diff options
author | jlam <jlam> | 2002-06-28 17:10:16 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-06-28 17:10:16 +0000 |
commit | 47cc40e9936b7cbf6aa44e8c041988e5d9ec61f2 (patch) | |
tree | 941cc4feec4bfacab28d75e8b3b8fe31a99cb953 | |
parent | afc8054955512edc80b2a69d69ab17b29daa9dbe (diff) | |
download | pkgsrc-47cc40e9936b7cbf6aa44e8c041988e5d9ec61f2.tar.gz |
Add ability to update the in-tree OpenSSH directly from pkgsrc. This
installs the binaries directly in /usr and places the manpages and example
files in the correct hier(7) locations. We don't register installation in
this case because the package database can't handle it. We deal with the
ssh config files and directories as follows:
NetBSD-1.5.* use /etc/ssh_config, /etc/sshd_config
NetBSD-1.6 use /etc/ssh/ssh_config, /etc/ssh/sshd_config
We also emit a warning in the MESSAGE file that /etc/ssh.conf and
/etc/sshd.conf should be renamed in order to keep using them. Lastly,
there is a new target "tarball" to generate a tarball of the installed
files that might be used to install quickly on many machines, though it
may be only of limited utility.
These changes are only active if UPDATE_INTREE_OPENSSH is defined.
-rw-r--r-- | security/openssh/Makefile | 16 | ||||
-rw-r--r-- | security/openssh/Makefile.intree | 42 | ||||
-rw-r--r-- | security/openssh/PLIST | 31 |
3 files changed, 70 insertions, 19 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile index 10fcdfe12cb..fe8ab660ea5 100644 --- a/security/openssh/Makefile +++ b/security/openssh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.81 2002/06/28 09:05:16 seb Exp $ +# $NetBSD: Makefile,v 1.82 2002/06/28 17:10:16 jlam Exp $ DISTNAME= openssh-3.4p1 PKGNAME= openssh-3.4.0.1 @@ -42,10 +42,20 @@ SSH_PID_DIR= ${SSH_PID_DIR.${OPSYS}} .endif PKG_SYSCONFSUBDIR= ssh +MANDIR= man +RCD_SCRIPTS_EGDIR= etc/rc.d + +PLIST_SUBST+= MANDIR=${MANDIR} +PLIST_SUBST+= RCD_SCRIPTS_EGDIR=${RCD_SCRIPTS_EGDIR} + +.if defined(UPDATE_INTREE_OPENSSH) +. include "Makefile.intree" +.endif USE_BUILDLINK_ONLY= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +CONFIGURE_ARGS+= --mandir=${PREFIX}/${MANDIR} CONFIGURE_ARGS+= --with-pid-dir=${SSH_PID_DIR} CONFIGURE_ARGS+= --with-ssl-dir=${BUILDLINK_DIR} CONFIGURE_ARGS+= --with-tcp-wrappers=${BUILDLINK_DIR} @@ -104,6 +114,7 @@ SUPPORT_FILES= # empty .for FILE in ${SUPPS} SUPPORT_FILES+= ${EGDIR}/${FILE} ${PKG_SYSCONFDIR}/${FILE} .endfor +OWN_DIRS= /var/chroot/sshd RCD_SCRIPTS= sshd PLIST_SRC+= ${.CURDIR}/PLIST @@ -122,8 +133,7 @@ post-install: #.if defined(USE_PAM) # ${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.freebsd ${EGDIR}/sshd.pam #.endif - ${INSTALL_SCRIPT} ${WRKDIR}/sshd ${PREFIX}/etc/rc.d/sshd - ${MKDIR} /var/chroot/sshd + ${INSTALL_SCRIPT} ${WRKDIR}/sshd ${PREFIX}/${RCD_SCRIPTS_EGDIR}/sshd .include "../../devel/zlib/buildlink.mk" .include "../../security/openssl/buildlink.mk" diff --git a/security/openssh/Makefile.intree b/security/openssh/Makefile.intree new file mode 100644 index 00000000000..aa809631c81 --- /dev/null +++ b/security/openssh/Makefile.intree @@ -0,0 +1,42 @@ +# $NetBSD: Makefile.intree,v 1.1 2002/06/28 17:10:17 jlam Exp $ + +.include "../../mk/bsd.prefs.mk" + +_UPDATE_INTREE_OPENSSH?= NO +.if ${OPSYS} == "NetBSD" +. for PATTERN in 1.5 1.5.* +. if ${OS_VERSION:M${PATTERN}} +_UPDATE_INTREE_OPENSSH= YES +PKG_SYSCONFSUBDIR:= # empty +. endif +. endfor +. for PATTERN in 1.6* +. if ${OS_VERSION:M${PATTERN}} +_UPDATE_INTREE_OPENSSH= YES +PKG_SYSCONFSUBDIR:= ssh +. endif +. endfor +.endif + +.if ${_UPDATE_INTREE_OPENSSH} == "YES" +NO_MTREE= yes +NO_PKG_REGISTER= yes +NO_PACKAGE= No package registration is done +MANCOMPRESSED_IF_MANZ= yes +LOCALBASE:= /usr +PKG_SYSCONFBASE:= /etc +MANDIR:= share/man +RCD_SCRIPTS_EGDIR:= share/examples/openssh +.endif + +real-tarball: + ${GREP} -v "^@" ${PLIST} | ${SED} -e "s,^,${PREFIX}/," | ${SORT} \ + > ${WRKDIR}/MANIFEST + ${GTAR} zcvpf ${PKGNAME}-intree-${OPSYS}-${OS_VERSION}.tgz \ + `${CAT} ${WRKDIR}/MANIFEST` + +tarball: + @${ECHO_MSG} "${_PKGSRC_IN}> Tarballing ${PKGNAME}" + ${_PKG_SILENT}${_PKG_DEBUG} \ + realtarget="real-tarball"; action="tarball"; \ + ${_SU_TARGET} diff --git a/security/openssh/PLIST b/security/openssh/PLIST index 0017c24d208..fc87e722312 100644 --- a/security/openssh/PLIST +++ b/security/openssh/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2002/06/26 10:29:59 seb Exp $ +@comment $NetBSD: PLIST,v 1.7 2002/06/28 17:10:17 jlam Exp $ bin/scp bin/sftp bin/slogin @@ -7,25 +7,24 @@ bin/ssh-add bin/ssh-agent bin/ssh-keygen bin/ssh-keyscan -etc/rc.d/sshd +${RCD_SCRIPTS_EGDIR}/sshd libexec/sftp-server libexec/ssh-keysign -man/man1/scp.1 -man/man1/sftp.1 -man/man1/slogin.1 -man/man1/ssh-add.1 -man/man1/ssh-agent.1 -man/man1/ssh-keygen.1 -man/man1/ssh-keyscan.1 -man/man1/ssh.1 -man/man5/ssh_config.5 -man/man5/sshd_config.5 -man/man8/sftp-server.8 -man/man8/ssh-keysign.8 -man/man8/sshd.8 +${MANDIR}/man1/scp.1 +${MANDIR}/man1/sftp.1 +${MANDIR}/man1/slogin.1 +${MANDIR}/man1/ssh-add.1 +${MANDIR}/man1/ssh-agent.1 +${MANDIR}/man1/ssh-keygen.1 +${MANDIR}/man1/ssh-keyscan.1 +${MANDIR}/man1/ssh.1 +${MANDIR}/man5/ssh_config.5 +${MANDIR}/man5/sshd_config.5 +${MANDIR}/man8/sftp-server.8 +${MANDIR}/man8/ssh-keysign.8 +${MANDIR}/man8/sshd.8 sbin/sshd share/examples/openssh/moduli share/examples/openssh/ssh_config share/examples/openssh/sshd_config @dirrm share/examples/openssh -@exec ${MKDIR} /var/chroot/sshd |