Accepting request 644719 from home:1Antoine1:branches:Java:packages
- Add reproducible-build-manifest.patch: Use less detailed version string for manifest's "Created-by" field (boo#1110024). OBS-URL: https://build.opensuse.org/request/show/644719 OBS-URL: https://build.opensuse.org/package/show/Java:packages/ant?expand=0&rev=119
This commit is contained in:
parent
8a1801adbf
commit
372ab108d9
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 21 08:08:23 UTC 2018 - antoine.belvire@opensuse.org
|
||||||
|
|
||||||
|
- Add reproducible-build-manifest.patch: Use less detailed version
|
||||||
|
string for manifest's "Created-by" field (boo#1110024).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 17 19:40:22 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
Wed Oct 17 19:40:22 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ Patch5: apache-ant-bootstrap.patch
|
|||||||
#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates
|
#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates
|
||||||
Patch6: reproducible-build-date.patch
|
Patch6: reproducible-build-date.patch
|
||||||
Patch7: ant-python3.patch
|
Patch7: ant-python3.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
|
Patch8: reproducible-build-manifest.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -342,6 +344,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 21 08:08:23 UTC 2018 - antoine.belvire@opensuse.org
|
||||||
|
|
||||||
|
- Add reproducible-build-manifest.patch: Use less detailed version
|
||||||
|
string for manifest's "Created-by" field (boo#1110024).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 17 19:40:22 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
Wed Oct 17 19:40:22 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ Patch5: apache-ant-bootstrap.patch
|
|||||||
#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates
|
#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates
|
||||||
Patch6: reproducible-build-date.patch
|
Patch6: reproducible-build-date.patch
|
||||||
Patch7: ant-python3.patch
|
Patch7: ant-python3.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
|
Patch8: reproducible-build-manifest.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -342,6 +344,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 21 08:08:23 UTC 2018 - antoine.belvire@opensuse.org
|
||||||
|
|
||||||
|
- Add reproducible-build-manifest.patch: Use less detailed version
|
||||||
|
string for manifest's "Created-by" field (boo#1110024).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 17 19:40:22 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
Wed Oct 17 19:40:22 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
3
ant.spec
3
ant.spec
@ -41,6 +41,8 @@ Patch5: apache-ant-bootstrap.patch
|
|||||||
#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates
|
#PATCH-FEATURE-OPENSUSE bmwiedemann -- have fixed build dates
|
||||||
Patch6: reproducible-build-date.patch
|
Patch6: reproducible-build-date.patch
|
||||||
Patch7: ant-python3.patch
|
Patch7: ant-python3.patch
|
||||||
|
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
|
||||||
|
Patch8: reproducible-build-manifest.patch
|
||||||
BuildRequires: antlr-bootstrap
|
BuildRequires: antlr-bootstrap
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -341,6 +343,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" -print -delete
|
find . -name "*.jar" -print -delete
|
||||||
|
32
reproducible-build-manifest.patch
Normal file
32
reproducible-build-manifest.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Use Java major version for manifest's Created-by
|
||||||
|
|
||||||
|
No need of detailed version such java.vm.version. Java's jar command
|
||||||
|
uses java.version when it fills the manifest's "Created-by" field,
|
||||||
|
let's make ant do the same.
|
||||||
|
|
||||||
|
Using a detailed version makes that every Java release triggers a
|
||||||
|
new publication for ant-based applications, only because a line in
|
||||||
|
manifest has changed - not because the binary or dependencies have
|
||||||
|
changed. Using a less detailed version reduces these publications.
|
||||||
|
|
||||||
|
Using a less detailed version also prevents more subtle problems
|
||||||
|
such as in boo#1110024: noarch packages differ depending on the
|
||||||
|
builder architecture, when Java vm version contains an architecture
|
||||||
|
information (which is the case for openSUSE, though it's probably
|
||||||
|
not relevant).
|
||||||
|
|
||||||
|
--
|
||||||
|
--- a/src/main/org/apache/tools/ant/taskdefs/Manifest.java
|
||||||
|
+++ b/src/main/org/apache/tools/ant/taskdefs/Manifest.java
|
||||||
|
@@ -816,10 +816,7 @@ public class Manifest {
|
||||||
|
try {
|
||||||
|
insr = new InputStreamReader(in, "UTF-8");
|
||||||
|
Manifest defaultManifest = new Manifest(insr);
|
||||||
|
- String version = System.getProperty("java.runtime.version");
|
||||||
|
- if (version == null) {
|
||||||
|
- version = System.getProperty("java.vm.version");
|
||||||
|
- }
|
||||||
|
+ String version = System.getProperty("java.version");
|
||||||
|
Attribute createdBy = new Attribute("Created-By",
|
||||||
|
version + " ("
|
||||||
|
+ System.getProperty("java.vm.vendor") + ")");
|
Loading…
Reference in New Issue
Block a user