Compare commits

...

4 Commits

Author SHA1 Message Date
Sam Kottler 5c388f50e5 Add more bootstrap conditionals for bundled libs 2014-03-08 21:56:31 +06:00
Sam Kottler 750cafe2b6 Set the release to 0.1 so rawhide and epel7 releases will match when bootstrap mode is disabled and enable bootstrap 2014-03-08 15:02:23 +06:00
Sam Kottler 824bdb90ce Merge branch 'master' into epel7
* master:
  Bump the release for the bootstrap mode change
  Add bootstrap mode and add necessary conditionals for building rebar with a self-hosted rebar
2014-03-08 14:58:13 +06:00
Sam Kottler b1366d5170 Add bootstrap mode and add necessary conditionals for building rebar with a self-hosted rebar
Rebar is built with rebar, which makes getting the initial bootstrap
completed rather interesting. Additionally, erlang-rebar requires
erlang-getopt, but erlang-rebar can't be built without erlang-getopt
already available in the repo mock is using because of the patch which
removes the vendored version. This commit adds a variable which uses the
bundled getopt in order to bootstrap.
2014-03-08 14:57:57 +06:00
1 changed files with 17 additions and 6 deletions

View File

@ -7,14 +7,14 @@
# Set this to true when starting a rebuild of the whole erlang stack. There's
# a cyclical dependency between erlang-rebar and erlang-getopt so this package
# (rebar) needs to get built first in bootstrap mode.
%global need_bootstrap_set 0
%global need_bootstrap_set 1
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
Name: erlang-%{realname}
Version: 2.1.0
Release: 0.7%{?dist}
Release: 0.2%{?dist}
Summary: Erlang Build Tools
Group: Development/Tools
License: MIT
@ -22,14 +22,15 @@ URL: https://github.com/rebar/rebar
# wget --content-disposition https://github.com/basho/rebar/tarball/ebb474b
Source0: %{upstream}-%{realname}-%{version}-pre-%{patchnumber}-g%{git_tag}.tar.gz
Source1: rebar.escript
# The bundled getopt is necessary to do the initial bootstrap since
# erlang-getopt requires erlang-rebar to build and vice versa.
%if 0%{?need_bootstrap} < 1
# Fedora/EPEL-specific
Patch1: rebar-0001-Don-t-load-templates-from-the-bundle.patch
# Fedora/EPEL-specific
Patch2: rebar-0002-Remove-bundled-mustache.patch
# The bundled getopt is necessary to do the initial bootstrap since
# erlang-getopt requires erlang-rebar to build and vice versa.
%if 0%{?need_bootstrap} < 1
# Fedora/EPEL-specific
Patch3: rebar-0003-Remove-bundled-getopt.patch
%endif
@ -63,7 +64,9 @@ Requires: erlang-crypto%{?_isa}
# FIXME does it still needed?
Requires: erlang-dialyzer%{?_isa}
Requires: erlang-edoc%{?_isa}
%if 1%{?need_bootstrap} < 1
Requires: erlang-erlydtl%{?_isa}
%endif
Requires: erlang-erts%{?_isa}
# Requires for port compiling - no direct references in Rebar's src/*.erl files
Requires: erlang-erl_interface%{?_isa}
@ -71,13 +74,21 @@ Requires: erlang-erl_interface%{?_isa}
# eunit_test:function_wrapper/2. This function was removed in R16, and rebar
# contains a workaround for that. So no need to worry about that.
Requires: erlang-eunit%{?_isa}
%if 1%{?need_bootstrap} < 1
Requires: erlang-getopt%{?_isa}
%endif
Requires: erlang-kernel%{?_isa}
%if 1%{?need_bootstrap} < 1
Requires: erlang-lfe%{?_isa}
%endif
%if 1%{?need_bootstrap} < 1
Requires: erlang-mustache%{?_isa}
Requires: erlang-neotoma%{?_isa}
%endif
Requires: erlang-parsetools%{?_isa}
%if 1%{?need_bootstrap} < 1
Requires: erlang-protobuffs%{?_isa}
%endif
Requires: erlang-reltool%{?_isa}
Requires: erlang-sasl%{?_isa}
Requires: erlang-snmp%{?_isa}
@ -93,9 +104,9 @@ Erlang Build Tools.
%prep
%setup -q -n %{upstream}-%{realname}-%{git_tag}
%if 0%{?need_bootstrap} < 1
%patch1 -p1 -b .dont_load_templates
%patch2 -p1 -b .remove_bundled_mustache
%if 0%{?need_bootstrap} < 1
%patch3 -p1 -b .remove_bundled_getopt
%endif
%patch4 -p1 -b .dont_try_building_so