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)
On Wed, 27 Sep 2000, Pekka Savola wrote:> 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.I am not sure about this - there are few differences between ssh.com ssh and openssh (LogLevel, etc). Enough IMO to warrant that admins manually restart the service. -d -- | ``The power of accurate observation is | Damien Miller <djm at mindrot.org> | commonly called cynicism by those who | @Work <djm at ibs.com.au> | have not got it'' - George Bernard Shaw | http://www.mindrot.org
Circa 2000-Sep-27 18:25:24 +0300 dixit Pekka Savola:
: 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.
Hmmm. I haven't looked at this for some time, but i recall patching
the initscript back before OpenSSH-1.2.3 to do this sort of thing:
#!/bin/bash
# ...
case "$1" in
start)
# ...
case "`type -type success`" in
function)
## For Red Hat Linux 6.0 and later
/usr/sbin/sshd && success "sshd startup" || failure
"sshd startup"
RETVAL=$?
;;
*)
## For Red Hat Linux 4.x and 5.x
/usr/sbin/sshd && echo -n "sshd "
;;
esac
# ...
;;
esac
Did that construct go away in the meantime?
--
jim knoble | jmknoble at jmknoble.cx | http://www.jmknoble.cx/