[erlang-rebar/epel7] Add more bootstrap conditionals for bundled libs
by Sam Kottler
commit 5c388f50e500767f92fbb9962830e278ec26657c
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 21:56:31 2014 +0600
Add more bootstrap conditionals for bundled libs
erlang-rebar.spec | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/erlang-rebar.spec b/erlang-rebar.spec
index 59958ae..bfb8bb7 100644
--- a/erlang-rebar.spec
+++ b/erlang-rebar.spec
@@ -14,7 +14,7 @@
Name: erlang-%{realname}
Version: 2.1.0
-Release: 0.1%{?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
9 years, 9 months
[erlang-rebar/epel7: 5/5] Set the release to 0.1 so rawhide and epel7 releases will match when bootstrap mode is disabled and
by Sam Kottler
commit 750cafe2b63fcdff44ad1c74267eb8bc87b7e14c
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 15:02:23 2014 +0600
Set the release to 0.1 so rawhide and epel7 releases will match when bootstrap mode is disabled and enable bootstrap
erlang-rebar.spec | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/erlang-rebar.spec b/erlang-rebar.spec
index 6811df5..59958ae 100644
--- a/erlang-rebar.spec
+++ b/erlang-rebar.spec
@@ -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.1%{?dist}
Summary: Erlang Build Tools
Group: Development/Tools
License: MIT
9 years, 9 months
[erlang-rebar/epel7: 4/5] Merge branch 'master' into epel7
by Sam Kottler
commit 824bdb90ce7c2bcc5da3ebbb690cae2fb1fe375e
Merge: b1366d5 0648829
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 14:58:13 2014 +0600
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
erlang-rebar.spec | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
9 years, 9 months
[erlang-rebar/epel7: 3/5] Add bootstrap mode and add necessary conditionals for building rebar with a self-hosted rebar
by Sam Kottler
commit b1366d51709585a41ec2e1f092a87ff6821d4df5
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 14:13:31 2014 +0600
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.
erlang-rebar.spec | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/erlang-rebar.spec b/erlang-rebar.spec
index e75bbcf..a9f00ae 100644
--- a/erlang-rebar.spec
+++ b/erlang-rebar.spec
@@ -4,6 +4,13 @@
%global git_tag ebb474b
%global patchnumber 0
+# 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
+
+%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
+
Name: erlang-%{realname}
Version: 2.1.0
@@ -19,8 +26,13 @@ Source1: rebar.escript
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
# Backported from upstream
Patch4: rebar-0004-Be-sure-to-filter-empty-sources-h-t-to-Tuncer-and-Jo.patch
# Will be proposed for inclusion
@@ -35,7 +47,13 @@ Patch8: rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch
Patch9: rebar-0009-Adjust-app-version.patch
# Backported from upstream
Patch10: rebar-0010-Fix-default-DTL-compilation-when-no-erlydtl_opts-are.patch
+
+%if 0%{?need_bootstrap} < 1
BuildRequires: erlang-rebar
+%else
+BuildRequires: erlang
+%endif
+
# FIXME wip
#Requires: erlang-abnfc%{?_isa}
Requires: erlang-asn1%{?_isa}
@@ -77,7 +95,9 @@ Erlang Build Tools.
%setup -q -n %{upstream}-%{realname}-%{git_tag}
%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
%patch5 -p1 -b .allow_discarding_ports
%patch6 -p1 -b .use_locally_installed
@@ -88,7 +108,12 @@ Erlang Build Tools.
%build
+%if 0%{?need_bootstrap} < 1
rebar compile -v
+%else
+./bootstrap
+./rebar compile -v
+%endif
%install
9 years, 9 months
[erlang-rebar] Bump the release for the bootstrap mode change
by Sam Kottler
commit 0648829759d4f018e1b2809a5038c4daf25dabc5
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 14:17:19 2014 +0600
Bump the release for the bootstrap mode change
erlang-rebar.spec | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/erlang-rebar.spec b/erlang-rebar.spec
index a9f00ae..6811df5 100644
--- a/erlang-rebar.spec
+++ b/erlang-rebar.spec
@@ -14,7 +14,7 @@
Name: erlang-%{realname}
Version: 2.1.0
-Release: 0.6%{?dist}
+Release: 0.7%{?dist}
Summary: Erlang Build Tools
Group: Development/Tools
License: MIT
@@ -137,6 +137,9 @@ cp -a priv %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/
%changelog
+* Sat Mar 8 2014 Sam Kottler <skottler(a)fedoraproject.org> - 2.1.0-0.7
+- Add bootstrap variable and necessary conditionals for building without external getopt
+
* Sun Sep 01 2013 Peter Lemenkov <lemenkov(a)gmail.com> - 2.1.0-0.5
- Added missing runtime requirements
9 years, 9 months
[erlang-rebar] Add bootstrap mode and add necessary conditionals for building rebar with a self-hosted rebar
by Sam Kottler
commit af15b5923823a186c9deb258020e29fe3aad3fab
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 14:13:31 2014 +0600
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.
erlang-rebar.spec | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/erlang-rebar.spec b/erlang-rebar.spec
index e75bbcf..a9f00ae 100644
--- a/erlang-rebar.spec
+++ b/erlang-rebar.spec
@@ -4,6 +4,13 @@
%global git_tag ebb474b
%global patchnumber 0
+# 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
+
+%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
+
Name: erlang-%{realname}
Version: 2.1.0
@@ -19,8 +26,13 @@ Source1: rebar.escript
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
# Backported from upstream
Patch4: rebar-0004-Be-sure-to-filter-empty-sources-h-t-to-Tuncer-and-Jo.patch
# Will be proposed for inclusion
@@ -35,7 +47,13 @@ Patch8: rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch
Patch9: rebar-0009-Adjust-app-version.patch
# Backported from upstream
Patch10: rebar-0010-Fix-default-DTL-compilation-when-no-erlydtl_opts-are.patch
+
+%if 0%{?need_bootstrap} < 1
BuildRequires: erlang-rebar
+%else
+BuildRequires: erlang
+%endif
+
# FIXME wip
#Requires: erlang-abnfc%{?_isa}
Requires: erlang-asn1%{?_isa}
@@ -77,7 +95,9 @@ Erlang Build Tools.
%setup -q -n %{upstream}-%{realname}-%{git_tag}
%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
%patch5 -p1 -b .allow_discarding_ports
%patch6 -p1 -b .use_locally_installed
@@ -88,7 +108,12 @@ Erlang Build Tools.
%build
+%if 0%{?need_bootstrap} < 1
rebar compile -v
+%else
+./bootstrap
+./rebar compile -v
+%endif
%install
9 years, 9 months
Bootstrapping erlang-rebar for EPEL7
by Sam Kottler
Greetings,
It's currently not possible to do a complete bootstrap of the erlang stack for EPEL7 because of a circular dependency in erlang-rebar. Right now there's a patch (rebar-0003-Remove-bundled-getopt.patch) applied to erlang-rebar which removes getopt from the upstream tarball. Unfortunately, rebar requires getopt to properly build and getopt subsequently requires rebar to build. Is it acceptable to remove the unbundling patch for the initial bootstrap (controlled via a variable I'll add to the spec) to get erlang-rebar built and then build erlang-getopt with the unbundled package?
-Sam
9 years, 9 months