Accepting request 1110919 from Java:packages
More reproducible OBS-URL: https://build.opensuse.org/request/show/1110919 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javapackages-tools?expand=0&rev=39
This commit is contained in:
52
0003-Reproducible-exclusions-order-in-maven-metadata.patch
Normal file
52
0003-Reproducible-exclusions-order-in-maven-metadata.patch
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
From 66ba33a8c28497e01eddcb0cd17fbe324674eabc Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||||
|
Date: Mon, 11 Sep 2023 18:43:28 +0200
|
||||||
|
Subject: [PATCH 3/3] Reproducible exclusions order in maven metadata
|
||||||
|
|
||||||
|
---
|
||||||
|
python/javapackages/metadata/dependency.py | 4 ++--
|
||||||
|
python/javapackages/metadata/exclusion.py | 9 +++++++++
|
||||||
|
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/python/javapackages/metadata/dependency.py b/python/javapackages/metadata/dependency.py
|
||||||
|
index 1709e1fb..5931134d 100644
|
||||||
|
--- a/python/javapackages/metadata/dependency.py
|
||||||
|
+++ b/python/javapackages/metadata/dependency.py
|
||||||
|
@@ -46,7 +46,7 @@ class MetadataDependency(ObjectBinding):
|
||||||
|
defaults = {'extension': 'jar',
|
||||||
|
'requestedVersion': 'SYSTEM'}
|
||||||
|
types = {'optional': str, # todo bool
|
||||||
|
- 'exclusions': set([MetadataExclusion])}
|
||||||
|
+ 'exclusions': list([MetadataExclusion])}
|
||||||
|
|
||||||
|
def is_optional(self):
|
||||||
|
if self.optional and self.optional.lower() == "true":
|
||||||
|
@@ -145,4 +145,4 @@ class MetadataDependency(ObjectBinding):
|
||||||
|
classifier=mvn_dep.classifier,
|
||||||
|
optional=mvn_dep.optional,
|
||||||
|
requestedVersion=mvn_dep.version,
|
||||||
|
- exclusions=exclusions)
|
||||||
|
+ exclusions=sorted(exclusions))
|
||||||
|
diff --git a/python/javapackages/metadata/exclusion.py b/python/javapackages/metadata/exclusion.py
|
||||||
|
index 3152b090..5b9503c0 100644
|
||||||
|
--- a/python/javapackages/metadata/exclusion.py
|
||||||
|
+++ b/python/javapackages/metadata/exclusion.py
|
||||||
|
@@ -41,6 +41,15 @@ class MetadataExclusion(ObjectBinding):
|
||||||
|
element_name = 'exclusion'
|
||||||
|
fields = ['groupId', 'artifactId']
|
||||||
|
|
||||||
|
+ def __lt__(self, other):
|
||||||
|
+ if self.groupId < other.groupId:
|
||||||
|
+ return True
|
||||||
|
+ if self.groupId > other.groupId:
|
||||||
|
+ return False
|
||||||
|
+ if self.artifactId < other.artifactId:
|
||||||
|
+ return True
|
||||||
|
+ return False
|
||||||
|
+
|
||||||
|
def get_mvn_str(self):
|
||||||
|
return Printer.get_mvn_str(self.groupId, self.artifactId)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
@@ -0,0 +1,28 @@
|
|||||||
|
From f211da6e4cf216a020b47ccab9b2c7806c5a8a62 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||||
|
Date: Wed, 13 Sep 2023 15:47:54 +0200
|
||||||
|
Subject: [PATCH 4/4] Reproducible builds: keep order of aliases and
|
||||||
|
dependencies
|
||||||
|
|
||||||
|
---
|
||||||
|
python/javapackages/metadata/artifact.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/python/javapackages/metadata/artifact.py b/python/javapackages/metadata/artifact.py
|
||||||
|
index 72e57e62..f5cbf3be 100644
|
||||||
|
--- a/python/javapackages/metadata/artifact.py
|
||||||
|
+++ b/python/javapackages/metadata/artifact.py
|
||||||
|
@@ -52,8 +52,8 @@ class MetadataArtifact(ObjectBinding):
|
||||||
|
'compatVersions', 'dependencies']
|
||||||
|
defaults = {'extension': 'jar'}
|
||||||
|
types = {'compatVersions': set(['version']),
|
||||||
|
- 'aliases': set([MetadataAlias]),
|
||||||
|
- 'dependencies': set([MetadataDependency]),
|
||||||
|
+ 'aliases': list([MetadataAlias]),
|
||||||
|
+ 'dependencies': list([MetadataDependency]),
|
||||||
|
'properties': dict}
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
@@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 13 13:52:00 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* 0004-Reproducible-builds-keep-order-of-aliases-and-depend.patch
|
||||||
|
+ make the aliases and dependencies lists so that the order is
|
||||||
|
kept
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 12 09:54:08 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* 0003-Reproducible-exclusions-order-in-maven-metadata.patch
|
||||||
|
+ sort exclusions in maven metadata
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 5 11:40:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
Tue Sep 5 11:40:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@@ -49,6 +49,10 @@ Patch2: suse-no-epoch.patch
|
|||||||
Patch3: 0001-Make-maven_depmap-order-of-aliases-reproducible.patch
|
Patch3: 0001-Make-maven_depmap-order-of-aliases-reproducible.patch
|
||||||
#PATCH-FIX-UPSTREAM: Do not bomb on <relativePath/> construct
|
#PATCH-FIX-UPSTREAM: Do not bomb on <relativePath/> construct
|
||||||
Patch4: 0002-Do-not-bomb-on-relativePath-construct.patch
|
Patch4: 0002-Do-not-bomb-on-relativePath-construct.patch
|
||||||
|
#PATCH-FIX-UPSTREAM: Sort exclusions when writing out metadata
|
||||||
|
Patch5: 0003-Reproducible-exclusions-order-in-maven-metadata.patch
|
||||||
|
#PATCH-FIX-UPSTREAM: make the aliases and dependencies lists so that the order is kept
|
||||||
|
Patch6: 0004-Reproducible-builds-keep-order-of-aliases-and-depend.patch
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
|
Reference in New Issue
Block a user