diff options
-rw-r--r-- | mail/majordomo/MESSAGE | 12 | ||||
-rw-r--r-- | mail/majordomo/Makefile | 18 | ||||
-rw-r--r-- | mail/majordomo/distinfo | 14 | ||||
-rw-r--r-- | mail/majordomo/patches/patch-aa | 37 | ||||
-rw-r--r-- | mail/majordomo/patches/patch-ae | 85 | ||||
-rw-r--r-- | mail/majordomo/patches/patch-af | 3 | ||||
-rw-r--r-- | mail/majordomo/patches/patch-ak | 50 | ||||
-rw-r--r-- | mail/majordomo/patches/patch-am | 4 | ||||
-rw-r--r-- | mail/majordomo/patches/patch-an | 31 |
9 files changed, 215 insertions, 39 deletions
diff --git a/mail/majordomo/MESSAGE b/mail/majordomo/MESSAGE index d823df9da40..a52bb2083dc 100644 --- a/mail/majordomo/MESSAGE +++ b/mail/majordomo/MESSAGE @@ -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 @@ manually: ${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 --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile index 6099ec34744..4c49bf86332 100644 --- a/mail/majordomo/Makefile +++ b/mail/majordomo/Makefile @@ -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 @@ MAKE_FILE= Makefile.netbsd .include "../../mk/bsd.prefs.mk" -MAJORDOMO_TMPDIR?= ${VARBASE}/majordomo/tmp MAJORDOMO_HOMEDIR?= ${VARBASE}/majordomo +MAJORDOMO_TMPDIR?= ${VARBASE}/majordomo/tmp MAJORDOMO_CF?= ${PREFIX}/etc/majordomo/majordomo.cf MAJORDOMO_USER?= majordom MAJORDOMO_GROUP?= majordom @@ -42,9 +42,9 @@ PKG_HOME.${MAJORDOMO_USER}= ${MAJORDOMO_HOMEDIR} 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 @@ CONFIGURE_SED= -e "s|@PREFIX@|${PREFIX}|g" \ -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 @@ MESSAGE_SED= -e 's|$${PREFIX}|${PREFIX}|g' \ -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 --git a/mail/majordomo/distinfo b/mail/majordomo/distinfo index b1f8d5e19ec..13e62640b26 100644 --- a/mail/majordomo/distinfo +++ b/mail/majordomo/distinfo @@ -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 --git a/mail/majordomo/patches/patch-aa b/mail/majordomo/patches/patch-aa index 986888bf3c5..89f298e355d 100644 --- a/mail/majordomo/patches/patch-aa +++ b/mail/majordomo/patches/patch-aa @@ -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 @@ $NetBSD: patch-aa,v 1.4 2010/10/29 21:51:22 spz Exp $ 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 @@ $NetBSD: patch-aa,v 1.4 2010/10/29 21:51:22 spz Exp $ -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 @@ $NetBSD: patch-aa,v 1.4 2010/10/29 21:51:22 spz Exp $ #--------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 @@ $NetBSD: patch-aa,v 1.4 2010/10/29 21:51:22 spz Exp $ # 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 @@ $NetBSD: patch-aa,v 1.4 2010/10/29 21:51:22 spz Exp $ 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 --git a/mail/majordomo/patches/patch-ae b/mail/majordomo/patches/patch-ae index 3f51328300c..00f953b9a84 100644 --- a/mail/majordomo/patches/patch-ae +++ b/mail/majordomo/patches/patch-ae @@ -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 $ ---- ./digest.orig Wed Aug 27 08:42:52 1997 -+++ ./digest Tue Jun 8 10:55:12 1999 -@@ -320,4 +320,8 @@ +bring up to perl 5.12 standard (this is old code) + +--- 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 @@ $NetBSD: patch-ae,v 1.1.1.1 1999/06/08 17:51:26 bad Exp $ + $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"); ++ $HEADER = join("",<HEADER>); ++ close(HEADER); ++ ++ open(TRAILER,$V{'TRAILER'}) || &abort("$V{'TRAILER'}: $!\n"); ++ $TRAILER = join("",<TRAILER>); ++ close(TRAILER); + + open(VOL_FILE,$V{'VOL_FILE'}) || &abort("$V{'VOL_FILE'}: $!\n"); + $VOLUME = join("",<VOL_FILE>); diff --git a/mail/majordomo/patches/patch-af b/mail/majordomo/patches/patch-af index aba5c959188..d2f283ffef0 100644 --- a/mail/majordomo/patches/patch-af +++ b/mail/majordomo/patches/patch-af @@ -1,4 +1,5 @@ -$NetBSD: patch-af,v 1.3 2000/01/09 01:28:07 wiz Exp $ +$NetBSD: patch-af,v 1.4 2010/10/30 23:48:36 spz Exp $ + --- majordomo.orig Sat Nov 27 17:28:39 1999 +++ majordomo Sat Nov 27 17:29:16 1999 @@ -58,6 +58,7 @@ diff --git a/mail/majordomo/patches/patch-ak b/mail/majordomo/patches/patch-ak index 3cec2448241..d422d2be757 100644 --- a/mail/majordomo/patches/patch-ak +++ b/mail/majordomo/patches/patch-ak @@ -1,9 +1,15 @@ -$NetBSD: patch-ak,v 1.3 2000/02/05 19:51:44 wiz Exp $ ---- wrapper.c.orig Sat Nov 27 17:43:56 1999 -+++ wrapper.c Sat Nov 27 17:45:54 1999 -@@ -16,10 +16,14 @@ +$NetBSD: patch-ak,v 1.4 2010/10/30 23:48:36 spz Exp $ + +add necessary headers +make it use getpwnam to find uid and gid to set to instead of hardwiring these + +--- wrapper.c.orig 1997-08-27 15:01:12.000000000 +0000 ++++ wrapper.c +@@ -15,11 +15,16 @@ static char rcs_header[] = "$Header: /so + #include <stdio.h> #include <sysexits.h> ++#include <pwd.h> -#if defined(sun) && defined(sparc) +#if (defined(sun) && defined(sparc)) || defined(__NetBSD__) @@ -17,3 +23,39 @@ $NetBSD: patch-ak,v 1.3 2000/02/05 19:51:44 wiz Exp $ #ifndef STRCHR # include <string.h> +@@ -65,6 +70,9 @@ main(argc, argv, env) + { + char * prog; + int e, i; ++#ifdef MAJORDOMO_USER ++ struct passwd *majordomuser; ++#endif + + if (argc < 2) { + fprintf(stderr, "USAGE: %s program [<arg> ...]\n", argv[0]); +@@ -123,7 +131,17 @@ main(argc, argv, env) + } + #endif + ++#ifdef MAJORDOMO_USER ++ if ((majordomuser = getpwnam(MAJORDOMO_USER)) == NULL) { ++ extern int errno; + ++ fprintf(stderr, "%s: error user %s not found, errno %d", argv[0], ++ MAJORDOMO_USER, errno); ++ } else { ++ setgid(majordomuser->pw_gid); ++ setuid(majordomuser->pw_uid); ++ } ++#else + #ifdef POSIX_GID + setgid(POSIX_GID); + #else +@@ -135,6 +153,7 @@ main(argc, argv, env) + #else + setuid(geteuid()); + #endif ++#endif + + if ((getuid() != geteuid()) || (getgid() != getegid())) { + fprintf(stderr, "%s: error: Not running with proper UID and GID.\n", argv[0]); diff --git a/mail/majordomo/patches/patch-am b/mail/majordomo/patches/patch-am index 1e79a35ce21..6b8c29ee654 100644 --- a/mail/majordomo/patches/patch-am +++ b/mail/majordomo/patches/patch-am @@ -1,4 +1,6 @@ -$NetBSD: patch-am,v 1.2 2010/08/20 21:25:02 tron Exp $ +$NetBSD: patch-am,v 1.3 2010/10/30 23:48:36 spz Exp $ + +bring up to perl 5.12 standard (this is old code) --- approve.orig 1997-04-05 20:18:36.000000000 +0100 +++ approve 2010-08-20 22:22:40.000000000 +0100 diff --git a/mail/majordomo/patches/patch-an b/mail/majordomo/patches/patch-an index 3e82aaaa95d..98c04a8df3b 100644 --- a/mail/majordomo/patches/patch-an +++ b/mail/majordomo/patches/patch-an @@ -1,7 +1,36 @@ -$NetBSD: patch-an,v 1.1 2010/10/16 10:30:56 spz Exp $ +$NetBSD: patch-an,v 1.2 2010/10/30 23:48:36 spz Exp $ + +bring up to perl 5.12 standard (this is old code) --- majordomo.pl.orig 2000-01-07 12:32:04.000000000 +0000 +++ majordomo.pl +@@ -44,7 +44,7 @@ $DEBUG = $main'DEBUG; + + sub main'ParseMailHeader ## Public + { +- local($save1, $save2) = ($*, $/); ++ local($save) = ($/); + local($FH, *array) = @_; + local ($keyw, $val); + +@@ -54,7 +54,7 @@ sub main'ParseMailHeader ## Public + local($package) = caller; + $FH =~ s/^[^':]+$/$package'$&/; + +- ($*, $/) = (1, ''); ++ $/ = ''; + $array = $_ = <$FH>; + s/\n\s+/ /g; + +@@ -69,7 +69,7 @@ sub main'ParseMailHeader ## Public + $array{$keyw} = $val; + } + } +- ($*, $/) = ($save1, $save2); ++ $/ = $save; + } + + @@ -95,14 +95,14 @@ sub main'ParseAddrs { local($_) = shift; 1 while s/\([^\(\)]*\)//g; # strip comments |