From cfdae8883c73c1ea1a2671d29e8d92ab9bef60140a25e26db0d1a560ac323b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 26 Oct 2017 06:45:48 +0000 Subject: [PATCH] Accepting request 536291 from home:bmwiedemann:reproducible:test Add reproducible-build-date.patch to allow to have fixed build dates to make other packages build more reproducibly OBS-URL: https://build.opensuse.org/request/show/536291 OBS-URL: https://build.opensuse.org/package/show/Java:packages/ant?expand=0&rev=104 --- ant-antlr.changes | 6 ++++++ ant-antlr.spec | 3 +++ ant-junit.changes | 6 ++++++ ant-junit.spec | 3 +++ ant.changes | 6 ++++++ ant.spec | 3 +++ reproducible-build-date.patch | 21 +++++++++++++++++++++ 7 files changed, 48 insertions(+) create mode 100644 reproducible-build-date.patch diff --git a/ant-antlr.changes b/ant-antlr.changes index a591ebe..68de980 100644 --- a/ant-antlr.changes +++ b/ant-antlr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 24 11:26:36 UTC 2017 - bwiedemann@suse.com + +- Add reproducible-build-date.patch to allow to have fixed build dates + to make other packages build more reproducibly + ------------------------------------------------------------------- Wed Oct 4 09:07:19 UTC 2017 - fstrba@suse.com diff --git a/ant-antlr.spec b/ant-antlr.spec index 324746a..9b01738 100644 --- a/ant-antlr.spec +++ b/ant-antlr.spec @@ -41,6 +41,8 @@ Patch1: apache-ant-class-path-in-manifest.patch Patch3: reproducible.patch Patch4: apache-ant-1.9.9-sourcetarget.patch Patch5: apache-ant-bootstrap.patch +#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates +Patch6: reproducible-build-date.patch BuildRequires: antlr-bootstrap BuildRequires: java-devel >= 1.6 BuildRequires: javapackages-tools @@ -339,6 +341,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT// %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # clean jar files %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t rm diff --git a/ant-junit.changes b/ant-junit.changes index a591ebe..68de980 100644 --- a/ant-junit.changes +++ b/ant-junit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 24 11:26:36 UTC 2017 - bwiedemann@suse.com + +- Add reproducible-build-date.patch to allow to have fixed build dates + to make other packages build more reproducibly + ------------------------------------------------------------------- Wed Oct 4 09:07:19 UTC 2017 - fstrba@suse.com diff --git a/ant-junit.spec b/ant-junit.spec index 8490075..786aaf7 100644 --- a/ant-junit.spec +++ b/ant-junit.spec @@ -41,6 +41,8 @@ Patch1: apache-ant-class-path-in-manifest.patch Patch3: reproducible.patch Patch4: apache-ant-1.9.9-sourcetarget.patch Patch5: apache-ant-bootstrap.patch +#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates +Patch6: reproducible-build-date.patch BuildRequires: antlr-bootstrap BuildRequires: java-devel >= 1.6 BuildRequires: javapackages-tools @@ -339,6 +341,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT// %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # clean jar files %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t rm diff --git a/ant.changes b/ant.changes index a591ebe..68de980 100644 --- a/ant.changes +++ b/ant.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 24 11:26:36 UTC 2017 - bwiedemann@suse.com + +- Add reproducible-build-date.patch to allow to have fixed build dates + to make other packages build more reproducibly + ------------------------------------------------------------------- Wed Oct 4 09:07:19 UTC 2017 - fstrba@suse.com diff --git a/ant.spec b/ant.spec index b65542b..c16577c 100644 --- a/ant.spec +++ b/ant.spec @@ -40,6 +40,8 @@ Patch1: apache-ant-class-path-in-manifest.patch Patch3: reproducible.patch Patch4: apache-ant-1.9.9-sourcetarget.patch Patch5: apache-ant-bootstrap.patch +#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates +Patch6: reproducible-build-date.patch BuildRequires: antlr-bootstrap BuildRequires: java-devel >= 1.6 BuildRequires: javapackages-tools @@ -338,6 +340,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT// %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # clean jar files %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t rm diff --git a/reproducible-build-date.patch b/reproducible-build-date.patch new file mode 100644 index 0000000..ebcfc47 --- /dev/null +++ b/reproducible-build-date.patch @@ -0,0 +1,21 @@ +Author: Bernhard M. Wiedemann +Date: 2017-10-24 + +have fixed build dates +to make packages like rhino build more reproducibly +that use their build.xml to insert build dates into output files + +Index: apache-ant-1.9.9/src/script/ant +=================================================================== +--- apache-ant-1.9.9.orig/src/script/ant ++++ apache-ant-1.9.9/src/script/ant +@@ -290,6 +290,9 @@ fi + if $usejikes; then + ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" + fi ++if test -n "$SOURCE_DATE_EPOCH" ; then ++ ANT_OPTS="$ANT_OPTS -Dant.tstamp.now=$SOURCE_DATE_EPOCH" ++fi + + # For Cygwin, switch paths to appropriate format before running java + # For PATHs convert to unix format first, then to windows format to ensure