Revert "Remove sshd.socket unit"

This reverts commit 8a294387d0.

This change has been pushed to Fedora 40 and is pending discussion /
voting from FESCo.

See: https://pagure.io/fesco/issue/3062
See: https://fedoraproject.org/wiki/Changes/Drop_Sshd_Socket
This commit is contained in:
Timothée Ravier 2023-09-15 10:22:41 +02:00
parent d77b1b790a
commit f98acbdc5d
2 changed files with 20 additions and 3 deletions

View File

@ -47,7 +47,7 @@
# Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1 # Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
%global openssh_ver 9.3p1 %global openssh_ver 9.3p1
%global openssh_rel 9 %global openssh_rel 10
%global pam_ssh_agent_ver 0.10.4 %global pam_ssh_agent_ver 0.10.4
%global pam_ssh_agent_rel 9 %global pam_ssh_agent_rel 9
@ -66,6 +66,7 @@ Source5: pam_ssh_agent-rmheaders
Source6: ssh-keycat.pam Source6: ssh-keycat.pam
Source7: sshd.sysconfig Source7: sshd.sysconfig
Source9: sshd@.service Source9: sshd@.service
Source10: sshd.socket
Source11: sshd.service Source11: sshd.service
Source12: sshd-keygen@.service Source12: sshd-keygen@.service
Source13: sshd-keygen Source13: sshd-keygen
@ -573,6 +574,7 @@ install -m644 sshd_config_redhat_cp $RPM_BUILD_ROOT%{_sysconfdir}/ssh/sshd_confi
install -m644 sshd_config_redhat $RPM_BUILD_ROOT%{_sysconfdir}/ssh/sshd_config.d/50-redhat.conf install -m644 sshd_config_redhat $RPM_BUILD_ROOT%{_sysconfdir}/ssh/sshd_config.d/50-redhat.conf
install -d -m755 $RPM_BUILD_ROOT/%{_unitdir} install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
install -m644 %{SOURCE9} $RPM_BUILD_ROOT/%{_unitdir}/sshd@.service 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 %{SOURCE11} $RPM_BUILD_ROOT/%{_unitdir}/sshd.service
install -m644 %{SOURCE12} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen@.service install -m644 %{SOURCE12} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen@.service
install -m644 %{SOURCE15} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen.target install -m644 %{SOURCE15} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen.target
@ -630,7 +632,7 @@ if [ $1 -gt 1 ]; then
# OSTree systems) from running. # OSTree systems) from running.
touch /var/lib/.ssh-host-keys-migration touch /var/lib/.ssh-host-keys-migration
fi fi
%systemd_post sshd.service %systemd_post sshd.service sshd.socket
# Migration scriptlet for Fedora 31 and 32 installations to sshd_config # Migration scriptlet for Fedora 31 and 32 installations to sshd_config
# drop-in directory (in F32+). # drop-in directory (in F32+).
# Do this only if the file generated by anaconda exists, contains our config # Do this only if the file generated by anaconda exists, contains our config
@ -644,7 +646,7 @@ test -f %{sysconfig_anaconda} && \
rm %{sysconfig_anaconda} || : rm %{sysconfig_anaconda} || :
%preun server %preun server
%systemd_preun sshd.service %systemd_preun sshd.service sshd.socket
%postun server %postun server
%systemd_postun_with_restart sshd.service %systemd_postun_with_restart sshd.service
@ -711,6 +713,7 @@ test -f %{sysconfig_anaconda} && \
%attr(0640,root,root) %config(noreplace) /etc/sysconfig/sshd %attr(0640,root,root) %config(noreplace) /etc/sysconfig/sshd
%attr(0644,root,root) %{_unitdir}/sshd.service %attr(0644,root,root) %{_unitdir}/sshd.service
%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@.service
%attr(0644,root,root) %{_unitdir}/sshd-keygen.target %attr(0644,root,root) %{_unitdir}/sshd-keygen.target
%attr(0644,root,root) %{_sysusersdir}/openssh-server.conf %attr(0644,root,root) %{_sysusersdir}/openssh-server.conf
@ -741,6 +744,9 @@ test -f %{sysconfig_anaconda} && \
%endif %endif
%changelog %changelog
* Fri Sep 15 2023 Timothée Ravier <tim@siosm.fr> - 9.3p1-10
- Revert "Remove sshd.socket unit (rhbz#2025716)"
* Thu Aug 03 2023 Norbert Pocs <npocs@redhat.com> - 9.3p1-9 * Thu Aug 03 2023 Norbert Pocs <npocs@redhat.com> - 9.3p1-9
- pkcs11: Add support for 'serial' in PKCS#11 URI - pkcs11: Add support for 'serial' in PKCS#11 URI
- Apply the upstream MR related to the previous pkcs11 issue - Apply the upstream MR related to the previous pkcs11 issue

11
sshd.socket Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=OpenSSH Server Socket
Documentation=man:sshd(8) man:sshd_config(5)
Conflicts=sshd.service
[Socket]
ListenStream=22
Accept=yes
[Install]
WantedBy=sockets.target