From 1503dec12c75695f69ac42abe6548413eddfbe9c Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 18 Jun 2021 14:24:49 -0500 Subject: [PATCH] Dependency updates Resolves: #1952530 --- 0001-Remove-Log4jLogger.patch | 163 ++++++++++++++++++++++++++++++++++ resteasy.spec | 37 ++++++-- 2 files changed, 193 insertions(+), 7 deletions(-) create mode 100644 0001-Remove-Log4jLogger.patch diff --git a/0001-Remove-Log4jLogger.patch b/0001-Remove-Log4jLogger.patch new file mode 100644 index 0000000..f5335db --- /dev/null +++ b/0001-Remove-Log4jLogger.patch @@ -0,0 +1,163 @@ +From d9ad1ff80c45333922fb51e454ee6036b389faa4 Mon Sep 17 00:00:00 2001 +From: "Endi S. Dewata" +Date: Wed, 2 Jun 2021 19:34:16 -0500 +Subject: [PATCH] Remove Log4jLogger + +--- + .../resteasy/logging/impl/Log4jLogger.java | 144 ------------------ + 1 file changed, 144 deletions(-) + delete mode 100644 resteasy-jaxrs/src/main/java/org/jboss/resteasy/logging/impl/Log4jLogger.java + +diff --git a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/logging/impl/Log4jLogger.java b/resteasy-jaxrs/src/main/java/org/jboss/resteasy/logging/impl/Log4jLogger.java +deleted file mode 100644 +index 6cf43d251..000000000 +--- a/resteasy-jaxrs/src/main/java/org/jboss/resteasy/logging/impl/Log4jLogger.java ++++ /dev/null +@@ -1,144 +0,0 @@ +-package org.jboss.resteasy.logging.impl; +- +-import org.apache.log4j.Logger; +- +-import java.text.MessageFormat; +- +-/** +- * @author Bill Burke +- * @version $Revision: 1 $ +- */ +-public class Log4jLogger extends org.jboss.resteasy.logging.Logger +-{ +- private transient Logger delegate; +- private String classname; +- +- public Log4jLogger(String classname) +- { +- this.classname = classname; +- delegate = Logger.getLogger(classname); +- } +- +- @Override +- public boolean isTraceEnabled() +- { +- return delegate.isTraceEnabled(); +- } +- +- @Override +- public void trace(String message) +- { +- if (!delegate.isTraceEnabled()) return; +- delegate.trace(message); +- } +- +- @Override +- public void trace(String message, Object... params) +- { +- if (!delegate.isTraceEnabled()) return; +- String msg = MessageFormat.format(message, params); +- delegate.trace(msg); +- } +- +- @Override +- public void trace(String message, Throwable error) +- { +- if (!delegate.isTraceEnabled()) return; +- delegate.trace(message, error); +- } +- +- @Override +- public boolean isDebugEnabled() +- { +- return delegate.isDebugEnabled(); +- } +- +- @Override +- public void debug(String message) +- { +- if (!delegate.isDebugEnabled()) return; +- delegate.debug(message); +- } +- +- @Override +- public void debug(String message, Object... params) +- { +- if (!delegate.isDebugEnabled()) return; +- String msg = MessageFormat.format(message, params); +- delegate.debug(msg); +- } +- +- @Override +- public void debug(String message, Throwable error) +- { +- if (!isDebugEnabled()) return; +- delegate.debug(message, error); +- } +- +- @Override +- public void info(String message) +- { +- if (!(delegate.isInfoEnabled())) return; +- delegate.info(message); +- } +- +- @Override +- public void info(String message, Object... params) +- { +- if (!delegate.isInfoEnabled()) return; +- String msg = MessageFormat.format(message, params); +- delegate.info(msg); +- } +- +- @Override +- public void info(String message, Throwable error) +- { +- if (!delegate.isInfoEnabled()) return; +- delegate.info(message, error); +- } +- +- @Override +- public void warn(String message) +- { +- delegate.warn(message); +- } +- +- @Override +- public void warn(String message, Object... params) +- { +- String msg = MessageFormat.format(message, params); +- delegate.warn(msg); +- } +- +- @Override +- public void warn(String message, Throwable error) +- { +- delegate.warn(message, error); +- } +- +- @Override +- public void error(String message) +- { +- delegate.warn(message); +- } +- +- @Override +- public void error(String message, Object... params) +- { +- String msg = MessageFormat.format(message, params); +- delegate.error(msg); +- } +- +- @Override +- public void error(String message, Throwable error) +- { +- delegate.warn(message, error); +- } +- +- @Override +- public boolean isWarnEnabled() +- { +- return true; +- } +- +-} +-- +2.31.1 + diff --git a/resteasy.spec b/resteasy.spec index 8e1ffe4..d5871ff 100644 --- a/resteasy.spec +++ b/resteasy.spec @@ -3,20 +3,21 @@ Name: resteasy Version: 3.0.26 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Framework for RESTful Web services and Java applications License: ASL 2.0 URL: http://resteasy.jboss.org/ Source0: https://github.com/resteasy/Resteasy/archive/%{namedversion}/%{name}-%{namedversion}.tar.gz Patch1: 0001-RESTEASY-2559-Improper-validation-of-response-header.patch +Patch2: 0001-Remove-Log4jLogger.patch BuildArch: noarch BuildRequires: maven-local BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(com.sun.xml.bind:jaxb-impl) +BuildRequires: mvn(jakarta.activation:jakarta.activation-api) BuildRequires: mvn(javax.xml.bind:jaxb-api) -BuildRequires: mvn(log4j:log4j) BuildRequires: mvn(org.apache.httpcomponents:httpclient) BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) BuildRequires: mvn(org.apache.tomcat:tomcat-servlet-api) @@ -31,7 +32,7 @@ BuildRequires: mvn(org.jboss:jboss-parent:pom:) BuildRequires: mvn(org.jboss.logging:jboss-logging) BuildRequires: mvn(org.jboss.logging:jboss-logging-annotations) BuildRequires: mvn(org.jboss.logging:jboss-logging-processor) -BuildRequires: mvn(org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec) +BuildRequires: mvn(javax.annotation:javax.annotation-api) BuildRequires: mvn(org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec) BuildRequires: mvn(org.slf4j:slf4j-api) @@ -109,8 +110,7 @@ Provides: %{name}-client = %{version}-%{release} %{extdesc} %{summary}. %prep -%setup -q -n Resteasy-%{namedversion} -%patch1 -p1 +%autosetup -n Resteasy-%{namedversion} -p 1 %pom_disable_module arquillian %pom_disable_module eagledns @@ -151,8 +151,23 @@ find -name '*.jar' -print -delete %pom_remove_plugin :maven-clover2-plugin %pom_remove_plugin :maven-javadoc-plugin -# remove activation.jar dependencies -%pom_remove_dep -r javax.activation:activation resteasy-jaxrs resteasy-spring +# depend on jakarta-activation +%pom_change_dep javax.activation:activation jakarta.activation:jakarta.activation-api resteasy-jaxrs +%pom_change_dep javax.activation:activation jakarta.activation:jakarta.activation-api resteasy-spring + +# depend on jakarta-annotations +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api jboss-modules +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api providers/jaxb +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api resteasy-dependencies-bom +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api resteasy-guice +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api resteasy-jaxrs +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api resteasy-links +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api resteasy-spring +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api security/keystone/keystone-core +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api security/resteasy-crypto +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api security/skeleton-key-idm/skeleton-key-core +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api security/skeleton-key-idm/skeleton-key-idp +%pom_change_dep org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec javax.annotation:javax.annotation-api server-adapters/resteasy-jdk-http # remove resteasy-dependencies pom %pom_remove_dep "org.jboss.resteasy:resteasy-dependencies" @@ -166,6 +181,9 @@ find -name '*.jar' -print -delete %pom_remove_dep junit:junit providers/jaxb %pom_remove_dep junit:junit resteasy-jaxrs +# remove log4j dependency +%pom_remove_dep log4j:log4j resteasy-jaxrs + # depend on servlet-api from pki-servlet-4.0-api %pom_change_dep org.jboss.spec.javax.servlet: org.apache.tomcat:tomcat-servlet-api resteasy-jaxrs %pom_change_dep org.jboss.spec.javax.servlet: org.apache.tomcat:tomcat-servlet-api providers/abdera-atom @@ -214,6 +232,11 @@ find -name '*.jar' -print -delete %license License.html %changelog +* Fri Jun 18 2021 Dogtag PKI Team - 3.0.26-13 +- Replace jboss-annotations-1.2-api with jakarta-annotations +- Drop log4j dependency +- Add jakarta-activation dependency + * Fri May 21 2021 Red Hat PKI Team - 3.0.26-12 - Drop pki-resteasy-javadoc and pki-resteasy-atom-provider