Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package maven-archiver for openSUSE:Factory checked in at 2025-07-22 12:54:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/maven-archiver (Old) and /work/SRC/openSUSE:Factory/.maven-archiver.new.8875 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "maven-archiver" Tue Jul 22 12:54:16 2025 rev:7 rq:1294787 version:3.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/maven-archiver/maven-archiver.changes 2025-06-10 09:06:44.815060701 +0200 +++ /work/SRC/openSUSE:Factory/.maven-archiver.new.8875/maven-archiver.changes 2025-07-22 12:54:32.289650775 +0200 @@ -1,0 +2,11 @@ +Mon Jul 21 10:30:59 UTC 2025 - Fridrich Strba <fst...@suse.com> + +- Modified patch: + * automatic-module-name.patch + + rebase and add unit test +- Added patch: + * reproducible-from-environment.patch + + if the outputTimestamp variable is not specified, use the + environmental varialble SOURCE_DATE_EPOCH if it is set. + +------------------------------------------------------------------- New: ---- reproducible-from-environment.patch ----------(New B)---------- New:- Added patch: * reproducible-from-environment.patch + if the outputTimestamp variable is not specified, use the ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ maven-archiver.spec ++++++ --- /var/tmp/diff_new_pack.NTYM4T/_old 2025-07-22 12:54:32.913676761 +0200 +++ /var/tmp/diff_new_pack.NTYM4T/_new 2025-07-22 12:54:32.917676927 +0200 @@ -27,6 +27,7 @@ Source0: https://repo1.maven.org/maven2/org/apache/maven/%{name}/%{version}/%{name}-%{version}-source-release.zip Source1: %{name}-build.xml Patch0: automatic-module-name.patch +Patch1: reproducible-from-environment.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: javapackages-local @@ -54,21 +55,22 @@ %setup -q cp %{SOURCE1} build.xml %patch -P 0 -p1 +%patch -P 1 -p1 %pom_xpath_remove pom:project/pom:parent/pom:relativePath %build mkdir -p lib build-jar-repository -s lib \ - org.eclipse.sisu.plexus \ - maven-shared-utils/maven-shared-utils \ - maven/maven-artifact maven/maven-core \ + maven/maven-artifact \ + maven/maven-core \ maven/maven-model \ - plexus/interpolation \ - plexus/archiver + maven-shared-utils/maven-shared-utils \ + org.eclipse.sisu.plexus \ + plexus/archiver \ + plexus/interpolation -%{ant} \ - jar javadoc +ant jar javadoc %install # jar ++++++ automatic-module-name.patch ++++++ --- /var/tmp/diff_new_pack.NTYM4T/_old 2025-07-22 12:54:32.941677927 +0200 +++ /var/tmp/diff_new_pack.NTYM4T/_new 2025-07-22 12:54:32.945678094 +0200 @@ -1,15 +1,54 @@ ---- maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-06-06 16:23:04.815330137 +0200 -+++ maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-06-06 16:23:13.234776465 +0200 -@@ -597,7 +597,10 @@ +--- maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:17:38.831806826 +0200 ++++ maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:17:56.567532578 +0200 +@@ -597,7 +597,9 @@ String automaticModuleName = manifest.getMainSection().getAttributeValue("Automatic-Module-Name"); if (automaticModuleName != null) { - if (!isValidModuleName(automaticModuleName)) { + if (automaticModuleName.isEmpty()) { + manifest.getMainSection().removeAttribute("Automatic-Module-Name"); -+ } -+ else if (!isValidModuleName(automaticModuleName)) { ++ } else if (!isValidModuleName(automaticModuleName)) { throw new ManifestException("Invalid automatic module name: '" + automaticModuleName + "'"); } } +--- maven-archiver-3.6.3/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java 2025-07-21 12:17:38.832836603 +0200 ++++ maven-archiver-3.6.3/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java 2025-07-21 12:18:11.727320893 +0200 +@@ -563,9 +563,36 @@ + } + + /* +- * Test to make sure that manifest sections are present in the manifest prior to the archive has been created. ++ * Test to make sure that empty Automatic-Module-Name will result in no ++ * Automatic-Module-Name attribute at all, but that the archive will be created. + */ + @Test ++ void testManifestWithEmptyAutomaticModuleName() throws Exception { ++ File jarFile = new File("target/test/dummy.jar"); ++ JarArchiver jarArchiver = getCleanJarArchiver(jarFile); ++ ++ MavenArchiver archiver = getMavenArchiver(jarArchiver); ++ ++ Project project = getDummyProject(); ++ MavenArchiveConfiguration config = new MavenArchiveConfiguration(); ++ ++ Map<String, String> manifestEntries = new HashMap<>(); ++ manifestEntries.put("Automatic-Module-Name", ""); ++ config.setManifestEntries(manifestEntries); ++ ++ archiver.createArchive(session, project, config); ++ assertThat(jarFile).exists(); ++ ++ final Manifest jarFileManifest = getJarFileManifest(jarFile); ++ Attributes manifest = jarFileManifest.getMainAttributes(); ++ ++ assertThat(manifest).doesNotContainKey(new Attributes.Name("Automatic-Module-Name")); ++ } ++ ++ // ++ // Test to make sure that manifest sections are present in the manifest prior to the archive has been created. ++ // ++ @Test + void testManifestSections() throws Exception { + MavenArchiver archiver = new MavenArchiver(); + ++++++ reproducible-from-environment.patch ++++++ --- maven-archiver-3.6.3/pom.xml 2025-07-21 12:15:02.217924139 +0200 +++ maven-archiver-3.6.3/pom.xml 2025-07-21 12:16:28.230551125 +0200 @@ -115,4 +115,22 @@ <scope>test</scope> </dependency> </dependencies> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <redirectTestOutputToFile>true</redirectTestOutputToFile> + <excludedEnvironmentVariables> + <excludedEnvironmentVariable>SOURCE_DATE_EPOCH</excludedEnvironmentVariable> + </excludedEnvironmentVariables> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + </project> --- maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:15:02.214537980 +0200 +++ maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:16:38.230572982 +0200 @@ -753,9 +753,15 @@ * section 4.4.6. */ public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp) { - // Fail-fast on nulls - if (outputTimestamp == null) { + final String sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH"); + // Fail fast on null and no timestamp configured (1 character configuration is useful to override + // a full value during pom inheritance) + if (outputTimestamp == null || (outputTimestamp.length() < 2 && !isNumeric(outputTimestamp))) { + if (sourceDateEpoch == null) { return Optional.empty(); + } else { + outputTimestamp = sourceDateEpoch; + } } // Number representing seconds since the epoch @@ -769,12 +775,6 @@ return Optional.of(date); } - // no timestamp configured (1 character configuration is useful to override a full value during pom - // inheritance) - if (outputTimestamp.length() < 2) { - return Optional.empty(); - } - try { // Parse the date in UTC such as '2011-12-03T10:15:30Z' or with an offset '2019-10-05T20:37:42+06:00'. final Instant date = OffsetDateTime.parse(outputTimestamp)