PATCH: OpenSSH RPM spec file problems

Pekka Savola pekkas at netcore.fi
Thu Sep 28 02:25:24 EST 2000


Hello all,

There are two issues in OpenSSH RPM Red Hat spec file (against 2.2.0p1):

1. /etc/rc.d/init.d/sshd uses 'success' and 'failure'.  These don't work
in Red Hat 5.2; else the spec file is fine.  Initscripts requirement (for
the one in RH60) added.

2. If you're upgrading over SSH ltd's ssh-server, the server will be
stopped and sshd removed from chkconfig --list.  Obsoleletion doesn't seem
to qualify as "clean" operation, so the %preun will be run
regardless.  H.J. Lu <hjl at valinux.com> supplied the patch.  Tested.

Similar issues (at least the second) surely apply for the SuSE SPEC file
too.

-- 
Pekka Savola                 "Tell me of difficulties surmounted, 
Pekka.Savola at netcore.fi      not those you stumble over and fall"
-------------- next part --------------
--- openssh.spec.orig	Wed Sep 27 18:17:32 2000
+++ openssh.spec	Wed Sep 27 18:16:57 2000
@@ -25,6 +25,8 @@
 Obsoletes: ssh
 PreReq: openssl >= 0.9.5a
 Requires: openssl >= 0.9.5a
+### Post-RH52 initscripts is required for 'success'/'failure' in init.d/sshd
+Requires: initscripts >= 4.16
 BuildPreReq: perl
 BuildPreReq: openssl-devel
 BuildPreReq: tcp_wrappers
@@ -221,6 +223,25 @@
 	/etc/rc.d/init.d/sshd stop >&2
 	/sbin/chkconfig --del sshd
 fi
+
+# Deal with the original ssh-server rpm.
+%triggerun server -- ssh-server
+if [ "$1" != 0 -a -r /var/run/sshd.pid ]
+then
+       touch /var/run/sshd.restart
+fi
+
+%triggerpostun server -- ssh-server
+if [ "$1" != 0 ]
+then
+       /sbin/chkconfig --add sshd
+       if test -f /var/run/sshd.restart
+       then
+               rm -f /var/run/sshd.restart
+               /etc/rc.d/init.d/sshd start >&2
+       fi
+fi
+
 
 %files
 %defattr(-,root,root)


More information about the openssh-unix-dev mailing list