diff --git a/0004-Reproducible-manifest-modification-time.patch b/0004-Reproducible-manifest-modification-time.patch new file mode 100644 index 0000000..04087ed --- /dev/null +++ b/0004-Reproducible-manifest-modification-time.patch @@ -0,0 +1,35 @@ +From 3c2036e15f127c4ab90eb2312af27e13711d5a24 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fridrich=20=C5=A0trba?= +Date: Wed, 18 Sep 2024 18:31:24 +0200 +Subject: [PATCH 4/4] Reproducible manifest modification time + +--- + .../org/fedoraproject/xmvn/tools/install/JarUtils.java | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java +index 815d19a6..844510b6 100644 +--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java ++++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java +@@ -249,12 +249,17 @@ public final class JarUtils + try ( ZipFile jar = new ZipFile( backupPath.toFile() ); + ZipArchiveOutputStream os = new ZipArchiveOutputStream( targetJar.toFile() ) ) + { +- try ( InputStream mfIs = jar.getInputStream( jar.getEntry( MANIFEST_PATH ) ) ) ++ ZipArchiveEntry jarEntry = jar.getEntry( MANIFEST_PATH ); ++ try ( InputStream mfIs = jar.getInputStream( jarEntry ) ) + { + Manifest mf = new Manifest( mfIs ); + updateManifest( artifact, mf ); + // write manifest + ZipArchiveEntry newManifestEntry = new ZipArchiveEntry( MANIFEST_PATH ); ++ if ( jarEntry != null ) ++ { ++ newManifestEntry.setTime( jarEntry.getTime() ); ++ } + os.putArchiveEntry( newManifestEntry ); + mf.write( os ); + os.closeArchiveEntry(); +-- +2.46.0 + diff --git a/xmvn-connector.changes b/xmvn-connector.changes index 309b344..6ccc55f 100644 --- a/xmvn-connector.changes +++ b/xmvn-connector.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 18 16:33:37 UTC 2024 - Fridrich Strba + +- Added patch: + * 0004-Reproducible-manifest-modification-time.patch + + preserve manifest modification time when injecting additional + attributes + ------------------------------------------------------------------- Thu Jul 18 11:07:04 UTC 2024 - Fridrich Strba diff --git a/xmvn-connector.spec b/xmvn-connector.spec index 396b9b6..d9cf016 100644 --- a/xmvn-connector.spec +++ b/xmvn-connector.spec @@ -31,6 +31,7 @@ Source1: %{parent}-build.tar.xz Patch0: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch Patch1: 0002-Make-metadata-UUIDs-reproducible-if-SOURCE_DATE_EPOC.patch Patch2: 0003-Reproducible-javadoc-notimestamp-option-and-some-aut.patch +Patch3: 0004-Reproducible-manifest-modification-time.patch BuildRequires: %{parent}-api = %{version} BuildRequires: %{parent}-core = %{version} BuildRequires: ant diff --git a/xmvn-mojo.changes b/xmvn-mojo.changes index 3bbb15f..9a3adfe 100644 --- a/xmvn-mojo.changes +++ b/xmvn-mojo.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 18 16:33:37 UTC 2024 - Fridrich Strba + +- Added patch: + * 0004-Reproducible-manifest-modification-time.patch + + preserve manifest modification time when injecting additional + attributes + ------------------------------------------------------------------- Thu Jul 18 11:07:04 UTC 2024 - Fridrich Strba diff --git a/xmvn-mojo.spec b/xmvn-mojo.spec index d4ea419..326d222 100644 --- a/xmvn-mojo.spec +++ b/xmvn-mojo.spec @@ -29,6 +29,7 @@ Source0: https://github.com/fedora-java/%{parent}/releases/download/%{ver Patch0: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch Patch1: 0002-Make-metadata-UUIDs-reproducible-if-SOURCE_DATE_EPOC.patch Patch2: 0003-Reproducible-javadoc-notimestamp-option-and-some-aut.patch +Patch3: 0004-Reproducible-manifest-modification-time.patch BuildRequires: %{parent}-api = %{version} BuildRequires: %{parent}-core = %{version} BuildRequires: fdupes @@ -101,7 +102,7 @@ find -name ResolverIntegrationTest.java -delete %pom_remove_dep -r :::test: %pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-plugin-plugin']/pom:configuration" ' - xmvn-mojo' xmvn-mojo + ${project.artifactId}' xmvn-mojo pushd %{name} %{mvn_file} :{*} %{parent}/@1 diff --git a/xmvn-parent.changes b/xmvn-parent.changes index 7f5654a..2bb4dca 100644 --- a/xmvn-parent.changes +++ b/xmvn-parent.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 18 16:33:37 UTC 2024 - Fridrich Strba + +- Added patch: + * 0004-Reproducible-manifest-modification-time.patch + + preserve manifest modification time when injecting additional + attributes + ------------------------------------------------------------------- Thu Jul 18 11:07:04 UTC 2024 - Fridrich Strba diff --git a/xmvn-parent.spec b/xmvn-parent.spec index 019dccc..9282d84 100644 --- a/xmvn-parent.spec +++ b/xmvn-parent.spec @@ -29,6 +29,7 @@ Source0: https://github.com/fedora-java/%{parent}/releases/download/%{ver Patch0: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch Patch1: 0002-Make-metadata-UUIDs-reproducible-if-SOURCE_DATE_EPOC.patch Patch2: 0003-Reproducible-javadoc-notimestamp-option-and-some-aut.patch +Patch3: 0004-Reproducible-manifest-modification-time.patch BuildRequires: javapackages-local BuildRequires: xmvn-resolve BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin) diff --git a/xmvn-tools.changes b/xmvn-tools.changes index 7219ea5..59ad780 100644 --- a/xmvn-tools.changes +++ b/xmvn-tools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 18 16:33:37 UTC 2024 - Fridrich Strba + +- Added patch: + * 0004-Reproducible-manifest-modification-time.patch + + preserve manifest modification time when injecting additional + attributes + ------------------------------------------------------------------- Thu Jul 18 11:07:04 UTC 2024 - Fridrich Strba diff --git a/xmvn-tools.spec b/xmvn-tools.spec index 0615803..8eebbad 100644 --- a/xmvn-tools.spec +++ b/xmvn-tools.spec @@ -30,6 +30,7 @@ Source1: %{parent}-build.tar.xz Patch0: 0001-Do-not-leave-a-stray-options-file-in-the-generated-j.patch Patch1: 0002-Make-metadata-UUIDs-reproducible-if-SOURCE_DATE_EPOC.patch Patch2: 0003-Reproducible-javadoc-notimestamp-option-and-some-aut.patch +Patch3: 0004-Reproducible-manifest-modification-time.patch BuildRequires: ant BuildRequires: apache-commons-compress BuildRequires: apache-commons-io @@ -37,7 +38,7 @@ BuildRequires: atinject BuildRequires: beust-jcommander >= 1.82 BuildRequires: fdupes BuildRequires: java-devel >= 1.8 -BuildRequires: javapackages-local +BuildRequires: javapackages-local >= 6 BuildRequires: modello >= 2.0.0 BuildRequires: objectweb-asm BuildRequires: sisu-inject @@ -157,19 +158,6 @@ find -name ResolverIntegrationTest.java -delete rm -f xmvn-core/src/test/java/org/fedoraproject/xmvn/resolver/JavaHomeResolverTest.java %endif -for i in api core; do - %pom_xpath_inject "pom:project" " - org.fedoraproject.xmvn - %{version}" %{parent}-${i} - %pom_remove_parent %{parent}-${i} -done -for i in install resolve subst; do - %pom_xpath_inject "pom:project" " - org.fedoraproject.xmvn - %{version}" %{parent}-tools/%{parent}-${i} - %pom_remove_parent %{parent}-tools/%{parent}-${i} -done - %build mkdir -p lib build-jar-repository -s lib \ @@ -196,11 +184,11 @@ done # poms install -dm 0755 %{buildroot}%{_mavenpomdir}/%{parent} for i in api core; do - install -pm 0644 %{parent}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{parent}-${i}.pom + %{mvn_install_pom} %{parent}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{parent}-${i}.pom %add_maven_depmap %{parent}/%{parent}-${i}.pom %{parent}/%{parent}-${i}.jar -f ${i} done for i in install resolve subst; do - install -pm 0644 %{parent}-tools/%{parent}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{parent}-${i}.pom + %{mvn_install_pom} %{parent}-tools/%{parent}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{parent}-${i}.pom %add_maven_depmap %{parent}/%{parent}-${i}.pom %{parent}/%{parent}-${i}.jar -f ${i} done