From b0b29499b72e8f2e799c08bb84a9aef4753186bc02d40c1f548a645b25268171 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 22 Feb 2022 20:47:11 +0000 Subject: [PATCH 1/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=61 --- _service | 15 +++++++++++++++ build.xml.tar.bz2 | 3 --- build.xml.tar.xz | 3 +++ slf4j-1.7.32.tar.xz | 3 +++ slf4j-sources.changes | 7 +++++++ slf4j-sources.spec | 4 ++-- slf4j.changes | 7 +++++++ slf4j.spec | 9 +++++---- v_1.7.32.tar.gz | 3 --- 9 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 _service delete mode 100644 build.xml.tar.bz2 create mode 100644 build.xml.tar.xz create mode 100644 slf4j-1.7.32.tar.xz delete mode 100644 v_1.7.32.tar.gz diff --git a/_service b/_service new file mode 100644 index 0000000..12ff674 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://github.com/qos-ch/slf4j.git + v_1.7.32 + v_* + @PARENT_TAG@ + v_(.*) + + + *.tar + xz + + + diff --git a/build.xml.tar.bz2 b/build.xml.tar.bz2 deleted file mode 100644 index 0a471ac..0000000 --- a/build.xml.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:748214c48efa50088936dd57575a72555dde17bf79f0b24240e5e62605e7d9c6 -size 9405 diff --git a/build.xml.tar.xz b/build.xml.tar.xz new file mode 100644 index 0000000..307baa0 --- /dev/null +++ b/build.xml.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a4b31b1488ed43e9239545ea99b6ed9ada625133cf767828afd8f3247680ea7 +size 7880 diff --git a/slf4j-1.7.32.tar.xz b/slf4j-1.7.32.tar.xz new file mode 100644 index 0000000..62228eb --- /dev/null +++ b/slf4j-1.7.32.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3394567be9f31307d69e4d41a62e8be48f8c080ed9ae8ec6911515fe64ab948b +size 2022484 diff --git a/slf4j-sources.changes b/slf4j-sources.changes index 31b6863..91f12d8 100644 --- a/slf4j-sources.changes +++ b/slf4j-sources.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 22 20:45:12 UTC 2022 - Fridrich Strba + +- Fetch sources using source service +- Depend for build on reload4j +- Fix dependencies of the module slf4j-log4j12 + ------------------------------------------------------------------- Tue Feb 22 09:50:47 UTC 2022 - Fridrich Strba diff --git a/slf4j-sources.spec b/slf4j-sources.spec index 03ca6ce..fde97d3 100644 --- a/slf4j-sources.spec +++ b/slf4j-sources.spec @@ -26,7 +26,7 @@ Summary: SLF4J Source JARs License: Apache-2.0 AND MIT Group: Development/Libraries/Java URL: https://www.slf4j.org/ -Source0: https://github.com/qos-ch/%{base_name}/archive/v_%{version}.tar.gz +Source0: %{base_name}-%{version}.tar.xz Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Patch2: slf4j-commons-lang3.patch Patch3: slf4j-reload4j.patch @@ -37,7 +37,7 @@ BuildArch: noarch SLF4J Source JARs. %prep -%setup -q -n %{base_name}-v_%{version} +%setup -q -n %{base_name}-%{version} %patch2 -p1 %patch3 -p1 find . -name "*.jar" | xargs rm diff --git a/slf4j.changes b/slf4j.changes index 31b6863..91f12d8 100644 --- a/slf4j.changes +++ b/slf4j.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 22 20:45:12 UTC 2022 - Fridrich Strba + +- Fetch sources using source service +- Depend for build on reload4j +- Fix dependencies of the module slf4j-log4j12 + ------------------------------------------------------------------- Tue Feb 22 09:50:47 UTC 2022 - Fridrich Strba diff --git a/slf4j.spec b/slf4j.spec index 59ad479..882c528 100644 --- a/slf4j.spec +++ b/slf4j.spec @@ -25,9 +25,9 @@ Summary: Simple Logging Facade for Java License: Apache-2.0 AND MIT Group: Development/Libraries/Java URL: https://www.slf4j.org/ -Source0: https://github.com/qos-ch/%{name}/archive/v_%{version}.tar.gz +Source0: %{name}-%{version}.tar.xz Source1: http://www.apache.org/licenses/LICENSE-2.0.txt -Source2: build.xml.tar.bz2 +Source2: build.xml.tar.xz Patch1: build-remove-slf4j_api-binder.patch Patch2: slf4j-commons-lang3.patch Patch3: slf4j-reload4j.patch @@ -41,7 +41,7 @@ BuildRequires: javapackages-local BuildRequires: javapackages-tools BuildRequires: javassist >= 3.4 BuildRequires: junit >= 3.8.2 -BuildRequires: log4j12-mini +BuildRequires: reload4j Requires: cal10n Requires: java # this is ugly hack, which creates package which requires the same, @@ -86,6 +86,7 @@ SLF4J JDK14 Binding. %package log4j12 Summary: SLF4J LOG4J-12 Binding Group: Development/Libraries/Java +Requires: mvn(log4j:log4j) Requires: mvn(org.slf4j:slf4j-api) = %{version} %description log4j12 @@ -133,7 +134,7 @@ Requires: mvn(org.slf4j:slf4j-api) = %{version} JUL to SLF4J bridge. %prep -%setup -q -n %{name}-v_%{version} -a2 +%setup -q -n %{name}-%{version} -a2 %patch1 -p1 %patch2 -p1 %patch3 -p1 diff --git a/v_1.7.32.tar.gz b/v_1.7.32.tar.gz deleted file mode 100644 index 47e2349..0000000 --- a/v_1.7.32.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c5d99d1fbd06ad33fcbe732c3696606262d129375ea0e788ee88514eac24389 -size 2277207 From a5c077e3d26e64a831be2628b6426335e3d948ea771c791bbb444ecf0926c9f2 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 22 Feb 2022 20:49:52 +0000 Subject: [PATCH 2/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=62 --- slf4j-sources.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/slf4j-sources.spec b/slf4j-sources.spec index fde97d3..daab6e5 100644 --- a/slf4j-sources.spec +++ b/slf4j-sources.spec @@ -43,23 +43,17 @@ SLF4J Source JARs. find . -name "*.jar" | xargs rm cp -p %{SOURCE1} APACHE-LICENSE -# Compat symlinks -%{mvn_file} ':{*}' %{base_name}/@1 -%{mvn_package} :::sources: - %build rm -f */src/main/resources/META-INF/MANIFEST.MF for i in api ext jcl jdk14 log4j12 nop simple; do mkdir -p %{base_name}-${i}/target jar cf %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar -C %{base_name}-${i}/src/main/java . jar uf %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar -C %{base_name}-${i}/src/main/resources . -# %{mvn_artifact} org.slf4j:%{base_name}-${i}:jar:sources:%{version} %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar done for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do mkdir -p ${i}/target jar cf ${i}/target/${i}-%{version}-sources.jar -C ${i}/src/main/java . jar uf ${i}/target/${i}-%{version}-sources.jar -C ${i}/src/main/resources . -# %{mvn_artifact} org.slf4j:${i}:jar:sources:%{version} ${i}/target/${i}-%{version}-sources.jar done %install From 743f9474a58f5fdd05d4237ed0f2ac9140f7d0d5435bc8cc970ec18404262bde Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 23 Feb 2022 07:29:44 +0000 Subject: [PATCH 3/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=63 --- slf4j-reload4j.patch | 10 ---------- slf4j-sources.changes | 7 +++++++ slf4j-sources.spec | 2 -- slf4j.changes | 7 +++++++ slf4j.spec | 2 -- 5 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 slf4j-reload4j.patch diff --git a/slf4j-reload4j.patch b/slf4j-reload4j.patch deleted file mode 100644 index 473ed5c..0000000 --- a/slf4j-reload4j.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- slf4j-v_1.7.32/slf4j-log4j12/src/main/java/org/apache/log4j/MDCFriend.java 2021-07-29 20:27:41.000000000 +0200 -+++ slf4j-v_1.7.32/slf4j-log4j12/src/main/java/org/apache/log4j/MDCFriend.java 2022-02-22 10:46:34.151501274 +0100 -@@ -10,7 +10,6 @@ - public static void fixForJava9() { - if (MDC.mdc.tlm == null) { - MDC.mdc.tlm = new ThreadLocalMap(); -- MDC.mdc.java1 = false; - setRemoveMethod(MDC.mdc); - } - diff --git a/slf4j-sources.changes b/slf4j-sources.changes index 91f12d8..6c8ceee 100644 --- a/slf4j-sources.changes +++ b/slf4j-sources.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 23 07:17:10 UTC 2022 - Fridrich Strba + +- Removed patch: + * slf4j-reload4j.patch + + the incompatibility is now handled in reload4j itself + ------------------------------------------------------------------- Tue Feb 22 20:45:12 UTC 2022 - Fridrich Strba diff --git a/slf4j-sources.spec b/slf4j-sources.spec index daab6e5..933d51f 100644 --- a/slf4j-sources.spec +++ b/slf4j-sources.spec @@ -29,7 +29,6 @@ URL: https://www.slf4j.org/ Source0: %{base_name}-%{version}.tar.xz Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Patch2: slf4j-commons-lang3.patch -Patch3: slf4j-reload4j.patch BuildRequires: javapackages-local BuildArch: noarch @@ -39,7 +38,6 @@ SLF4J Source JARs. %prep %setup -q -n %{base_name}-%{version} %patch2 -p1 -%patch3 -p1 find . -name "*.jar" | xargs rm cp -p %{SOURCE1} APACHE-LICENSE diff --git a/slf4j.changes b/slf4j.changes index 91f12d8..6c8ceee 100644 --- a/slf4j.changes +++ b/slf4j.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 23 07:17:10 UTC 2022 - Fridrich Strba + +- Removed patch: + * slf4j-reload4j.patch + + the incompatibility is now handled in reload4j itself + ------------------------------------------------------------------- Tue Feb 22 20:45:12 UTC 2022 - Fridrich Strba diff --git a/slf4j.spec b/slf4j.spec index 882c528..23934a0 100644 --- a/slf4j.spec +++ b/slf4j.spec @@ -30,7 +30,6 @@ Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Source2: build.xml.tar.xz Patch1: build-remove-slf4j_api-binder.patch Patch2: slf4j-commons-lang3.patch -Patch3: slf4j-reload4j.patch BuildRequires: ant >= 1.6.5 BuildRequires: ant-junit >= 1.6.5 BuildRequires: apache-commons-lang3 @@ -137,7 +136,6 @@ JUL to SLF4J bridge. %setup -q -n %{name}-%{version} -a2 %patch1 -p1 %patch2 -p1 -%patch3 -p1 find . -name "*.jar" | xargs rm cp -p %{SOURCE1} APACHE-LICENSE From ff7521d9b549fc5093fb868e518ddab51511f0f98eac0cbbcb014206371118f4 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Wed, 23 Feb 2022 15:25:49 +0000 Subject: [PATCH 4/7] Updating link to change in openSUSE:Factory/slf4j revision 26.0 OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=f7b33317962a4e50fee78afebaabcd2d --- slf4j-reload4j.patch | 10 ++++++++++ slf4j-sources.spec | 2 ++ slf4j.spec | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 slf4j-reload4j.patch diff --git a/slf4j-reload4j.patch b/slf4j-reload4j.patch new file mode 100644 index 0000000..473ed5c --- /dev/null +++ b/slf4j-reload4j.patch @@ -0,0 +1,10 @@ +--- slf4j-v_1.7.32/slf4j-log4j12/src/main/java/org/apache/log4j/MDCFriend.java 2021-07-29 20:27:41.000000000 +0200 ++++ slf4j-v_1.7.32/slf4j-log4j12/src/main/java/org/apache/log4j/MDCFriend.java 2022-02-22 10:46:34.151501274 +0100 +@@ -10,7 +10,6 @@ + public static void fixForJava9() { + if (MDC.mdc.tlm == null) { + MDC.mdc.tlm = new ThreadLocalMap(); +- MDC.mdc.java1 = false; + setRemoveMethod(MDC.mdc); + } + diff --git a/slf4j-sources.spec b/slf4j-sources.spec index 933d51f..daab6e5 100644 --- a/slf4j-sources.spec +++ b/slf4j-sources.spec @@ -29,6 +29,7 @@ URL: https://www.slf4j.org/ Source0: %{base_name}-%{version}.tar.xz Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Patch2: slf4j-commons-lang3.patch +Patch3: slf4j-reload4j.patch BuildRequires: javapackages-local BuildArch: noarch @@ -38,6 +39,7 @@ SLF4J Source JARs. %prep %setup -q -n %{base_name}-%{version} %patch2 -p1 +%patch3 -p1 find . -name "*.jar" | xargs rm cp -p %{SOURCE1} APACHE-LICENSE diff --git a/slf4j.spec b/slf4j.spec index 23934a0..882c528 100644 --- a/slf4j.spec +++ b/slf4j.spec @@ -30,6 +30,7 @@ Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Source2: build.xml.tar.xz Patch1: build-remove-slf4j_api-binder.patch Patch2: slf4j-commons-lang3.patch +Patch3: slf4j-reload4j.patch BuildRequires: ant >= 1.6.5 BuildRequires: ant-junit >= 1.6.5 BuildRequires: apache-commons-lang3 @@ -136,6 +137,7 @@ JUL to SLF4J bridge. %setup -q -n %{name}-%{version} -a2 %patch1 -p1 %patch2 -p1 +%patch3 -p1 find . -name "*.jar" | xargs rm cp -p %{SOURCE1} APACHE-LICENSE From 8adf8060cff7d57d0d495145c4486f383491d4c1e272e397a36ddf9740e8ed55 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 24 Feb 2022 07:09:55 +0000 Subject: [PATCH 5/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=64 --- slf4j-sources.changes | 202 ------------------------------------------ slf4j-sources.spec | 75 ---------------- slf4j.changes | 6 ++ slf4j.spec | 50 ++++++++++- 4 files changed, 54 insertions(+), 279 deletions(-) delete mode 100644 slf4j-sources.changes delete mode 100644 slf4j-sources.spec diff --git a/slf4j-sources.changes b/slf4j-sources.changes deleted file mode 100644 index 6c8ceee..0000000 --- a/slf4j-sources.changes +++ /dev/null @@ -1,202 +0,0 @@ -------------------------------------------------------------------- -Wed Feb 23 07:17:10 UTC 2022 - Fridrich Strba - -- Removed patch: - * slf4j-reload4j.patch - + the incompatibility is now handled in reload4j itself - -------------------------------------------------------------------- -Tue Feb 22 20:45:12 UTC 2022 - Fridrich Strba - -- Fetch sources using source service -- Depend for build on reload4j -- Fix dependencies of the module slf4j-log4j12 - -------------------------------------------------------------------- -Tue Feb 22 09:50:47 UTC 2022 - Fridrich Strba - -- Added patch: - * slf4j-reload4j.patch - + fix build against reload4j - -------------------------------------------------------------------- -Wed Dec 29 10:53:06 UTC 2021 - Pedro Monreal - -- Update to upstream version 1.7.32 - * In the slf4j-simple module, SimpleLogger now caters for - concurrent access. -- Update to upstream version 1.7.31 - * In the jcl-over-slf4j module avoid Object to String conversion. - * In the log4j-over-slf4j module added empty constructors for - ConsoleAppender. - -------------------------------------------------------------------- -Sat Apr 11 19:11:24 UTC 2020 - Fridrich Strba - -- Don't use %%mvn_artifact, but %%add_maven_depmap for the - sources artifacts, so that they don't suck in half of the xmvn* - stack in order to build - -------------------------------------------------------------------- -Wed Feb 26 12:40:57 UTC 2020 - Fridrich Strba - -- Upgrade to upstream version 1.7.30 -- Removed patch: - * slf4j-Disallow-EventData-deserialization-by-default.patch - + not needed any more - -------------------------------------------------------------------- -Wed Dec 18 09:09:30 UTC 2019 - Fridrich Strba - -- Use the source tarball from github, since the previous one is - not accessible anymore -- Modified patches: - * slf4j-Disallow-EventData-deserialization-by-default.patch - + Adapt to unix line-ends - * slf4j-commons-lang3.patch - + Adapt to unix line-ends - + Do not patch inexisting files - -------------------------------------------------------------------- -Sat Oct 5 12:59:06 UTC 2019 - Fridrich Strba - -- Remove references to parent from all pom files -- Avoid dependencies without version tag - -------------------------------------------------------------------- -Tue Oct 1 09:01:32 UTC 2019 - Fridrich Strba - -- Build against the compatibility log4j12-mini package -- Depend on mvn(log4j:log4j:1.2.17) provided by the compatibility - packages - -------------------------------------------------------------------- -Tue Mar 19 05:31:47 UTC 2019 - Fridrich Strba - -- Fix an unexpanded ${parsedVersion.osgiVersion} variable in the - manifests. - -------------------------------------------------------------------- -Mon Mar 18 09:34:22 UTC 2019 - Fridrich Strba - -- Split slf4j package into several sub-packages leaving only - parent, api, simple and nop in the main package -- Package slf4j source jar files in a separate spec file - -------------------------------------------------------------------- -Tue Feb 26 09:24:00 UTC 2019 - Fridrich Strba - -- Clean up the maven pom installation - -------------------------------------------------------------------- -Mon Oct 22 10:44:00 UTC 2018 - Fridrich Strba - -- Upgrade to 1.7.25 -- Modify the build.xml file tarball to correspond to the right - version -- Modify slf4j-commons-lang3.patch to the new context - -------------------------------------------------------------------- -Mon Oct 15 14:52:23 UTC 2018 - Fridrich Strba - -- Install the maven artefacts to have mvn dependencies/provides - generated automatically - -------------------------------------------------------------------- -Fri May 18 09:17:44 UTC 2018 - pmonrealgonzalez@suse.com - -- Security fix: [bsc#1085970, CVE-2018-8088] - * Disallow EventData deserialization by default - * Added slf4j-Disallow-EventData-deserialization-by-default.patch - refreshed from Fedora [ https://src.fedoraproject.org/rpms/slf4j/ - blob/d7cd96bc7a8e8d8d62c8bc62baa7df02cef56c63/f/ - 0001-Disallow-EventData-deserialization-by-default.patch ] - -------------------------------------------------------------------- -Wed Oct 11 09:08:10 UTC 2017 - fstrba@suse.com - -- Adeed patch: - * slf4j-commons-lang3.patch - + Use apache-commons-lang3 instead of apache-commons-lang - -------------------------------------------------------------------- -Sun Sep 10 13:38:22 UTC 2017 - fstrba@suse.com - -- Specify java source and target levels 1.6 in order to allow - building with jdk9 -- Disable doclint to avoid bailing out on formatting errors -- Recompress the build.xml.tar.bz2, so that it is a real tar.bz2 - -------------------------------------------------------------------- -Fri May 19 16:49:25 UTC 2017 - tchvatal@suse.com - -- Remove some not-needed deps - -------------------------------------------------------------------- -Tue Nov 10 09:07:58 UTC 2015 - dmacvicar@suse.de - -- note: - slf4j-pom_xml.patch was removed (not relevant anymore) - -------------------------------------------------------------------- -Fri Oct 23 10:14:51 UTC 2015 - dmacvicar@suse.de - -- remove all unnecessary maven depmap metadata - -------------------------------------------------------------------- -Fri Oct 23 08:56:21 UTC 2015 - dmacvicar@suse.de - -- update to version 1.7.12 - -------------------------------------------------------------------- -Wed Mar 18 09:46:20 UTC 2015 - tchvatal@suse.com - -- Fix build with new javapackages-tools - -------------------------------------------------------------------- -Fri Aug 29 12:50:01 UTC 2014 - coolo@suse.com - -- build against log4j-mini to avoid a cycle - -------------------------------------------------------------------- -Thu Sep 19 14:22:54 UTC 2013 - mvyskocil@suse.com - -- self-provide osgi(slf4j.api) symbol - -------------------------------------------------------------------- -Fri Sep 13 10:51:12 UTC 2013 - mvyskocil@suse.com - -- fix build with apache-commons-lang - -------------------------------------------------------------------- -Wed Sep 11 07:49:42 UTC 2013 - mvyskocil@suse.com - -- use add_maven_depmap from javapackages-tools - -------------------------------------------------------------------- -Mon Sep 9 11:06:22 UTC 2013 - tchvatal@suse.com - -- Move from jpackage-utils to javapackage-tools - -------------------------------------------------------------------- -Fri Apr 27 09:59:40 UTC 2012 - mvyskocil@suse.cz - -- format spec file to be suitable for Factory - -------------------------------------------------------------------- -Mon Dec 12 19:31:15 UTC 2011 - dmacvicar@suse.de - -- Fix absolute path in maven-build.xml that prevented - package task in newer versions of openSUSE -- Fix javadoc group - -------------------------------------------------------------------- -Wed Jul 27 09:08:44 UTC 2011 - dmacvicar@suse.de - -- Completely remove all maven build parts. Build with ant - -------------------------------------------------------------------- -Mon Jul 4 21:18:38 UTC 2011 - dmacvicar@suse.de - -- add BuildRoot tag - diff --git a/slf4j-sources.spec b/slf4j-sources.spec deleted file mode 100644 index daab6e5..0000000 --- a/slf4j-sources.spec +++ /dev/null @@ -1,75 +0,0 @@ -# -# spec file -# -# Copyright (c) 2022 SUSE LLC -# Copyright (c) 2000-2009, JPackage Project -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ -# - - -%global base_name slf4j -Name: %{base_name}-sources -Version: 1.7.32 -Release: 0 -Summary: SLF4J Source JARs -# the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT -License: Apache-2.0 AND MIT -Group: Development/Libraries/Java -URL: https://www.slf4j.org/ -Source0: %{base_name}-%{version}.tar.xz -Source1: http://www.apache.org/licenses/LICENSE-2.0.txt -Patch2: slf4j-commons-lang3.patch -Patch3: slf4j-reload4j.patch -BuildRequires: javapackages-local -BuildArch: noarch - -%description -SLF4J Source JARs. - -%prep -%setup -q -n %{base_name}-%{version} -%patch2 -p1 -%patch3 -p1 -find . -name "*.jar" | xargs rm -cp -p %{SOURCE1} APACHE-LICENSE - -%build -rm -f */src/main/resources/META-INF/MANIFEST.MF -for i in api ext jcl jdk14 log4j12 nop simple; do - mkdir -p %{base_name}-${i}/target - jar cf %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar -C %{base_name}-${i}/src/main/java . - jar uf %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar -C %{base_name}-${i}/src/main/resources . -done -for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do - mkdir -p ${i}/target - jar cf ${i}/target/${i}-%{version}-sources.jar -C ${i}/src/main/java . - jar uf ${i}/target/${i}-%{version}-sources.jar -C ${i}/src/main/resources . -done - -%install -install -dm 0755 %{buildroot}%{_javadir}/%{base_name} -for i in api ext jcl jdk14 log4j12 nop simple; do - install -pm 0644 %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar \ - %{buildroot}%{_javadir}/%{base_name}/%{base_name}-${i}-sources.jar - %add_maven_depmap org.slf4j:%{base_name}-${i}:jar:sources:%{version} %{base_name}/%{base_name}-${i}-sources.jar -done -for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do - install -pm 0644 ${i}/target/${i}-%{version}-sources.jar \ - %{buildroot}%{_javadir}/%{base_name}/${i}-sources.jar - %add_maven_depmap org.slf4j:${i}:jar:sources:%{version} %{base_name}/${i}-sources.jar -done - -%files -f .mfiles -%license LICENSE.txt APACHE-LICENSE - -%changelog diff --git a/slf4j.changes b/slf4j.changes index 6c8ceee..4ba513e 100644 --- a/slf4j.changes +++ b/slf4j.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 24 07:08:36 UTC 2022 - Fridrich Strba + +- Do not use a separate spec file for sources, since now they + can be built in the same run as the other artifacts + ------------------------------------------------------------------- Wed Feb 23 07:17:10 UTC 2022 - Fridrich Strba diff --git a/slf4j.spec b/slf4j.spec index 882c528..43312ad 100644 --- a/slf4j.spec +++ b/slf4j.spec @@ -133,8 +133,15 @@ Requires: mvn(org.slf4j:slf4j-api) = %{version} %description -n jul-to-slf4j JUL to SLF4J bridge. +%package sources +Summary: SLF4J Source JARs +Group: Development/Libraries/Java + +%description sources +SLF4J Source JARs. + %prep -%setup -q -n %{name}-%{version} -a2 +%setup -q -a2 %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -167,7 +174,7 @@ sed -i "/Import-Package/s/$/;resolution:=optional/" slf4j-api/src/main/resources %pom_change_dep -r -f ::::: ::::: %build -export CLASSPATH=$(build-classpath log4j12/log4j-12 \ +export CLASSPATH=$(build-classpath reload4j \ commons-logging \ commons-lang3 \ javassist-3.14.0 \ @@ -179,20 +186,46 @@ ant -Dmaven2.jpp.mode=true \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ package javadoc \ +# Sources +for i in api ext jcl jdk14 log4j12 nop simple; do + mkdir -p %{name}-${i}/target + jar cf %{name}-${i}/target/%{name}-${i}-%{version}-sources.jar -C %{name}-${i}/src/main/java . + jar uf %{name}-${i}/target/%{name}-${i}-%{version}-sources.jar -C %{name}-${i}/src/main/resources . +done + +for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do + mkdir -p ${i}/target + jar cf ${i}/target/${i}-%{version}-sources.jar -C ${i}/src/main/java . + jar uf ${i}/target/${i}-%{version}-sources.jar -C ${i}/src/main/resources . +done + %install # jars install -d -m 0755 %{buildroot}%{_javadir}/%{name} + for i in api ext jcl jdk14 log4j12 nop simple; do install -m 644 slf4j-${i}/target/slf4j-${i}-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/${i}.jar ln -sf ${i}.jar %{buildroot}%{_javadir}/%{name}/%{name}-${i}.jar done + for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do install -m 644 ${i}/target/${i}-%{version}.jar %{buildroot}%{_javadir}/%{name}/${i}.jar done +for i in api ext jcl jdk14 log4j12 nop simple; do + install -pm 0644 %{name}-${i}/target/%{name}-${i}-%{version}-sources.jar \ + %{buildroot}%{_javadir}/%{name}/%{name}-${i}-sources.jar +done + +for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do + install -pm 0644 ${i}/target/${i}-%{version}-sources.jar \ + %{buildroot}%{_javadir}/%{name}/${i}-sources.jar +done + # poms install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name} + for i in api ext jcl jdk14 log4j12 nop simple; do %pom_remove_parent slf4j-${i} %pom_xpath_inject "pom:project" " @@ -200,6 +233,7 @@ for i in api ext jcl jdk14 log4j12 nop simple; do %{version}" slf4j-${i} install -pm 644 slf4j-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom done + for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do %pom_remove_parent ${i} %pom_xpath_inject "pom:project" " @@ -207,13 +241,23 @@ for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do %{version}" ${i} install -pm 644 ${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom done + for i in api nop simple; do %add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar done + for i in ext jcl jdk14 log4j12 jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do %add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar -f ${i} done +for i in api ext jcl jdk14 log4j12 nop simple; do + %add_maven_depmap org.slf4j:%{name}-${i}:jar:sources:%{version} %{name}/%{name}-${i}-sources.jar -f sources +done + +for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do + %add_maven_depmap org.slf4j:${i}:jar:sources:%{version} %{name}/${i}-sources.jar -f sources +done + # manual install -d -m 0755 %{buildroot}%{_docdir}/%{name}-%{version} rm -f target/site/.htaccess @@ -250,6 +294,8 @@ rm -rf target/site %files -n jul-to-slf4j -f .mfiles-jul-to-slf4j +%files sources -f .mfiles-sources + %files javadoc %{_javadocdir}/%{name} From 051f906e26ddb91271f8d52a14efebf65693d9ac8bf2e2c333939ff0ef03461b Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 24 Feb 2022 07:32:17 +0000 Subject: [PATCH 6/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=65 --- slf4j.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/slf4j.spec b/slf4j.spec index 43312ad..c905000 100644 --- a/slf4j.spec +++ b/slf4j.spec @@ -30,7 +30,6 @@ Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Source2: build.xml.tar.xz Patch1: build-remove-slf4j_api-binder.patch Patch2: slf4j-commons-lang3.patch -Patch3: slf4j-reload4j.patch BuildRequires: ant >= 1.6.5 BuildRequires: ant-junit >= 1.6.5 BuildRequires: apache-commons-lang3 @@ -144,7 +143,6 @@ SLF4J Source JARs. %setup -q -a2 %patch1 -p1 %patch2 -p1 -%patch3 -p1 find . -name "*.jar" | xargs rm cp -p %{SOURCE1} APACHE-LICENSE From b0136615b16275f46f4126789d6feeae9cead01b64826a922e0e087f21e6ff16 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 24 Feb 2022 07:32:52 +0000 Subject: [PATCH 7/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=66 --- slf4j-reload4j.patch | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 slf4j-reload4j.patch diff --git a/slf4j-reload4j.patch b/slf4j-reload4j.patch deleted file mode 100644 index 473ed5c..0000000 --- a/slf4j-reload4j.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- slf4j-v_1.7.32/slf4j-log4j12/src/main/java/org/apache/log4j/MDCFriend.java 2021-07-29 20:27:41.000000000 +0200 -+++ slf4j-v_1.7.32/slf4j-log4j12/src/main/java/org/apache/log4j/MDCFriend.java 2022-02-22 10:46:34.151501274 +0100 -@@ -10,7 +10,6 @@ - public static void fixForJava9() { - if (MDC.mdc.tlm == null) { - MDC.mdc.tlm = new ThreadLocalMap(); -- MDC.mdc.java1 = false; - setRemoveMethod(MDC.mdc); - } -