--- ssh-2.3.0.spec Thu Aug 24 07:38:03 2000 +++ ssh2-2.3.0.spec Sun Sep 3 19:40:20 2000 @@ -5,15 +5,16 @@ # Summary: SSH Secure Shell, Noncommercial version -Name: ssh +Name: ssh2 Version: 2.3.0 -Release: 1 +Release: kiva1 Copyright: See LICENSE. Group: Applications/Internet -Source: ssh-2.3.0.tar.gz +Source: ssh2-2.3.0.tar.gz URL: http://www.ssh.org/ Vendor: SSH -Packager: SSH Communications Security +Packager: Joe Bowman +BuildRoot: /var/tmp/%{name}-root %description SSH Secure Shell, Noncommercial version. @@ -22,11 +23,13 @@ %setup %build -./configure --enable-debug -make +./configure --enable-debug --prefix=%_prefix --mandir=%_mandir +make %install -make install +make DESTDIR="$RPM_BUILD_ROOT" install +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +mv sshd2.startup $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd2 %post # @@ -36,63 +39,101 @@ then echo "Hostkey not found at /etc/ssh2/hostkey."; umask 022; - /usr/local/bin/ssh-keygen2 -P -b 1024 -t dsa /etc/ssh2/hostkey; + %_bindir/ssh-keygen2 -P -b 1024 -t dsa /etc/ssh2/hostkey; else echo "Hostkey found at /etc/ssh2/hostkey, not regenerating."; fi +ln -sf %_bindir/ssh2 %_bindir/ssh +ln -sf %_bindir/ssh-add2 %_bindir/ssh-add +ln -sf %_bindir/ssh-agent2 %_bindir/ssh-agent +ln -sf %_bindir/scp2 %_bindir/scp +ln -sf %_bindir/ssh-keygen2 %_bindir/ssh-keygen +ln -sf %_sbindir/sshd2 %_sbindir/sshd +ln -sf %_bindir/ssh-askpass2 %_bindir/ssh-askpass + + # # Configuration # # This is a bit distribution specific. If SuSE is not found, we're # assuming RedHat. Others are in development. # -if [ -r /etc/SuSE-release ] ; -then - echo "Configuring for SuSE Linux..."; - /bin/fillup -q -d = /etc/rc.config /var/adm/fillup-templates/rc.config.ssh; - ln -sf /etc/rc.d/init.d/sshd /etc/rc.d/init.d/rc2.d/K20sshd; - ln -sf /etc/rc.d/init.d/sshd /etc/rc.d/init.d/rc2.d/S20sshd; - ln -sf /etc/rc.d/init.d/sshd /etc/rc.d/init.d/rc3.d/K20sshd; - ln -sf /etc/rc.d/init.d/sshd /etc/rc.d/init.d/rc3.d/S20sshd; -else - echo "Assuming RedHat Linux compatible and trying to configure..."; - if ! /sbin/chkconfig --add sshd; +echo "Assuming RedHat Linux compatible and trying to configure..."; + if ! /sbin/chkconfig --add sshd2; then echo -n "Configuration seems to have failed. "; echo "You might be running other than RedHat."; echo "Please edit configuration files by hand."; fi -fi echo "Please make sure you haven't specified sshd in /etc/rc.d/rc.local"; echo ""; echo "If you already have sshd running, you should restart it or reboot."; echo "Configuration done."; -%postun -# -# Postuninstall stuff +%preun # -# This is as much distribution specific as the postinstall stuff. +#Preuninstall stuff # -if [ -r /etc/SuSE-release ] ; -then - echo "Uninstalling for SuSE Linux..."; - rm -f /etc/rc.d/init.d/rc2.d/K20sshd >/dev/null 2>/dev/null; - rm -f /etc/rc.d/init.d/rc3.d/S20sshd >/dev/null 2>/dev/null; - rm -f /etc/rc.d/init.d/rc2.d/K20sshd >/dev/null 2>/dev/null; - rm -f /etc/rc.d/init.d/rc3.d/S20sshd >/dev/null 2>/dev/null; -else echo "Assuming RedHat Linux compatible and uninstalling..."; - if ! /sbin/chkconfig --del sshd; - then - echo -n "Uninstall seems to have failed. "; - echo "You might be running other than RedHat."; - echo "Please edit configuration files by hand."; - fi +if ! /sbin/chkconfig --del sshd2; +then +echo -n "Uninstall seems to have failed. "; +echo "You might be running other than RedHat."; +echo "Please edit configuration files by hand."; fi echo "SSHd wasn't stopped if it was running. You should kill it or reboot."; + +%postun +# +# Postuninstall stuff +# + +if [ -f %_bindir/ssh1 ]; then + ln -sf %_bindir/ssh1 %_bindir/ssh + else + rm -f %_bindir/ssh +fi + +if [ -f %_bindir/ssh-add1 ]; then + ln -sf %_bindir/ssh-add1 %_bindir/ssh-add + else + rm -f %_bindir/ssh-add +fi + +if [ -f %_bindir/ssh-agent1 ]; then + ln -sf %_bindir/ssh-agent1 %_bindir/ssh-agent + else + rm -f %_bindir/ssh-agent +fi + +if [ -f %_bindir/scp1 ]; then + ln -sf %_bindir/scp1 %_bindir/scp + else + rm -f %_bindir/scp +fi + +if [ -f %_bindir/ssh-keygen1 ]; then + ln -sf %_bindir/ssh-keygen1 %_bindir/ssh-keygen + else + rm -f %_bindir/ssh-keygen +fi + +if [ -f /usr/sbin/sshd1 ]; then + ln -sf /usr/sbin/sshd1 /usr/sbin/sshd + else + rm -f /usr/sbin/sshd +fi + +if [ -f %_bindir/ssh-askpass1 ]; then + ln -sf %_bindir/ssh-askpass1 %_bindir/ssh-askpass + else + rm -f %_bindir/ssh-askpass +fi + + + %files %doc BUG.REPORT %doc CHANGES @@ -102,60 +143,74 @@ %doc MANIFEST %doc README %doc SSH2.QUICKSTART -%config /etc/ssh2/sshd2_config %config /etc/ssh2/ssh2_config %config /etc/ssh2/ssh_dummy_shell.out -%config /etc/rc.d/init.d/sshd -%config /var/adm/fillup-templates/rc.config.ssh -/usr/local/bin/ssh2 -/usr/local/bin/scp2 -/usr/local/bin/sftp2 -/usr/local/bin/sftp-server2 -/usr/local/bin/ssh-agent2 -/usr/local/bin/ssh-keygen2 -/usr/local/bin/ssh-signer2 -/usr/local/bin/ssh-probe2 -/usr/local/bin/ssh-askpass2 -/usr/local/bin/ssh-add2 -/usr/local/bin/ssh-dummy-shell -/usr/local/bin/ssh-pubkeymgr -/usr/local/bin/ssh-agent -/usr/local/bin/ssh-add -/usr/local/bin/ssh-askpass -/usr/local/bin/ssh-keygen -/usr/local/bin/ssh-chrootmgr -/usr/local/bin/ssh -/usr/local/bin/scp -/usr/local/bin/sftp -/usr/local/bin/sftp-server -/usr/local/bin/ssh-signer -/usr/local/bin/ssh-probe -/usr/local/sbin/sshd2 -/usr/local/sbin/sshd -/usr/local/man/man1/ssh2.1 -/usr/local/man/man1/ssh-keygen2.1 -/usr/local/man/man1/ssh-add2.1 -/usr/local/man/man1/ssh-agent2.1 -/usr/local/man/man1/scp2.1 -/usr/local/man/man1/sftp2.1 -/usr/local/man/man1/sshregex.1 -/usr/local/man/man1/ssh-probe2.1 -/usr/local/man/man1/ssh-dummy-shell.1 -/usr/local/man/man1/ssh-pubkeymgr.1 -/usr/local/man/man1/ssh.1 -/usr/local/man/man1/ssh-add.1 -/usr/local/man/man1/ssh-agent.1 -/usr/local/man/man1/ssh-keygen.1 -/usr/local/man/man1/scp.1 -/usr/local/man/man1/sftp.1 -/usr/local/man/man1/ssh-probe.1 -/usr/local/man/man1/ssh-chrootmgr.1 -/usr/local/man/man5/ssh2_config.5 -/usr/local/man/man5/sshd2_config.5 -/usr/local/man/man8/sshd2.8 -/usr/local/man/man8/sshd.8 +%config /etc/ssh2/sshd2_config +/etc/rc.d/init.d/sshd2 +%_bindir/sftp +%_bindir/sftp-server +%_bindir/ssh-signer +%_bindir/ssh-probe +%_bindir/ssh2 +%_bindir/scp2 +%_bindir/sftp2 +%_bindir/sftp-server2 +%_bindir/ssh-agent2 +%_bindir/ssh-keygen2 +%_bindir/ssh-signer2 +%_bindir/ssh-probe2 +%_bindir/ssh-askpass2 +%_bindir/ssh-add2 +%_bindir/ssh-dummy-shell +%_bindir/ssh-pubkeymgr +%_bindir/ssh-chrootmgr +%_sbindir/sshd2 +%_mandir/man1/* +%_mandir/man5/* +%_mandir/man8/* + +%triggerin -- ssh +ln -sf %_bindir/scp2 %_bindir/scp +ln -sf %_bindir/ssh-keygen2 %_bindir/ssh-keygen + +%triggerpostun -- ssh +[ $2 = 0 ] || exit 0 +ln -sf %_bindir/scp2 %_bindir/scp +ln -sf %_bindir/ssh-keygen2 %_bindir/ssh-keygen + +%triggerin -- ssh-server +ln -sf /usr/sbin/sshd2 /usr/sbin/sshd + +%triggerpostun -- ssh-server +[ $2 = 0 ] || exit 0 +ln -sf %_sbindir/sshd2 %_sbindir/sshd + +%triggerin -- ssh-extras +ln -sf %_bindir/ssh-askpass2 %_bindir/ssh-askpass + +%triggerpostun -- ssh-extras +[ $2 = 0 ] || exit 0 +ln -sf %_bindir/ssh-askpass2 %_bindir/ssh-askpass + +%triggerin -- ssh-clients +ln -sf %_bindir/ssh2 %_bindir/ssh +ln -sf %_bindir/ssh-add2 %_bindir/ssh-add +ln -sf %_bindir/ssh-agent2 %_bindir/ssh-agent + +%triggerpostun -- ssh-clients +[ $2 = 0 ] || exit 0 +ln -sf %_bindir/ssh2 %_bindir/ssh +ln -sf %_bindir/ssh-add2 %_bindir/ssh-add +ln -sf %_bindir/ssh-agent2 %_bindir/ssh-agent + + %changelog +* Thu Aug 31 2000 Joe Bowman +- Patched to solve a large number of specfile problems +- Added the ability to install alongside ssh1 rpms for ssh1 compatibility mode +- Changed package name to ssh2 to allow for installation alongside ssh1 +- Removed explicit SUSE support. * Thu Aug 24 2000 Anne Carasik - Made from 2.3.0 distribution. * Fri Jun 9 2000 Anne Carasik