diff options
author | schmonz <schmonz@pkgsrc.org> | 2014-08-19 22:06:49 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2014-08-19 22:06:49 +0000 |
commit | 3426d87adc87649316f94b225cd8afe87e68aba9 (patch) | |
tree | 2452959f80009a7792e3137cacec44bafbb61cce /mail/qmail | |
parent | b2fde6cd0f1bb786ab5320e93f5fe3518970bd0f (diff) | |
download | pkgsrc-3426d87adc87649316f94b225cd8afe87e68aba9.tar.gz |
Allow packaging as non-root, prompted by private mail from J. Lewis
Muir.
For the baker's dozen of binaries unreadable (or worse) to non-root,
chmod them 0755 at post-install for pkg_create(1), and chmod them
back with SPECIAL_PERMS at pkg_add(1) time. Permissions on the
installed binaries compare equal before and after this change, so
no PKGREVISION bump.
Diffstat (limited to 'mail/qmail')
-rw-r--r-- | mail/qmail/Makefile | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile index 1266805ccb4..ba478d939f2 100644 --- a/mail/qmail/Makefile +++ b/mail/qmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.69 2014/05/30 21:35:04 schmonz Exp $ +# $NetBSD: Makefile,v 1.70 2014/08/19 22:06:49 schmonz Exp $ # DISTNAME= ${PKGNAME_NOREV} @@ -121,7 +121,18 @@ PKG_HOME.${user}= ${QMAILDIR} .endfor PKG_HOME.alias= ${QMAILDIR}/alias +QMAIL_ROOT_ONLY_READABLE= qmail-clean qmail-getpw qmail-local qmail-popup +QMAIL_ROOT_ONLY_READABLE+= qmail-pw2u qmail-remote qmail-rspawn qmail-send +QMAIL_ROOT_ONLY_READABLE+= splogger +QMAIL_ROOT_ONLY_EVERYTHING= qmail-lspawn qmail-newmrh qmail-newu qmail-start + SPECIAL_PERMS+= ${PREFIX}/bin/qmail-queue qmailq qmail 4555 +.for f in ${QMAIL_ROOT_ONLY_READABLE} +SPECIAL_PERMS+= ${PREFIX}/bin/${f} root qmail 0711 +.endfor +.for f in ${QMAIL_ROOT_ONLY_EVERYTHING} +SPECIAL_PERMS+= ${PREFIX}/bin/${f} root qmail 0700 +.endfor .if ${OPSYS} == "Darwin" DARWINSUFX= .doc @@ -153,6 +164,11 @@ pre-install: . endif post-install: post-install-viruscan + # allow packaging as non-root, fix at install time with SPECIAL_PERMS + ${CHMOD} 0755 ${DESTDIR}${PREFIX}/bin/qmail-queue +. for f in ${QMAIL_ROOT_ONLY_READABLE} ${QMAIL_ROOT_ONLY_EVERYTHING} + ${CHMOD} 0755 ${DESTDIR}${PREFIX}/bin/${f} +. endfor # qmail's installer sets strange permissions, set them back . if (${PKG_INSTALLATION_TYPE} == "overwrite") . for i in bin boot |