From ff4fd9f6f0c9989d1ff851c6201928f2a3f18e70 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 26 Aug 2016 13:01:22 -0400 Subject: Bumping to 3.3.0 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 90775c8..e48aff4 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.2.0", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.0", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From ff752834ee292e05c67fee7e53a5e095afe0ce9f Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 2 Sep 2016 20:33:44 -0400 Subject: Bump to 3.3.1 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index e48aff4..2c9c66f 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.0", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.1", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From f0d1a8404c9488135a120e4640c76ff3ff1eda66 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 14 Oct 2016 19:12:43 -0400 Subject: Bump version to 3.3.2 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 2c9c66f..c36fddb 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.1", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.2", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 72dcbe1c1b5204e2e92b80a25cac6acf54254ec2 Mon Sep 17 00:00:00 2001 From: Artem Pervin Date: Tue, 29 Nov 2016 12:30:29 -0500 Subject: 1394: fixed handling of proxy username and password --- bootstrap | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index c36fddb..9190c6b 100755 --- a/bootstrap +++ b/bootstrap @@ -99,8 +99,9 @@ fetch({pkg, Name, Vsn}, App) -> {ok, Binary} -> {ok, Contents} = extract(Binary), ok = erl_tar:extract({binary, Contents}, [{cwd, Dir}, compressed]); - _ -> - io:format("Error: Unable to fetch package ~p ~p~n", [Name, Vsn]) + {error, {Reason, _}} -> + ReasonText = re:replace(atom_to_list(Reason), "_", " ", [global,{return,list}]), + io:format("Error: Unable to fetch package ~s ~s: ~s~n", [Name, Vsn, ReasonText]) end; true -> io:format("Dependency ~s already exists~n", [Name]) @@ -112,8 +113,10 @@ extract(Binary) -> {ok, Contents}. request(Url) -> + HttpOptions = [{relaxed, true} | get_proxy_auth()], + case httpc:request(get, {Url, []}, - [{relaxed, true}], + HttpOptions, [{body_format, binary}], rebar) of {ok, {{_Version, 200, _Reason}, _Headers, Body}} -> @@ -402,3 +405,23 @@ otp_release1(Rel) -> binary:bin_to_list(Vsn, {0, Size - 1}) end end. + +%% extracts username and password from HTTPS_PROXY and returns them as tuple +get_proxy_auth() -> + get_proxy_auth(get_http_vars(https_proxy)). + +get_proxy_auth([]) -> + []; +get_proxy_auth(HttpsProxy) -> + {ok, {_, UserInfo, _, _, _, _}} = http_uri:parse(HttpsProxy), + parse_user_info(UserInfo). + +parse_user_info([]) -> + []; +parse_user_info(UserInfo) -> + Idx = string:chr(UserInfo, $:), + Username = string:sub_string(UserInfo, 1, Idx-1), + Password = string:sub_string(UserInfo, Idx+1), + %% password may contain url encoded characters, need to decode them first + [{proxy_auth, {Username, http_uri:decode(Password)}}]. + -- cgit v1.1 From ffc2cf98d390a35cf3f61c7c0bf5f26e3552fd2c Mon Sep 17 00:00:00 2001 From: Artem Pervin Date: Wed, 30 Nov 2016 13:45:06 -0500 Subject: 1394: added fix for rebar_utils, moved setting of http_options into init_config, added unit tests --- bootstrap | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 9190c6b..c7f0e06 100755 --- a/bootstrap +++ b/bootstrap @@ -150,8 +150,9 @@ set_httpc_options(_, []) -> ok; set_httpc_options(Scheme, Proxy) -> - {ok, {_, _, Host, Port, _, _}} = http_uri:parse(Proxy), - httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar). + {ok, {_, UserInfo, Host, Port, _, _}} = http_uri:parse(Proxy), + httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar), + set_proxy_auth(UserInfo). compile(App, FirstFiles) -> Dir = filename:join(filename:absname("_build/default/lib/"), App), @@ -406,22 +407,18 @@ otp_release1(Rel) -> end end. -%% extracts username and password from HTTPS_PROXY and returns them as tuple -get_proxy_auth() -> - get_proxy_auth(get_http_vars(https_proxy)). - -get_proxy_auth([]) -> - []; -get_proxy_auth(HttpsProxy) -> - {ok, {_, UserInfo, _, _, _, _}} = http_uri:parse(HttpsProxy), - parse_user_info(UserInfo). - -parse_user_info([]) -> - []; -parse_user_info(UserInfo) -> +set_proxy_auth([]) -> + ok; +set_proxy_auth(UserInfo) -> Idx = string:chr(UserInfo, $:), Username = string:sub_string(UserInfo, 1, Idx-1), Password = string:sub_string(UserInfo, Idx+1), %% password may contain url encoded characters, need to decode them first - [{proxy_auth, {Username, http_uri:decode(Password)}}]. + put(proxy_auth, [{proxy_auth, {Username, http_uri:decode(Password)}}]). + +get_proxy_auth() -> + case get(proxy_auth) of + undefined -> []; + ProxyAuth -> ProxyAuth + end. -- cgit v1.1 From a58857162c3a17356a3d634ac28f0e15c3a1a6f9 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 8 Dec 2016 12:41:22 -0500 Subject: Bump to 3.3.3 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index c7f0e06..5359660 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.2", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.3", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From c21a5f7ab2309bedfd430e71ece576cbfaa93114 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 23 Dec 2016 15:27:08 -0500 Subject: Bumping to 3.3.4 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 5359660..8a0ebed 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.3", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.4", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 6fcf464d370a6d18d5c9c95bf21c9162b370b481 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 3 Feb 2017 16:11:06 -0500 Subject: Bump to 3.3.5 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 8a0ebed..8b9b001 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.4", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.5", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 81b6c0f6b689a17d6b5ea796b59610c7d669b561 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 24 Feb 2017 12:42:18 -0500 Subject: WIP windows escripts get cmd autogenerated --- bootstrap | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 8b9b001..b797b6e 100755 --- a/bootstrap +++ b/bootstrap @@ -52,21 +52,7 @@ main(_) -> rebar3:run(["escriptize"]), %% Done with compile, can turn back on error logger - error_logger:tty(true), - - %% Finally, update executable perms for our script on *nix, - %% or write out script files on win32. - ec_file:copy("_build/default/bin/rebar3", "./rebar3"), - case os:type() of - {unix,_} -> - [] = os:cmd("chmod u+x rebar3"), - ok; - {win32,_} -> - write_windows_scripts(), - ok; - _ -> - ok - end. + error_logger:tty(true). default_registry_file() -> {ok, [[Home]]} = init:get_argument(home), @@ -305,14 +291,6 @@ reset_env() -> application:unload(rebar), application:load(rebar). -write_windows_scripts() -> - CmdScript= - "@echo off\r\n" - "setlocal\r\n" - "set rebarscript=%~f0\r\n" - "escript.exe \"%rebarscript:.cmd=%\" %*\r\n", - ok = file:write_file("rebar3.cmd", CmdScript). - get_deps() -> case file:consult("rebar.lock") of {ok, [[]]} -> -- cgit v1.1 From 8142cd739999994e85632c407d272de3d23ba982 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 23 Mar 2017 07:14:36 -0400 Subject: Bump to 3.3.6 - [OSX tests added to CI](https://github.com/erlang/rebar3/pull/1471), joining linux and windows 10 - [upgrade relx to 3.22.3](https://github.com/erlang/rebar3/pull/1518), [fixing multiple issues](https://github.com/erlware/relx/releases/tag/v3.22.3) - [Fixing eunit errors in 19.3 when `init_per_*` isn't paired with `end_per_*`](https://github.com/erlang/rebar3/pull/1516) - [Allow single test spec in ct_opts](https://github.com/erlang/rebar3/pull/1506) - [Properly warn when missing inets at runtime](https://github.com/erlang/rebar3/pull/1505) - [rebar_utils:escape_chars handles quotes in paths](https://github.com/erlang/rebar3/pull/1504) - [Fix typo in help text for upgrade command](https://github.com/erlang/rebar3/pull/1503) - [change package version warnings to debug level](https://github.com/erlang/rebar3/pull/1502) - [Path-type sensitive .cmd creation for escripts](https://github.com/erlang/rebar3/pull/1500) - [Windows escripts get cmd autogenerated](https://github.com/erlang/rebar3/pull/1494) - [REBAR_CONFIG impacts config file for project root only](https://github.com/erlang/rebar3/pull/1497) - [Fix wildcard usage in rebar3 clean](https://github.com/erlang/rebar3/pull/1498) - [Bump cth_readable to 1.2.4](https://github.com/erlang/rebar3/pull/1496) (fixing some erroneous reports when suites get skipped) - [Add respect for src_dirs option in app_discover and app_info](https://github.com/erlang/rebar3/pull/1486) - [Add support for global plugin-defined templates](https://github.com/erlang/rebar3/pull/1473) - [catch badarg exception from eunit in `rebar_prv_eunit`](https://github.com/erlang/rebar3/pull/1472) --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index b797b6e..3a030ff 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.5", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.3.6", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 46651f030c6a9560061ff5d4f5f5bf5b747a2738 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 22 May 2017 10:17:09 -0400 Subject: Bump to 3.4.0 Patches: - Try to start epmd when distribution fails - Allow non-default profile deps upgrade - Switch default license in templates to Apache 2.0, and hook it up in the .app file - Fix git SHA comparisons for dep update - Let relx know about rebar-specified erl_opts - Use rm_rf instead of ec_file:delete, fixing some deps-related issues on Windows - Handle internal CT failures - Fix profile merging of erl_first_files options - Fix CT output in skipped test cases and failing end of function hooks - Officially drop R15 support, since its SSL libs can no longer talk to hex.pm - REBAR_COLOR supports all ec_cmd_log intensity options, allowing the none value to disable all colors without dropping termcap support - Bump relx to 3.22.4 The one new feature supported here is for the interactive shell: - Support commands in the shell such as r3:Command(), r3:Command("--args=as a string"), or r3:Command(Namespace, "--args=as a string"), instead of just r3:do(Command). --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 3a030ff..4cd0ab3 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.3.6", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.0", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 2312aa0228b5deeacbcee4969aee22cdbf7daba3 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 24 May 2017 14:01:52 -0400 Subject: Bump to 3.4.1 Includes Relx fixes Signed-off-by: Fred Hebert --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 4cd0ab3..1b2be71 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.0", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.1", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From b49987ca33ad8c1920635faa3128a85e2cdd80c1 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 14 Jul 2017 18:25:49 -0400 Subject: Bump to 3.4.2 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 1b2be71..279e249 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.1", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.2", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From cf6550daa6148b1bf3af3aec6ef2727f82ac1c16 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 31 Jul 2017 08:42:33 -0400 Subject: Upgrade certifi dependencies Get more up-to-date root certs. This was blocked for a while because certifi wouldn't build on windows, but this is now fixed, with minimal changes to the use case -- only a small change in the bootstrap script is required. The new certifi lib is also a few megabytes lighter than before, which is good for rebar3. --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 279e249..1bf1972 100755 --- a/bootstrap +++ b/bootstrap @@ -16,7 +16,7 @@ main(_) -> ,{getopt, []} ,{cf, []} ,{erlware_commons, ["ec_dictionary.erl", "ec_vsn.erl"]} - ,{certifi, []}], + ,{certifi, ["certifi_pt.erl"]}], Deps = get_deps(), [fetch_and_compile(Dep, Deps) || Dep <- BaseDeps], -- cgit v1.1 From 533a27731bd39243fca8775686f498494f2ae182 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 21 Aug 2017 17:24:37 -0400 Subject: Bump to 3.4.3 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 1bf1972..7c56bab 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.2", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.3", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 7960778403aef10a57d5748e51ff5205f5a3eebb Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sun, 10 Sep 2017 21:47:38 -0400 Subject: Back to git-based versioning --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 7c56bab..80f318b 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.3", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.4", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 2d5cd9c00cfa4e58066b48beee4057fdd52cc7be Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 1 Nov 2017 19:38:03 -0400 Subject: OTP-21 readiness, Full Unicode support This replaces all deprecated function usage by alternative ones based on a version switch enacted at compile time, preventing all warnings. This will likely introduce some possible runtime errors in using a Rebar3 compiled on OTP-20 or OTP-21 back in versions 19 and earlier, but we can't really work around that. A bunch of dependencies have been updated to support OTP-21 without warnings as well. --- bootstrap | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 80f318b..e9bd7f1 100755 --- a/bootstrap +++ b/bootstrap @@ -80,7 +80,7 @@ fetch({pkg, Name, Vsn}, App) -> false -> CDN = "https://repo.hex.pm/tarballs", Package = binary_to_list(<>), - Url = string:join([CDN, Package], "/"), + Url = join([CDN, Package], "/"), case request(Url) of {ok, Binary} -> {ok, Contents} = extract(Binary), @@ -210,7 +210,7 @@ cp_r(Sources, Dest) -> case os:type() of {unix, _} -> EscSources = [escape_path(Src) || Src <- Sources], - SourceStr = string:join(EscSources, " "), + SourceStr = join(EscSources, " "), os:cmd(?FMT("cp -R ~s \"~s\"", [SourceStr, Dest])), ok; {win32, _} -> @@ -336,7 +336,11 @@ format_error(AbsSource, Extra, {Mod, Desc}) -> io_lib:format("~s: ~s~s~n", [AbsSource, Extra, ErrorDesc]). additional_defines() -> - [{d, D} || {Re, D} <- [{"^[0-9]+", namespaced_types}, {"^R1[4|5]", deprecated_crypto}, {"^((1[8|9])|2)", rand_module}], is_otp_release(Re)]. + [{d, D} || {Re, D} <- [{"^[0-9]+", namespaced_types}, + {"^R1[4|5]", deprecated_crypto}, + {"^2", unicode_str}, + {"^((1[8|9])|2)", rand_module}], + is_otp_release(Re)]. is_otp_release(ArchRegex) -> case re:run(otp_release(), ArchRegex, [{capture, none}]) of @@ -388,9 +392,8 @@ otp_release1(Rel) -> set_proxy_auth([]) -> ok; set_proxy_auth(UserInfo) -> - Idx = string:chr(UserInfo, $:), - Username = string:sub_string(UserInfo, 1, Idx-1), - Password = string:sub_string(UserInfo, Idx+1), + [Username, Password] = re:split(UserInfo, ":", + [{return, list}, {parts,2}, unicode]), %% password may contain url encoded characters, need to decode them first put(proxy_auth, [{proxy_auth, {Username, http_uri:decode(Password)}}]). @@ -400,3 +403,12 @@ get_proxy_auth() -> ProxyAuth -> ProxyAuth end. +%% string:join/2 copy; string:join/2 is getting obsoleted +%% and replaced by lists:join/2, but lists:join/2 is too new +%% for version support (only appeared in 19.0) so it cannot be +%% used. Instead we just adopt join/2 locally and hope it works +%% for most unicode use cases anyway. +join([], Sep) when is_list(Sep) -> + []; +join([H|T], Sep) -> + H ++ lists:append([Sep ++ X || X <- T]). -- cgit v1.1 From 6c9b3e361d33cb2f6f54108bdb71ea3cfa40fa12 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 17 Nov 2017 12:02:18 -0500 Subject: Bump to 3.4.5 - OTP-21 readiness, Full Unicode support, massive dep upgrade - fixed handling of proxy username and password when fetching registry - git versions from tag made consistent and all strip 'v' prefix - Prevent hard crash on duplicate plugin paths - Fix include paths in profile multiapp edge case - Fix unlock state carry, which broke do sequences with unlock in them. - Avoid guessing on utf8 decoding of app files - Various fixes related to .app files - Warn user when an unsupported local git or hg resource is used - Corrects a fix to src_dir values - Update eunit_formatters to latest version - Changes in wording of warnings for more accuracy --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index e9bd7f1..02eb28a 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.4", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.5", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 9e4cd942d0ae70d3541ea542df0cad0595874eb1 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 17 Nov 2017 17:21:41 -0500 Subject: Bump to 3.4.6 Updates relx (windows fixes) and erlware commons (strings) --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 02eb28a..bd9535b 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.5", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.6", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 81a5711b6db4dedb1d151d39464f326be80e2285 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 22 Nov 2017 14:55:21 -0500 Subject: Bump to 3.4.7 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index bd9535b..431faad 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.6", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.4.7", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 553cee679f1dbe5badaff5ba9c2b98ef953c047e Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 8 Dec 2017 07:47:44 -0500 Subject: Update bootstrap script // fix windows issues The bootstrap script has been mostly unchanged for a long period of time, and has not benefited from all the changes and improvements that rebar3 itself had, including (but not limited to) path escaping, handling of directories on windows, and edge case management when it comes to file and symlink handling. This patch brings the updates seen in rebar_string_utils, rebar_utils, and rebar_dir into the bootstrap script so that fewer people have build issues when starting from source, from scratch. --- bootstrap | 293 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 265 insertions(+), 28 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 431faad..92933b6 100755 --- a/bootstrap +++ b/bootstrap @@ -179,6 +179,8 @@ bootstrap_rebar3() -> -define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))). %%/rebar.hrl %%rebar_file_utils +-include_lib("kernel/include/file.hrl"). + symlink_or_copy(Source, Target) -> Link = case os:type() of {win32, _} -> @@ -190,55 +192,63 @@ symlink_or_copy(Source, Target) -> ok -> ok; {error, eexist} -> - ok; + exists; {error, _} -> - cp_r([Source], Target) + case os:type() of + {win32, _} -> + S = unicode:characters_to_list(Source), + T = unicode:characters_to_list(Target), + case filelib:is_dir(S) of + true -> + win32_symlink_or_copy(S, T); + false -> + cp_r([S], T) + end; + _ -> + case filelib:is_dir(Target) of + true -> + ok; + false -> + cp_r([Source], Target) + end + end end. -make_relative_path(Source, Target) -> - do_make_relative_path(filename:split(Source), filename:split(Target)). - -do_make_relative_path([H|T1], [H|T2]) -> - do_make_relative_path(T1, T2); -do_make_relative_path(Source, Target) -> - Base = lists:duplicate(max(length(Target) - 1, 0), ".."), - filename:join(Base ++ Source). - +-spec cp_r(list(string()), file:filename()) -> 'ok'. cp_r([], _Dest) -> ok; cp_r(Sources, Dest) -> case os:type() of {unix, _} -> - EscSources = [escape_path(Src) || Src <- Sources], + EscSources = [escape_chars(Src) || Src <- Sources], SourceStr = join(EscSources, " "), - os:cmd(?FMT("cp -R ~s \"~s\"", [SourceStr, Dest])), + {ok, []} = sh(?FMT("cp -Rp ~ts \"~ts\"", + [SourceStr, escape_double_quotes(Dest)]), + [{use_stdout, false}, abort_on_error]), ok; {win32, _} -> lists:foreach(fun(Src) -> ok = cp_r_win32(Src,Dest) end, Sources), ok end. -xcopy_win32(Source,Dest)-> - R = os:cmd(?FMT("xcopy \"~s\" \"~s\" /q /y /e 2> nul", - [filename:nativename(Source), filename:nativename(Dest)])), - case length(R) > 0 of - %% when xcopy fails, stdout is empty and and error message is printed - %% to stderr (which is redirected to nul) +%% @private Compatibility function for windows +win32_symlink_or_copy(Source, Target) -> + Res = sh(?FMT("cmd /c mklink /j \"~ts\" \"~ts\"", + [escape_double_quotes(filename:nativename(Target)), + escape_double_quotes(filename:nativename(Source))]), + [{use_stdout, false}, return_on_error]), + case win32_mklink_ok(Res, Target) of true -> ok; - false -> - {error, lists:flatten( - io_lib:format("Failed to xcopy from ~s to ~s~n", - [Source, Dest]))} + false -> cp_r_win32(Source, drop_last_dir_from_path(Target)) end. cp_r_win32({true, SourceDir}, {true, DestDir}) -> %% from directory to directory - SourceBase = filename:basename(SourceDir), - ok = case file:make_dir(filename:join(DestDir, SourceBase)) of + ok = case file:make_dir(DestDir) of {error, eexist} -> ok; Other -> Other end, - ok = xcopy_win32(SourceDir, filename:join(DestDir, SourceBase)); + ok = xcopy_win32(SourceDir, DestDir); cp_r_win32({false, Source} = S,{true, DestDir}) -> %% from file to directory cp_r_win32(S, {false, filename:join(DestDir, filename:basename(Source))}); @@ -272,10 +282,231 @@ cp_r_win32(Source,Dest) -> end, filelib:wildcard(Source)), ok. -escape_path(Str) -> - re:replace(Str, "([ ()?])", "\\\\&", [global, {return, list}]). +%% drops the last 'node' of the filename, presumably the last dir such as 'src' +%% this is because cp_r_win32/2 automatically adds the dir name, to appease +%% robocopy and be more uniform with POSIX +drop_last_dir_from_path([]) -> + []; +drop_last_dir_from_path(Path) -> + case lists:droplast(filename:split(Path)) of + [] -> []; + Dirs -> filename:join(Dirs) + end. + +%% @private specifically pattern match against the output +%% of the windows 'mklink' shell call; different values from +%% what win32_ok/1 handles +win32_mklink_ok({ok, _}, _) -> + true; +win32_mklink_ok({error,{1,"Local NTFS volumes are required to complete the operation.\n"}}, _) -> + false; +win32_mklink_ok({error,{1,"Cannot create a file when that file already exists.\n"}}, Target) -> + % File or dir is already in place; find if it is already a symlink (true) or + % if it is a directory (copy-required; false) + is_symlink(Target); +win32_mklink_ok(_, _) -> + false. + +xcopy_win32(Source,Dest)-> + %% "xcopy \"~ts\" \"~ts\" /q /y /e 2> nul", Changed to robocopy to + %% handle long names. May have issues with older windows. + Cmd = case filelib:is_dir(Source) of + true -> + %% For robocopy, copying /a/b/c/ to /d/e/f/ recursively does not + %% create /d/e/f/c/*, but rather copies all files to /d/e/f/*. + %% The usage we make here expects the former, not the later, so we + %% must manually add the last fragment of a directory to the `Dest` + %% in order to properly replicate POSIX platforms + NewDest = filename:join([Dest, filename:basename(Source)]), + ?FMT("robocopy \"~ts\" \"~ts\" /e 1> nul", + [escape_double_quotes(filename:nativename(Source)), + escape_double_quotes(filename:nativename(NewDest))]); + false -> + ?FMT("robocopy \"~ts\" \"~ts\" \"~ts\" /e 1> nul", + [escape_double_quotes(filename:nativename(filename:dirname(Source))), + escape_double_quotes(filename:nativename(Dest)), + escape_double_quotes(filename:basename(Source))]) + end, + Res = sh(Cmd, [{use_stdout, false}, return_on_error]), + case win32_ok(Res) of + true -> ok; + false -> + {error, lists:flatten( + io_lib:format("Failed to copy ~ts to ~ts~n", + [Source, Dest]))} + end. + +is_symlink(Filename) -> + {ok, Info} = file:read_link_info(Filename), + Info#file_info.type == symlink. + +win32_ok({ok, _}) -> true; +win32_ok({error, {Rc, _}}) when Rc<9; Rc=:=16 -> true; +win32_ok(_) -> false. + %%/rebar_file_utils +%%rebar_utils + +%% escape\ as\ a\ shell\? +escape_chars(Str) when is_atom(Str) -> + escape_chars(atom_to_list(Str)); +escape_chars(Str) -> + re:replace(Str, "([ ()?`!$&;\"\'])", "\\\\&", + [global, {return, list}, unicode]). + +%% "escape inside these" +escape_double_quotes(Str) -> + re:replace(Str, "([\"\\\\`!$&*;])", "\\\\&", + [global, {return, list}, unicode]). + +sh(Command0, Options0) -> + DefaultOptions = [{use_stdout, false}], + Options = [expand_sh_flag(V) + || V <- proplists:compact(Options0 ++ DefaultOptions)], + + ErrorHandler = proplists:get_value(error_handler, Options), + OutputHandler = proplists:get_value(output_handler, Options), + + Command = lists:flatten(patch_on_windows(Command0, proplists:get_value(env, Options, []))), + PortSettings = proplists:get_all_values(port_settings, Options) ++ + [exit_status, {line, 16384}, use_stdio, stderr_to_stdout, hide, eof], + Port = open_port({spawn, Command}, PortSettings), + + try + case sh_loop(Port, OutputHandler, []) of + {ok, _Output} = Ok -> + Ok; + {error, {_Rc, _Output}=Err} -> + ErrorHandler(Command, Err) + end + after + port_close(Port) + end. + +sh_loop(Port, Fun, Acc) -> + receive + {Port, {data, {eol, Line}}} -> + sh_loop(Port, Fun, Fun(Line ++ "\n", Acc)); + {Port, {data, {noeol, Line}}} -> + sh_loop(Port, Fun, Fun(Line, Acc)); + {Port, eof} -> + Data = lists:flatten(lists:reverse(Acc)), + receive + {Port, {exit_status, 0}} -> + {ok, Data}; + {Port, {exit_status, Rc}} -> + {error, {Rc, Data}} + end + end. + +expand_sh_flag(return_on_error) -> + {error_handler, + fun(_Command, Err) -> + {error, Err} + end}; +expand_sh_flag(abort_on_error) -> + {error_handler, + fun log_and_abort/2}; +expand_sh_flag({use_stdout, false}) -> + {output_handler, + fun(Line, Acc) -> + [Line | Acc] + end}; +expand_sh_flag({cd, _CdArg} = Cd) -> + {port_settings, Cd}; +expand_sh_flag({env, _EnvArg} = Env) -> + {port_settings, Env}. + +%% We do the shell variable substitution ourselves on Windows and hope that the +%% command doesn't use any other shell magic. +patch_on_windows(Cmd, Env) -> + case os:type() of + {win32,nt} -> + Cmd1 = "cmd /q /c " + ++ lists:foldl(fun({Key, Value}, Acc) -> + expand_env_variable(Acc, Key, Value) + end, Cmd, Env), + %% Remove left-over vars + re:replace(Cmd1, "\\\$\\w+|\\\${\\w+}", "", + [global, {return, list}, unicode]); + _ -> + Cmd + end. + +%% @doc Given env. variable `FOO' we want to expand all references to +%% it in `InStr'. References can have two forms: `$FOO' and `${FOO}' +%% The end of form `$FOO' is delimited with whitespace or EOL +-spec expand_env_variable(string(), string(), term()) -> string(). +expand_env_variable(InStr, VarName, RawVarValue) -> + case chr(InStr, $$) of + 0 -> + %% No variables to expand + InStr; + _ -> + ReOpts = [global, unicode, {return, list}], + VarValue = re:replace(RawVarValue, "\\\\", "\\\\\\\\", ReOpts), + %% Use a regex to match/replace: + %% Given variable "FOO": match $FOO\s | $FOOeol | ${FOO} + RegEx = io_lib:format("\\\$(~ts(\\W|$)|{~ts})", [VarName, VarName]), + re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts) + end. + +-spec log_and_abort(string(), {integer(), string()}) -> no_return(). +log_and_abort(Command, {Rc, Output}) -> + io:format("sh(~ts)~n" + "failed with return code ~w and the following output:~n" + "~ts", [Command, Rc, Output]), + throw(bootstrap_abort). + +%%/rebar_utils + +%%rebar_dir +make_relative_path(Source, Target) -> + AbsSource = make_normalized_path(Source), + AbsTarget = make_normalized_path(Target), + do_make_relative_path(filename:split(AbsSource), filename:split(AbsTarget)). + +%% @private based on fragments of paths, replace the number of common +%% segments by `../' bits, and add the rest of the source alone after it +-spec do_make_relative_path([string()], [string()]) -> file:filename(). +do_make_relative_path([H|T1], [H|T2]) -> + do_make_relative_path(T1, T2); +do_make_relative_path(Source, Target) -> + Base = lists:duplicate(max(length(Target) - 1, 0), ".."), + filename:join(Base ++ Source). + +make_normalized_path(Path) -> + AbsPath = make_absolute_path(Path), + Components = filename:split(AbsPath), + make_normalized_path(Components, []). + +make_absolute_path(Path) -> + case filename:pathtype(Path) of + absolute -> + Path; + relative -> + {ok, Dir} = file:get_cwd(), + filename:join([Dir, Path]); + volumerelative -> + Volume = hd(filename:split(Path)), + {ok, Dir} = file:get_cwd(Volume), + filename:join([Dir, Path]) + end. + +-spec make_normalized_path([string()], [string()]) -> file:filename(). +make_normalized_path([], NormalizedPath) -> + filename:join(lists:reverse(NormalizedPath)); +make_normalized_path([H|T], NormalizedPath) -> + case H of + "." when NormalizedPath == [], T == [] -> make_normalized_path(T, ["."]); + "." -> make_normalized_path(T, NormalizedPath); + ".." when NormalizedPath == [] -> make_normalized_path(T, [".."]); + ".." when hd(NormalizedPath) =/= ".." -> make_normalized_path(T, tl(NormalizedPath)); + _ -> make_normalized_path(T, [H|NormalizedPath]) + end. +%%/rebar_dir + setup_env() -> %% We don't need or want relx providers loaded yet application:load(rebar), @@ -412,3 +643,9 @@ join([], Sep) when is_list(Sep) -> []; join([H|T], Sep) -> H ++ lists:append([Sep ++ X || X <- T]). + +%% Same for chr; no non-deprecated equivalent in OTP20+ +chr(S, C) when is_integer(C) -> chr(S, C, 1). +chr([C|_Cs], C, I) -> I; +chr([_|Cs], C, I) -> chr(Cs, C, I+1); +chr([], _C, _I) -> 0. \ No newline at end of file -- cgit v1.1 From 718291e5169e08ac901f1109622e76381f7a0ccd Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 13 Dec 2017 23:51:46 -0500 Subject: Fix repeated bootstrap runs Updating the bootstrap script in #1689 made it so symlinks that already exist return `exist` rather than ok, in line with the regular code. However the bootstrap module wouldn't handle this case. This fixes the problem by ensuring that `exists` is as valid as `ok`. --- bootstrap | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 92933b6..a765ba1 100755 --- a/bootstrap +++ b/bootstrap @@ -168,8 +168,9 @@ compile_file(File, Opts) -> bootstrap_rebar3() -> filelib:ensure_dir("_build/default/lib/rebar/ebin/dummy.beam"), code:add_path("_build/default/lib/rebar/ebin/"), - ok = symlink_or_copy(filename:absname("src"), - filename:absname("_build/default/lib/rebar/src")), + Res = symlink_or_copy(filename:absname("src"), + filename:absname("_build/default/lib/rebar/src")), + true = Res == ok orelse Res == exists, Sources = ["src/rebar_resource.erl" | filelib:wildcard("src/*.erl")], [compile_file(X, [{outdir, "_build/default/lib/rebar/ebin/"} ,return | additional_defines()]) || X <- Sources], @@ -648,4 +649,4 @@ join([H|T], Sep) -> chr(S, C) when is_integer(C) -> chr(S, C, 1). chr([C|_Cs], C, I) -> I; chr([_|Cs], C, I) -> chr(Cs, C, I+1); -chr([], _C, _I) -> 0. \ No newline at end of file +chr([], _C, _I) -> 0. -- cgit v1.1 From e569a2c1b7af599f0d0c0bab873e9a128bebce45 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 22 Dec 2017 15:37:13 -0500 Subject: Bump to 3.5.0 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index a765ba1..bacde32 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.4.7", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.5.0", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 497bc3b8de1d2952e5bed8d958d0d10e64ff77d0 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sat, 14 Apr 2018 17:12:08 -0400 Subject: Make rebar3 work with dialyzer internally We got funny interactions since PR #1656: - the last `debug_info`-related option seen in a list of options after profile merge is kept, allowing later profiles from overtaking earlier ones - if you go `rebar3 as a,b,c compile`, the options from profile A come before B, which come before C, so C's options win - overrides are applied in order of profile as well, giving a priority to a later profile than an earlier one - The values in overrides are prepended rather than suffixed to the existing list - this means if we have to overrides adding options, such as `default` adding `no_debug_info', and `dialyze` adding `debug_info`, the results are `[debug_info]` as `dialyze` is applied first, and then `[no_debug_info, debug_info]` as `default` overrides are applied - the final result is `no_debug_info` always winning when erl_opts are overriden specifically. only `debug_info` options are going to suffer this, and in the context of overrides. Other `erl_opts` should be fine. I'm not sure how that can be fixed at all. In the meanwhile, we can add support back while leaving the default to not having debug information. This is done by: - moving all `no_debug_info` options to the `prod` profile - forcing `prod` to be called by `./bootstrap` so that most people keep getting no debug info - anyone calling `rebar3 clean -a` and then rebuilding with `rebar3 escriptize` (i.e. rebar3 devs) get debug info going This is up for review and discussion. --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index bacde32..9675e1d 100755 --- a/bootstrap +++ b/bootstrap @@ -49,7 +49,7 @@ main(_) -> code:add_pathsa(DepsPaths), rebar3:run(["clean", "-a"]), - rebar3:run(["escriptize"]), + rebar3:run(["as", "prod", "escriptize"]), %% Done with compile, can turn back on error logger error_logger:tty(true). -- cgit v1.1 From 5f9b4293bc029e2132d7c442cb5b4480915ea0e4 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 3 May 2018 07:12:11 -0400 Subject: Work around OTP-21 deprecation of get_stacktrace() Based off a macro by @okeuday at https://github.com/erlang/otp/pull/1783 --- bootstrap | 1 + 1 file changed, 1 insertion(+) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 9675e1d..5899e9b 100755 --- a/bootstrap +++ b/bootstrap @@ -571,6 +571,7 @@ additional_defines() -> [{d, D} || {Re, D} <- [{"^[0-9]+", namespaced_types}, {"^R1[4|5]", deprecated_crypto}, {"^2", unicode_str}, + {"^(R|1|20)", fun_stacktrace}, {"^((1[8|9])|2)", rand_module}], is_otp_release(Re)]. -- cgit v1.1 From e4cffdb323f500d3016fa92ea80cefaff85dab76 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 3 May 2018 18:17:12 -0400 Subject: bump to 3.5.1 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 5899e9b..a2b5f8d 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.5.0", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.5.1", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From dcf717ac2ef4fe2a27d1dd5fb036668a20e31b26 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 3 May 2018 19:35:24 -0400 Subject: Bump to 3.5.2 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index a2b5f8d..9075aab 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.5.1", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.5.2", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 33eb505573170ff8bf77d6b4758c88a75bf772d8 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 9 May 2018 21:52:37 -0400 Subject: bump to 3.5.3 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 9075aab..57940b1 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.5.2", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.5.3", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From e195e82442f74a623d13445468888bbda51b6a73 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Tue, 12 Jun 2018 19:23:02 -0600 Subject: upgrade certifi to 2.3.1 --- bootstrap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 57940b1..91a0bc4 100755 --- a/bootstrap +++ b/bootstrap @@ -16,7 +16,10 @@ main(_) -> ,{getopt, []} ,{cf, []} ,{erlware_commons, ["ec_dictionary.erl", "ec_vsn.erl"]} - ,{certifi, ["certifi_pt.erl"]}], + ,{parse_trans, ["parse_trans.erl", + "parse_trans_pp.erl", + "parse_trans_codegen.erl"]} + ,{certifi, []}], Deps = get_deps(), [fetch_and_compile(Dep, Deps) || Dep <- BaseDeps], -- cgit v1.1 From 56979aac96bb557e58fd10de3be7c3409b0ca0c6 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Tue, 19 Jun 2018 12:07:44 -0600 Subject: Revert "upgrade certifi to 2.3.1" --- bootstrap | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 91a0bc4..57940b1 100755 --- a/bootstrap +++ b/bootstrap @@ -16,10 +16,7 @@ main(_) -> ,{getopt, []} ,{cf, []} ,{erlware_commons, ["ec_dictionary.erl", "ec_vsn.erl"]} - ,{parse_trans, ["parse_trans.erl", - "parse_trans_pp.erl", - "parse_trans_codegen.erl"]} - ,{certifi, []}], + ,{certifi, ["certifi_pt.erl"]}], Deps = get_deps(), [fetch_and_compile(Dep, Deps) || Dep <- BaseDeps], -- cgit v1.1 From 38865da7ba01e7d5e60316e970f01959e85759ee Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Tue, 19 Jun 2018 16:38:56 -0400 Subject: Bump to 3.6.0 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 57940b1..c4d0abf 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.5.3", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.6.0", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 9ec901e47bc1259204896e4a102f23eca2c22953 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 25 Jun 2018 16:50:40 -0400 Subject: Bump to 3.6.1 -- fixing eperm issues --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index c4d0abf..5dedd71 100755 --- a/bootstrap +++ b/bootstrap @@ -24,7 +24,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.6.0", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.6.1", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 34a182dcf04b28f07f77f4c730c2568006356a0a Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 2 Aug 2018 19:39:09 -0400 Subject: Bump certifi Includes an update to parse_trans on an OTP-21 friendly version --- bootstrap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 5dedd71..dfce964 100755 --- a/bootstrap +++ b/bootstrap @@ -16,7 +16,9 @@ main(_) -> ,{getopt, []} ,{cf, []} ,{erlware_commons, ["ec_dictionary.erl", "ec_vsn.erl"]} - ,{certifi, ["certifi_pt.erl"]}], + ,{parse_trans, ["parse_trans.erl", "parse_trans_pp.erl", + "parse_trans_codegen.erl"]} + ,{certifi, []}], Deps = get_deps(), [fetch_and_compile(Dep, Deps) || Dep <- BaseDeps], -- cgit v1.1 From 4ec1d288c0b90ce92dffc687bb6287fcf5a2776d Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 13 Sep 2018 18:15:46 -0400 Subject: Bump to 3.6.2 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index dfce964..5c2f468 100755 --- a/bootstrap +++ b/bootstrap @@ -26,7 +26,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.6.1", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.6.2", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 56b7d88975aa8da6446857cfd92de0825024bf63 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Thu, 13 Sep 2018 19:36:00 -0600 Subject: support for hex v2, multiple repository fetching, private organizations (#1884) * update to hex_core for hex-v2 repo support (#1865) * update to hex_core for hex-v2 repo support This patch adds only single repo hex-v2 support through hex_core. Packages no longer filtered out by buildtool metadata and the package index is updated per-package instead of fetched as one large ets dump. * tell travis to also build hex_core branch * support list of repos for hex packages (#1866) * support list of repos for hex packages repos are defined under the hex key in rebar configs. They can be defined at the top level of a project or globally, but not in profiles and the repos configured in dependencies are also ignored. Searching for packages involves first checking for a match in the local repo index cache, in the order repos are defined. If not found each repo is checked through the hex api for any known versions of the package and the first repo with a version that fits the constraint is used. * add {repos, replace, []} for overriding the global & default repos * add hex auth handling for repos (#1874) auth token are kept in a hex.config file that is modified by the rebar3 hex plugin. Repo names that have a : separating a parent and child are considered organizations. The parent repo's auth will be included with the child. So an organization named hexpm:rebar3_test will include any hexpm auth tokens found in the rebar3_test organization's configuration. * move packages to top level of of hexpm cache dir (#1876) * move packages to top level of of hexpm cache dir * append organization name to parent's repo_url when parsing repos * only eval config scripts and apply overrides once per app (#1879) * only eval config scripts and apply overrides once per app * move new resource behaviour to rebar_resource_v2 and keep v1 * cleanup use of rebar_resource module and unused functions * cleanup error messages and unused code * when discovering apps support mix packages as unbuilt apps (#1882) * use hex_core tarball unpacking support in pkg resource (#1883) * use hex_core tarball unpacking support in pkg resource * ignore etag if package doesn't exist and delete if checksum fails * add back tests for bad package checksums * improve bad registry checksum error message --- bootstrap | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 5c2f468..6be617e 100755 --- a/bootstrap +++ b/bootstrap @@ -18,7 +18,8 @@ main(_) -> ,{erlware_commons, ["ec_dictionary.erl", "ec_vsn.erl"]} ,{parse_trans, ["parse_trans.erl", "parse_trans_pp.erl", "parse_trans_codegen.erl"]} - ,{certifi, []}], + ,{certifi, []} + ,{hex_core, []}], Deps = get_deps(), [fetch_and_compile(Dep, Deps) || Dep <- BaseDeps], @@ -35,14 +36,6 @@ main(_) -> setup_env(), os:putenv("REBAR_PROFILE", "bootstrap"), - RegistryFile = default_registry_file(), - case filelib:is_file(RegistryFile) of - true -> - ok; - false -> - rebar3:run(["update"]) - end, - {ok, State} = rebar3:run(["compile"]), reset_env(), os:putenv("REBAR_PROFILE", ""), @@ -56,11 +49,6 @@ main(_) -> %% Done with compile, can turn back on error logger error_logger:tty(true). -default_registry_file() -> - {ok, [[Home]]} = init:get_argument(home), - CacheDir = filename:join([Home, ".cache", "rebar3"]), - filename:join([CacheDir, "hex", "default", "registry"]). - fetch_and_compile({Name, ErlFirstFiles}, Deps) -> case lists:keyfind(Name, 1, Deps) of {Name, Vsn} -> @@ -173,7 +161,7 @@ bootstrap_rebar3() -> Res = symlink_or_copy(filename:absname("src"), filename:absname("_build/default/lib/rebar/src")), true = Res == ok orelse Res == exists, - Sources = ["src/rebar_resource.erl" | filelib:wildcard("src/*.erl")], + Sources = ["src/rebar_resource_v2.erl", "src/rebar_resource.erl" | filelib:wildcard("src/*.erl")], [compile_file(X, [{outdir, "_build/default/lib/rebar/ebin/"} ,return | additional_defines()]) || X <- Sources], code:add_patha(filename:absname("_build/default/lib/rebar/ebin")). -- cgit v1.1 From 5889a6e32bf09e5c50b49be330229bd157b5fae9 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Thu, 13 Sep 2018 20:13:59 -0600 Subject: Bump to 3.7.0-rc1 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 6be617e..ea0aaaf 100755 --- a/bootstrap +++ b/bootstrap @@ -27,7 +27,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.6.2", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.7.0-rc1", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 78ef63b03350fb6def07cc2fe0d88c23c9fe619c Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 23 Nov 2018 12:59:33 -0500 Subject: Bump to 3.7.0 Signed-off-by: Fred Hebert --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index ea0aaaf..66164b0 100755 --- a/bootstrap +++ b/bootstrap @@ -27,7 +27,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.7.0-rc1", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.7.0", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 153371ce7c679e6ddf5a61b0b85665d36cb35101 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 23 Nov 2018 20:00:26 -0500 Subject: bump to 3.7.2 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 66164b0..79e5a24 100755 --- a/bootstrap +++ b/bootstrap @@ -27,7 +27,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.7.0", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.7.2", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 0192c7439c0938b529f9230f53bd4122d68c1e8b Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sat, 24 Nov 2018 11:34:28 -0500 Subject: Bump to 3.7.3 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 79e5a24..d7b61c5 100755 --- a/bootstrap +++ b/bootstrap @@ -27,7 +27,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.7.2", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.7.3", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From 0907ccea9a235432118946e51e874e84b7e9a25d Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 24 Nov 2018 15:22:32 -0700 Subject: version bump 3.7.4 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index d7b61c5..8bb8b10 100755 --- a/bootstrap +++ b/bootstrap @@ -27,7 +27,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.7.3", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.7.4", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1 From b562a893f8967cf8102d1ded8d3d23a66ff1116a Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Tue, 27 Nov 2018 18:21:06 -0500 Subject: Bump to 3.7.5 --- bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 8bb8b10..ebbf35b 100755 --- a/bootstrap +++ b/bootstrap @@ -27,7 +27,7 @@ main(_) -> bootstrap_rebar3(), %% Build rebar.app from rebar.app.src - {ok, App} = rebar_app_info:new(rebar, "3.7.4", filename:absname("_build/default/lib/rebar/")), + {ok, App} = rebar_app_info:new(rebar, "3.7.5", filename:absname("_build/default/lib/rebar/")), rebar_otp_app:compile(rebar_state:new(), App), %% Because we are compiling files that are loaded already we want to silence -- cgit v1.1