diff --git a/libssh-0.10.5.tar.xz b/libssh-0.10.5.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..2a2603fce87e03459cfd117cd0fb7c6ab2f1b80c Binary files /dev/null and b/libssh-0.10.5.tar.xz differ diff --git a/libssh-0.10.5.tar.xz.asc b/libssh-0.10.5.tar.xz.asc new file mode 100644 index 0000000000000000000000000000000000000000..01c568576e041899e9643d765070c88306fb4e28 --- /dev/null +++ b/libssh-0.10.5.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmRTm30ACgkQfuD8TcwB +Tj0TBQ/+MS5qNXgV8I/3s0k6jpzTsEMdozOZ7RYiJg9i9UzCGsIuJ0aiMl+G1aFH +UJOkLlHgGXTSCeZk4aoSTky2jEOezcFgsi0v9j8nmxRTjlDDAY0KxOoA//wc5nQ0 +fgQKUbX0SrtIbe9qpffoGBjaEap2ICAiM7a5PJ+Js0RQ944TqmkWmhGP/2XhxsF9 +0TJ6e4ilSg/mTBV5GemLTRSc+MgFoh5jJiV1+zmkOw5bBvPx7/KgsdmhoZ63prFI +8LvfChEEx50lyTXC8eLW4uSvO5tMHyAwDNBJcKOccp5yqEr147S1pZL8iNS0C2EF +/vG7zRDa3dv81xJjuPVdO40/GE77omp1IWC3i4ZskaAocGOmHo7KSwJ/7MjtAuJT +QgqeTPHjENRYbB6FvyesHpWzesORFIxQtCMxugVpEPcc3WLIRNLvJGa7rofAGJJf +u5uLyzmBuyAWm5gpPMyLRy2ysAgBi7NVusnAuR4v28r8YYpGrwTG+epJ1fV6MKWV +tlV8aCY51H7WVmDNJlwyJOwEZWzRdi9n3e22hEm79+cj3WKY3uwYwJI4s0CgcsUw +OzEZt97Yy+pSvdOokgNHRz0tGoDXZw55PF4+mcyvXSQfZJ2QCL7q7dJ/7DmibGgY +LtsN5bSfzXgEBqpty/sD5HSSt1/fNICJjfuiTKtjKXMD45wBUkE= +=IAN/ +-----END PGP SIGNATURE----- diff --git a/libssh.spec b/libssh.spec new file mode 100644 index 0000000000000000000000000000000000000000..a878f220ac67485c25f81779bd45ec8e1c577ff6 --- /dev/null +++ b/libssh.spec @@ -0,0 +1,147 @@ +%define anolis_release 2 +%global _smp_build_ncpus 1 + + +Name: libssh +Version: 0.10.5 +Release: %{anolis_release}%{?dist} +Epoch: 1 +Summary: A library implementing the SSH protocol +License: LGPLv2+ +URL: http://www.libssh.org +Source0: https://www.libssh.org/files/0.10/%{name}-%{version}.tar.xz +Source3: libssh_server.config +Source4: libssh_client.config + +BuildRequires: cmake gcc-c++ +BuildRequires: openssl-devel zlib-devel krb5-devel libcmocka-devel +BuildRequires: pam_wrapper socket_wrapper nss_wrapper uid_wrapper +BuildRequires: openssh-clients openssh-server openssl-pkcs11 +BuildRequires: gnutls-utils pkgconfig nmap-ncat softhsm + +Requires: %{name}-config = %{epoch}:%{version}-%{release} + +Recommends: crypto-policies + +Provides: libssh_threads.so.4()(64bit) + +%description +libssh is a C library that enables you to write a program that uses +the SSH protocol. With it, you can remotely execute programs, transfer +files, or use a secure and transparent tunnel for your remote programs. +The SSH protocol is encrypted, ensures data integrity, and provides +strong means of authenticating both the server of the client. The library +hides a lot of technical details from the SSH protocol, but this does not +mean that you should not try to know about and understand these details. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description devel +This package provides libraries and header files for developers of +applications that use %{name}. + +%package config +Summary: Configuration files for %{name} +BuildArch: noarch +Obsoletes: %{name} < 0.9.0 + +%description config +The %{name}-config package provides the default configuration files for %{name}. + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build +%cmake \ + -DUNIT_TESTING=ON \ + -DCLIENT_TESTING=ON \ + -DSERVER_TESTING=ON \ + -DGLOBAL_CLIENT_CONFIG="%{_sysconfdir}/libssh/libssh_client.config" \ + -DGLOBAL_BIND_CONFIG="%{_sysconfdir}/libssh/libssh_server.config" + +%cmake_build + +%install +%cmake_install +install -m 0755 -p -d %{buildroot}%{_sysconfdir}/libssh +install -m 0644 -p %{SOURCE3} %{buildroot}%{_sysconfdir}/libssh/libssh_server.config +install -m 0644 -p %{SOURCE4} %{buildroot}%{_sysconfdir}/libssh/libssh_client.config + + +pushd %{buildroot}%{_libdir} +for i in libssh.so*; +do + _target="${i}" + _link_name="${i%libssh*}libssh_threads${i##*libssh}" + if [ -L "${i}" ]; then + _target="$(readlink ${i})" + fi + ln -s "${_target}" "${_link_name}" +done; +popd + +%generate_compatibility_deps + +%check +%ctest -- -E torture_auth + +%files +%dir %{abidir} +%license COPYING +%doc BSD +%{_libdir}/libssh.so.4* +%{_libdir}/libssh_threads.so.4* +%{abidir}/libssh*.dump + +%files devel +%dir %{_libdir}/cmake/ +%{_libdir}/cmake/libssh/libssh-config-noconfig.cmake +%{_libdir}/cmake/libssh/libssh-config-version.cmake +%{_libdir}/cmake/libssh/libssh-config.cmake +%{_libdir}/pkgconfig/libssh.pc +%{_libdir}/libssh.so +%{_libdir}/libssh_threads.so +%{_includedir}/libssh/ + +%files config +%attr(0755,root,root) %dir %{_sysconfdir}/libssh +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/libssh/libssh_client.config +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/libssh/libssh_server.config + +%files doc +%doc AUTHORS CHANGELOG README + +%changelog +* Sat Mar 23 2024 li.longjiang