diff options
author | fhajny <fhajny@pkgsrc.org> | 2011-12-22 11:06:40 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2011-12-22 11:06:40 +0000 |
commit | 526dc51bd2a97a647398bd34eabde9dff34ef7b3 (patch) | |
tree | aefc66a062a9f1e62128afaedb038410178ff34d /mail/mailman | |
parent | bc6a006a24eebb6a732ddf745a2c018904f3cb99 (diff) | |
download | pkgsrc-526dc51bd2a97a647398bd34eabde9dff34ef7b3.tar.gz |
Disable configure-time check for Mailman user & group. Removes the need
to hard code UID/GID when building a binary package.
Fixes PR pkg/44048
Diffstat (limited to 'mail/mailman')
-rw-r--r-- | mail/mailman/Makefile | 8 | ||||
-rw-r--r-- | mail/mailman/distinfo | 3 | ||||
-rw-r--r-- | mail/mailman/patches/patch-configure | 72 |
3 files changed, 77 insertions, 6 deletions
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile index 8f04b8b8c4d..f75d566166a 100644 --- a/mail/mailman/Makefile +++ b/mail/mailman/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.64 2011/07/03 06:20:06 markd Exp $ +# $NetBSD: Makefile,v 1.65 2011/12/22 11:06:40 fhajny Exp $ DISTNAME= mailman-2.1.14-1 PKGNAME= mailman-2.1.14.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail www MASTER_SITES= http://launchpad.net/mailman/2.1/2.1.14/+download/ EXTRACT_SUFX= .tgz @@ -43,7 +43,6 @@ PLIST_SUBST+= MAILMAN_CGIEXT=${MAILMAN_CGIEXT:S/none//} PKG_GROUPS_VARS+= MAILMAN_GROUP MAILMAN_CGIGROUP MAILMAN_MAILGROUP PKG_USERS_VARS+= MAILMAN_USER -USERGROUP_PHASE= pre-install PKG_GROUPS= ${MAILMAN_GROUP} PKG_USERS= ${MAILMAN_USER}:${MAILMAN_GROUP} @@ -113,7 +112,7 @@ post-patch: ${RM} -f ${WRKSRC}/[A-Z]*.orig pre-install: - ${INSTALL} -d -o ${MAILMAN_USER} -g ${MAILMAN_GROUP} -m 775 ${DESTDIR}${EXECDIR} + ${INSTALL_PROGRAM_DIR} ${DESTDIR}${EXECDIR} ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR} ${INSTALL_DATA_DIR} ${DESTDIR}${EXECDIR}/support @@ -128,7 +127,6 @@ post-install: ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} ${INSTALL_DATA} ${WRKDIR}/mailman.conf.dist ${DESTDIR}${EGDIR}/mailman.conf ${INSTALL_DATA} ${WRKSRC}/cron/crontab.in ${DESTDIR}${EGDIR}/crontab.in - ${CHOWN} -R root:${MAILMAN_GROUP} ${DESTDIR}${EXECDIR} ${CHMOD} -R g+w ${DESTDIR}${EXECDIR} ${CHMOD} g+s ${DESTDIR}${EXECDIR}/cgi-bin/* ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/lib/mailman/bin ${DESTDIR}${PREFIX}/lib/mailman/cron ${DESTDIR}${PREFIX}/lib/mailman/scripts diff --git a/mail/mailman/distinfo b/mail/mailman/distinfo index c36eeb35aca..45882d8873e 100644 --- a/mail/mailman/distinfo +++ b/mail/mailman/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.20 2011/04/07 15:45:37 hauke Exp $ +$NetBSD: distinfo,v 1.21 2011/12/22 11:06:40 fhajny Exp $ SHA1 (mailman-2.1.14-1.tgz) = 390874c1059878b33be9ab4cf57fdb719eac1819 RMD160 (mailman-2.1.14-1.tgz) = 0d86e766e28aaab9703bfe530b72316a5b02beda @@ -11,3 +11,4 @@ SHA1 (patch-af) = 985a619a055151d998cefd0c1b7280a0d55f889e SHA1 (patch-ag) = fac40640db483c2e9db3a79ec0696dc60596e453 SHA1 (patch-ah) = c7cde35f787c003ace550a98d8d5e166ba2d48dc SHA1 (patch-ai) = f3afeba664b0cca27f160fde3b94c7b7f8498e57 +SHA1 (patch-configure) = 3a2b3aeee266762664268d4abf5769e17e6b1fe1 diff --git a/mail/mailman/patches/patch-configure b/mail/mailman/patches/patch-configure new file mode 100644 index 00000000000..48c2f768a8b --- /dev/null +++ b/mail/mailman/patches/patch-configure @@ -0,0 +1,72 @@ +$NetBSD: patch-configure,v 1.1 2011/12/22 11:06:40 fhajny Exp $ + +Skip checks for user/group at configure time. +--- configure.orig 2011-10-10 09:11:25.745910175 +0000 ++++ configure +@@ -3381,33 +3381,9 @@ $as_echo_n "checking for user name \"$US + # MAILMAN_USER == variable name + # $USERNAME == user id to check for + +- +-if test -z "$MAILMAN_USER" +-then +- cat > conftest.py <<EOF +-import pwd +-uid = '' +-for user in "$USERNAME".split(): +- try: +- try: +- uname = pwd.getpwuid(int(user))[0] +- break +- except ValueError: +- uname = pwd.getpwnam(user)[0] +- break +- except KeyError: +- uname = '' +-fp = open("conftest.out", "w") +-fp.write("%s\n" % uname) +-fp.close() +-EOF +- $PYTHON conftest.py +- MAILMAN_USER=`cat conftest.out` +-fi +- +-rm -f conftest.out conftest.py + if test -z "$MAILMAN_USER" + then ++ MAILMAN_USER="$USERNAME" + if test "$with_permcheck" = "yes" + then + { { $as_echo "$as_me:$LINENO: error: +@@ -3457,30 +3433,7 @@ $as_echo_n "checking for group name \"$G + + if test -z "$MAILMAN_GROUP" + then +- cat > conftest.py <<EOF +-import grp +-gid = '' +-for group in "$GROUPNAME".split(): +- try: +- try: +- gname = grp.getgrgid(int(group))[0] +- break +- except ValueError: +- gname = grp.getgrnam(group)[0] +- break +- except KeyError: +- gname = '' +-fp = open("conftest.out", "w") +-fp.write("%s\n" % gname) +-fp.close() +-EOF +- $PYTHON conftest.py +- MAILMAN_GROUP=`cat conftest.out` +-fi +- +-rm -f conftest.out conftest.py +-if test -z "$MAILMAN_GROUP" +-then ++ MAILMAN_GROUP="$GROUPNAME" + if test "$with_permcheck" = "yes" + then + { { $as_echo "$as_me:$LINENO: error: |