From 351367246551b470df37f57bed2229235f2ec73695054ee403ea0ec984d00f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 20 Feb 2025 09:50:35 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main maven-bundle-plugin revision 0cc56e0764a9e2e4a4717970e010b0ce --- maven-bundle-plugin.changes | 18 ++++++++++++++++++ maven-bundle-plugin.spec | 5 ++++- new-reporting-api.patch | 14 +++++--------- reproducible-from-environment.patch | 11 +++++++++++ 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 reproducible-from-environment.patch diff --git a/maven-bundle-plugin.changes b/maven-bundle-plugin.changes index b418992..0bc7d18 100644 --- a/maven-bundle-plugin.changes +++ b/maven-bundle-plugin.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Oct 3 10:26:07 UTC 2024 - Fridrich Strba + +- Build against maven-doxia >= 2.0.0 +- Modified patch: + * new-reporting-api.patch + + adapt to the maven-doxia 2.0.0 APIs + +------------------------------------------------------------------- +Mon Sep 23 09:42:01 UTC 2024 - Fridrich Strba + +- Use SOURCE_DATE_EPOCH for reproducible builds +- Added patch: + * reproducible-from-environment.patch + + SOURCE_DATE_EPOCH environmental variable triggers reproducible + use of the maven-bundle-plugin if it is not requested already + using the project.build.outputTimestamp option. + ------------------------------------------------------------------- Wed Feb 21 10:49:57 UTC 2024 - Gus Kenion diff --git a/maven-bundle-plugin.spec b/maven-bundle-plugin.spec index 29b6e41..9ae6336 100644 --- a/maven-bundle-plugin.spec +++ b/maven-bundle-plugin.spec @@ -25,13 +25,14 @@ Group: Development/Libraries/Java URL: https://felix.apache.org Source0: https://repo1.maven.org/maven2/org/apache/felix/%{name}/%{version}/%{name}-%{version}-source-release.tar.gz Patch0: new-reporting-api.patch +Patch1: reproducible-from-environment.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib) BuildRequires: mvn(org.apache.felix:felix-parent:pom:) BuildRequires: mvn(org.apache.felix:org.apache.felix.bundlerepository) BuildRequires: mvn(org.apache.felix:org.apache.felix.utils) -BuildRequires: mvn(org.apache.maven.doxia:doxia-sink-api) +BuildRequires: mvn(org.apache.maven.doxia:doxia-sink-api) >= 2.0.0 BuildRequires: mvn(org.apache.maven.doxia:doxia-site-renderer) BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) @@ -69,6 +70,7 @@ API documentation for %{name}. %prep %setup -q %patch -P 0 -p1 +%patch -P 1 -p1 find -name '*.jar' -delete @@ -81,6 +83,7 @@ find -name '*.jar' -delete %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} -Dmaven.compiler.release=8 \ %endif + -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \ -Dsource=8 %install diff --git a/new-reporting-api.patch b/new-reporting-api.patch index c3fcb7f..6fe62ac 100644 --- a/new-reporting-api.patch +++ b/new-reporting-api.patch @@ -1,15 +1,11 @@ ---- maven-bundle-plugin-5.1.1/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java 2020-07-09 18:44:18.000000000 +0200 -+++ maven-bundle-plugin-5.1.1/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java 2022-03-11 07:46:59.951664164 +0100 -@@ -324,6 +324,12 @@ +--- maven-bundle-plugin-5.1.9/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java 2024-09-30 22:01:52.149300507 +0200 ++++ maven-bundle-plugin-5.1.9/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java 2024-09-30 22:03:05.556458439 +0200 +@@ -324,7 +324,7 @@ return !skip && outputDirectory != null; } +- public void generate( @SuppressWarnings( "deprecation" ) org.codehaus.doxia.sink.Sink sink, Locale locale ) + public void generate( org.apache.maven.doxia.sink.Sink sink, Locale locale ) -+ throws MavenReportException -+ { -+ generate( (org.codehaus.doxia.sink.Sink) sink, locale ); -+ } -+ - public void generate( @SuppressWarnings( "deprecation" ) org.codehaus.doxia.sink.Sink sink, Locale locale ) throws MavenReportException { + final Context ctx = new Context(); diff --git a/reproducible-from-environment.patch b/reproducible-from-environment.patch new file mode 100644 index 0000000..775076c --- /dev/null +++ b/reproducible-from-environment.patch @@ -0,0 +1,11 @@ +--- maven-bundle-plugin-5.1.9/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java 2024-09-23 11:31:10.426888887 +0200 ++++ maven-bundle-plugin-5.1.9/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java 2024-09-23 11:35:04.561855048 +0200 +@@ -551,7 +551,7 @@ + properties.putAll( getDefaultProperties( currentProject ) ); + properties.putAll( transformDirectives( originalInstructions ) ); + +- if ( new MavenArchiver().parseOutputTimestamp( outputTimestamp ) != null ) ++ if ( new MavenArchiver().parseOutputTimestamp( outputTimestamp ) != null || System.getenv( "SOURCE_DATE_EPOCH" ) != null ) + { + properties.put( Constants.REPRODUCIBLE, "true" ); + }