|
@@ -1,5 +1,4 @@
|
|
|
-%define ver 8.2p1
|
|
|
-%define rel 1%{_dist_release}
|
|
|
+%bcond_with systemd
|
|
|
|
|
|
# SELinux
|
|
|
%define WITH_SELINUX 0
|
|
@@ -8,9 +7,6 @@
|
|
|
%define sshd_uid 74
|
|
|
%define sshd_gid 74
|
|
|
|
|
|
-# Version of ssh-askpass
|
|
|
-%define aversion 1.2.4.1
|
|
|
-
|
|
|
# Do we want to disable building of gnome-askpass? (1=yes 0=no)
|
|
|
%define no_gnome_askpass 0
|
|
|
|
|
@@ -60,11 +56,24 @@
|
|
|
Summary: The OpenSSH implementation of SSH.
|
|
|
Summary(ja): OpenSSH - フリーの Secure Shell (SSH) の実装
|
|
|
Name: openssh
|
|
|
-Version: %{ver}
|
|
|
-Release: %{rel}
|
|
|
-URL: https://www.openssh.com/portable.html
|
|
|
+Version: 8.3p1
|
|
|
+Release: 1%{_dist_release}%{?with_systemd:.systemd}
|
|
|
+Group: Applications/Internet
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+Packager: daisuke
|
|
|
|
|
|
+License: BSD
|
|
|
+URL: https://www.openssh.com/portable.html
|
|
|
Source0: https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
|
|
|
+# files for systemd
|
|
|
+Source9: sshd@.service
|
|
|
+Source10: sshd.socket
|
|
|
+Source11: sshd.service
|
|
|
+Source12: sshd-keygen@.service
|
|
|
+Source13: sshd-keygen
|
|
|
+Source14: sshd.tmpfiles
|
|
|
+Source15: sshd-keygen.target
|
|
|
|
|
|
Patch0: openssh-7.6p1-vine.patch
|
|
|
#Patch4: openssh-8.0p1-vendor.patch
|
|
@@ -78,12 +87,13 @@ Patch26: openssh-5.2p1-pam-no-stack.patch
|
|
|
# Patch31: openssh-3.9p1-skip-used.patch
|
|
|
Patch35: openssh-8.2p1-askpass-progress-gtk3.patch
|
|
|
|
|
|
+# Help systemd to track the running service
|
|
|
+Patch948: openssh-7.4p1-systemd.patch
|
|
|
+
|
|
|
# Vine Source
|
|
|
Source100: sshd.init.vine
|
|
|
Source110: sshd.sysconfig.vine
|
|
|
|
|
|
-License: BSD
|
|
|
-Group: Applications/Internet
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
|
|
|
|
|
Obsoletes: ssh
|
|
@@ -104,10 +114,10 @@ BuildRequires: gtk3-devel
|
|
|
BuildRequires: xorg-x11-xauth
|
|
|
BuildRequires: groff
|
|
|
BuildRequires: libedit-devel
|
|
|
+%if %{with systemd}
|
|
|
+BuildRequires: systemd-devel
|
|
|
+%endif
|
|
|
|
|
|
-Vendor: Project Vine
|
|
|
-Distribution: Vine Linux
|
|
|
-Packager: daisuke
|
|
|
|
|
|
%package clients
|
|
|
Summary: OpenSSH clients.
|
|
@@ -234,8 +244,8 @@ OpenSSH は OpenBSD による最後のフリーのバージョンの再実装で
|
|
|
|
|
|
このパッケージは GNOME 用のパスフレーズ入力ダイアログを含んでいます。
|
|
|
|
|
|
-%prep
|
|
|
|
|
|
+%prep
|
|
|
%setup -q
|
|
|
%patch0 -p1 -b .vine
|
|
|
#patch4 -p1 -b .vendor
|
|
@@ -252,6 +262,10 @@ OpenSSH は OpenBSD による最後のフリーのバージョンの再実装で
|
|
|
# %patch30 -p1 -b .exit-deadlock
|
|
|
%patch35 -p1 -b .progress
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
+%patch948 -p1
|
|
|
+%endif
|
|
|
+
|
|
|
autoreconf
|
|
|
|
|
|
|
|
@@ -288,10 +302,14 @@ LDFLAGS="$LDFLAGS -pie"; export LDFLAGS
|
|
|
--with-ipv4-default \
|
|
|
%endif
|
|
|
%if %{rescue}
|
|
|
- --without-pam --with-md5-passwords
|
|
|
+ --without-pam --with-md5-passwords \
|
|
|
%else
|
|
|
- --with-pam
|
|
|
+ --with-pam \
|
|
|
%endif
|
|
|
+%if %{with systemd}
|
|
|
+ --with-systemd \
|
|
|
+%endif
|
|
|
+ %{nil}
|
|
|
|
|
|
%if %{static_libcrypto}
|
|
|
perl -pi -e "s|-lcrypto|%{_libdir}/libcrypto.a|g" Makefile
|
|
@@ -332,9 +350,23 @@ install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
|
install -d $RPM_BUILD_ROOT/etc/sysconfig/
|
|
|
install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
|
|
|
install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
|
|
|
-install -m755 %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
|
|
|
install -m644 %{SOURCE110} $RPM_BUILD_ROOT/etc/sysconfig/sshd
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
+install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
|
|
|
+install -m644 %{SOURCE9} $RPM_BUILD_ROOT/%{_unitdir}/sshd@.service
|
|
|
+install -m644 %{SOURCE10} $RPM_BUILD_ROOT/%{_unitdir}/sshd.socket
|
|
|
+install -m644 %{SOURCE11} $RPM_BUILD_ROOT/%{_unitdir}/sshd.service
|
|
|
+install -m644 %{SOURCE12} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen@.service
|
|
|
+install -m644 %{SOURCE15} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen.target
|
|
|
+install -m744 %{SOURCE13} $RPM_BUILD_ROOT/%{_libexecdir}/openssh/sshd-keygen
|
|
|
+install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}/
|
|
|
+install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
|
|
+install -m644 -D %{SOURCE14} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
|
|
|
+%else
|
|
|
+install -m755 %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
|
|
|
+%endif
|
|
|
+
|
|
|
%if ! %{scard}
|
|
|
rm -f $RPM_BUILD_ROOT%{_datadir}/openssh/Ssh.bin
|
|
|
%endif
|
|
@@ -388,26 +420,43 @@ if [ "$1" != 0 ] ; then
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
+%pre
|
|
|
+getent group ssh_keys >/dev/null || groupadd -r ssh_keys || :
|
|
|
+%endif
|
|
|
+
|
|
|
%pre server
|
|
|
%{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :
|
|
|
%{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \
|
|
|
-g sshd -M -r sshd 2>/dev/null || :
|
|
|
|
|
|
%post server
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_post sshd.service sshd.socket
|
|
|
+%else
|
|
|
/sbin/chkconfig --add sshd
|
|
|
+%endif
|
|
|
|
|
|
%postun server
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_postun_with_restart sshd.service
|
|
|
+%else
|
|
|
# /sbin/service sshd condrestart > /dev/null 2>&1 || :
|
|
|
/sbin/service sshd condrestart
|
|
|
exit 0
|
|
|
+%endif
|
|
|
|
|
|
%preun server
|
|
|
-if [ "$1" = 0 ]
|
|
|
-then
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_preun sshd.service sshd.socket
|
|
|
+%else
|
|
|
+if [ "$1" = 0 -o -x /bin/systemctl ]; then
|
|
|
/sbin/service sshd stop > /dev/null 2>&1 || :
|
|
|
/sbin/chkconfig --del sshd
|
|
|
+%endif
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
%license LICENCE
|
|
@@ -468,8 +517,18 @@ fi
|
|
|
%attr(0755,root,root) %dir %{_sysconfdir}/ssh
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
|
|
|
%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
|
|
|
-%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
|
|
|
%attr(0755,root,root) %config /etc/sysconfig/sshd
|
|
|
+%if %{with systemd}
|
|
|
+%attr(0755,root,root) %{_libexecdir}/openssh/sshd-keygen
|
|
|
+%attr(0644,root,root) %{_unitdir}/sshd.service
|
|
|
+%attr(0644,root,root) %{_unitdir}/sshd@.service
|
|
|
+%attr(0644,root,root) %{_unitdir}/sshd.socket
|
|
|
+%attr(0644,root,root) %{_unitdir}/sshd-keygen@.service
|
|
|
+%attr(0644,root,root) %{_unitdir}/sshd-keygen.target
|
|
|
+%attr(0644,root,root) %{_tmpfilesdir}/openssh.conf
|
|
|
+%else
|
|
|
+%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
|
|
|
+%endif
|
|
|
%endif
|
|
|
|
|
|
%if ! %{no_gnome_askpass}
|
|
@@ -481,6 +540,12 @@ fi
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Wed May 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.3p1-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
+* Thu Apr 02 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2p1-2
|
|
|
+- added systemd support (disabled as default).
|
|
|
+
|
|
|
* Thu Mar 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2p1-1
|
|
|
- new upstream release.
|
|
|
- updated Patch35.
|