]> git.donarmstrong.com Git - debbugs.git/blob - scripts/mailsummary
Include the protocol (http://) in gWebDomain and gCGIDomain
[debbugs.git] / scripts / mailsummary
1 #!/usr/bin/perl
2 # $Id: mailsummary.in,v 1.11 2003/04/28 23:51:15 cjwatson Exp $
3
4 $config_path = '/etc/debbugs';
5 $lib_path = '/usr/lib/debbugs';
6
7 require("$config_path/config");
8 require("$lib_path/errorlib");
9 $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
10
11 chdir("$gSpoolDir") || die "chdir spool: $!\n";
12
13 #open(DEBUG,">&4");
14
15 if ($ARGV[0] eq 'undone') {
16     $vdef= "(no outstanding $gBug reports on file, or problem running script)\n";
17     $subject= "Unanswered problem reports by date";
18     $intro=
19 "The following problem reports have not yet been marked as `taken up\' by a
20 message to done\@$gEmailDomain or or `forwarded\' by a
21 message to forwarded\@$gEmailDomain."
22     ;
23 } elsif ($ARGV[0] eq 'bymaint') {
24     $vdef= "(no outstanding $gBug reports on file, or problem running script)\n";
25     $subject= "Unanswered problem reports by maintainer and package";
26     $intro=
27 "The following problem reports have not yet been marked as `taken up\' by a
28 message to done\@$gEmailDomain or or `forwarded\' by a
29 message to forwarded\@$gEmailDomain.
30 The maintainer listed against each package is derived from the Maintainer
31 field of the package found in the development tree; there is an override file
32 that can be amended to get the right results if you have taken over a package
33 and do not expect to issue a new version soon.
34
35 Variant versions of the Maintainer field for the same actual package
36 maintainer will be listed separately.
37
38 Maintainers with few outstanding $gBugs appear first, to avoid those with few
39 $gBugs being lost deep in the message.
40 "
41     ;
42 } elsif ($ARGV[0] eq 'veryold') {
43     $vdef= '';
44     $subject= "Overdue problem reports by age";
45     $intro=
46 "The following problem reports are very old but have not yet been marked
47 as `taken up\' by a message to done\@$gEmailDomain as forwarded
48 to a developer by CCing a message to forwarded\@$gEmailDomain.
49 Please help ensure that these $gBugs are dealt with quickly, even if you
50 are not the package maintainer in question.  (NB a full list of outstanding
51 $gBug reports is posted periodically - this is a partial list only!)
52 "
53 } else {
54     die "urgk, wrong argument @ARGV";
55 }
56
57 $v=`$lib_path/summary $ARGV[0]`; $? && die "undone failed $?: $!\n";
58
59 $v= $vdef if $v eq '';
60 exit 0 if $v eq '';
61
62 open(D, '| '.join(' ',('/usr/lib/sendmail','-f'.$gMaintainerEmail)).' -odq -oem -oi -t') ||
63     die "start sendmail: $!";
64
65 print D <<END || die "complete sendmail";
66 From: $gMaintainerEmail ($gProject $gBug Tracking System)
67 To: $gSummaryList\@$gListDomain
68 Subject: $subject
69
70 $intro
71 $v
72 Every Tuesday, the listing by package maintainer is posted.
73 Every Friday, the listing by age of the report is posted.
74
75 Please see the documentation for more information about how to
76 use the $gBug tracking system.  It is available on the WWW at
77 <A HREF=\"$gWebDomain/txt/\">$gWebDomain/txt</A>
78 END
79
80 close(D);
81 $? && die "sendmail failed $?: $!\n";
82
83 print length($v)," bytes of summary posted.\n";