2007-01-07 17:26:05 +01:00
|
|
|
#
|
2011-02-01 15:14:14 +01:00
|
|
|
# spec file for package openssh
|
2007-01-07 17:26:05 +01:00
|
|
|
#
|
2016-09-19 01:04:18 +02:00
|
|
|
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-07 17:26:05 +01:00
|
|
|
#
|
2008-08-23 01:32:08 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-12-26 08:09:33 +01:00
|
|
|
|
2016-04-06 13:34:51 +02:00
|
|
|
%if 0%{suse_version} >= 1100
|
2013-09-19 06:09:33 +02:00
|
|
|
%define has_fw_dir 1
|
|
|
|
%else
|
2016-01-21 08:28:30 +01:00
|
|
|
%define has_fw_dir 0
|
2016-04-06 13:34:51 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{suse_version} >= 1110
|
|
|
|
%define has_libselinux 1
|
|
|
|
%else
|
2013-09-19 06:09:33 +02:00
|
|
|
%define has_libselinux 0
|
|
|
|
%endif
|
2016-04-06 13:34:51 +02:00
|
|
|
|
2013-09-19 06:09:33 +02:00
|
|
|
%if 0%{?suse_version} >= 1130
|
2016-04-06 13:34:51 +02:00
|
|
|
%define needs_all_dirs 1
|
|
|
|
%else
|
|
|
|
%define needs_all_dirs 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} >= 1140
|
2013-09-19 06:09:33 +02:00
|
|
|
%define needs_libedit 1
|
|
|
|
%else
|
2016-01-21 08:28:30 +01:00
|
|
|
%define needs_libedit 0
|
2016-04-06 13:34:51 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
%define has_krb_mini 1
|
|
|
|
%else
|
2013-09-19 06:09:33 +02:00
|
|
|
%define has_krb_mini 0
|
|
|
|
%endif
|
2016-04-06 13:34:51 +02:00
|
|
|
|
2014-02-14 15:54:10 +01:00
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
%define uses_systemd 1
|
2013-09-19 15:51:33 +02:00
|
|
|
%else
|
2014-02-14 15:54:10 +01:00
|
|
|
%define uses_systemd 0
|
|
|
|
%endif
|
2016-04-06 13:34:51 +02:00
|
|
|
|
|
|
|
%define sandbox_seccomp 0
|
2014-02-18 14:04:57 +01:00
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
%define sandbox_seccomp 1
|
|
|
|
%endif
|
|
|
|
%endif
|
2016-04-06 13:34:51 +02:00
|
|
|
|
|
|
|
%define _fwdir %{_sysconfdir}/sysconfig/SuSEfirewall2.d
|
|
|
|
%define _fwdefdir %{_fwdir}/services
|
|
|
|
%define _appdefdir %( grep "configdirspec=" $( which xmkmf ) | sed -r 's,^[^=]+=.*-I(.*)/config.*$,\\1/app-defaults,' )
|
|
|
|
%{!?_initddir:%global _initddir %{_initrddir}}
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
Name: openssh
|
2016-04-06 13:34:51 +02:00
|
|
|
BuildRequires: audit-devel
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: groff
|
|
|
|
%if %{has_krb_mini}
|
|
|
|
BuildRequires: krb5-mini-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: krb5-devel
|
|
|
|
%endif
|
|
|
|
%if %{needs_libedit}
|
|
|
|
BuildRequires: libedit-devel
|
|
|
|
%endif
|
|
|
|
%if %{has_libselinux}
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: openssl
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
%if %{uses_systemd}
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
%{?systemd_requires}
|
|
|
|
%endif
|
2016-05-30 03:36:18 +02:00
|
|
|
BuildRequires: tcpd-devel
|
2016-09-30 22:34:19 +02:00
|
|
|
PreReq: pwdutils %{fillup_prereq} coreutils
|
|
|
|
%if ! %{uses_systemd}
|
|
|
|
PreReq: %{insserv_prereq}
|
|
|
|
%endif
|
2016-05-30 03:36:18 +02:00
|
|
|
Version: 7.2p2
|
2011-12-21 18:59:28 +01:00
|
|
|
Release: 0
|
2007-01-07 17:26:05 +01:00
|
|
|
Summary: Secure Shell Client and Server (Remote Login Program)
|
2016-05-30 03:36:18 +02:00
|
|
|
License: BSD-2-Clause and MIT
|
2011-12-21 18:59:28 +01:00
|
|
|
Group: Productivity/Networking/SSH
|
2011-10-19 04:18:13 +02:00
|
|
|
Url: http://www.openssh.com/
|
2016-05-30 17:53:09 +02:00
|
|
|
Source: http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
|
2016-07-25 15:47:29 +02:00
|
|
|
Source42: http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc
|
2011-10-19 04:18:13 +02:00
|
|
|
Source1: sshd.init
|
2007-01-07 17:26:05 +01:00
|
|
|
Source2: sshd.pamd
|
2016-05-30 03:36:18 +02:00
|
|
|
Source3: README.SUSE
|
2013-09-19 06:09:33 +02:00
|
|
|
Source4: README.kerberos
|
|
|
|
Source5: ssh.reg
|
|
|
|
Source6: ssh-askpass
|
|
|
|
Source7: sshd.fw
|
|
|
|
Source8: sysconfig.ssh
|
|
|
|
Source9: sshd-gen-keys-start
|
|
|
|
Source10: sshd.service
|
2016-05-30 03:36:18 +02:00
|
|
|
Source11: README.FIPS
|
|
|
|
Source12: cavs_driver-ssh.pl
|
|
|
|
Patch00: openssh-7.2p2-allow_root_password_login.patch
|
2016-07-07 09:07:23 +02:00
|
|
|
Patch01: openssh-7.2p2-allow_DSS_by_default.patch
|
|
|
|
Patch02: openssh-7.2p2-X11_trusted_forwarding.patch
|
|
|
|
Patch03: openssh-7.2p2-lastlog.patch
|
|
|
|
Patch04: openssh-7.2p2-enable_PAM_by_default.patch
|
|
|
|
Patch05: openssh-7.2p2-dont_use_pthreads_in_PAM.patch
|
|
|
|
Patch06: openssh-7.2p2-eal3.patch
|
|
|
|
Patch07: openssh-7.2p2-blocksigalrm.patch
|
|
|
|
Patch08: openssh-7.2p2-send_locale.patch
|
|
|
|
Patch09: openssh-7.2p2-hostname_changes_when_forwarding_X.patch
|
|
|
|
Patch10: openssh-7.2p2-remove_xauth_cookies_on_exit.patch
|
|
|
|
Patch11: openssh-7.2p2-pts_names_formatting.patch
|
|
|
|
Patch12: openssh-7.2p2-pam_check_locks.patch
|
|
|
|
Patch13: openssh-7.2p2-disable_short_DH_parameters.patch
|
|
|
|
Patch14: openssh-7.2p2-seccomp_getuid.patch
|
|
|
|
Patch15: openssh-7.2p2-seccomp_stat.patch
|
2016-09-19 01:04:18 +02:00
|
|
|
Patch16: openssh-7.2p2-fips.patch
|
|
|
|
Patch17: openssh-7.2p2-seed-prng.patch
|
|
|
|
Patch18: openssh-7.2p2-gssapi_key_exchange.patch
|
2016-09-30 22:34:19 +02:00
|
|
|
Patch19: openssh-7.2p2-audit.patch
|
|
|
|
Patch20: openssh-7.2p2-login_options.patch
|
|
|
|
Patch21: openssh-7.2p2-disable-openssl-abi-check.patch
|
|
|
|
Patch22: openssh-7.2p2-no_fork-no_pid_file.patch
|
|
|
|
Patch23: openssh-7.2p2-host_ident.patch
|
|
|
|
Patch24: openssh-7.2p2-sftp_homechroot.patch
|
|
|
|
Patch25: openssh-7.2p2-sftp_force_permissions.patch
|
|
|
|
Patch26: openssh-7.2p2-X_forward_with_disabled_ipv6.patch
|
|
|
|
Patch27: openssh-7.2p2-ldap.patch
|
|
|
|
Patch28: openssh-7.2p2-additional_seccomp_archs.patch
|
2013-09-19 06:09:33 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2016-05-30 03:36:18 +02:00
|
|
|
Conflicts: nonfreessh
|
|
|
|
Recommends: audit
|
|
|
|
Recommends: xauth
|
|
|
|
Recommends: %{name}-helpers = %{version}-%{release}
|
|
|
|
Conflicts: %{name}-fips < %{version}-%{release} , %{name}-fips > %{version}-%{release}
|
|
|
|
%define CHECKSUM_SUFFIX .hmac
|
|
|
|
%define CHECKSUM_HMAC_KEY "HMAC_KEY:OpenSSH-FIPS@SLE"
|
2011-12-26 08:09:33 +01:00
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%description
|
|
|
|
SSH (Secure Shell) is a program for logging into and executing commands
|
2007-07-27 02:01:43 +02:00
|
|
|
on a remote machine. It is intended to replace rsh (rlogin and rsh) and
|
|
|
|
provides openssl (secure encrypted communication) between two untrusted
|
|
|
|
hosts over an insecure network.
|
|
|
|
|
|
|
|
xorg-x11 (X Window System) connections and arbitrary TCP/IP ports can
|
|
|
|
also be forwarded over the secure channel.
|
2007-01-07 17:26:05 +01:00
|
|
|
|
2016-04-06 13:34:51 +02:00
|
|
|
|
2014-01-31 13:18:41 +01:00
|
|
|
%package helpers
|
|
|
|
Summary: OpenSSH AuthorizedKeysCommand helpers
|
2013-09-19 06:09:33 +02:00
|
|
|
Group: Productivity/Networking/SSH
|
2016-05-30 03:36:18 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2013-09-19 06:09:33 +02:00
|
|
|
|
2014-01-31 13:18:41 +01:00
|
|
|
%description helpers
|
|
|
|
Helper applications for OpenSSH which retrieve keys from various sources.
|
2013-09-19 06:09:33 +02:00
|
|
|
|
2016-04-06 13:34:51 +02:00
|
|
|
|
2014-04-14 23:53:01 +02:00
|
|
|
%package fips
|
2016-05-30 03:36:18 +02:00
|
|
|
Summary: OpenSSH FIPS cryptomodule HMACs
|
2014-04-14 23:53:01 +02:00
|
|
|
Group: Productivity/Networking/SSH
|
2016-05-30 03:36:18 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Conflicts: %{name} < %{version}-%{release} , %{name} > %{version}-%{release}
|
|
|
|
Obsoletes: %{name}-hmac
|
2014-04-14 23:53:01 +02:00
|
|
|
|
|
|
|
%description fips
|
|
|
|
Hashes that together with the main package form the FIPS certifiable
|
|
|
|
cryptomodule.
|
|
|
|
|
2016-04-06 13:34:51 +02:00
|
|
|
|
2016-05-30 03:36:18 +02:00
|
|
|
%package cavs
|
|
|
|
Summary: OpenSSH FIPS cryptomodule CAVS tests
|
|
|
|
Group: Productivity/Networking/SSH
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description cavs
|
|
|
|
FIPS140 CAVS tests related parts of the OpenSSH package
|
|
|
|
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%prep
|
2013-09-19 06:09:33 +02:00
|
|
|
%setup -q
|
2016-05-30 03:36:18 +02:00
|
|
|
%patch00 -p2
|
|
|
|
%patch01 -p2
|
|
|
|
%patch02 -p2
|
|
|
|
%patch03 -p2
|
|
|
|
%patch04 -p2
|
|
|
|
%patch05 -p2
|
|
|
|
%patch06 -p2
|
|
|
|
%patch07 -p2
|
|
|
|
%patch08 -p2
|
|
|
|
%patch09 -p2
|
2013-09-19 06:09:33 +02:00
|
|
|
%patch10 -p2
|
|
|
|
%patch11 -p2
|
|
|
|
%patch12 -p2
|
|
|
|
%patch13 -p2
|
|
|
|
%patch14 -p2
|
2016-07-07 09:07:23 +02:00
|
|
|
%patch15 -p2
|
2016-09-19 01:04:18 +02:00
|
|
|
%patch16 -p2
|
|
|
|
%patch17 -p2
|
|
|
|
%patch18 -p2
|
2016-09-30 22:34:19 +02:00
|
|
|
%patch19 -p2
|
|
|
|
%patch20 -p2
|
|
|
|
%patch21 -p2
|
|
|
|
%patch22 -p2
|
|
|
|
%patch23 -p2
|
|
|
|
%patch24 -p2
|
|
|
|
%patch25 -p2
|
|
|
|
%patch26 -p2
|
|
|
|
%patch27 -p2
|
|
|
|
%patch28 -p2
|
2016-05-30 03:36:18 +02:00
|
|
|
cp %{SOURCE3} %{SOURCE4} %{SOURCE11} .
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%build
|
2016-09-30 22:34:19 +02:00
|
|
|
# set libexec dir in the LDAP patch
|
|
|
|
sed -i.libexec 's,@LIBEXECDIR@,%{_libexecdir}/ssh,' \
|
|
|
|
$( grep -Rl @LIBEXECDIR@ \
|
|
|
|
$( grep "^+++" %{PATCH27} | sed -r 's@^.+/([^/\t ]+).*$@\1@' )
|
|
|
|
)
|
2016-04-06 13:34:51 +02:00
|
|
|
|
2011-09-07 17:50:44 +02:00
|
|
|
autoreconf -fiv
|
2016-04-06 13:34:51 +02:00
|
|
|
%ifarch s390 s390x %sparc
|
2007-01-07 17:26:05 +01:00
|
|
|
PIEFLAGS="-fPIE"
|
|
|
|
%else
|
|
|
|
PIEFLAGS="-fpie"
|
|
|
|
%endif
|
2013-09-19 06:09:33 +02:00
|
|
|
CFLAGS="%{optflags} $PIEFLAGS -fstack-protector"
|
|
|
|
CXXFLAGS="%{optflags} $PIEFLAGS -fstack-protector"
|
|
|
|
LDFLAGS="-pie -Wl,--as-needed"
|
2016-04-06 13:34:51 +02:00
|
|
|
#CPPFLAGS="%{optflags} -DUSE_INTERNAL_B64"
|
2013-09-19 06:09:33 +02:00
|
|
|
export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
|
2016-05-30 03:36:18 +02:00
|
|
|
%configure \
|
2013-09-19 06:09:33 +02:00
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
2011-10-19 04:18:13 +02:00
|
|
|
--sysconfdir=%{_sysconfdir}/ssh \
|
|
|
|
--libexecdir=%{_libexecdir}/ssh \
|
2016-05-30 03:36:18 +02:00
|
|
|
--with-tcp-wrappers \
|
2013-09-19 06:09:33 +02:00
|
|
|
%if %{has_libselinux}
|
2011-02-04 11:44:51 +01:00
|
|
|
--with-selinux \
|
2011-12-26 08:09:33 +01:00
|
|
|
%endif
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
2013-09-19 06:09:33 +02:00
|
|
|
--with-pid-dir=/run \
|
|
|
|
%endif
|
|
|
|
--with-ssl-engine \
|
2011-02-04 11:44:51 +01:00
|
|
|
--with-pam \
|
2013-09-19 06:09:33 +02:00
|
|
|
--with-kerberos5=%{_prefix} \
|
2016-04-06 13:34:51 +02:00
|
|
|
--with-privsep-path=/var/lib/empty \
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{sandbox_seccomp}
|
|
|
|
--with-sandbox=seccomp_filter \
|
|
|
|
%else
|
2011-10-19 04:18:13 +02:00
|
|
|
--with-sandbox=rlimit \
|
2014-02-14 15:54:10 +01:00
|
|
|
%endif
|
2013-09-19 06:09:33 +02:00
|
|
|
%ifnarch s390 s390x
|
|
|
|
--with-opensc \
|
|
|
|
%endif
|
2011-02-04 11:44:51 +01:00
|
|
|
--disable-strip \
|
2013-09-19 06:09:33 +02:00
|
|
|
--with-audit=linux \
|
|
|
|
--with-ldap \
|
|
|
|
--with-xauth=%{_bindir}/xauth \
|
|
|
|
%if %{needs_libedit}
|
|
|
|
--with-libedit \
|
|
|
|
%endif
|
2016-07-07 09:07:23 +02:00
|
|
|
--with-ssh1 \
|
2013-09-19 06:09:33 +02:00
|
|
|
--target=%{_target_cpu}-suse-linux \
|
|
|
|
|
|
|
|
### configure end
|
2014-02-14 15:54:10 +01:00
|
|
|
make %{?_smp_mflags}
|
2013-09-19 06:09:33 +02:00
|
|
|
|
2016-04-06 13:34:51 +02:00
|
|
|
#make %{?_smp_mflags} -C converter
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%install
|
2016-04-06 13:34:51 +02:00
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
#make install DESTDIR=%{buildroot} -C converter
|
2014-02-14 15:54:10 +01:00
|
|
|
|
2011-10-19 04:18:13 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/pam.d
|
2016-04-06 13:34:51 +02:00
|
|
|
install -d -m 755 %{buildroot}/var/lib/sshd
|
2013-09-19 06:09:33 +02:00
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sshd
|
2011-10-19 04:18:13 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/slp.reg.d/
|
2013-09-19 06:09:33 +02:00
|
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/slp.reg.d/
|
2011-12-26 08:09:33 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_initddir}
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
|
|
|
install -m 0755 %{SOURCE1} .
|
|
|
|
install -D -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/sshd.service
|
2016-09-30 22:34:19 +02:00
|
|
|
ln -s /sbin/service %{buildroot}%{_sbindir}/rcsshd
|
2013-09-19 15:51:33 +02:00
|
|
|
%else
|
2014-02-14 15:54:10 +01:00
|
|
|
install -D -m 0755 %{SOURCE1} %{buildroot}%{_initddir}/sshd
|
|
|
|
install -m 0644 %{SOURCE10} .
|
|
|
|
ln -s ../..%{_initddir}/sshd %{buildroot}%{_sbindir}/rcsshd
|
2013-09-19 15:51:33 +02:00
|
|
|
%endif
|
2016-04-06 13:34:51 +02:00
|
|
|
install -d -m 755 %{buildroot}/var/adm/fillup-templates
|
|
|
|
install -m 644 %{SOURCE8} %{buildroot}/var/adm/fillup-templates
|
2007-01-07 17:26:05 +01:00
|
|
|
# install shell script to automate the process of adding your public key to a remote machine
|
2011-10-19 04:18:13 +02:00
|
|
|
install -m 755 contrib/ssh-copy-id %{buildroot}%{_bindir}
|
2011-11-02 16:44:39 +01:00
|
|
|
install -m 644 contrib/ssh-copy-id.1 %{buildroot}%{_mandir}/man1
|
2016-04-06 13:34:51 +02:00
|
|
|
sed -i -e s@/usr/libexec@%{_libexecdir}@g %{buildroot}%{_sysconfdir}/ssh/sshd_config
|
2013-09-19 06:09:33 +02:00
|
|
|
|
|
|
|
%if %{has_fw_dir}
|
2016-04-06 13:34:51 +02:00
|
|
|
#install firewall definitions format is described here:
|
|
|
|
#%{_datadir}/SuSEfirewall2/services/TEMPLATE
|
2011-11-02 16:44:39 +01:00
|
|
|
mkdir -p %{buildroot}%{_fwdefdir}
|
2013-09-19 06:09:33 +02:00
|
|
|
install -m 644 %{SOURCE7} %{buildroot}%{_fwdefdir}/sshd
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# askpass wrapper
|
|
|
|
sed -e "s,@LIBEXECDIR@,%{_libexecdir},g" < %{SOURCE6} > %{buildroot}%{_libexecdir}/ssh/ssh-askpass
|
2016-05-30 03:36:18 +02:00
|
|
|
sed -e "s,@LIBEXECDIR@,%{_libexecdir},g" < %{SOURCE12} > %{buildroot}%{_libexecdir}/ssh/cavs_driver-ssh.pl
|
2013-09-19 06:09:33 +02:00
|
|
|
rm -f %{buildroot}%{_datadir}/Ssh.bin
|
2014-02-14 15:54:10 +01:00
|
|
|
# sshd keys generator wrapper
|
2013-09-19 06:09:33 +02:00
|
|
|
install -D -m 0755 %{SOURCE9} %{buildroot}%{_sbindir}/sshd-gen-keys-start
|
2007-01-07 17:26:05 +01:00
|
|
|
|
2014-04-14 23:53:01 +02:00
|
|
|
# the hmac hashes - taken from openssl
|
|
|
|
#
|
|
|
|
# re-define the __os_install_post macro: the macro strips
|
|
|
|
# the binaries and thereby invalidates any hashes created earlier.
|
|
|
|
#
|
2016-04-06 13:34:51 +02:00
|
|
|
# this shows up earlier because otherwise the %expand of
|
2014-04-14 23:53:01 +02:00
|
|
|
# the macro is too late.
|
|
|
|
%{expand:%%global __os_install_post {%__os_install_post
|
|
|
|
for b in \
|
|
|
|
%{_bindir}/ssh \
|
|
|
|
%{_sbindir}/sshd \
|
|
|
|
%{_libexecdir}/ssh/sftp-server \
|
|
|
|
; do
|
2016-05-30 03:36:18 +02:00
|
|
|
openssl dgst -sha256 -binary -hmac %{CHECKSUM_HMAC_KEY} < %{buildroot}$b > %{buildroot}$b%{CHECKSUM_SUFFIX}
|
2014-04-14 23:53:01 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%pre
|
2012-11-13 11:18:36 +01:00
|
|
|
getent group sshd >/dev/null || %{_sbindir}/groupadd -r sshd
|
2016-04-06 13:34:51 +02:00
|
|
|
getent passwd sshd >/dev/null || %{_sbindir}/useradd -r -g sshd -d /var/lib/sshd -s /bin/false -c "SSH daemon" sshd
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
2011-11-29 20:55:10 +01:00
|
|
|
%service_add_pre sshd.service
|
|
|
|
%endif
|
2011-10-19 04:18:13 +02:00
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%post
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
|
|
|
%{fillup_only -n ssh sshd}
|
2011-11-29 20:55:10 +01:00
|
|
|
%service_add_post sshd.service
|
2014-02-14 15:54:10 +01:00
|
|
|
%else
|
|
|
|
%{fillup_and_insserv -n ssh sshd}
|
2011-11-29 20:55:10 +01:00
|
|
|
%endif
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%preun
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
2011-11-29 20:55:10 +01:00
|
|
|
%service_del_preun sshd.service
|
2014-02-14 15:54:10 +01:00
|
|
|
%else
|
|
|
|
%stop_on_removal sshd
|
2011-11-29 20:55:10 +01:00
|
|
|
%endif
|
2007-01-07 17:26:05 +01:00
|
|
|
|
|
|
|
%postun
|
2016-05-30 03:36:18 +02:00
|
|
|
# The openssh-fips trigger script for openssh will normally restart sshd once
|
|
|
|
# it gets installed, so only restart the service here is openssh-fips is not
|
|
|
|
# present
|
|
|
|
rpm -q openssh-fips >& /dev/null && DISABLE_RESTART_ON_UPDATE=yes
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
|
|
|
%service_del_postun sshd.service
|
|
|
|
%else
|
2007-01-07 17:26:05 +01:00
|
|
|
%restart_on_update sshd
|
2016-04-06 13:34:51 +02:00
|
|
|
%{insserv_cleanup}
|
2013-09-19 15:51:33 +02:00
|
|
|
%endif
|
2007-01-07 17:26:05 +01:00
|
|
|
|
2016-05-30 03:36:18 +02:00
|
|
|
%triggerin -n openssh-fips -- %{name} = %{version}-%{release}
|
|
|
|
%restart_on_update sshd
|
|
|
|
|
2007-01-07 17:26:05 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2016-05-30 03:36:18 +02:00
|
|
|
%exclude %{_bindir}/ssh%{CHECKSUM_SUFFIX}
|
|
|
|
%exclude %{_sbindir}/sshd%{CHECKSUM_SUFFIX}
|
|
|
|
%exclude %{_libexecdir}/ssh/sftp-server%{CHECKSUM_SUFFIX}
|
|
|
|
%exclude %{_libexecdir}/ssh/cavs*
|
2016-04-06 13:34:51 +02:00
|
|
|
%dir %attr(755,root,root) /var/lib/sshd
|
2016-05-30 03:36:18 +02:00
|
|
|
%doc README.SUSE README.kerberos README.FIPS ChangeLog OVERVIEW README TODO LICENCE CREDITS
|
2011-10-19 04:18:13 +02:00
|
|
|
%attr(0755,root,root) %dir %{_sysconfdir}/ssh
|
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli
|
2013-09-19 06:09:33 +02:00
|
|
|
%verify(not mode) %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
|
|
|
|
%verify(not mode) %attr(0640,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/sshd
|
2014-02-14 15:54:10 +01:00
|
|
|
%if %{uses_systemd}
|
2016-04-06 13:34:51 +02:00
|
|
|
%doc sshd.init
|
|
|
|
%attr(0644,root,root) %config %{_unitdir}/sshd.service
|
2014-02-14 15:54:10 +01:00
|
|
|
%else
|
|
|
|
%attr(0755,root,root) %config %{_initddir}/sshd
|
2016-04-06 13:34:51 +02:00
|
|
|
%doc sshd.service
|
2013-09-19 15:51:33 +02:00
|
|
|
%endif
|
2013-09-19 06:09:33 +02:00
|
|
|
%attr(0755,root,root) %{_bindir}/*
|
|
|
|
%attr(0755,root,root) %{_sbindir}/*
|
2011-10-19 04:18:13 +02:00
|
|
|
%attr(0755,root,root) %dir %{_libexecdir}/ssh
|
2016-09-30 22:34:19 +02:00
|
|
|
%exclude %{_libexecdir}/ssh/ssh-ldap*
|
2013-09-19 06:09:33 +02:00
|
|
|
%attr(0755,root,root) %{_libexecdir}/ssh/*
|
2016-04-06 13:34:51 +02:00
|
|
|
%attr(0444,root,root) %doc %{_mandir}/man1/*
|
|
|
|
%attr(0444,root,root) %doc %{_mandir}/man5/*
|
|
|
|
%attr(0444,root,root) %doc %{_mandir}/man8/*
|
2011-10-19 04:18:13 +02:00
|
|
|
%dir %{_sysconfdir}/slp.reg.d
|
|
|
|
%config %{_sysconfdir}/slp.reg.d/ssh.reg
|
2016-04-06 13:34:51 +02:00
|
|
|
/var/adm/fillup-templates/sysconfig.ssh
|
2013-09-19 06:09:33 +02:00
|
|
|
%if %{has_fw_dir}
|
2016-04-06 13:34:51 +02:00
|
|
|
%if %{needs_all_dirs}
|
2013-09-19 06:09:33 +02:00
|
|
|
%dir %{_fwdir}
|
|
|
|
%dir %{_fwdefdir}
|
2016-04-06 13:34:51 +02:00
|
|
|
%endif
|
2013-09-19 06:09:33 +02:00
|
|
|
%config %{_fwdefdir}/sshd
|
|
|
|
%endif
|
|
|
|
|
2014-01-31 13:18:41 +01:00
|
|
|
%files helpers
|
2013-09-19 06:09:33 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0755,root,root) %dir %{_sysconfdir}/ssh
|
2016-09-30 22:34:19 +02:00
|
|
|
%verify(not mode) %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ldap.conf
|
2013-09-19 06:09:33 +02:00
|
|
|
%attr(0755,root,root) %dir %{_libexecdir}/ssh
|
2016-09-30 22:34:19 +02:00
|
|
|
%attr(0755,root,root) %{_libexecdir}/ssh/ssh-ldap*
|
|
|
|
%doc HOWTO.ldap-keys openssh-lpk-openldap.schema openssh-lpk-sun.schema
|
2007-01-07 17:26:05 +01:00
|
|
|
|
2014-04-14 23:53:01 +02:00
|
|
|
%files fips
|
|
|
|
%defattr(-,root,root)
|
2016-05-30 03:36:18 +02:00
|
|
|
%attr(0444,root,root) %{_bindir}/ssh%{CHECKSUM_SUFFIX}
|
|
|
|
%attr(0444,root,root) %{_sbindir}/sshd%{CHECKSUM_SUFFIX}
|
|
|
|
%attr(0444,root,root) %{_libexecdir}/ssh/sftp-server%{CHECKSUM_SUFFIX}
|
|
|
|
|
|
|
|
%files cavs
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0755,root,root) %{_libexecdir}/ssh/cavs*
|
2014-04-14 23:53:01 +02:00
|
|
|
|
2007-02-22 14:37:20 +01:00
|
|
|
%changelog
|