From 911a1a4d8d5aeaea33465c97782bd6c98a847846514349cc0823475331fa6a53 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 30 Aug 2023 21:35:28 +0000 Subject: [PATCH 1/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-lang3?expand=0&rev=30 --- _multibuild | 3 ++ apache-commons-lang3-junit-bom.patch | 23 ---------- apache-commons-lang3.changes | 11 +++++ apache-commons-lang3.spec | 64 ++++++++++++++++++---------- 4 files changed, 56 insertions(+), 45 deletions(-) create mode 100644 _multibuild delete mode 100644 apache-commons-lang3-junit-bom.patch diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..655ec81 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/apache-commons-lang3-junit-bom.patch b/apache-commons-lang3-junit-bom.patch deleted file mode 100644 index 6446ffe..0000000 --- a/apache-commons-lang3-junit-bom.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: commons-lang3-3.12.0-src/pom.xml -=================================================================== ---- commons-lang3-3.12.0-src.orig/pom.xml -+++ commons-lang3-3.12.0-src/pom.xml -@@ -513,18 +513,6 @@ - - - -- -- -- -- org.junit -- junit-bom -- 5.7.1 -- pom -- import -- -- -- -- - - - diff --git a/apache-commons-lang3.changes b/apache-commons-lang3.changes index e1e9749..9c02ad8 100644 --- a/apache-commons-lang3.changes +++ b/apache-commons-lang3.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 30 20:57:36 UTC 2023 - Fridrich Strba + +- Split into bootstrap and full package using the _multibuild + * this should allow to build the new bcel without cycles +- Removed patch: + * apache-commons-lang3-junit-bom.patch + + not needed since we install the pom file using the new + %%mvn_install_pom macro which sanitizes the pom file to the + bare runtime dependencies. + ------------------------------------------------------------------- Wed Dec 29 15:18:48 UTC 2021 - Pedro Monreal diff --git a/apache-commons-lang3.spec b/apache-commons-lang3.spec index 4f086b0..f4eaf2a 100644 --- a/apache-commons-lang3.spec +++ b/apache-commons-lang3.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,13 @@ %define base_name lang3 %define short_name commons-%{base_name} -Name: apache-%{short_name} +%define full_name apache-%{short_name} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "bootstrap" +%bcond_without bootstrap +%else +%bcond_with bootstrap +%endif Version: 3.12.0 Release: 0 Summary: Apache Commons Lang Package @@ -28,13 +34,20 @@ URL: https://commons.apache.org/proper/commons-lang/ Source0: https://dlcdn.apache.org/commons/lang/source/%{short_name}-%{version}-src.tar.gz Source1: build.xml Source2: default.properties -Patch0: apache-commons-lang3-junit-bom.patch +BuildRequires: java-devel >= 1.8 +BuildArch: noarch +%if %{with bootstrap} +Name: %{full_name}-bootstrap +Conflicts: %{full_name} +%else +Name: %{full_name} BuildRequires: ant BuildRequires: fdupes -BuildRequires: java-devel >= 1.8 -BuildRequires: javapackages-local +BuildRequires: javapackages-local >= 6 +Conflicts: %{full_name}-bootstrap Provides: %{short_name} = %{version}-%{release} -BuildArch: noarch +Obsoletes: %{full_name}-bootstrap +%endif %description The standard Java libraries fail to provide enough methods for @@ -58,43 +71,42 @@ Javadoc for %{name}. %prep %setup -q -n %{short_name}-%{version}-src -%patch0 -p1 cp %{SOURCE1} . cp %{SOURCE2} . sed -i 's/\r//' *.txt -# Not needed since we don't build with maven -%pom_remove_parent -%pom_xpath_inject "pom:project" "org.apache.commons" -%pom_xpath_remove pom:project/pom:reporting -%pom_xpath_remove pom:project/pom:build -%pom_xpath_remove pom:project/pom:profiles -%pom_remove_dep :::test - %build +%if %{without bootstrap} export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/junit` export CLASSPATH= ant \ -Dcompile.source=1.8 -Dcompile.target=1.8 \ -Dfinal.name=%{short_name} \ jar javadoc +%else +mkdir -p target/classes +javac -source 8 -target 8 -encoding utf-8 -d target/classes $(find src/main/java -name \*.java | xargs) +jar -cf target/%{short_name}.jar -C target/classes . +%endif %install # jars install -dm 755 %{buildroot}%{_javadir} -install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar -ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar +install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{full_name}.jar +ln -sf %{full_name}.jar %{buildroot}%{_javadir}/%{short_name}.jar + +%if %{without bootstrap} # pom install -dm 755 %{buildroot}%{_mavenpomdir} -install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom -%add_maven_depmap %{name}.pom %{name}.jar +%mvn_install_pom pom.xml %{buildroot}%{_mavenpomdir}/%{full_name}.pom +%add_maven_depmap %{full_name}.pom %{full_name}.jar # javadoc install -dm 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ -%fdupes -s %{buildroot}%{_javadocdir}/%{name}/ +cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{full_name}/ +%fdupes -s %{buildroot}%{_javadocdir}/%{full_name}/ %files -f .mfiles %license LICENSE.txt NOTICE.txt @@ -102,6 +114,14 @@ cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ %{_javadir}/%{short_name}.jar %files javadoc -%{_javadocdir}/%{name} +%{_javadocdir}/%{full_name} + +%else + +%files +%license LICENSE.txt NOTICE.txt +%{_javadir}/*.jar + +%endif %changelog From 04094eb4731364dd54684dab5adc8b1c1b135d00d18855583ea724fab0d137c5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 31 Aug 2023 06:36:21 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-lang3?expand=0&rev=31 --- apache-commons-lang3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/apache-commons-lang3.spec b/apache-commons-lang3.spec index f4eaf2a..59ec1ab 100644 --- a/apache-commons-lang3.spec +++ b/apache-commons-lang3.spec @@ -48,6 +48,7 @@ Conflicts: %{full_name}-bootstrap Provides: %{short_name} = %{version}-%{release} Obsoletes: %{full_name}-bootstrap %endif +#!BuildIgnore: bcel xalan-j2 xerces-j2 %description The standard Java libraries fail to provide enough methods for From 0af1bd16519f0948d2ae5b0e12a09a1c6367af9bdc6746fcd2a4dd25c471cdad Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 31 Aug 2023 06:41:04 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-lang3?expand=0&rev=32 --- _multibuild | 3 --- apache-commons-lang3.changes | 8 +------ apache-commons-lang3.spec | 41 ++++++------------------------------ 3 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 _multibuild diff --git a/_multibuild b/_multibuild deleted file mode 100644 index 655ec81..0000000 --- a/_multibuild +++ /dev/null @@ -1,3 +0,0 @@ - - bootstrap - diff --git a/apache-commons-lang3.changes b/apache-commons-lang3.changes index 9c02ad8..9a9b4bd 100644 --- a/apache-commons-lang3.changes +++ b/apache-commons-lang3.changes @@ -1,13 +1,7 @@ ------------------------------------------------------------------- Wed Aug 30 20:57:36 UTC 2023 - Fridrich Strba -- Split into bootstrap and full package using the _multibuild - * this should allow to build the new bcel without cycles -- Removed patch: - * apache-commons-lang3-junit-bom.patch - + not needed since we install the pom file using the new - %%mvn_install_pom macro which sanitizes the pom file to the - bare runtime dependencies. +- Break cycle with the new bcel ------------------------------------------------------------------- Wed Dec 29 15:18:48 UTC 2021 - Pedro Monreal diff --git a/apache-commons-lang3.spec b/apache-commons-lang3.spec index 59ec1ab..d573d70 100644 --- a/apache-commons-lang3.spec +++ b/apache-commons-lang3.spec @@ -18,13 +18,7 @@ %define base_name lang3 %define short_name commons-%{base_name} -%define full_name apache-%{short_name} -%global flavor @BUILD_FLAVOR@%{nil} -%if "%{flavor}" == "bootstrap" -%bcond_without bootstrap -%else -%bcond_with bootstrap -%endif +Name: apache-%{short_name} Version: 3.12.0 Release: 0 Summary: Apache Commons Lang Package @@ -34,21 +28,15 @@ URL: https://commons.apache.org/proper/commons-lang/ Source0: https://dlcdn.apache.org/commons/lang/source/%{short_name}-%{version}-src.tar.gz Source1: build.xml Source2: default.properties -BuildRequires: java-devel >= 1.8 -BuildArch: noarch -%if %{with bootstrap} -Name: %{full_name}-bootstrap -Conflicts: %{full_name} -%else -Name: %{full_name} BuildRequires: ant BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local >= 6 -Conflicts: %{full_name}-bootstrap +#!BuildIgnore: bcel +#!BuildIgnore: xalan-j2 +#!BuildIgnore: xerces-j2 Provides: %{short_name} = %{version}-%{release} -Obsoletes: %{full_name}-bootstrap -%endif -#!BuildIgnore: bcel xalan-j2 xerces-j2 +BuildArch: noarch %description The standard Java libraries fail to provide enough methods for @@ -78,18 +66,12 @@ cp %{SOURCE2} . sed -i 's/\r//' *.txt %build -%if %{without bootstrap} export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/junit` export CLASSPATH= ant \ -Dcompile.source=1.8 -Dcompile.target=1.8 \ -Dfinal.name=%{short_name} \ jar javadoc -%else -mkdir -p target/classes -javac -source 8 -target 8 -encoding utf-8 -d target/classes $(find src/main/java -name \*.java | xargs) -jar -cf target/%{short_name}.jar -C target/classes . -%endif %install @@ -98,10 +80,9 @@ install -dm 755 %{buildroot}%{_javadir} install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{full_name}.jar ln -sf %{full_name}.jar %{buildroot}%{_javadir}/%{short_name}.jar -%if %{without bootstrap} # pom install -dm 755 %{buildroot}%{_mavenpomdir} -%mvn_install_pom pom.xml %{buildroot}%{_mavenpomdir}/%{full_name}.pom +%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{full_name}.pom %add_maven_depmap %{full_name}.pom %{full_name}.jar # javadoc @@ -117,12 +98,4 @@ cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{full_name}/ %files javadoc %{_javadocdir}/%{full_name} -%else - -%files -%license LICENSE.txt NOTICE.txt -%{_javadir}/*.jar - -%endif - %changelog From 406a63f724ba1369533006a1f43861751f97fe73af3548f0894e1341a8ce41dc Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 31 Aug 2023 06:42:30 +0000 Subject: [PATCH 4/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-lang3?expand=0&rev=33 --- apache-commons-lang3.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apache-commons-lang3.spec b/apache-commons-lang3.spec index d573d70..5d4a212 100644 --- a/apache-commons-lang3.spec +++ b/apache-commons-lang3.spec @@ -77,18 +77,18 @@ ant \ # jars install -dm 755 %{buildroot}%{_javadir} -install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{full_name}.jar -ln -sf %{full_name}.jar %{buildroot}%{_javadir}/%{short_name}.jar +install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar # pom install -dm 755 %{buildroot}%{_mavenpomdir} -%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{full_name}.pom -%add_maven_depmap %{full_name}.pom %{full_name}.jar +%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom +%add_maven_depmap %{name}.pom %{name}.jar # javadoc install -dm 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{full_name}/ -%fdupes -s %{buildroot}%{_javadocdir}/%{full_name}/ +cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ +%fdupes -s %{buildroot}%{_javadocdir}/%{name}/ %files -f .mfiles %license LICENSE.txt NOTICE.txt @@ -96,6 +96,6 @@ cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{full_name}/ %{_javadir}/%{short_name}.jar %files javadoc -%{_javadocdir}/%{full_name} +%{_javadocdir}/%{name} %changelog From 4e6f35284f63f4dbc96eecb6d17386d1083b9b5e27a0e77d2313f771dc6df560 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 31 Aug 2023 08:22:15 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-lang3?expand=0&rev=34 --- apache-commons-lang3.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apache-commons-lang3.changes b/apache-commons-lang3.changes index 9a9b4bd..41cf2da 100644 --- a/apache-commons-lang3.changes +++ b/apache-commons-lang3.changes @@ -2,6 +2,11 @@ Wed Aug 30 20:57:36 UTC 2023 - Fridrich Strba - Break cycle with the new bcel +- Removed patch: + * apache-commons-lang3-junit-bom.patch + + not needed since we install the pom file using the new + %%mvn_install_pom macro which sanitizes the pom file to the + bare runtime dependencies. ------------------------------------------------------------------- Wed Dec 29 15:18:48 UTC 2021 - Pedro Monreal