Accepting request 956674 from Java:packages

Fix eventual build against reload4j instead of log4j12

OBS-URL: https://build.opensuse.org/request/show/956674
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/slf4j?expand=0&rev=26
This commit is contained in:
Dominique Leuenberger 2022-02-23 15:25:49 +00:00 committed by Git OBS Bridge
commit 2f70f227c4
5 changed files with 30 additions and 2 deletions

10
slf4j-reload4j.patch Normal file
View File

@ -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);
}

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 22 09:50:47 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* slf4j-reload4j.patch
+ fix build against reload4j
-------------------------------------------------------------------
Wed Dec 29 10:53:06 UTC 2021 - Pedro Monreal <pmonreal@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2000-2009, JPackage Project
#
# All modifications and additions to the file contributed by third parties
@ -29,6 +29,7 @@ URL: https://www.slf4j.org/
Source0: https://github.com/qos-ch/%{base_name}/archive/v_%{version}.tar.gz
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}-v_%{version}
%patch2 -p1
%patch3 -p1
find . -name "*.jar" | xargs rm
cp -p %{SOURCE1} APACHE-LICENSE

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 22 09:50:47 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* slf4j-reload4j.patch
+ fix build against reload4j
-------------------------------------------------------------------
Wed Dec 29 10:53:06 UTC 2021 - Pedro Monreal <pmonreal@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package slf4j
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2000-2009, JPackage Project
#
# All modifications and additions to the file contributed by third parties
@ -30,6 +30,7 @@ Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
Source2: build.xml.tar.bz2
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
@ -135,6 +136,7 @@ JUL to SLF4J bridge.
%setup -q -n %{name}-v_%{version} -a2
%patch1 -p1
%patch2 -p1
%patch3 -p1
find . -name "*.jar" | xargs rm
cp -p %{SOURCE1} APACHE-LICENSE