From 13690b3eea183b70352237b4c517d5635f2365a7 Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 26 May 2022 09:53:46 -0400 Subject: [PATCH] Auto sync2gitlab import of jboss-logging-3.3.0-5.el8.src.rpm --- .gitignore | 1 + EMPTY | 1 - disable-log4j-backend.patch | 42 +++++++++++ jboss-logging.spec | 141 ++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 EMPTY create mode 100644 disable-log4j-backend.patch create mode 100644 jboss-logging.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..619cbc5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/3.3.0.Final.tar.gz diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/disable-log4j-backend.patch b/disable-log4j-backend.patch new file mode 100644 index 0000000..8d5c018 --- /dev/null +++ b/disable-log4j-backend.patch @@ -0,0 +1,42 @@ +--- jboss-logging-3.3.0.Final/src/main/java/org/jboss/logging/LoggerProviders.java~ 2015-05-28 18:49:04.000000000 +0200 ++++ jboss-logging-3.3.0.Final/src/main/java/org/jboss/logging/LoggerProviders.java 2018-05-25 08:48:45.830239006 +0200 +@@ -51,8 +51,6 @@ + return tryJBossLogManager(cl, "system property"); + } else if ("jdk".equalsIgnoreCase(loggerProvider)) { + return tryJDK("system property"); +- } else if ("log4j2".equalsIgnoreCase(loggerProvider)) { +- return tryLog4j2(cl, "system property"); + } else if ("log4j".equalsIgnoreCase(loggerProvider)) { + return tryLog4j(cl, "system property"); + } else if ("slf4j".equalsIgnoreCase(loggerProvider)) { +@@ -87,12 +85,6 @@ + // nope... + } + try { +- // MUST try Log4j 2.x BEFORE Log4j 1.x because Log4j 2.x also passes Log4j 1.x test in some circumstances +- return tryLog4j2(cl, null); +- } catch (Throwable t) { +- // nope... +- } +- try { + return tryLog4j(cl, null); + } catch (Throwable t) { + // nope... +@@ -118,17 +110,6 @@ + logProvider(provider, via); + return provider; + } +- +- // JBLOGGING-95 - Add support for Log4j 2.x +- private static LoggerProvider tryLog4j2(final ClassLoader cl, final String via) throws ClassNotFoundException { +- Class.forName("org.apache.logging.log4j.Logger", true, cl); +- Class.forName("org.apache.logging.log4j.LogManager", true, cl); +- Class.forName("org.apache.logging.log4j.spi.AbstractLogger", true, cl); +- LoggerProvider provider = new Log4j2LoggerProvider(); +- // if Log4j 2 has a bad implementation that doesn't extend AbstractLogger, we won't know until getting the first logger throws an exception +- logProvider(provider, via); +- return provider; +- } + + private static LoggerProvider tryLog4j(final ClassLoader cl, final String via) throws ClassNotFoundException { + Class.forName("org.apache.log4j.LogManager", true, cl); diff --git a/jboss-logging.spec b/jboss-logging.spec new file mode 100644 index 0000000..0ff9a86 --- /dev/null +++ b/jboss-logging.spec @@ -0,0 +1,141 @@ +%global namedreltag .Final +%global namedversion %{version}%{?namedreltag} + +Name: jboss-logging +Version: 3.3.0 +Release: 5%{?dist} +Summary: The JBoss Logging Framework +License: ASL 2.0 +URL: https://github.com/jboss-logging/jboss-logging +Source0: https://github.com/jboss-logging/jboss-logging/archive/%{namedversion}.tar.gz +Patch0: disable-log4j-backend.patch + +BuildArch: noarch + +BuildRequires: maven-local +BuildRequires: mvn(log4j:log4j:12) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.jboss:jboss-parent:pom:) +BuildRequires: mvn(org.jboss.logmanager:jboss-logmanager) +BuildRequires: mvn(org.slf4j:slf4j-api) + +%description +This package contains the JBoss Logging Framework. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n jboss-logging-%{namedversion} +%patch0 -p1 + +# Remove dependency on log4j 2.x - use 1.2 +%pom_xpath_set pom:properties/pom:version.org.apache.log4j 12 +%pom_remove_dep org.apache.logging.log4j:log4j-api +rm -f src/main/java/org/jboss/logging/Log4j2Logger{,Provider}.java + +# SLF4j 1.7 upgrade +sed -i "s|map = MDC.getCopyOfContextMap();|map = (Map) MDC.getCopyOfContextMap();|" \ + src/main/java/org/jboss/logging/Slf4jLoggerProvider.java + +# Unneeded task +%pom_remove_plugin :maven-source-plugin + +cp -p src/main/resources/META-INF/LICENSE.txt . +sed -i 's/\r//' LICENSE.txt + +%build +%mvn_build -f + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE.txt + +%files javadoc -f .mfiles-javadoc +%license LICENSE.txt + +%changelog +* Wed May 30 2018 Mikolaj Izdebski - 3.3.0-5 +- Disable log4j backend + +* Wed Feb 07 2018 Fedora Release Engineering - 3.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri May 27 2016 gil cattaneo 3.3.0-1 +- update to 3.3.0.Final + +* Sun Feb 14 2016 gil cattaneo 3.1.4-6 +- fix FTBFS rhbz#1307647 +- fix BR list and use BR mvn()-like +- introduce license macro +- fix some rpmlint problem + +* Thu Feb 04 2016 Fedora Release Engineering - 3.1.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 3.1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Jul 01 2014 Marek Goldmann - 3.1.4-3 +- Upgrade to SLF4j 1.7 + +* Sat Jun 07 2014 Fedora Release Engineering - 3.1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Feb 14 2014 Marek Goldmann - 3.1.4-1 +- Upstream release 3.1.4.GA + +* Sat Aug 03 2013 Fedora Release Engineering - 3.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jun 28 2013 Marek Goldmann - 3.1.3-1 +- Upstream release 3.1.3.GA + +* Tue Feb 26 2013 Marek Goldmann - 3.1.2-1 +- Upstream release 3.1.2.GA +- Move to mvn_build and mvn_install macros +- License change to ASL 2.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 3.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Feb 06 2013 Java SIG - 3.1.0-5 +- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild +- Replace maven BuildRequires with maven-local + +* Fri Jul 20 2012 Marek Goldmann - 3.1.0-4 +- Fixed BR + +* Thu Jul 19 2012 Fedora Release Engineering - 3.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Feb 26 2012 Marek Goldmann 3.1.0-2 +- Release bump + +* Sun Feb 26 2012 Marek Goldmann 3.1.0-1 +- Upstream release 3.1.0.GA +- Relocated jars to _javadir + +* Fri Jan 13 2012 Fedora Release Engineering - 3.1.0-0.2.CR1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Nov 18 2011 Marek Goldmann 3.1.0-0.1.CR1 +- Upstream release 3.1.0.CR1 + +* Mon Sep 19 2011 Marek Goldmann 3.0.1-1 +- Upstream release 3.0.1.GA + +* Thu Jul 28 2011 Marek Goldmann 3.0.0-1 +- Initial packaging + diff --git a/sources b/sources new file mode 100644 index 0000000..7e184df --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (3.3.0.Final.tar.gz) = 8b017b7aaedb202befd9f8777e9cc501726ab09ac0d7751a607ee1d73524ae36ddf55094c793369cfa2cc4f7dc61655e41b75d561c1a0aaae2594f3910b9047b