diff --git a/0001-Avoid-optional-dependency-on-native-tomcat-APR-libra.patch b/0001-Avoid-optional-dependency-on-native-tomcat-APR-libra.patch new file mode 100644 index 0000000..3f96d5e --- /dev/null +++ b/0001-Avoid-optional-dependency-on-native-tomcat-APR-libra.patch @@ -0,0 +1,106 @@ +From accd3e006a05615cf6eed9369d91fbedcc4eab16 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Thu, 7 Mar 2019 11:27:55 +0000 +Subject: [PATCH] Avoid optional dependency on native tomcat APR library + +--- + pom.xml | 5 ----- + sshd-core/pom.xml | 6 ------ + .../sshd/agent/local/ProxyAgentFactory.java | 16 +--------------- + sshd-osgi/pom.xml | 6 ------ + 4 files changed, 1 insertion(+), 32 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 867ca88..7c29678 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -397,11 +397,6 @@ + mina-core + 2.0.19 + +- +- tomcat +- tomcat-apr +- 5.5.23 +- + + + net.i2p.crypto +diff --git a/sshd-core/pom.xml b/sshd-core/pom.xml +index 6171c5c..73a43a7 100644 +--- a/sshd-core/pom.xml ++++ b/sshd-core/pom.xml +@@ -44,12 +44,6 @@ + ${project.version} + + +- +- tomcat +- tomcat-apr +- true +- +- + + org.bouncycastle + bcpg-jdk15on +diff --git a/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java b/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java +index ab19539..5757e68 100644 +--- a/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java ++++ b/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java +@@ -27,8 +27,6 @@ import java.util.concurrent.atomic.AtomicBoolean; + import org.apache.sshd.agent.SshAgent; + import org.apache.sshd.agent.SshAgentFactory; + import org.apache.sshd.agent.SshAgentServer; +-import org.apache.sshd.agent.unix.AprLibrary; +-import org.apache.sshd.agent.unix.UnixAgentFactory; + import org.apache.sshd.common.FactoryManager; + import org.apache.sshd.common.NamedFactory; + import org.apache.sshd.common.PropertyResolver; +@@ -53,9 +51,7 @@ public class ProxyAgentFactory implements SshAgentFactory { + + @Override + public List> getChannelForwardingFactories(FactoryManager manager) { +- return isPreferredUnixAgent(manager) +- ? UnixAgentFactory.DEFAULT_FORWARDING_CHANNELS +- : LocalAgentFactory.DEFAULT_FORWARDING_CHANNELS; ++ return LocalAgentFactory.DEFAULT_FORWARDING_CHANNELS; + } + + @Override +@@ -106,16 +102,6 @@ public class ProxyAgentFactory implements SshAgentFactory { + } + + public static boolean isPreferredUnixAgent(PropertyResolver resolver) { +- if (PropertyResolverUtils.getBooleanProperty(resolver, PREFER_UNIX_AGENT, OsUtils.isUNIX())) { +- try { +- if (AprLibrary.getInstance() != null) { +- return true; +- } +- } catch (Exception ignore) { +- // ignored +- } +- } +- + return false; + } + } +diff --git a/sshd-osgi/pom.xml b/sshd-osgi/pom.xml +index 5395ceb..f456263 100644 +--- a/sshd-osgi/pom.xml ++++ b/sshd-osgi/pom.xml +@@ -68,12 +68,6 @@ + true + provided + +- +- tomcat +- tomcat-apr +- true +- provided +- + + + +-- +2.20.1 + diff --git a/apache-sshd.spec b/apache-sshd.spec index 433124e..331c321 100644 --- a/apache-sshd.spec +++ b/apache-sshd.spec @@ -1,25 +1,29 @@ Name: apache-sshd -Version: 2.1.0 -Release: 3%{?dist} +Version: 2.2.0 +Release: 1%{?dist} Summary: Apache SSHD License: ASL 2.0 URL: http://mina.apache.org/sshd-project Source0: https://archive.apache.org/dist/mina/sshd/%{version}/apache-sshd-%{version}-src.tar.gz -# Avoids optional dep on tomcat libs -Patch0: avoid-tomcat-dep.patch +Patch0: 0001-Avoid-optional-dependency-on-native-tomcat-APR-libra.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(net.i2p.crypto:eddsa) +BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache:apache:pom:) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.maven:maven-archiver) +BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin) BuildRequires: mvn(org.apache.maven.surefire:surefire-junit47) BuildRequires: mvn(org.bouncycastle:bcpg-jdk15on) BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.plexus:plexus-archiver) BuildRequires: mvn(org.slf4j:slf4j-api) @@ -37,11 +41,12 @@ This package provides %{name}. %prep %setup -q -%patch0 -# Avoid deps on tomcat and spring framework -%pom_remove_dep -r tomcat:tomcat-apr +# Avoid optional dep on tomcat native APR library +%patch0 -p1 rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix + +# Avoid unnecessary dep on spring framework %pom_remove_dep :spring-framework-bom # Build the core modules only @@ -54,6 +59,7 @@ rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix %pom_disable_module sshd-contrib %pom_disable_module sshd-spring-sftp %pom_disable_module sshd-cli +%pom_disable_module sshd-openpgp # Disable plugins we don't need for RPM builds %pom_remove_plugin :apache-rat-plugin @@ -68,7 +74,7 @@ rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix %build # tests require ch.ethz.ganymed:ganymed-ssh2 -%mvn_build -f +%mvn_build -f -- -Dworkspace.root.dir=$(pwd) %install %mvn_install @@ -80,6 +86,9 @@ rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix %license LICENSE.txt NOTICE.txt %changelog +* Thu Mar 07 2019 Mat Booth - 2.2.0-1 +- Update to latest upstream release + * Thu Jan 31 2019 Fedora Release Engineering - 2.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/avoid-tomcat-dep.patch b/avoid-tomcat-dep.patch deleted file mode 100644 index 980abed..0000000 --- a/avoid-tomcat-dep.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java.orig 2018-11-29 23:39:24.581254624 +0000 -+++ sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java 2018-11-29 23:41:15.823913619 +0000 -@@ -27,8 +27,6 @@ - import org.apache.sshd.agent.SshAgent; - import org.apache.sshd.agent.SshAgentFactory; - import org.apache.sshd.agent.SshAgentServer; --import org.apache.sshd.agent.unix.AprLibrary; --import org.apache.sshd.agent.unix.UnixAgentFactory; - import org.apache.sshd.common.FactoryManager; - import org.apache.sshd.common.NamedFactory; - import org.apache.sshd.common.PropertyResolver; -@@ -53,9 +51,7 @@ - - @Override - public List> getChannelForwardingFactories(FactoryManager manager) { -- return isPreferredUnixAgent(manager) -- ? UnixAgentFactory.DEFAULT_FORWARDING_CHANNELS -- : LocalAgentFactory.DEFAULT_FORWARDING_CHANNELS; -+ return LocalAgentFactory.DEFAULT_FORWARDING_CHANNELS; - } - - @Override -@@ -106,16 +102,6 @@ - } - - public static boolean isPreferredUnixAgent(PropertyResolver resolver) { -- if (PropertyResolverUtils.getBooleanProperty(resolver, PREFER_UNIX_AGENT, OsUtils.isUNIX())) { -- try { -- if (AprLibrary.getInstance() != null) { -- return true; -- } -- } catch (Exception ignore) { -- // ignored -- } -- } -- - return false; - } - } diff --git a/sources b/sources index 7159f3e..daeed3c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-sshd-2.1.0-src.tar.gz) = 58d9166a621e913cbd5cad91d9427b96f43c714dc151a462dec699e8de5d8fde360e15ee0136862d4b411426bbc467437073ddcc786cab9de4ed822711dbba1f +SHA512 (apache-sshd-2.2.0-src.tar.gz) = f2feee18bec9efb4b5a8bf104a3478318db1394362b595363275dcbdaf2e5aa63bca94188ce037582730db53a80a065fa132b74b5f8f825edaf556f405177da0