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..6006344 --- /dev/null +++ b/0001-Avoid-optional-dependency-on-native-tomcat-APR-libra.patch @@ -0,0 +1,107 @@ +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-2.2.0-src.tar.gz b/apache-sshd-2.2.0-src.tar.gz new file mode 100644 index 0000000..d4fe2cf Binary files /dev/null and b/apache-sshd-2.2.0-src.tar.gz differ diff --git a/apache-sshd.spec b/apache-sshd.spec new file mode 100644 index 0000000..109aa84 --- /dev/null +++ b/apache-sshd.spec @@ -0,0 +1,68 @@ +Epoch: 1 +Name: apache-sshd +Version: 2.2.0 +Release: 1 +Summary: Apache SSHD +License: ASL 2.0 and ISC +URL: http://mina.apache.org/sshd-project +Source0: https://archive.apache.org/dist/mina/sshd/%{version}/apache-sshd-%{version}-src.tar.gz +Patch0: 0001-Avoid-optional-dependency-on-native-tomcat-APR-libra.patch +BuildRequires: maven-local mvn(junit:junit) mvn(net.i2p.crypto:eddsa) mvn(org.apache.ant:ant) +BuildRequires: mvn(org.apache:apache:pom:) 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) mvn(org.bouncycastle:bcpkix-jdk15on) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: mvn(org.codehaus.plexus:plexus-archiver) mvn(org.slf4j:slf4j-api) +BuildArch: noarch +%description +Apache SSHD is a 100% pure java library to support the SSH protocols on both +the client and server side. + +%package javadoc +Summary: API documentation for %{name} +%description javadoc +This package provides %{name}. + +%prep +%setup -q +%patch0 -p1 +rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix +%pom_remove_dep :spring-framework-bom +%pom_disable_module assembly +%pom_disable_module sshd-mina +%pom_disable_module sshd-netty +%pom_disable_module sshd-ldap +%pom_disable_module sshd-git +%pom_disable_module sshd-contrib +%pom_disable_module sshd-spring-sftp +%pom_disable_module sshd-cli +%pom_disable_module sshd-openpgp +%pom_remove_plugin :apache-rat-plugin +%pom_remove_plugin :groovy-maven-plugin +%pom_remove_plugin :maven-checkstyle-plugin +%pom_remove_plugin :maven-enforcer-plugin +%pom_remove_plugin :maven-pmd-plugin +%pom_remove_plugin :animal-sniffer-maven-plugin +%pom_xpath_inject "pom:configuration/pom:instructions" "<_nouses>true" . + +%build +%mvn_build -f -- -Dworkspace.root.dir=$(pwd) + +%install +%mvn_install + +%files -f .mfiles +%doc CHANGES.md +%license LICENSE.txt NOTICE.txt assembly/src/main/legal/licenses/jbcrypt.txt + +%files javadoc -f .mfiles-javadoc +%license LICENSE.txt NOTICE.txt assembly/src/main/legal/licenses/jbcrypt.txt + +%changelog +* Thu Aug 6 2020 Jeffery.Gao - 2.2.0-1 +- Package init diff --git a/apache-sshd.yaml b/apache-sshd.yaml new file mode 100644 index 0000000..00bbaf0 --- /dev/null +++ b/apache-sshd.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA