summaryrefslogtreecommitdiffstats
path: root/libssh2.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-06-26 17:42:09 +0200
committerRemi Collet <remi@php.net>2022-06-26 17:42:09 +0200
commit20e61c0a1471086c99fd346cfd200b865b30bf57 (patch)
tree629172d26f48a80e34e3b06866f7db5c19d2a2d2 /libssh2.spec
parent6c2df6054475dd31fa2ce3f5ebeef77bc4537f4a (diff)
rename to remi-libssh2 for EL-7 and EL-8HEADmaster
update to 1.10.0
Diffstat (limited to 'libssh2.spec')
-rw-r--r--libssh2.spec144
1 files changed, 72 insertions, 72 deletions
diff --git a/libssh2.spec b/libssh2.spec
index be8598e..e807f62 100644
--- a/libssh2.spec
+++ b/libssh2.spec
@@ -1,39 +1,32 @@
-Name: libssh2
-Version: 1.8.0
-Release: 0%{?dist}
+# remirepo spec file for remi-libssh2
+# renamed for parallel installation, from:
+#
+# Fedora spec file for libssh2
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+# Please preserve changelog entries
+#
+
+%global projname libssh2
+
+%if 0%{?vendeur:1} && 0%{?fedora} < 35 && 0%{?rhel} < 9
+%global move_to_opt 1
+%global _prefix /opt/%{vendeur}/%{projname}
+%global __arch_install_post /bin/true
+Name: %{vendeur}-%{projname}
+%else
+%global move_to_opt 0
+Name: %{projname}
+%endif
+
+Version: 1.10.0
+Release: 1%{?dist}
Summary: A library implementing the SSH2 protocol
-Group: System Environment/Libraries
License: BSD
-URL: http://www.libssh2.org/
-Source0: http://libssh2.org/download/libssh2-%{version}.tar.gz
-
-# fix integer overflow in transport read resulting in out of bounds write (CVE-2019-3855)
-Patch1: 0001-libssh2-1.8.0-CVE-2019-3855.patch
-
-# fix integer overflow in keyboard interactive handling resulting in out of bounds write (CVE-2019-3856)
-Patch2: 0002-libssh2-1.8.0-CVE-2019-3856.patch
-
-# fix integer overflow in SSH packet processing channel resulting in out of bounds write (CVE-2019-3857)
-Patch3: 0003-libssh2-1.8.0-CVE-2019-3857.patch
-
-# fix zero-byte allocation in SFTP packet processing resulting in out-of-bounds read (CVE-2019-3858)
-Patch4: 0004-libssh2-1.8.0-CVE-2019-3858.patch
-
-# fix out-of-bounds reads with specially crafted SSH packets (CVE-2019-3861)
-Patch7: 0007-libssh2-1.8.0-CVE-2019-3861.patch
-
-# fix out-of-bounds memory comparison with specially crafted message channel request (CVE-2019-3862)
-Patch8: 0008-libssh2-1.8.0-CVE-2019-3862.patch
-
-# fix integer overflow in keyboard interactive handling that allows out-of-bounds writes (CVE-2019-3863)
-Patch9: 0009-libssh2-1.8.0-CVE-2019-3863.patch
-
-# fix integer overflow in SSH_MSG_DISCONNECT logic (CVE-2019-17498)
-Patch10: 0010-libssh2-1.8.0-CVE-2019-17498.patch
-
-Patch14: 0014-libssh2-1.4.3-scp-remote-exec.patch
-Patch15: 0015-libssh2-1.4.3-debug-msgs.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+URL: https://www.libssh2.org/
+Source0: https://libssh2.org/download/libssh2-%{version}.tar.gz
BuildRequires: coreutils
BuildRequires: findutils
@@ -44,14 +37,14 @@ BuildRequires: sed
BuildRequires: zlib-devel
BuildRequires: /usr/bin/man
-# Test suite requirements - we run the OpenSSH server and try to connect to it
+# 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
-# We use matchpathcon to get the correct SELinux context for the ssh server
-# initialization script so that it can transition correctly in an SELinux
-# environment
-%if !(0%{?fedora} >= 17 || 0%{?rhel} >= 7)
-BuildRequires: libselinux-utils
-BuildRequires: selinux-policy-targeted
+# Need a valid locale to run the mansyntax check
+%if 0%{?fedora} > 23 || 0%{?rhel} > 7
+BuildRequires: glibc-langpack-en
%endif
%description
@@ -62,7 +55,6 @@ SECSH-DHGEX(04), and SECSH-NUMBERS(10).
%package devel
Summary: Development files for libssh2
-Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
@@ -72,7 +64,6 @@ developing applications that use libssh2.
%package docs
Summary: Documentation for libssh2
-Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
@@ -80,43 +71,29 @@ BuildArch: noarch
The libssh2-docs package contains man pages and examples for
developing applications that use libssh2.
+
+%if %{move_to_opt}
+# Filter in the /opt installation
+%{?filter_from_provides: %filter_from_provides /libssh2/d}
+%{?filter_from_requires: %filter_from_requires /libssh2/d}
+%{?filter_setup}
+%endif
+
+
%prep
-%setup -q
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
+%setup -q -n %{projname}-%{version}
# 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}
-# scp: send valid commands for remote execution (#1489733)
-%patch14 -p1
-
-# session: avoid printing misleading debug messages (#1503294)
-%patch15 -p1
-
-# Make sshd transition appropriately if building in an SELinux environment
-%if !(0%{?fedora} >= 17 || 0%{?rhel} >= 7)
-chcon $(/usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd) tests/ssh2.sh || :
-chcon -R $(/usr/sbin/matchpathcon -n /etc) tests/etc || :
-chcon $(/usr/sbin/matchpathcon -n /etc/ssh/ssh_host_key) tests/etc/{host,user} || :
-%endif
%build
%configure --disable-silent-rules --disable-static --enable-shared
make %{?_smp_mflags}
-# Avoid polluting libssh2.pc with linker options (#947813)
-sed -i -e 's|[[:space:]]-Wl,[^[:space:]]*||' libssh2.pc
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="install -p"
find %{buildroot} -name '*.la' -delete
@@ -146,26 +123,45 @@ echo "exit 0" > tests/ssh2.sh
echo "Skipping mansyntax test on PPC* and aarch64"
echo "exit 0" > tests/mansyntax.sh
%endif
-make -C tests check
+LC_ALL=en_US.UTF-8 make -C tests check
-%clean
-rm -rf %{buildroot}
+%if 0%{?fedora} < 28 && 0%{?rhel} < 8
%post -p /sbin/ldconfig
-
%postun -p /sbin/ldconfig
+%endif
+
%files
-%doc COPYING docs/AUTHORS README RELEASE-NOTES
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc docs/AUTHORS README RELEASE-NOTES
+%if %{move_to_opt}
+%dir %{_libdir}
+%dir %{_prefix}
+%dir %{_datadir}
+%ghost %{_datadir}/doc
+%ghost %{_docdir}
+%{?_licensedir:%ghost %{_datadir}/licenses}
+%{?_licensedir:%ghost %{_licensedir}}
+%endif
%{_libdir}/libssh2.so.1
%{_libdir}/libssh2.so.1.*
%files docs
%doc docs/BINDINGS docs/HACKING docs/TODO NEWS
+%if %{move_to_opt}
+%dir %{_mandir}
+%dir %{_mandir}/man3
+%endif
%{_mandir}/man3/libssh2_*.3*
%files devel
%doc example.%{_arch}/
+%if %{move_to_opt}
+%dir %{_includedir}
+%dir %{_libdir}/pkgconfig/
+%endif
%{_includedir}/libssh2.h
%{_includedir}/libssh2_publickey.h
%{_includedir}/libssh2_sftp.h
@@ -173,6 +169,10 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libssh2.pc
%changelog
+* Sun Jun 26 2022 Remi Collet <remi@remirepo.net> - 1.10.0-1
+- rename to remi-libssh2 for EL-7 and EL-8
+- update to 1.10.0
+
* Tue Mar 2 2021 Remi Collet <remi@remirepo.net> - 1.8.0-0
- rebuild with lower release for amazon