Patch to update contrib/solaris package builder [3rd patch]

ninjaz at webexpress.com ninjaz at webexpress.com
Tue May 8 14:44:08 EST 2001


On Mon, 7 May 2001 mouring at etoh.eviladmin.org wrote:

> 
> 
> [.. From Makefile.. 'install-files:' section..]
>         -rm -f $(DESTDIR)$(bindir)/slogin
>         ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
>         -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
>         ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
> 
> So they are symlinks.

Thanks -

Fixed in this patch (symlink entries in prototype).

> 
> The packaging process still does not handle a lot of cases.  You may
> always want to watch out for the 'mdoc vs man' formated manpages.  Most
> solaris (all?) use 'man' formated.  The default documentation is in mdoc.

This is fixed, too. (by using the foo.x.out files generated by the OpenSSH
Makefile)  It requires perl, but so does the OpenSSL build, anyway ... 

> If I don't get a rewrite in the next few days.  I'll apply this as a
> stop-gap.  But I'd like to see this rewritten, but I'll not get to it for
> at least two weeks due to projects at work.

Are these two issues the ones you wanted squashed?  Or is there a more
ambitious complete rewrite you have in mind?

				-pete

-------------- next part --------------
diff -u solaris.virgin/build-pkg solaris/build-pkg
--- solaris.virgin/build-pkg	Fri Nov 10 14:36:39 2000
+++ solaris/build-pkg	Mon May  7 21:03:48 2001
@@ -145,21 +145,28 @@
 mkdir -p ${BUILDDIR}/man/man8
 mkdir -p ${BUILDDIR}/etc
 mkdir -p ${BUILDDIR}/bin
+mkdir -p ${BUILDDIR}/libexec
 mkdir -p ${BUILDDIR}/sbin
 
 echo "Populating build directories..."
 cp -p ../../../sshd sbin
 cp -p ../../../ssh-keygen bin
+cp -p ../../../ssh-keyscan bin
 cp -p ../../../ssh bin
 cp -p ../../../ssh-add bin
 cp -p ../../../ssh-agent bin
 cp -p ../../../scp bin
-cp -p ../../../scp.1 man/man1/scp.1
-cp -p ../../../ssh-add.1 man/man1/ssh-add.1
-cp -p ../../../ssh-agent.1 man/man1/ssh-agent.1
-cp -p ../../../ssh-keygen.1 man/man1/ssh-keygen.1
-cp -p ../../../ssh.1 man/man1/ssh.1
-cp -p ../../../sshd.8 man/man8/sshd.8
+cp -p ../../../scp.1.out man/man1/scp.1
+cp -p ../../../sftp bin
+cp -p ../../../sftp.1.out man/man1/sftp.1
+cp -p ../../../sftp-server libexec/sftp-server
+cp -p ../../../sftp-server.8.out man/man8/sftp-server.8
+cp -p ../../../ssh-add.1.out man/man1/ssh-add.1
+cp -p ../../../ssh-agent.1.out man/man1/ssh-agent.1
+cp -p ../../../ssh-keygen.1.out man/man1/ssh-keygen.1
+cp -p ../../../ssh-keyscan.1.out man/man1/ssh-keyscan.1
+cp -p ../../../ssh.1.out man/man1/ssh.1
+cp -p ../../../sshd.8.out man/man8/sshd.8
 cp -p ../../../sshd_config.out etc/sshd_config.default 
 cp -p ../../../ssh_config.out etc/ssh_config.default
 cp -p ../../../ssh_prng_cmds etc/ssh_prng_cmds.default
@@ -182,8 +189,11 @@
 ${STRIP} bin/ssh-add
 ${STRIP} bin/ssh-agent
 ${STRIP} bin/ssh-keygen
+${STRIP} bin/ssh-keyscan
 ${STRIP} sbin/sshd
 ${STRIP} bin/scp
+${STRIP} bin/sftp
+${STRIP} libexec/sftp-server
 
 echo ""
 echo "Building Package"
