forked from pool/erlang-rebar
Accepting request 511398 from home:bmwiedemann:branches:devel:languages:erlang
now with simpler patch - Add reproducible.patch to use a constant build time in .beam files - Normalize zip file timestamps in /usr/bin/rebar (boo#1047218) OBS-URL: https://build.opensuse.org/request/show/511398 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/erlang-rebar?expand=0&rev=32
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 12 14:48:15 UTC 2017 - bwiedemann@suse.com
|
||||
|
||||
- Add reproducible.patch to use a constant build time in .beam files
|
||||
- Normalize zip file timestamps in /usr/bin/rebar (boo#1047218)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 30 12:59:14 UTC 2016 - matwey.kornilov@gmail.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package erlang-rebar-testsuite
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -31,7 +31,12 @@ Source1: macros.erlang-rebar
|
||||
Source98: %{name}.rpmlintrc
|
||||
Patch2: tdeps_update-retest.patch
|
||||
Patch5: erlc_dep_graph-timeout.patch
|
||||
# PATCH-FIX-OPENSUSE -- bmwiedemann
|
||||
Patch6: reproducible.patch
|
||||
BuildRequires: erlang >= R13B01
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: strip-nondeterminism
|
||||
%endif
|
||||
Requires: erlang >= R13B01
|
||||
Provides: rebar = %{version}
|
||||
Obsoletes: rebar < %{version}
|
||||
@@ -77,10 +82,20 @@ test Erlang applications, port drivers and releases.
|
||||
%setup -q -n rebar-%{version}
|
||||
%patch2 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
export REBAR_DEPS_PREFER_LIBS=1
|
||||
make
|
||||
if [ -e /usr/bin/strip-nondeterminism ] ; then
|
||||
# normalize timestamps in the zip file
|
||||
# that starts after 3 lines at offset 51 with "PK"
|
||||
zipoffs=$(perl -ne 'if(/\APK/){print $offs;exit 0} $offs+=length($_)' rebar)
|
||||
dd if=rebar of=rebar.zip bs=$zipoffs skip=1
|
||||
strip-nondeterminism rebar.zip
|
||||
dd if=rebar.zip of=rebar bs=$zipoffs seek=1 conv=notrunc
|
||||
rm rebar.zip
|
||||
fi
|
||||
|
||||
%install
|
||||
%if %{normal_build}
|
||||
|
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 12 14:48:15 UTC 2017 - bwiedemann@suse.com
|
||||
|
||||
- Add reproducible.patch to use a constant build time in .beam files
|
||||
- Normalize zip file timestamps in /usr/bin/rebar (boo#1047218)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 30 12:59:14 UTC 2016 - matwey.kornilov@gmail.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package erlang-rebar
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -31,7 +31,12 @@ Source1: macros.erlang-rebar
|
||||
Source98: %{name}.rpmlintrc
|
||||
Patch2: tdeps_update-retest.patch
|
||||
Patch5: erlc_dep_graph-timeout.patch
|
||||
# PATCH-FIX-OPENSUSE -- bmwiedemann
|
||||
Patch6: reproducible.patch
|
||||
BuildRequires: erlang >= R13B01
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: strip-nondeterminism
|
||||
%endif
|
||||
Requires: erlang >= R13B01
|
||||
Provides: rebar = %{version}
|
||||
Obsoletes: rebar < %{version}
|
||||
@@ -77,10 +82,20 @@ test Erlang applications, port drivers and releases.
|
||||
%setup -q -n rebar-%{version}
|
||||
%patch2 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
export REBAR_DEPS_PREFER_LIBS=1
|
||||
make
|
||||
if [ -e /usr/bin/strip-nondeterminism ] ; then
|
||||
# normalize timestamps in the zip file
|
||||
# that starts after 3 lines at offset 51 with "PK"
|
||||
zipoffs=$(perl -ne 'if(/\APK/){print $offs;exit 0} $offs+=length($_)' rebar)
|
||||
dd if=rebar of=rebar.zip bs=$zipoffs skip=1
|
||||
strip-nondeterminism rebar.zip
|
||||
dd if=rebar.zip of=rebar bs=$zipoffs seek=1 conv=notrunc
|
||||
rm rebar.zip
|
||||
fi
|
||||
|
||||
%install
|
||||
%if %{normal_build}
|
||||
|
16
reproducible.patch
Normal file
16
reproducible.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
From: Bernhard M. Wiedemann <bmwiedemann suse de>
|
||||
Set BUILD_TIME to a constant value
|
||||
so that TIME values in .beam files do not differ across builds
|
||||
|
||||
Index: rebar-2.6.4+git20160922.576e121/bootstrap
|
||||
===================================================================
|
||||
--- rebar-2.6.4+git20160922.576e121.orig/bootstrap
|
||||
+++ rebar-2.6.4+git20160922.576e121/bootstrap
|
||||
@@ -56,7 +56,6 @@ main(Args) ->
|
||||
[{outdir, "ebin"}, {i, "include"},
|
||||
DebugFlag,
|
||||
NamespacedTypes,
|
||||
- {d, 'BUILD_TIME', Built},
|
||||
{d, 'VCS_INFO', VcsInfo},
|
||||
{d, 'OTP_INFO', OtpInfo}]) of
|
||||
up_to_date ->
|
Reference in New Issue
Block a user