From 86a89c998a02fcadf6a587f0b47280b69a098fd1 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Nov 29 2018 23:53:19 +0000 Subject: Update to latest upstream release Patch out the dependency on tomcat-libs --- diff --git a/.gitignore b/.gitignore index dde07f7..153c126 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ -/apache-sshd-0.6.0-src.tar.gz -/apache-sshd-0.7.0-src.tar.gz -/apache-sshd-0.9.0-src.tar.gz -/apache-sshd-0.8.0-src.tar.gz -/apache-sshd-0.11.0-src.tar.gz -/apache-sshd-0.14.0-src.tar.gz +/apache-sshd-*-src.tar.gz +/*.src.rpm diff --git a/apache-sshd.spec b/apache-sshd.spec index 939598f..8bb3416 100644 --- a/apache-sshd.spec +++ b/apache-sshd.spec @@ -1,22 +1,26 @@ Name: apache-sshd -Version: 0.14.0 -Release: 8%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Apache SSHD License: ASL 2.0 URL: http://mina.apache.org/sshd-project -Source0: http://www.eu.apache.org/dist/mina/sshd/%{version}/dist/%{name}-%{version}-src.tar.gz +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 BuildRequires: maven-local -BuildRequires: mvn(com.jcraft:jzlib) -BuildRequires: mvn(commons-httpclient:commons-httpclient) +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(net.i2p.crypto:eddsa) BuildRequires: mvn(org.apache:apache:pom:) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) -BuildRequires: mvn(org.apache.mina:mina-core) -BuildRequires: mvn(org.apache.tomcat:tomcat-jni) +BuildRequires: mvn(org.apache.maven:maven-archiver) +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.plexus:plexus-archiver) BuildRequires: mvn(org.slf4j:slf4j-api) BuildArch: noarch @@ -33,20 +37,31 @@ This package provides %{name}. %prep %setup -q +%patch0 -# Use tomcat-jni instead of unavailable tomcat-apr -%pom_change_dep -r tomcat:tomcat-apr org.apache.tomcat:tomcat-jni:8.0.23 +# Avoid deps on tomcat and spring framework +%pom_remove_dep -r tomcat:tomcat-apr +rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix +%pom_remove_dep :spring-framework-bom -# Build the core only: +# Build the core modules only %pom_disable_module assembly -%pom_disable_module sshd-pam -%pom_disable_module sshd-sftp +%pom_disable_module sshd-putty +%pom_disable_module sshd-mina +%pom_disable_module sshd-netty +%pom_disable_module sshd-ldap %pom_disable_module sshd-git - -# Disable the plugins that we don't need: -%pom_remove_plugin :maven-remote-resources-plugin -# Too many files with unapproved license -%pom_remove_plugin org.apache.rat:apache-rat-plugin +%pom_disable_module sshd-contrib +%pom_disable_module sshd-spring-sftp +%pom_disable_module sshd-cli + +# Disable plugins we don't need for RPM builds +%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 %build # tests require ch.ethz.ganymed:ganymed-ssh2 @@ -62,6 +77,10 @@ This package provides %{name}. %license LICENSE.txt NOTICE.txt %changelog +* Thu Nov 29 2018 Mat Booth - 2.1.0-1 +- Update to latest upstream release +- Patch out the dependency on tomcat-libs + * Thu Jul 12 2018 Fedora Release Engineering - 0.14.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/avoid-tomcat-dep.patch b/avoid-tomcat-dep.patch new file mode 100644 index 0000000..980abed --- /dev/null +++ b/avoid-tomcat-dep.patch @@ -0,0 +1,39 @@ +--- 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 bba13c3..7159f3e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0b48b8bdd0007f73609bc915808ead66 apache-sshd-0.14.0-src.tar.gz +SHA512 (apache-sshd-2.1.0-src.tar.gz) = 58d9166a621e913cbd5cad91d9427b96f43c714dc151a462dec699e8de5d8fde360e15ee0136862d4b411426bbc467437073ddcc786cab9de4ed822711dbba1f