diff --git a/UUID.patch b/UUID.patch index 996d016..88f88a4 100644 --- a/UUID.patch +++ b/UUID.patch @@ -1,26 +1,36 @@ ---- xmvn-4.2.0/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java 2023-07-24 10:18:52.523347251 +0200 -+++ xmvn-4.2.0/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java 2023-07-24 11:24:03.362142115 +0200 -@@ -185,7 +185,7 @@ +--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java ++++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java +@@ -185,7 +185,12 @@ class DefaultArtifactInstaller am.setNamespace( repo.getNamespace() ); // UUID - am.setUuid( UUID.randomUUID().toString() ); -+ am.setUuid( UUID.nameUUIDFromBytes((System.getenv("SOURCE_DATE_EPOCH")+repo.getNamespace()+artifact.toString()).getBytes()).toString() ); ++ UUID guid = UUID.randomUUID(); ++ if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null ) ++ { ++ guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + repo.getNamespace() + artifact.toString() ).getBytes() ); ++ } ++ am.setUuid( guid.toString() ); // Compat version for ( String version : rule.getVersions() ) ---- xmvn-4.2.0/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java 2023-07-24 10:18:52.523347251 +0200 -+++ xmvn-4.2.0/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java 2023-07-28 07:33:41.305575464 +0200 -@@ -58,7 +58,7 @@ +--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java ++++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java +@@ -58,7 +58,12 @@ public class JavaPackage super( id ); this.basePackageName = basePackageName; this.metadataDir = metadataDir; - metadata.setUuid( UUID.randomUUID().toString() ); -+ metadata.setUuid( UUID.nameUUIDFromBytes((System.getenv("SOURCE_DATE_EPOCH")+basePackageName).getBytes()).toString() ); ++ UUID guid = UUID.randomUUID(); ++ if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null ) ++ { ++ guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + id + basePackageName + metadataDir.toString() ).getBytes() ); ++ } ++ metadata.setUuid( guid.toString() ); } /** -@@ -71,11 +71,11 @@ +@@ -71,11 +76,16 @@ public class JavaPackage private PackageMetadata getSplitMetadata( String namespace ) { PackageMetadata splitMetadata = new PackageMetadata(); @@ -29,7 +39,12 @@ List allArtifacts = metadata.getArtifacts(); List splitArtifacts = allArtifacts.stream().filter( a -> namespace.equals( a.getNamespace() ) ).collect( Collectors.toList() ); -+ splitMetadata.setUuid( UUID.nameUUIDFromBytes((System.getenv("SOURCE_DATE_EPOCH")+splitArtifacts.toString()).getBytes()).toString() ); ++ UUID guid = UUID.randomUUID(); ++ if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null ) ++ { ++ guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + splitArtifacts.toString() ).getBytes() ); ++ } ++ splitMetadata.setUuid( guid.toString() ); splitMetadata.setArtifacts( splitArtifacts ); splitMetadata.setSkippedArtifacts( metadata.getSkippedArtifacts() ); return splitMetadata; diff --git a/xmvn-connector.changes b/xmvn-connector.changes index 19e8d89..919c082 100644 --- a/xmvn-connector.changes +++ b/xmvn-connector.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba + +- Modified patch: + * UUID.patch + + sync with the version in our official upstream pull request + ------------------------------------------------------------------- Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba diff --git a/xmvn-connector.spec b/xmvn-connector.spec index ff59380..06b3c43 100644 --- a/xmvn-connector.spec +++ b/xmvn-connector.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package xmvn-connector # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/xmvn-mojo.changes b/xmvn-mojo.changes index 179da86..7c9aeb9 100644 --- a/xmvn-mojo.changes +++ b/xmvn-mojo.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba + +- Modified patch: + * UUID.patch + + sync with the version in our official upstream pull request + ------------------------------------------------------------------- Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba diff --git a/xmvn-mojo.spec b/xmvn-mojo.spec index c997693..c18b5ba 100644 --- a/xmvn-mojo.spec +++ b/xmvn-mojo.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package xmvn-mojo # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/xmvn-parent.changes b/xmvn-parent.changes index bc7aa66..269e6f0 100644 --- a/xmvn-parent.changes +++ b/xmvn-parent.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba + +- Modified patch: + * UUID.patch + + sync with the version in our official upstream pull request + ------------------------------------------------------------------- Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba diff --git a/xmvn-parent.spec b/xmvn-parent.spec index ffeda89..96025fb 100644 --- a/xmvn-parent.spec +++ b/xmvn-parent.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package xmvn-parent # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/xmvn-tools.changes b/xmvn-tools.changes index 5698f0b..e2691e7 100644 --- a/xmvn-tools.changes +++ b/xmvn-tools.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 30 09:25:00 UTC 2024 - Fridrich Strba + +- Modified patch: + * UUID.patch + + sync with the version in our official upstream pull request + ------------------------------------------------------------------- Wed Sep 13 16:55:35 UTC 2023 - Fridrich Strba diff --git a/xmvn-tools.spec b/xmvn-tools.spec index 33a2520..5e7b703 100644 --- a/xmvn-tools.spec +++ b/xmvn-tools.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package xmvn-tools # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/xmvn.spec b/xmvn.spec index 3c4496d..26afac1 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -1,7 +1,7 @@ # # spec file for package xmvn # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed