pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/majordomo make the wrapper use getpwnam to determ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b56c55b73add
branches: trunk
changeset: 581934:b56c55b73add
user: spz <spz%pkgsrc.org@localhost>
date: Sat Oct 30 23:48:35 2010 +0000
description:
make the wrapper use getpwnam to determine uid and gid of the majordomo user
adjust the Makefile to fit
package beautification and lint shutup (like eg comments for some patches)
diffstat:
mail/majordomo/MESSAGE | 12 ++--
mail/majordomo/Makefile | 18 ++++----
mail/majordomo/distinfo | 14 +++---
mail/majordomo/patches/patch-aa | 37 ++++++++++++++--
mail/majordomo/patches/patch-ae | 85 +++++++++++++++++++++++++++++++++++++++-
mail/majordomo/patches/patch-af | 3 +-
mail/majordomo/patches/patch-ak | 50 ++++++++++++++++++++++-
mail/majordomo/patches/patch-am | 4 +-
mail/majordomo/patches/patch-an | 31 ++++++++++++++-
9 files changed, 215 insertions(+), 39 deletions(-)
diffs (truncated from 434 to 300 lines):
diff -r f3a4282ba01d -r b56c55b73add mail/majordomo/MESSAGE
--- a/mail/majordomo/MESSAGE Sat Oct 30 20:33:25 2010 +0000
+++ b/mail/majordomo/MESSAGE Sat Oct 30 23:48:35 2010 +0000
@@ -1,5 +1,5 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.5 2010/10/29 21:51:21 spz Exp $
+$NetBSD: MESSAGE,v 1.6 2010/10/30 23:48:35 spz Exp $
Before you can use Majordomo, you will need to complete a few steps
manually:
@@ -18,23 +18,23 @@
${MAJORDOMO_USER} gets redirected properly.
- install majordomo aliases for your mail server software.
- For example, create ${PREFIX}/etc/majordomo/aliases following the
+ For example, create ${PKG_SYSCONFDIR}/aliases following the
example in ${PREFIX}/share/examples/majordomo and add it to
your mailer configuration.
For sendmail, add a line similar to the following to
/etc/sendmail.cf :
- OA${PREFIX}/etc/majordomo/aliases (for 8.6.x Sendmail),
+ OA${PKG_SYSCONFDIR}/aliases (for 8.6.x Sendmail),
- O AliasFile=/etc/mail/aliases,${PREFIX}/etc/majordomo/aliases
+ O AliasFile=/etc/mail/aliases,${PKG_SYSCONFDIR}/aliases
(for 8.7.x and up),
or a line similar to the following to your m4 macros file:
- define(`ALIAS_FILE',`/etc/mail/aliases,${PREFIX}/etc/majordomo/aliases')
+ define(`ALIAS_FILE',`/etc/mail/aliases,${PKG_SYSCONFDIR}/aliases')
- For postfix, add eg hash:${PREFIX}/etc/majordomo/aliases
+ For postfix, add eg hash:${PKG_SYSCONFDIR}/aliases
to the alias_maps and alias_database parameters in main.cf
- for sendmail, if the group for ${MAJORDOMO_USER} (${MAJORDOMO_GROUP}) is not
diff -r f3a4282ba01d -r b56c55b73add mail/majordomo/Makefile
--- a/mail/majordomo/Makefile Sat Oct 30 20:33:25 2010 +0000
+++ b/mail/majordomo/Makefile Sat Oct 30 23:48:35 2010 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.35 2010/10/29 21:51:21 spz Exp $
+# $NetBSD: Makefile,v 1.36 2010/10/30 23:48:36 spz Exp $
DISTNAME= majordomo-1.94.5
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= mail
MASTER_SITES= ftp://ftp.sgi.com/other/majordomo/1.94.5/ \
ftp://ftp-europe.sgi.com/other/majordomo/1.94.5/
@@ -30,8 +30,8 @@
.include "../../mk/bsd.prefs.mk"
+MAJORDOMO_HOMEDIR?= ${VARBASE}/majordomo
MAJORDOMO_TMPDIR?= ${VARBASE}/majordomo/tmp
-MAJORDOMO_HOMEDIR?= ${VARBASE}/majordomo
MAJORDOMO_CF?= ${PREFIX}/etc/majordomo/majordomo.cf
MAJORDOMO_USER?= majordom
MAJORDOMO_GROUP?= majordom
@@ -42,9 +42,9 @@
PKG_GROUPS_VARS+= MAJORDOMO_GROUP
PKG_USERS_VARS+= MAJORDOMO_USER
-PKG_SYSCONFDIR.majordomo= ${PREFIX}/etc/majordomo
-CONF_FILES+= ${EXAMPLEDIR}/aliases.majordomo ${PKG_SYSCONFDIR.majordomo}/aliases
-CONF_FILES+= ${EXAMPLEDIR}/majordomo.cf ${PKG_SYSCONFDIR.majordomo}/majordomo.cf
+PKG_SYSCONFSUBDIR= majordomo
+CONF_FILES+= ${EXAMPLEDIR}/aliases.majordomo ${PKG_SYSCONFDIR}/aliases
+CONF_FILES+= ${EXAMPLEDIR}/majordomo.cf ${PKG_SYSCONFDIR}/majordomo.cf
MESSAGE_SUBST+= HOME=${MAJORDOMO_HOMEDIR} \
MAJORDOMO_CF=${MAJORDOMO_CF} \
@@ -86,8 +86,7 @@
-e "s|@HOME@|${MAJORDOMO_HOMEDIR}|g" \
-e "s|@MAJORDOMO_CF@|${MAJORDOMO_CF}|g" \
-e "s|@MAJORDOMO_USER@|${MAJORDOMO_USER}|g" \
- -e "s|@UID@|${PKG_UID.${MAJORDOMO_USER}}|g" \
- -e "s|@GID@|${PKG_GID.${MAJORDOMO_GROUP}}|g" \
+ -e "s|@MAJORDOMO_GROUP@|${MAJORDOMO_GROUP}|g" \
-e "s|@TMPDIR@|${MAJORDOMO_TMPDIR}|g"
MESSAGE_SED= -e 's|$${PREFIX}|${PREFIX}|g' \
@@ -96,7 +95,8 @@
-e 's|$${MAJORDOMO_USER}|${MAJORDOMO_USER}|g' \
-e 's|$${MAJORDOMO_GROUP}|${MAJORDOMO_GROUP}|g'
-INSTALLATION_DIRS+= ${PKG_SYSCONFDIR.majordomo}
+MAKE_DIRS+= ${PKG_SYSCONFDIR}
+
INSTALLATION_DIRS+= ${PREFIX}/bin
INSTALLATION_DIRS+= ${PREFIX}/libexec/majordomo
INSTALLATION_DIRS+= ${PKGMANDIR}/man1
diff -r f3a4282ba01d -r b56c55b73add mail/majordomo/distinfo
--- a/mail/majordomo/distinfo Sat Oct 30 20:33:25 2010 +0000
+++ b/mail/majordomo/distinfo Sat Oct 30 23:48:35 2010 +0000
@@ -1,19 +1,19 @@
-$NetBSD: distinfo,v 1.8 2010/10/29 21:51:21 spz Exp $
+$NetBSD: distinfo,v 1.9 2010/10/30 23:48:36 spz Exp $
SHA1 (majordomo-1.94.5.tgz) = 44b18c7b9133f2cd992f6e718551d613d9d45c00
RMD160 (majordomo-1.94.5.tgz) = 7f6b48fb5cc5b23948133658b055588d0d6608c4
Size (majordomo-1.94.5.tgz) = 312244 bytes
-SHA1 (patch-aa) = 532bfe02d535231da689d1d5968a5247d624f005
+SHA1 (patch-aa) = 884e1ffa5e8cebef17328d0e6d5a7dc498ba72c0
SHA1 (patch-ab) = 68bdbd77029ebd8f113c492e50e60aa7efb35de9
SHA1 (patch-ac) = bea997e785b2656b1660a11efce759a56a700ab2
SHA1 (patch-ad) = 65370547240539128a405484e98c7ed15a869464
-SHA1 (patch-ae) = 692f5018cccef565bec3be0f24e7009ed1902edd
-SHA1 (patch-af) = 9f3d21953ada62876f7c2ba2be0fa5edb48335fb
+SHA1 (patch-ae) = d41dc97f58a294d937ffa842fed5e469757f8e7a
+SHA1 (patch-af) = b4a50a472a16eead08c189f68d47d2cf136308c6
SHA1 (patch-ag) = b469a639270d369732e75e6ae4df7f559e9c436e
SHA1 (patch-ah) = 666b52100cb50a948c145da0ba83c197386cbd1e
SHA1 (patch-ai) = 771c487d1a3392bf3b523330b8d60fd9a190c58b
SHA1 (patch-aj) = 2185ba182561ca3e003fa0879e696092c3b237fd
-SHA1 (patch-ak) = 401da2e552ff92ef35a60e45d6b8994dfd091b49
+SHA1 (patch-ak) = b33b0fc9e013642cc842c6d7ee70f590281764ae
SHA1 (patch-al) = 776088c5916b1b0516e8abaecd69870ba57f4a76
-SHA1 (patch-am) = cb557337c586c39f86b1c8f8fe265c7db022491c
-SHA1 (patch-an) = 44fd1f5dc600136e50536c9f3f9f0179c64ba723
+SHA1 (patch-am) = 614d33806576639cd9f401e5b560d31a738d8657
+SHA1 (patch-an) = db4b9c47bd6efb1fb883cb0c505bd1d0d6f2d83e
diff -r f3a4282ba01d -r b56c55b73add mail/majordomo/patches/patch-aa
--- a/mail/majordomo/patches/patch-aa Sat Oct 30 20:33:25 2010 +0000
+++ b/mail/majordomo/patches/patch-aa Sat Oct 30 23:48:35 2010 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.4 2010/10/29 21:51:22 spz Exp $
+$NetBSD: patch-aa,v 1.5 2010/10/30 23:48:36 spz Exp $
+
+warp the Makefile template to fit into pkgsrc
--- Makefile.orig 2000-01-18 14:01:17.000000000 +0000
+++ Makefile
@@ -38,7 +40,16 @@
EXEC_MODE = 755
HOME_MODE = 751
-@@ -62,11 +64,11 @@ POSIX = -DPOSIX_UID=$(W_USER) -DPOSIX_GI
+@@ -41,7 +43,7 @@ HOME_MODE = 751
+ # BSDI or other 4.4-based BSD, Linux) use the following four lines. Do not
+ # change these values!
+ WRAPPER_OWNER = root
+-WRAPPER_GROUP = $(W_GROUP)
++WRAPPER_GROUP = $(W_MAJORDOMO_GROUP)
+ WRAPPER_MODE = 4755
+ POSIX = -DPOSIX_UID=$(W_USER) -DPOSIX_GID=$(W_GROUP)
+ # Otherwise, if your system is NOT POSIX (e.g. SunOS 4.x, SGI Irix 4,
+@@ -62,11 +64,14 @@ POSIX = -DPOSIX_UID=$(W_USER) -DPOSIX_GI
# parent process, and without the leading "W_" in the variable names) gets
# passed to processes run by "wrapper"
W_SHELL = /bin/sh
@@ -46,6 +57,9 @@
-W_MAJORDOMO_CF = $(W_HOME)/majordomo.cf
+W_PATH = /bin:/usr/bin
+W_MAJORDOMO_CF = @MAJORDOMO_CF@
++
++W_MAJORDOMO_USER = @MAJORDOMO_USER@
++W_MAJORDOMO_GROUP = @MAJORDOMO_GROUP@
# A directory for temp files..
-TMPDIR = /usr/tmp
@@ -53,16 +67,27 @@
#--------YOU SHOULDN'T HAVE TO CHANGE ANYTHING BELOW THIS LINE.-------------
-@@ -76,7 +78,7 @@ VERSION = 1.94.5
+@@ -76,8 +81,9 @@ VERSION = 1.94.5
SHELL = /bin/sh
WRAPPER_FLAGS = -DBIN=\"$(W_HOME)\" -DPATH=\"PATH=$(W_PATH)\" \
- -DHOME=\"HOME=$(W_HOME)\" -DSHELL=\"SHELL=$(W_SHELL)\" \
+ -DHOME=\"HOME=$(HOME)\" -DSHELL=\"SHELL=$(W_SHELL)\" \
-DMAJORDOMO_CF=\"MAJORDOMO_CF=$(W_MAJORDOMO_CF)\" \
++ -DMAJORDOMO_USER=\"$(W_MAJORDOMO_USER)\" \
$(POSIX)
-@@ -118,12 +120,12 @@ install: wrapper install-scripts install
+ INSTALL = ./install.sh
+@@ -94,7 +100,7 @@ BIN = bounce-remind config_parse.pl ma
+ majordomo_version.pl request-answer resend \
+ shlock.pl config-test archive2.pl digest
+
+-INSTALL_FLAGS = -O $(W_USER) -g $(W_GROUP)
++INSTALL_FLAGS = -O $(W_MAJORDOMO_USER) -g $(W_MAJORDOMO_GROUP)
+
+ default:
+ @echo "make what?"
+@@ -118,12 +124,12 @@ install: wrapper install-scripts install
install-wrapper: wrapper
$(INSTALL) -o $(WRAPPER_OWNER) -g $(WRAPPER_GROUP) \
@@ -77,7 +102,7 @@
# fix where perl lives.
# Create a tmp directory to stuff all the files in, so we
-@@ -143,30 +145,29 @@ config-scripts:
+@@ -143,30 +149,29 @@ config-scripts:
install-scripts: config-scripts
@@ -116,7 +141,7 @@
done
@rm -rf $(TMP)
-@@ -177,46 +178,40 @@ install-scripts: config-scripts
+@@ -177,46 +182,40 @@ install-scripts: config-scripts
# all cases, the sample.cf file must be installed so that config-test will
# be able to check for new variables.
install-cf:
diff -r f3a4282ba01d -r b56c55b73add mail/majordomo/patches/patch-ae
--- a/mail/majordomo/patches/patch-ae Sat Oct 30 20:33:25 2010 +0000
+++ b/mail/majordomo/patches/patch-ae Sat Oct 30 23:48:35 2010 +0000
@@ -1,8 +1,45 @@
-$NetBSD: patch-ae,v 1.1.1.1 1999/06/08 17:51:26 bad Exp $
+$NetBSD: patch-ae,v 1.2 2010/10/30 23:48:36 spz Exp $
+
+bring up to perl 5.12 standard (this is old code)
---- ./digest.orig Wed Aug 27 08:42:52 1997
-+++ ./digest Tue Jun 8 10:55:12 1999
-@@ -320,4 +320,8 @@
+--- digest.orig 2000-01-07 11:04:34.000000000 +0000
++++ digest
+@@ -175,12 +175,12 @@ sub send_digest {
+ print STDERR "producing $V{'NAME'} V$VOLUME #$NUMBER\n";
+ foreach (@files) {
+ $message = "$V{'INCOMING'}/$_";
+- open(message) || &abort("$message: $!\n");
++ open(MESSAGE) || &abort("$message: $!\n");
+ print STDERR "\tprocessing $message\n";
+ push(@processed,$message);
+
+ $/ = '';
+- $head = <message>;
++ $head = <MESSAGE>;
+ $head =~ s/\n\s+/ /g;
+ $body = "";
+ $subj = ($head =~ /^Subject:\s+(.*)/i)? $1: "[none]";
+@@ -188,8 +188,8 @@ sub send_digest {
+ ($date) = $head =~ /^Date:\s+(.*)/i;
+
+ undef $/;
+- $body = <message>;
+- close(message);
++ $body = <MESSAGE>;
++ close(MESSAGE);
+
+ # trim message fronter and footers inserted by resend in
+ # non digest version of list
+@@ -302,7 +302,6 @@ EOF
+ }
+
+ sub init {
+- $* = 1;
+ $HOME = $ENV{"HOME"} || (getpwuid($>))[7];
+ chdir($HOME);
+ &getopt("drRmpc:Cl:z") ||
+@@ -328,6 +327,10 @@ sub readconfig {
+
chdir($homedir);
+ # All these should be in the standard PERL library
@@ -11,3 +48,43 @@
+
$opt_l =~ tr/A-Z/a-z/;
+ require "config_parse.pl";
+@@ -360,7 +363,7 @@ $bounce_mailer = "$sendmail_command -f\$
+ &get_config($listdir, $config_opts{$opt_l,"digest_rm_fronter"});
+ $RMHEADER = $config_opts{$config_opts{$opt_l,"digest_rm_fronter"},
+ "message_fronter"};
+- $RMHEADER =~ s/([^A-Za-z0-9 \001])/\\\1/g;
++ $RMHEADER =~ s/([^A-Za-z0-9 \001])/\\$1/g;
+ $RMHEADER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/g;
+ $RMHEADER =~ s/\001/\\n/g;
+ }
+@@ -371,7 +374,7 @@ $bounce_mailer = "$sendmail_command -f\$
+ }
+ $RMTRAILER = $config_opts{$config_opts{$opt_l,"digest_rm_footer"},
+ "message_footer"};
+- $RMTRAILER =~ s/([^A-Za-z0-9 \001])/\\\1/g;
++ $RMTRAILER =~ s/([^A-Za-z0-9 \001])/\\$1/g;
+ $RMTRAILER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/g;
+ $RMTRAILER =~ s/\001/\\n/g;
+ }
+@@ -441,13 +444,13 @@ $bounce_mailer = "$sendmail_command -fma
+ &abort("$program_name: can't get lock '$lockfile'\n");
+ $lock_set = 1;
+
+- open(header,$V{'HEADER'}) || &abort("$V{'HEADER'}: $!\n");
+- $HEADER = join("",<header>);
+- close(header);
+-
+- open(trailer,$V{'TRAILER'}) || &abort("$V{'TRAILER'}: $!\n");
+- $TRAILER = join("",<trailer>);
+- close(trailer);
++ open(HEADER,$V{'HEADER'}) || &abort("$V{'HEADER'}: $!\n");
Home |
Main Index |
Thread Index |
Old Index