From 9b9941454f6366b64bed5b8e08bfa01add9a3ec9 Mon Sep 17 00:00:00 2001 From: schnoebe Date: Sat, 27 Aug 2011 15:47:42 +0000 Subject: Remove the uses of ctime.pl and getopts.pl, since those are going away soon. --- mail/majordomo/Makefile | 4 +-- mail/majordomo/distinfo | 10 ++++---- mail/majordomo/patches/patch-ab | 30 +++++++++++++++++++--- mail/majordomo/patches/patch-af | 55 ++++++++++++++++++++++++++++++++++++++--- mail/majordomo/patches/patch-ai | 15 +++++++++-- mail/majordomo/patches/patch-am | 28 +++++++++++++++------ 6 files changed, 119 insertions(+), 23 deletions(-) (limited to 'mail') diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile index ef72e41696b..86f7bbcf7f5 100644 --- a/mail/majordomo/Makefile +++ b/mail/majordomo/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.42 2011/01/29 19:39:14 spz Exp $ +# $NetBSD: Makefile,v 1.43 2011/08/27 15:47:42 schnoebe Exp $ DISTNAME= majordomo-1.94.5 -PKGREVISION= 12 +PKGREVISION= 13 CATEGORIES= mail MASTER_SITES= ftp://ftp.sgi.com/other/majordomo/1.94.5/ \ ftp://ftp-europe.sgi.com/other/majordomo/1.94.5/ diff --git a/mail/majordomo/distinfo b/mail/majordomo/distinfo index 27e5a29cd7a..d287133cc40 100644 --- a/mail/majordomo/distinfo +++ b/mail/majordomo/distinfo @@ -1,19 +1,19 @@ -$NetBSD: distinfo,v 1.14 2011/01/29 19:39:14 spz Exp $ +$NetBSD: distinfo,v 1.15 2011/08/27 15:47:43 schnoebe 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) = 2be639e71d75780f82d2d6364431d7d40d97ba94 -SHA1 (patch-ab) = 188d81b804eb5e88b90fc07ba0c857c862ce24dd +SHA1 (patch-ab) = 58aec7d2ad3625caf8bdcd9b41792a2075605fa5 SHA1 (patch-ac) = 3f8973808314927f167392d640aefc67cd504a70 SHA1 (patch-ad) = 0e31ae0be84246e0691dfdc8aa86301eadd5cf79 SHA1 (patch-ae) = 99285559c0fe86084fedbaad5a482062187b404d -SHA1 (patch-af) = 00f1b634295f3bdb6d7d6e6ad59ca9c8dbd4d00d +SHA1 (patch-af) = 1626b7580f3d4f00b3b8c0ed567bad7da84a30b2 SHA1 (patch-ag) = 759a32dacb26221d83de97b463b2131b0f52a914 SHA1 (patch-ah) = ac08fa5d2fa321afe7fdf72783f8f2c887073bcd -SHA1 (patch-ai) = 50d29659f54c86be1c6f6d93732419f1bac8c435 +SHA1 (patch-ai) = 883a72515d793ea8376e1bb54063dd4d53b4f630 SHA1 (patch-aj) = 2185ba182561ca3e003fa0879e696092c3b237fd SHA1 (patch-ak) = b33b0fc9e013642cc842c6d7ee70f590281764ae SHA1 (patch-al) = 776088c5916b1b0516e8abaecd69870ba57f4a76 -SHA1 (patch-am) = 614d33806576639cd9f401e5b560d31a738d8657 +SHA1 (patch-am) = 74e46f28cb152e152594d949b0116f1370dd1ae3 SHA1 (patch-an) = db4b9c47bd6efb1fb883cb0c505bd1d0d6f2d83e diff --git a/mail/majordomo/patches/patch-ab b/mail/majordomo/patches/patch-ab index 23124252faf..edc48a08b5f 100644 --- a/mail/majordomo/patches/patch-ab +++ b/mail/majordomo/patches/patch-ab @@ -1,10 +1,11 @@ -$NetBSD: patch-ab,v 1.3 2011/01/29 19:39:14 spz Exp $ +$NetBSD: patch-ab,v 1.4 2011/08/27 15:47:43 schnoebe Exp $ avoid the wrapper + -C trap +Update to silence perl 5.12+ complaints. --- archive2.pl.orig 2000-01-07 11:00:49.000000000 +0000 +++ archive2.pl -@@ -47,19 +47,23 @@ +@@ -47,21 +47,24 @@ # Change directory to our home chdir($ENV{'HOME'}) if $ENV{'HOME'}; @@ -28,5 +29,28 @@ avoid the wrapper + -C trap # All these should be in the standard PERL library +unshift(@INC, $bindir); unshift(@INC, $homedir); - require "ctime.pl"; # To get MoY definitions for month abbrevs +-require "ctime.pl"; # To get MoY definitions for month abbrevs require "majordomo_version.pl"; # What version of Majordomo is this? + require "majordomo.pl"; # all sorts of general-purpose Majordomo subs + require "shlock.pl"; # NNTP-style file locking +@@ -72,16 +75,17 @@ $hostname = &chop_nl(`hostname`); + + # Here's where the fun begins... + +-require "getopts.pl"; ++use Getopt::Std; + + $m = 1; +-foreach (@ctime'MoY) { ++foreach ('Jan','Feb','Mar','Apr','May','Jun', ++ 'Jul','Aug','Sep','Oct','Nov','Dec') { + $MoY{$_} = $m++; + } + + $usage = "Usage: $0 -f {-u|-a} [-d|-D|-m|-M|-y|-Y] [file ...]"; + +-&Getopts("f:uadDmMyY") || die("$usage\nStopped"); ++&getopts("f:uadDmMyY") || die("$usage\nStopped"); + + if (!defined($opt_f)) { + print STDERR "'-f ' required\n$usage\n"; diff --git a/mail/majordomo/patches/patch-af b/mail/majordomo/patches/patch-af index 82c7db98d20..d981042a856 100644 --- a/mail/majordomo/patches/patch-af +++ b/mail/majordomo/patches/patch-af @@ -1,6 +1,7 @@ -$NetBSD: patch-af,v 1.6 2011/01/29 19:39:14 spz Exp $ +$NetBSD: patch-af,v 1.7 2011/08/27 15:47:43 schnoebe Exp $ avoid the wrapper + -C trap +update to be more friendly to perl 5.14 --- majordomo.orig 2000-01-13 17:29:31.000000000 +0000 +++ majordomo @@ -30,14 +31,62 @@ avoid the wrapper + -C trap if (! -r $cf) { die("$cf not readable; stopped"); } -@@ -58,6 +66,7 @@ if (! -t STDERR) { +@@ -58,8 +66,9 @@ if (! -t STDERR) { print STDERR "$0: starting\n" if $DEBUG; # All these should be in the standard PERL library +unshift(@INC, $bindir); unshift(@INC, $homedir); - require "ctime.pl"; # To get MoY definitions for month abbrevs +-require "ctime.pl"; # To get MoY definitions for month abbrevs ++use POSIX qw(ctime); require "majordomo_version.pl"; # What version of Majordomo is this? + require "majordomo.pl"; # all sorts of general-purpose Majordomo subs + require "shlock.pl"; # NNTP-style file locking +@@ -750,7 +759,7 @@ sub do_info { + while () { + print REPLY $_; + } +- print REPLY "\n[Last updated ", &chop_nl(&ctime((stat(INFO))[9])), ++ print REPLY "\n[Last updated ", &chop_nl(ctime((stat(INFO))[9])), + "]\n" if !&cf_ck_bool($clean_list,"date_info"); + &lclose(INFO); + } else { +@@ -778,7 +787,7 @@ sub do_newinfo { + (stat("$listdir/$clean_list.info"))[2,4,5]; + $mode = (0664) if !$mode; + if (&lopen(INFO, ">", "$listdir/$clean_list.info")) { +- print INFO "[Last updated on: ", &chop_nl(&ctime(time())), ++ print INFO "[Last updated on: ", &chop_nl(ctime(time())), + "]\n" if &cf_ck_bool($clean_list,"date_info"); + while (<>) { + $_ = &chop_nl($_); +@@ -848,7 +857,7 @@ sub do_intro { + while () { + print REPLY $_; + } +- print REPLY "\n[Last updated ", &chop_nl(&ctime((stat(INFO))[9])), ++ print REPLY "\n[Last updated ", &chop_nl(ctime((stat(INFO))[9])), + "]\n" if !&cf_ck_bool($clean_list,"date_intro"); + &lclose(INFO); + } else { +@@ -872,7 +881,7 @@ sub do_newintro { + if (&valid_passwd($listdir, $clean_list, $passwd)) { + # The password is valid, so write the new intro + if (&lopen(INFO, ">", "$listdir/$clean_list.intro")) { +- print INFO "[Last updated on: ", &chop_nl(&ctime(time())), ++ print INFO "[Last updated on: ", &chop_nl(ctime(time())), + "]\n" if &cf_ck_bool($clean_list,"date_intro"); + while (<>) { + $_ = &chop_nl($_); +@@ -936,7 +945,7 @@ sub do_config { + print REPLY $_; + } + print REPLY "\n#[Last updated ", +- &chop_nl(&ctime((stat(LCONFIG))[9])), "]\n"; ++ &chop_nl(ctime((stat(LCONFIG))[9])), "]\n"; + close(LCONFIG) || + print REPLY "Error writing config for $clean_list: $!"; + @@ -1095,7 +1104,7 @@ sub do_mkdigest { # The password is valid, so run digest diff --git a/mail/majordomo/patches/patch-ai b/mail/majordomo/patches/patch-ai index 270e1f9ec11..2827a9c8267 100644 --- a/mail/majordomo/patches/patch-ai +++ b/mail/majordomo/patches/patch-ai @@ -1,8 +1,19 @@ -$NetBSD: patch-ai,v 1.3 2011/01/29 17:16:33 spz Exp $ +$NetBSD: patch-ai,v 1.4 2011/08/27 15:47:43 schnoebe Exp $ + +Quite messages from perl 5.14.1, this is very old code. --- resend.orig 2000-01-07 15:32:39.000000000 +0000 +++ resend -@@ -78,8 +78,8 @@ if (! defined($opt_l)) { +@@ -71,15 +71,15 @@ if ($ARGV[0] =~ /^\@/) { + # getopts.pl was place where it's supposed to be. This changes previous + # behavior which allowed getopts.pl to be in the same place as + # majordomo.cf. +-require "getopts.pl"; +-&Getopts("C:c:Aa:df:h:I:l:M:p:Rr:s") || die("resend: Getopts() failed: $!"); ++use Getopt::Std; ++getopts("C:c:Aa:df:h:I:l:M:p:Rr:s") || die("resend: Getopts() failed: $!"); + + if (! defined($opt_l)) { die("resend: must specify '-l list'"); } diff --git a/mail/majordomo/patches/patch-am b/mail/majordomo/patches/patch-am index 6b8c29ee654..ec915fc1226 100644 --- a/mail/majordomo/patches/patch-am +++ b/mail/majordomo/patches/patch-am @@ -1,10 +1,22 @@ -$NetBSD: patch-am,v 1.3 2010/10/30 23:48:36 spz Exp $ +$NetBSD: patch-am,v 1.4 2011/08/27 15:47:43 schnoebe Exp $ -bring up to perl 5.12 standard (this is old code) +bring up to perl 5.14 standard (this is old code) ---- approve.orig 1997-04-05 20:18:36.000000000 +0100 -+++ approve 2010-08-20 22:22:40.000000000 +0100 -@@ -137,6 +137,7 @@ +--- approve.orig 1997-04-05 19:18:36.000000000 +0000 ++++ approve +@@ -70,9 +70,9 @@ die "Couldn't find a sendmail to invoke, + if !$MAILER; + + +-require "getopts.pl"; ++use Getopt::Std; + +-&Getopts("df:") || ++getopts("df:") || + die("USAGE: approve [-f ] [-d] [ ...]\nStopped"); + + if (!defined($opt_f)) { +@@ -137,6 +137,7 @@ sub process_file { sub process_approve { local($FILE) = shift; @@ -12,7 +24,7 @@ bring up to perl 5.12 standard (this is old code) while (<$FILE>) { if ((/^\tsubscribe\s/) || (/^\tunsubscribe\s/)) { if (!defined($reply_to)) { -@@ -144,8 +145,8 @@ +@@ -144,8 +145,8 @@ sub process_approve { exit(1); } s/^\t//; @@ -23,7 +35,7 @@ bring up to perl 5.12 standard (this is old code) $list =~ tr/A-Z/a-z/; $passwd = $passwd{"$list\@$reply_to"}; if (! $passwd) { -@@ -214,6 +215,11 @@ +@@ -214,6 +215,11 @@ sub process_bounce { $from_skipped = 1; next; } @@ -35,7 +47,7 @@ bring up to perl 5.12 standard (this is old code) s/^~/~~/; print MAIL $_; } -@@ -231,12 +237,13 @@ +@@ -231,12 +237,13 @@ sub read_config { s/\n$//; s/#.*//; if (/^$/) { next; } -- cgit v1.2.3