]> git.donarmstrong.com Git - debbugs.git/commitdiff
Merge branch 'master' into texticonv
authorDon Armstrong <don@donarmstrong.com>
Fri, 2 Nov 2012 18:16:49 +0000 (11:16 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 2 Nov 2012 18:16:49 +0000 (11:16 -0700)
21 files changed:
Debbugs/Status.pm
Makefile
cgi/pkgindex.cgi
debian/README.mail
debian/changelog
debian/control
debian/debbugs-web.install
examples/apache.conf
examples/debian/versions/merge-one-debinfo
html/Access.html.in
html/Developer.html.in
html/Reporting.html.in
html/index.html.in
html/server-control.html.in
html/server-refcard.html.in
html/server-request.html.in
scripts/config
scripts/errorlib
scripts/process
scripts/service
scripts/text

index 9416a31ba3ce9e26adc6f0ef2cdbccf376c6d5c5..a2aeabef1879cfcaa578fa1c6cc8573d82e868dd 100644 (file)
@@ -1108,6 +1108,63 @@ a source package). Defaults to true.
 Note: Currently the version information is cached; this needs to be
 changed before using this function in long lived programs.
 
+=head3 Returns
+
+Currently returns a hashref of status with the following keys.
+
+=over
+
+=item id -- bug number
+
+=item bug_num -- duplicate of id
+
+=item keywords -- tags set on the bug, including usertags if bugusertags passed.
+
+=item tags -- duplicate of keywords
+
+=item package -- name of package that the bug is assigned to
+
+=item severity -- severity of the bug
+
+=item pending -- pending state of the bug; one of following possible
+values; values listed later have precedence if multiple conditions are
+satisifed:
+
+=over
+
+=item pending -- default state
+
+=item forwarded -- bug has been forwarded
+
+=item pending-fixed -- bug is tagged pending
+
+=item fixed -- bug is tagged fixed
+
+=item absent -- bug does not apply to this distribution/architecture
+
+=item done -- bug is resolved in this distribution/architecture
+
+=back
+
+=item location -- db-h or archive; the location in the filesystem
+
+=item subject -- title of the bug
+
+=item last_modified -- epoch that the bug was last modified
+
+=item date -- epoch that the bug was filed
+
+=item originator -- bug reporter
+
+=item log_modified -- epoch that the log file was last modified
+
+=item msgid -- Message id of the original bug report
+
+=back
+
+
+Other key/value pairs are returned but are not currently documented here.
+
 =cut
 
 sub get_bug_status {
index da8de6085d0c1fc8611bdd633d77350c9d003bd0..7d427c61722a2209bbeb020c99d2bc07adbe401d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -102,8 +102,8 @@ $(var_dir)/spool/db-h $(scripts_dir) $(examples_dir) $(man8_dir); \
        $(install_data) misc/updateseqs $(var_dir)/spool
 
        # install the templates
-       $(foreach dir, $(wildcard templates/*/*), $(exec -d $(install_exec) $(template_dir)/$(patsubst templates/%,%,$(dir))))
-       $(foreach tmpl, $(wildcard templates/*/*/*.tmpl), $(exec $(install_data) $(tmpl) $(template_dir)/$(patsubst templates/%,%,$(tmpl))))
+       $(foreach dir, $(wildcard templates/*/*), $(install_exec) -d $(templates_dir)/$(patsubst templates/%,%,$(dir));)
+       $(foreach tmpl, $(wildcard templates/*/*/*.tmpl), $(install_data) $(tmpl) $(templates_dir)/$(patsubst templates/%,%,$(tmpl));)
 
 
-.PHONY: test build
\ No newline at end of file
+.PHONY: test build
index 8adbfb86c18714eba413c515d1dd387b2acad717..a0e91ae8978b6af7904175e7482e58d3f0ada75d 100755 (executable)
@@ -4,12 +4,14 @@ use warnings;
 use strict;
 use POSIX qw(strftime nice);
 
-use Debbugs::Config;
+use Debbugs::Config qw(:globals :text :config);
 use CGI::Simple;
 use Debbugs::CGI qw(:util :url :html);
-use Debbugs::Common qw(getmaintainers);
+use Debbugs::Common qw(getmaintainers getparsedaddrs);
 use Debbugs::Bugs qw(count_bugs);
 use Debbugs::Status qw(:status);
+use Debbugs::Packages qw(getpkgsrc);
+use Debbugs::Text qw(:templates);
 
 nice(5);
 
@@ -57,9 +59,6 @@ my %maintainers = %{&getmaintainers()};
 my %strings = ();
 
 my $dtime = strftime "%a, %e %b %Y %T UTC", gmtime;
-my $tail_html = '';#$gHTMLTail;
-$tail_html = '';#$gHTMLTail;
-$tail_html =~ s/SUBSTITUTE_DTIME/$dtime/;
 
 my %count;
 my $tag;
@@ -68,7 +67,9 @@ my %htmldescrip = ();
 my %sortkey = ();
 if ($indexon eq "pkg") {
   $tag = "package";
-  %count = count_bugs(function => sub {my %d=@_; return splitpackages($d{"pkg"})});
+  %count = count_bugs(function => sub {my %d=@_; return splitpackages($d{"pkg"})},
+                    archive => $archive,
+                    );
   if (defined $param{first}) {
        %count = map {
            if (/^\Q$param{first}\E/) {
@@ -84,7 +85,7 @@ if ($indexon eq "pkg") {
   foreach my $pkg (keys %count) {
     $sortkey{$pkg} = lc $pkg;
     $htmldescrip{$pkg} = sprintf('<a href="%s">%s</a> (%s)',
-                           pkg_url(pkg => $pkg),
+                           package_links(package => $pkg, links_only=>1),
                            html_escape($pkg),
                            htmlize_maintlinks(sub { $_[0] == 1 ? 'maintainer: '
                                                            : 'maintainers: ' },
@@ -103,16 +104,18 @@ if ($indexon eq "pkg") {
            } 
        } keys %count;
   }
-  %count = countbugs(function => sub {my %d=@_;
+  %count = count_bugs(function => sub {my %d=@_;
                           return map {
                             $pkgsrc->{$_} || $_
                           } splitpackages($d{"pkg"});
-                         });
+                         },
+                    archive => $archive,
+                    );
   $note = "";
   foreach my $src (keys %count) {
     $sortkey{$src} = lc $src;
     $htmldescrip{$src} = sprintf('<a href="%s">%s</a> (%s)',
-                           srcurl($src),
+                           package_links(src => $src, links_only=>1),
                            html_escape($src),
                            htmlize_maintlinks(sub { $_[0] == 1 ? 'maintainer: '
                                                            : 'maintainers: ' },
@@ -130,7 +133,9 @@ if ($indexon eq "pkg") {
                             }
                             map { $_->address } @me;
                           } splitpackages($d{"pkg"});
-                         });
+                         },
+                    archive => $archive,
+                    );
   if (defined $param{first}) {
        %count = map {
            if (/^\Q$param{first}\E/) {
@@ -158,7 +163,9 @@ if ($indexon eq "pkg") {
                               unless exists $fullname{$addr->address};
                           }
                           map { $_->address } @se;
-                         });
+                         },
+                    archive => $archive,
+                    );
   if (defined $param{first}) {
        %count = map {
            if (/^\Q$param{first}\E/) {
@@ -180,7 +187,9 @@ if ($indexon eq "pkg") {
   $note .= "different addresses.</p>\n";
 } elsif ($indexon eq "tag") {
   $tag = "tag";
-  %count = count_bugs(function => sub {my %d=@_; return split ' ', $d{tags}; });
+  %count = count_bugs(function => sub {my %d=@_; return split ' ', $d{tags}; },
+                     archive => $archive,
+                    );
   if (defined $param{first}) {
        %count = map {
            if (/^\Q$param{first}\E/) {
@@ -223,11 +232,12 @@ print "Content-Type: text/html\n\n";
 
 print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
 print "<HTML><HEAD>\n" . 
-    "<TITLE>$debbugs::gProject$Archived $debbugs::gBug reports by $tag</TITLE>\n" .
+    "<TITLE>$gProject$Archived $gBug reports by $tag</TITLE>\n" .
+    qq(<LINK REL="stylesheet" HREF="$gWebHostBugDir/css/bugs.css" TYPE="text/css">) .
     "</HEAD>\n" .
     '<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080">' .
     "\n";
-print "<H1>" . "$debbugs::gProject$Archived $debbugs::gBug report logs by $tag" .
+print "<H1>" . "$gProject$Archived $gBug report logs by $tag" .
       "</H1>\n";
 
 print $note;
@@ -256,6 +266,8 @@ else {
 print $result;
 
 print "<hr>\n";
-print "<p>$tail_html";
-
+print fill_in_template(template=>'html/html_tail',
+                       hole_var => {'&strftime' => \&POSIX::strftime,
+                                   },
+                      );
 print "</body></html>\n";
index 3343bf77834ad2be67c8d51d4799e78795e49353..46d77723b95438d207de6905fe90860365bc1334 100644 (file)
@@ -6,6 +6,7 @@ Config
 Be sure to set the $gMailer variable correctly in /etc/debbugs/config.
 The options are (all lower case) exim, qmail and sendmail.
 
+
 Exim 4
 ------
 The exim 4 setup supports virtual domains. This doesn't hurt on a
@@ -122,6 +123,7 @@ debbugs_transport:
     mail for those zones ("debbugs_router") and "send" the mail using a pipe
     ("debbugs_transport").
 
+
 Qmail
 -----
 From Tommi Virtanen (tv@debian.org), amended by Daniel Ruoso
@@ -211,36 +213,60 @@ Now the final step: run sendmailconfig to regenerate sendmail.cf and
 restart sendmail with the new configuration. Your system should now
 be up and running. Congratulations!
 
+
 Postfix
 -------
-It seems Bdale isn't around currently, so I'll just mail this
-here directly. This is a short description of how to get debbugs
-working with postfix. If someone can verify this and give me some
-feedback if would be appreciated.
-
-Lets assume that you are going to install bugs.domain.net, and you
+Let's assume that you are going to install bugs.domain.net, and you
 are going to run it on the machine master.domain.net.
 
 DNS setup: point the MX to the machine running debbugs:
 
        bugs.domain.net         MX      50      master.domain.net.
 
-In /etc/postfix/main.cf enable the transport maps by inserting the
-following line:
+For postfix we have to do three things now:
 
-       transport_maps = hash:/etc/postfix/transport
+ 1. Open postfix for any recipient address on the domain
+    bugs.domain.net
+ 2. Create a transport map to the debbugs script called
+    ,,receive''.
+ 3. Make sure that mails are handed individually into the
+    debbugs pipe. The receive script can only process mails
+    with _one_ recipient.
 
-Now create /etc/postfix/transport and insert:
+So, create /etc/postfix/transport and insert:
 
        bugs.domain.net        debbugs:
 
 This tells postfix to use the debbugs transport agent to deliver any
 mail send to bugs.domain.net. Now we need to make a database from that
+map, so that postfix can use:
+
+       $ postmap hash:/etc/postfix/transport
+
+So, create /etc/postfix/debbugs-recipients and put:
+
+       @bugs.domain.net          ACCEPT
+
+into it.
+
+Here, we also need to make a database from that map, so
 that postfix can use:
 
-       # postmap hash:transport
+       # postmap hash:/etc/postfix/debbugs-recipients
+
+In /etc/postfix/main.cf we enable the transport and local recipient
+map by inserting the following lines:
+
+       transport_maps = hash:/etc/postfix/transport
+       # debbugs transport
+       local_recipient_maps = hash:/etc/postfix/non-unix-users
+       transport_maps = hash:/etc/postfix/transport
+       debbugs_destination_recipient_limit = 1
 
-Now we need to teach postfix what the debbugs transport agent is. Edit
+The last line in the block above assures that mails pour into
+the debbugs receive scripts on a one by one recipient basis.
+
+At last we need to teach postfix what the debbugs transport agent is. Edit
 /etc/postfix/master.cf and add:
 
        debbugs   unix  -       n       n       -       -       pipe
@@ -256,7 +282,9 @@ Finally add bugs.domain.net to mydestination in main.cf:
 
 Now that all this is done, restart postfix and it should be working..
 
-Wichert.
+Wichert
+Updated+modified by Mike (20120919)
+
 
 Procmail and SpamAssassin
 -------------------------
index 988e5fe35eb7788407275150db7830bc04ed3b64..79faac10f9994f69f581f60457ce14631bc804a7 100644 (file)
@@ -1,17 +1,58 @@
-debbugs (2.4.2~exp2) experimental; urgency=low
+debbugs (2.4.2~exp2) UNRELEASED; urgency=low
 
+  [ Don Armstrong ]
   * Hack around elinks css bug (closes: #593804)
   * affects now appends packages by default (closes: #656371). Thanks to
     Andreas Beckmann and Julien Cristau.
   * Fix spacing in owner block (closes: #670411)
   * Fix double encoding issues (closes: #672432)
   * Fix encoding in cgi
+  * Fix installation of templates (closes: #686928). Thanks to Mike
+    Gabriel.
+  * Only remove list headers if the message appears to have traversed a
+    mailing list to get to us. (closes: #690408)
+  * Fix lack of archive support in pkgindex.cgi.
+  * Output notice to transcript when there is a malformed command.
+    (closes: #691573). Thanks to Jonathan Nieder.
 
   [Thanks to Arnout Engelen: ]
   * Add Homepage (closes: #670555).
   * Fix VCS in control (closes: #670556).
   * Link to blocked bugs (closes: #670568).
-  
+
+  [ Mike Gabriel ]
+  * /debian/control:
+    + Add ${misc:Depends} to Depends.
+  * /examples/apache.conf:
+    - Assure in apache.conf example that documentation html pages get loaded
+      (closes: #686943).
+    - Rewrite rule example: http://<webhost>/<nnn> -> show bug report for
+      bug <nnn>.
+    - Be more generic, comment out rewrite rule that directly redirects
+      http://<debbugs-webhost>/ to http://www.debian.org/Bugs.
+    - Extend examples/apache.conf, add directory rules. Esp. allow Indexes to be
+      overridden in /var/lib/debbugs/www/db to allow mod_expires apache
+      configuration options in .htaccess.
+  * Load bugs.css file in documentation html pages.
+  * Fix sani function in scripts/errorlib. Generate html entities correctly
+    (prepend ampersand, append semicolon).
+  * Fix pkgindex.cgi concerning several issues: load proper Perl modules,
+    replace usage of src_url and pkg_url by package_links, use
+    html_tail from templates, use count_bugs everywhere, load bugs.css,
+    fix global variable usage in html header (closes: #686940).
+  * Add empty $gBugSubscriptionDomain variable to config file template.
+  * Remove mailing list markers of the form [<list-name>] from the subject
+    line to avoid duplication (and more) of the bug number when replying to
+    bug postings.
+  * Update postfix section in Readme.mail (closes: #688109).
+  * Provide gStrongList configuration option in config file to make
+    a site admin aware of its existence (closes: #688345).
+  * Make sure that mails to gSubscriptionDomain and gBugSubscriptionDomain
+    are only sent out if the variables in config are defined and
+    have a lenght < 0 (closes: #688344).
+  * Use locale independent date format for mail processing and service mail
+    generation (closes: #688745).
+
  -- Don Armstrong <don@debian.org>  Wed, 25 Aug 2010 01:57:38 -0700
 
 debbugs (2.4.2~exp1) experimental; urgency=low
index 8d1432898d6240b79fece0e7f7243fefd4aa7fd5..1f014250d3d71f82be8c61a4c2a8be8c829f541d 100644 (file)
@@ -18,8 +18,11 @@ Homepage: http://wiki.debian.org/Teams/Debbugs
 
 Package: debbugs
 Architecture: all
-Depends: ${perl:Depends}, exim4 | mail-transport-agent,
- libdebbugs-perl
+Depends:
+ ${perl:Depends},
+ ${misc:Depends},
+ exim4 | mail-transport-agent,
+ libdebbugs-perl,
 Recommends: debbugs-web
 Suggests: spamassassin (>= 3.0), libcgi-alert-perl
 Description: The bug tracking system based on the active Debian BTS
@@ -35,7 +38,9 @@ Description: The bug tracking system based on the active Debian BTS
 
 Package: libdebbugs-perl
 Architecture: all
-Depends: ${perl:Depends}, libmailtools-perl, ed, libmime-tools-perl,
+Depends:
+ ${misc:Depends},
+ ${perl:Depends}, libmailtools-perl, ed, libmime-tools-perl,
  libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl,
  libcgi-simple-perl, libparams-validate-perl, libtext-template-perl,
  libsafe-hole-perl, libmail-rfc822-address-perl, liblist-moreutils-perl,
@@ -53,7 +58,9 @@ Description: modules used by the active Debian BTS
 
 Package: debbugs-web
 Architecture: all
-Depends: libdebbugs-perl, apache | httpd
+Depends:
+ ${misc:Depends},
+ libdebbugs-perl, apache | httpd
 Suggests: libcgi-alert-perl
 Description: web scripts for the active Debian BTS
  Debian has a bug tracking system which files details of bugs reported by
@@ -66,7 +73,9 @@ Description: web scripts for the active Debian BTS
 
 Package: debbugs-local
 Architecture: all
-Depends: libdebbugs-perl, debbugs-web, libconfig-simple-perl,
+Depends:
+ ${misc:Depends},
+ libdebbugs-perl, debbugs-web, libconfig-simple-perl,
  libuser-perl, rsync, libhttp-server-simple-perl, libnet-server-perl
 Description: run and maintains a local mirror of the Debian BTS
  Debian has a bug tracking system which files details of bugs reported
index 534b0b300a011516cfc6d62a83d772a77c7dc5c1..f33b23404203c7e91b050cfbfb0c022fe71253c0 100644 (file)
@@ -1,3 +1,4 @@
 var/lib/debbugs/www/*
 var/lib/debbugs/www/cgi/*
-etc/debbugs/html
\ No newline at end of file
+etc/debbugs/html
+usr/share/debbugs/templates/*
index e322c0fbdca8ce8e162c62f0fbae8c345aaeaa5d..246149ff6d0227188c7aed4dddc1bf237ff76317 100644 (file)
@@ -1,10 +1,38 @@
 <VirtualHost *>
     ServerName bugs.debian.org
     ServerAdmin owner@bugs.debian.org
-    DocumentRoot /org/bugs.debian.org/www/
-    ScriptAlias /cgi-bin /org/bugs.debian.org/cgi-bin
-    ErrorLog /var/log/apache/bugs.debian.org-error.log
-    CustomLog /var/log/apache/bugs.debian.org-access.log combined
+    DocumentRoot /var/lib/debbugs/www/
+
+    ErrorLog /var/log/apache/debbugs-error.log
+    CustomLog /var/log/apache/debbugs-access.log combined
+
+    <Directory />
+        Options FollowSymLinks
+        AllowOverride None
+    </Directory>
+
+    <Directory /var/lib/debbugs/www>
+        Options -Indexes FollowSymLinks MultiViews
+        AllowOverride Options
+        Order allow,deny
+        allow from all
+    </Directory>
+
+    <Directory /var/lib/debbugs/www/db>
+        AllowOverride Indexes
+    </Directory>
+
+    <Directory /var/lib/debbugs/www/txt>
+        Options +Indexes
+    </Directory>
+
+    ScriptAlias /cgi-bin/ /var/lib/debbugs/www/cgi/
+    <Directory "/var/lib/debbugs/www/cgi/">
+        AllowOverride None
+        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+        Order allow,deny
+        Allow from all
+    </Directory>
 
     RewriteEngine on
     RewriteCond %{HTTP_USER_AGENT}     .*apt-listbugs.*
@@ -13,7 +41,7 @@
     #  RewriteLog /org/bugs.debian.org/apache-rewrite.log
     #  RewriteLogLevel 0
      
-    RewriteRule ^/$ http://www.debian.org/Bugs/
+    #RewriteRule ^/$ http://www.debian.org/Bugs/
     RewriteRule ^/(robots\.txt|release-critical|apt-listbugs\.html)$ - [L]
     # The following two redirect to up-to-date pages
     RewriteRule ^/[[:space:]]*#?([[:digit:]][[:digit:]][[:digit:]]+)([;&].+)?$ /cgi-bin/bugreport.cgi?bug=$1$2 [L,R,NE]
@@ -27,6 +55,9 @@
     RewriteRule ^/severity:([^/]+)$ /cgi-bin/pkgreport.cgi?severity=$1 [L,R,NE]
     RewriteRule ^/tag:([^/]+)$ /cgi-bin/pkgreport.cgi?tag=$1 [L,R,NE]
     # RewriteMap fix-chars     int:noescape
+    RewriteCond %{REQUEST_URI} ^/(Access\.html|Developer\.html|Reporting\.html|server-request\.html|server-control\.html|server-refcard\.html).* [NC]
+    RewriteRule .* - [L]
+    RewriteRule ^/([0-9]+)$ /cgi-bin/bugreport.cgi?bug=$1 [L,R,NE]
     RewriteRule ^/([^/]+)$ /cgi-bin/pkgreport.cgi?pkg=$1 [L,R,NE]
     <IfModule mod_perl.c>
        <Directory /org/bugs.debian.org/cgi-bin/sql>
index 1ac22689308a48a55093bf9278ad04d0127a0a3d..5eefc52283bc2525e62bfc60b396200c8df0ff2c 100755 (executable)
@@ -1,4 +1,6 @@
-#! /usr/bin/perl -w
+#! /usr/bin/perl
+
+use warnings;
 use strict;
 use MLDBM qw(DB_File Storable);
 use Fcntl;
@@ -13,16 +15,32 @@ tie %binsrc, 'MLDBM', '/org/bugs.debian.org/versions/indices/binsrc.idx',
             O_CREAT|O_RDWR, 0644
     or die "tie binsrc.idx: $!";
 
-while (<>) {
-    my ($binname, $binver, $binarch, $srcname, $srcver) = split;
-    print STDERR "$binname/$binver/$binarch => $srcname/$srcver\n";
+my @files  = @ARGV;
+
 
-    # see MLDBM(3pm)/BUGS
-    my $tmp = $srcbin{$srcname};
-    push @{$tmp->{$srcver}}, [$binname, $binver, $binarch];
-    $srcbin{$srcname} = $tmp;
+for my $file (@files) {
+    my $fh = IO::File->new($file,'r') or
+       die "Unable to open $file for reading: $!";
+    while (<$fh>) {
+       chomp;
+       next unless length $_;
+       my ($binname, $binver, $binarch, $srcname, $srcver) = split;
+       # if $srcver is not defined, this is probably a broken
+       # .debinfo file [they were causing #686106, see commit
+       # 49c85ab8 in dak.] Basically, $binarch didn't get put into
+       # the file, so we'll fudge it from the filename.
+       if (not defined $srcver) {
+           ($srcname,$srcver) = ($binarch,$srcname);
+           ($binarch) = $file =~ /_([^\.]+)\.debinfo/;
+       }
+       print STDERR "$binname/$binver/$binarch => $srcname/$srcver\n";
+       # see MLDBM(3pm)/BUGS
+       my $tmp = $srcbin{$srcname};
+       push @{$tmp->{$srcver}}, [$binname, $binver, $binarch];
+       $srcbin{$srcname} = $tmp;
 
-    $tmp = $binsrc{$binname};
-    $tmp->{$binver}{$binarch} = [$srcname, $srcver];
-    $binsrc{$binname} = $tmp;
+       $tmp = $binsrc{$binname};
+       $tmp->{$binver}{$binarch} = [$srcname, $srcver];
+       $binsrc{$binname} = $tmp;
+    }
 }
index ec1b747d9bb12e2e36c5efc2a54341944e8bc7a9..4465fdd8185940e94c758a24c928fd40bd9cbf01 100644 (file)
@@ -4,6 +4,7 @@ $gAccessHtml = <<HTML_END
 <head>
   <title>$gProject $gBugs - Accessing the logs</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index d876d91dbaa9ceec1cd07922b6b1ff0d01cb7b10..4e14355c96a899c07b2c168e546182803004d0cb 100644 (file)
@@ -4,6 +4,7 @@ $gDeveloperHtml = <<HTML_END
 <head>
   <title>$gProject - Developers' information</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index 29fa156e5ce7c1fdbd89d2e8a4ef70354e07931c..caf81ef9a7d1351d859839d47c5b92ae414407f0 100644 (file)
@@ -4,6 +4,7 @@ $gReportingHtml = <<HTML_END
 <head>
   <title>$gProject $gBugs - how to report a $gBug</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index 5c8745129a5c049647c21300d70f24bb73eee550..d690d1f19864b884792ff79fda4593276fd6321a 100644 (file)
@@ -4,6 +4,7 @@ $gIndexHtml = <<HTML_END
 <head>
   <title>$gProject $gBug tracking system</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index 3c61089e866622e78be3decec8905fd90d3b91a5..5ded4849b263f99b45c70fe65b2a87f5c129ff06 100644 (file)
@@ -4,6 +4,7 @@ $gControlHtml = <<HTML_END
 <head>
   <title>$gProject $gBug system - control mail server commands</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index c1f09b85679ba60f01a81c688a9c39d759662ddd..7738a196c6455728b00d6eebeb74ea5358d524e5 100644 (file)
@@ -4,6 +4,7 @@ $gRefcardHtml = <<HTML_END
 <head>
   <title>$gProject $gBug system - mail servers' reference card</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index f7f783656fdb104246914b547d64c8014929ebfe..2de3500130e1ba7f5b5066a51a0e1451273cdb13 100644 (file)
@@ -4,6 +4,7 @@ $gRequestHtml = <<HTML_END
 <head>
   <title>$gProject $gBug system - $gBug logs by mail server</title>
   <link rev="made" href="mailto:$gMaintainerEmail">
+  <link rel="stylesheet" href="$gWebHostBugDir/css/bugs.css" type="text/css">
 </head>
 <body>
 
index 4767f6a577b5a23b2b9f7890af4394aa273f7f26..e64498eb6b835184b42607ba782cf5d3dd89c177 100644 (file)
@@ -15,7 +15,8 @@ $gCGIDomain = "$gWebDomain/cgi";                      # e.g. cgi.debian.org
 $gMirrors = "";                                                # comma separated list
 $gPackagePages = "packages.debian.org";                 # e.g. packages.debian.org
 $gSubscriptionDomain = "packages.something";           # e.g. packages.qa.debian.org
-
+$gBugSubscriptionDomain = "";                           # e.g. lists.debian.org (requires one list per bug
+                                                        #      of the name bugs=<bugno>@<gBugSubscriptionDomain>
 # Project identification
 $gProject = "Something";                               # e.g. Debian
 $gProjectTitle = "Something DebBugs Test";             # e.g. Debian GNU/Linux
@@ -35,6 +36,7 @@ $gForwardList = "bug-forward-list";           # e.g. debian-bugs-forwarded
 $gDoneList = "bug-done-list";                  # e.g. debian-bugs-closed
 $gRequestList = "bug-request-list";            # e.g. debian-bugs-dist
 $gSubmitterList = "bug-submitter-list";                # e.g. debian-bugs-dist
+$gStrongList = "bug-strong-list";              # e.g. debian-bugs-dist
 $gControlList = "bug-control-list";            # e.g. debian-bugs-dist
 $gSummaryList = "bug-summary-list";            # e.g. debian-bugs-reports
 $gMirrorList = "bug-mirrors-list";             # sends to all mirrors
index a2e90161730a1454cb03134fca9efb458102cec2..0b88d6a70b2d1a48c77a4042ad136fe4d3682ca7 100755 (executable)
@@ -18,7 +18,7 @@ sub unlockreadbugmerge {
 sub sani {
     my ($in) = @_;
     carp "You should be using HTML::Entities instead.";
-    $in =~ s/([<>&"])/$saniarray{$1}/g;
+    $in =~ s/([<>&"])/\&$saniarray{$1};/g;
     return $in;
 }
 
index e5759586a6ed25cb38a87c033661744b67be0407..c663dfd69782a59262095b36424ff5cd07cf6901 100755 (executable)
@@ -7,7 +7,9 @@
 use warnings;
 use strict;
 
-use POSIX qw(strftime);
+use locale;
+use POSIX qw(strftime locale_h);
+setlocale(LC_TIME, "C");
 
 use IO::File;
 
@@ -271,7 +273,21 @@ if (!defined($header{'subject'}))
 }
 
 my $ref=-1;
-$subject =~ s/^Re:\s*//i; $_= $subject."\n";
+# remove Re: from the subject line
+$subject =~ s/^Re:\s*//i;
+# remove remaining mailing list name markers from the subject line if
+# this appears to be a message that has traversed a mailing list
+if (exists $header{'list-id'} or exists $header{'list-subscribe'} or
+    (exists $header{'precedence'} and defined $header{'precedence'} and
+     $header{'precedence'} eq 'bulk') or
+    exists $header{'mailing-list'} or exists $header{'list-processor-version'}
+   ){
+    # if a mailing list didn't match any of the above, it's probably
+    # so horribly configured that we wouldn't be able to figure it out
+    # anyway.
+    $subject =~ s/^\[.*\]\s*//i;
+}
+$_= $subject."\n";
 if (not defined $tryref and m/^Bug ?\#(\d+)\D/i) {
     $tryref = $1 if $1 > 0;
 }
@@ -443,8 +459,14 @@ if ($codeletter eq 'D' || $codeletter eq 'F')
 
        # Add bug mailing list to $generalbcc as appropriate
        # This array is used to specify bcc in the cases where we're using create_mime_message.
-       my @generalbcc = (@generalcc,@addsrcaddrs,"bugs=$ref\@$gListDomain");
-       my $generalbcc = join(', ', $generalcc, @addsrcaddrs,"bugs=$ref\@$gListDomain");
+       my @generalbcc = @generalcc;
+       if (defined $config{subscription_domain} and length $config{subscription_domain}) {
+           @generalbcc = (@generalbcc, @addsrcaddrs);
+       }
+       if (defined $config{bug_subscription_domain} and length $config{bug_subscription_domain}) {
+           @generalbcc = (@generalbcc, "bugs=$ref\@$config{bug_subscription_domain}");
+       }
+       my $generalbcc = join(', ', @generalbcc);
        $generalbcc =~ s/\s+\n\s+/ /g;
        $generalbcc =~ s/^\s+/ /; $generalbcc =~ s/\s+$//;
        if (length $generalbcc) {$generalbcc = "Bcc: $generalbcc\n"};
@@ -717,7 +739,9 @@ if (defined $gStrongList and isstrongseverity($data->{severity})) {
 }
 
 # Send mail to the per bug list subscription too
-push @bccs, "bugs=$ref\@$gListDomain";
+if (defined $config{bug_subscription_domain} and length $config{bug_subscription_domain}) {
+    push @bccs, "bugs=$ref\@$config{bug_subscription_domain}";
+}
 
 if (defined $pheader{source}) {
     # Prefix source versions with the name of the source package. They
@@ -1256,15 +1280,15 @@ sub checkmaintainers {
        $p =~ /((?:src:)?[a-z0-9.+-]+)/;
        $p = $1;
        next unless defined $p;
-       if (defined $gSubscriptionDomain) {
+        if (defined $config{subscription_domain} and length $config{subscription_domain}) {
            my @source = binary_to_source(binary => $p,
                                          source_only => 1,
                                         );
            if (@source) {
                push @addsrcaddrs,
-                   map {"$_\@$gSubscriptionDomain"} @source;
+                   map {"$_\@$config{subscription_domain}"} @source;
            } else {
-               push @addsrcaddrs, "$p\@$gSubscriptionDomain";
+               push @addsrcaddrs, "$p\@$config{subscription_domain}";
            }
        }
        # this is utter hackery until we switch to Debbugs::Recipients
index 4346e36e96206586f82e3e3d9518975610f45a90..9debab2694eb76c77a76f403bd70581e64292dc3 100755 (executable)
@@ -7,6 +7,9 @@
 use warnings;
 use strict;
 
+use locale;
+use POSIX qw(strftime locale_h);
+setlocale(LC_TIME, "C");
 
 use Debbugs::Config qw(:globals :config);
 
@@ -479,6 +482,7 @@ END
            last;
        }
     } else {
+       print {$transcript} "Unknown command or malformed arguments to command.\n";
        $errors++;
         if (++$unknowns >= 5) {
             print {$transcript} "Too many unknown commands, stopping here.\n\n";
index 415aba05cd7ae42e6027b1fc7622000d3f762759..a1a6a008d5dc12909b138242d051153237ec3b0d 100644 (file)
@@ -199,6 +199,7 @@ $gHTMLExpireNote = "(Closed $gBugs are archived $gRemoveAge days after the last
 $gHTMLStamp = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBugs - timestamp page</TITLE>
        <LINK REV=\"made\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>Is this $gBug log or mirror up to date?</H1>
 
        Unlike all the other $gBug pages, this small timestamp page is updated every
@@ -227,6 +228,7 @@ $gHTMLStamp = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
 $gFullIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBugs - full index</TITLE>
        <LINK REV=\"make\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug report logs - index</H1>
 
        This index gives access to $gBugs sent to <CODE>submit\@$gEmailDomain</CODE>
@@ -244,6 +246,7 @@ $gFullIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
 $gJunkIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBug reports - Junk</TITLE>
        <LINK REV=\"made\" HREF=\"$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug reports - Junk</H1>
 
        This is the index page for logs of messages not associated with a specific
@@ -259,6 +262,7 @@ $gJunkIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
 $gMaintIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBug reports by maintainer</TITLE>
        <LINK REF=\"made\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug reports by maintainer</H1>
 
        This page lists the package maintainers against whose packages there are
@@ -278,6 +282,7 @@ $gMaintIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
 $gPackageIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBug reports by package</TITLE>
        <LINK REF=\"made\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug reports by package</H1>
 
        This page lists the package against which there are outstanding, forwarded or
@@ -294,6 +299,7 @@ $gPackageIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN
 $gSummaryIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBug report logs - summary index</TITLE>
        <LINK REF=\"made\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug report logs - summary index</H1>
 
        This summary index briefly lists $gBugs sent to <CODE>submit\@$gEmailDomain
@@ -312,6 +318,7 @@ $gSummaryIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN
 $gPackageLog = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBug report logs - index by package</TITLE>
        <LINK REF=\"made\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug report logs - index by package</H1>
 
        This summary index briefly lists $gBugs sent to <CODE>submit\@$gEmailDomain
@@ -327,6 +334,7 @@ $gPackageLog = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
 $gPseudoIndex = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
        <HTML><HEAD><TITLE>$gProject $gBug report pseudo-packages</TITLE>
        <LINK REF=\"made\" HREF=\"mailto:$gMaintainerEmail\">
+       <LINK REL=\"stylesheet\" HREF=\"$gWebHostBugDir/css/bugs.css\" TYPE=\"text/css\">
        </HEAD>$gHTMLStart<H1>$gProject $gBug report pseudo-packages</H1>
 
        This page lists the pseudo-packages available for use in the