diff -u solaris.virgin/postinstall.in solaris/postinstall.in
--- solaris.virgin/postinstall.in	Mon Apr 23 17:03:58 2001
+++ solaris/postinstall.in	Mon May  7 17:51:35 2001
@@ -89,6 +89,26 @@
     else
         echo "Using existing DSA public/private host key pair for SSH-2."
     fi
+    if [ ! -f "${CONFDIR}/ssh_host_rsa_key" ]; then
+        echo "Creating new RSA public/private host key pair for SSH-2."
+        $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key
+        $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key.pub
+        ### If there is *anything* there then leave it, otherwise look
+        ### in some reasonable alternate locations before giving up.
+        ### It's worth spending some extra time looking for the old one
+        ### to avoid a bunch of "host identification has changed" warnings.
+        ### Note that some old keys from the commercial SSH2 might not
+        ### be compatible, but we don't test for that.
+        if [ -f "${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key" ]; then
+           mv ${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key ${CONFDIR}
+        elif [ -f "${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key" ]; then
+           mv ${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key ${CONFDIR}
+        else
+           ${DESTBIN}/ssh-keygen -t rsa -f ${CONFDIR}/ssh_host_rsa_key -N ''
+        fi
+    else
+        echo "Using existing RSA public/private host key pair for SSH-2."
+    fi
 else
     echo "Performing an \"update\" installation of OpenSSH."
     ### Okay, this part *is* an update install...so we need to ensure
@@ -177,6 +197,26 @@
         fi
     else
         echo "Using existing DSA public/private host key pair for SSH-2."
+    fi
+    if [ ! -f "${CONFDIR}/ssh_host_rsa_key" ]; then
+        echo "Creating new RSA public/private host key pair for SSH-2."
+        $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key
+        $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key.pub
+        ### If there is *anything* there then leave it, otherwise look
+        ### in some reasonable alternate locations before giving up.
+        ### It's worth spending some extra time looking for the old one
+        ### to avoid a bunch of "host identification has changed" warnings.
+        ### Note that some old keys from the commercial SSH2 might not
+        ### be compatible, but we don't test for that.
+        if [ -f "${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key" ]; then
+           mv ${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key ${CONFDIR}
+        elif [ -f "${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key" ]; then
+           mv ${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key ${CONFDIR}
+        else
+           ${DESTBIN}/ssh-keygen -d -f ${CONFDIR}/ssh_host_rsa_key -N ''
+        fi
+    else
+        echo "Using existing RSA public/private host key pair for SSH-2."
     fi
 fi
 
diff -u solaris.virgin/prototype solaris/prototype
--- solaris.virgin/prototype	Fri Nov 10 14:36:39 2000
+++ solaris/prototype	Mon May  7 21:31:30 2001
@@ -5,11 +5,15 @@
 d none man 0755 root sys 
 d none man/man1 0755 root sys
 f none man/man1/scp.1 0644 root sys
+f none man/man1/sftp.1 0644 root sys
 f none man/man1/ssh-add.1 0644 root sys
 f none man/man1/ssh-agent.1 0644 root sys
 f none man/man1/ssh-keygen.1 0644 root sys
+f none man/man1/ssh-keyscan.1 0644 root sys
 f none man/man1/ssh.1 0644 root sys
+s none man/man1/slogin.1=ssh.1 
 d none man/man8 0755 root sys
+f none man/man8/sftp-server.8 0644 root sys
 f none man/man8/sshd.8 0644 root sys
 d none etc 0755 root sys
 f none etc/sshd_config.default 0644 root sys
@@ -20,8 +24,13 @@
 d none bin 0755 root sys
 f none bin/ssh-keygen 0755 root sys
 f none bin/ssh 0755 root sys
+s none bin/slogin=ssh 0755 root sys 
 f none bin/ssh-add 0755 root sys
 f none bin/ssh-agent 0755 root sys
+f none bin/ssh-keyscan 0755 root sys
 f none bin/scp 0755 root sys
+f none bin/sftp 0755 root sys
+d none libexec 0755 root sys
+f none libexec/sftp-server 0755 root sys
 d none sbin 0755 root sys
 f none sbin/sshd 0755 root sys


More information about the openssh-unix-dev mailing list