diff --git a/libssh2-1.10.0-ssh-rsa-test.patch b/libssh2-1.10.0-ssh-rsa-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..8485f147dbd620f150df9566c2aa6f359660014b --- /dev/null +++ b/libssh2-1.10.0-ssh-rsa-test.patch @@ -0,0 +1,19 @@ +In 8.8 OpenSSH disabled sha1 rsa-sha keys out of the box, +so we need to re-enable them as a workaround for the test +suite until upstream updates the tests. + +See: https://github.com/libssh2/libssh2/issues/630 + +--- tests/ssh2.sh ++++ tests/ssh2.sh +@@ -25,7 +25,8 @@ $SSHD -f /dev/null -h "$srcdir"/etc/host + -o 'Port 4711' \ + -o 'Protocol 2' \ + -o "AuthorizedKeysFile $srcdir/etc/user.pub" \ +- -o 'UsePrivilegeSeparation no' \ ++ -o 'HostKeyAlgorithms +ssh-rsa' \ ++ -o 'PubkeyAcceptedAlgorithms +ssh-rsa' \ + -o 'StrictModes no' \ + -D \ + $libssh2_sshd_params & + diff --git a/libssh2-1.10.0.tar.gz b/libssh2-1.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..675581d990ecaf32f5c078542b66efe956255393 Binary files /dev/null and b/libssh2-1.10.0.tar.gz differ diff --git a/libssh2.spec b/libssh2.spec new file mode 100644 index 0000000000000000000000000000000000000000..a8fc357a59938b4dbad57a0869204731c21d33f0 --- /dev/null +++ b/libssh2.spec @@ -0,0 +1,101 @@ +%define anolis_release 1 + +Name: libssh2 +Version: 1.10.0 +Release: %{anolis_release}%{?dist} +Summary: A library implementing the SSH2 protocol +License: BSD +URL: https://www.libssh2.org/ +Source0: https://libssh2.org/download/libssh2-%{version}.tar.gz +Patch1: libssh2-1.10.0-ssh-rsa-test.patch + +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: openssl-devel > 1:1.0.1 +BuildRequires: sed +BuildRequires: zlib-devel +BuildRequires: /usr/bin/man + +# Test suite requirements +# Full groff (not just groff-base) needed for the mansyntax check +BuildRequires: groff +# We run the OpenSSH server and try to connect to it +BuildRequires: openssh-server +# Need a valid locale to run the mansyntax check +BuildRequires: glibc-langpack-en + +%description +libssh2 is a library implementing the SSH2 protocol as defined by +Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25), +SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*, +SECSH-DHGEX(04), and SECSH-NUMBERS(10). + +%package devel +Summary: Development files for libssh2 +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The libssh2-devel package contains libraries and header files for +developing applications that use libssh2. + +%package docs +Summary: Documentation for libssh2 +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description docs +The libssh2-docs package contains man pages and examples for +developing applications that use libssh2. + +%prep +%autosetup -n %{name}-%{version} -p0 + +# Replace hard wired port number in the test suite to avoid collisions +# between 32-bit and 64-bit builds running on a single build-host +sed -i s/4711/47%{__isa_bits}/ tests/ssh2.{c,sh} + +%build +%configure --disable-silent-rules --disable-static --enable-shared +%{make_build} + +%install +%{make_install} INSTALL="install -p" +find %{buildroot} -name '*.la' -delete + +# clean things up a bit for packaging +make -C example clean +rm -rf example/.deps +find example/ -type f '(' -name '*.am' -o -name '*.in' ')' -delete + +# avoid multilib conflict on libssh2-devel +mv -v example example.%{_arch} + +%check +LC_ALL=en_US.UTF-8 make -C tests check + +%ldconfig_scriptlets + +%files +%license COPYING +%doc docs/AUTHORS +%{_libdir}/libssh2.so.1 +%{_libdir}/libssh2.so.1.* + +%files docs +%doc docs/BINDINGS docs/HACKING docs/TODO NEWS README RELEASE-NOTES +%{_mandir}/man3/libssh2_*.3* + +%files devel +%doc example.%{_arch}/ +%{_includedir}/libssh2.h +%{_includedir}/libssh2_publickey.h +%{_includedir}/libssh2_sftp.h +%{_libdir}/libssh2.so +%{_libdir}/pkgconfig/libssh2.pc + +%changelog +* Tue Jul 12 2022 happy_orange - 1.10.0-1 +- Init pcakage from upstream