]> git.pld-linux.org Git - packages/openssh.git/blobdiff - openssh.spec
- sandbox macro is always defined
[packages/openssh.git] / openssh.spec
index a19d70c04daa529b12d605bc35959f8a968becaf..8f80222b1239ad4ca0e00637b0f87a2295b1a46e 100644 (file)
 %bcond_without libedit         # without libedit (editline/history support in sftp client)
 %bcond_without kerberos5       # without kerberos5 support
 %bcond_without selinux         # build without SELinux support
+%bcond_without libseccomp      # use libseccomp for seccomp privsep (requires 3.5 kernel)
 %bcond_with    hpn             # High Performance SSH/SCP - HPN-SSH including Cipher NONE (broken too often)
 %bcond_without tests
 
 # gtk2-based gnome-askpass means no gnome1-based
 %{?with_gtk:%undefine with_gnome}
 
+%if "%{pld_release}" != "ac"
+%define        sandbox %{?with_libseccomp:lib}seccomp_filter
+%endif
+
 %if "%{pld_release}" == "ac"
 %define                pam_ver 0.79.0
 %else
@@ -34,7 +39,7 @@ Summary(ru.UTF-8):    OpenSSH - свободная реализация прото
 Summary(uk.UTF-8):     OpenSSH - вільна реалізація протоколу Secure Shell (SSH)
 Name:          openssh
 Version:       6.8p1
-Release:       4
+Release:       6
 Epoch:         2
 License:       BSD
 Group:         Applications/Networking
@@ -88,12 +93,14 @@ BuildRequires:      pam-devel
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.627
 BuildRequires: sed >= 4.0
-# libseccomp based sandbox requires NO_NEW_PRIVS prctl flag
-%{?with_tests:BuildRequires:   uname(release) >= 3.5}
 BuildRequires: zlib-devel >= 1.2.3
 %if %{with tests} && 0%(id -u sshd >/dev/null 2>&1; echo $?)
 BuildRequires: %{name}-server
 %endif
+%if %{with tests} && %{with libseccomp}
+# libseccomp based sandbox requires NO_NEW_PRIVS prctl flag
+BuildRequires: uname(release) >= 3.5
+%endif
 Requires:      zlib >= 1.2.3
 %if "%{pld_release}" == "ac"
 Requires:      filesystem >= 2.0-1
@@ -103,6 +110,7 @@ Requires:   filesystem >= 3.0-11
 Requires:      pam >= %{pam_ver}
 Suggests:      xorg-app-xauth
 %endif
+%{?with_libseccomp:Requires:   uname(release) >= 3.5}
 Obsoletes:     ssh
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -530,7 +538,7 @@ openldap-a.
 
 %patch14 -p1
 %{!?with_ldap:%patch15 -p1}
-%patch16 -p1
+%{?with_libseccomp:%patch16 -p1}
 
 %if "%{pld_release}" == "ac"
 # fix for missing x11.pc
@@ -543,6 +551,9 @@ sed -i -e 's#-lssh -lopenbsd-compat#-lssh -lopenbsd-compat -lssh#g' Makefile*
 grep -rl /usr/libexec/openssh/ssh-ldap-helper . | xargs \
 %{__sed} -i -e 's,/usr/libexec/openssh/ssh-ldap-helper,%{_libexecdir}/ssh-ldap-helper,'
 
+# prevent being ovewritten by aclocal calls
+mv aclocal.m4 acinclude.m4
+
 %build
 cp /usr/share/automake/config.sub .
 %{__aclocal}
@@ -566,9 +577,7 @@ CPPFLAGS="%{rpmcppflags} -DCHROOT -std=gnu99"
        --with-pid-dir=%{_localstatedir}/run \
        --with-privsep-path=%{_privsepdir} \
        --with-privsep-user=sshd \
-%if "%{pld_release}" != "ac"
-       --with-sandbox=libseccomp_filter \
-%endif
+       --with-sandbox=%{sandbox} \
        %{?with_selinux:--with-selinux} \
 %if "%{pld_release}" == "ac"
        --with-xauth=/usr/X11R6/bin/xauth
This page took 0.03736 seconds and 4 git commands to generate.