]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-11-17 22:45:15 by cjwatson]
authorcjwatson <>
Mon, 18 Nov 2002 06:45:16 +0000 (22:45 -0800)
committercjwatson <>
Mon, 18 Nov 2002 06:45:16 +0000 (22:45 -0800)
Fix hardcoding of bugs.debian.org, /org/bugs.debian.org, and
packages.qa.debian.org throughout.
Touch index.{archive,db}.realtime on upgrade.

17 files changed:
UPGRADE
cgi/bugreport.cgi
debian/debbugsconfig
scripts/config.debian
scripts/config.in
scripts/db2html.in
scripts/errorlib.in
scripts/expire.in
scripts/html-control.in
scripts/html-install.in
scripts/mailsummary.in
scripts/process.in
scripts/processall.in
scripts/rebuild.in
scripts/receive.in
scripts/service.in
scripts/summary.in

diff --git a/UPGRADE b/UPGRADE
index 4b466d381eeea808f3416c6734326d3d0f4d27e0..ff61fd0b995d3540370a048997a80c4e47c94fc3 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -13,12 +13,15 @@ $gWebHostBugDir = "Bugs";                           # e.g. Bugs
 $gWebDomain = "$gWebHost/$gWebHostBugDir";
 $gCGIDomain = "$gWebDomain/Bugs/cgi";                  # e.g. cgi.debian.org
 $gPackagePages = "packages.debian.org";                 # e.g. packages.debian.org
+$gSubscriptionDomain = "packages.something";           # e.g. packages.qa.debian.org
 $gMaintainerFileOverride = "$gConfigDir/Maintainers.override";
 $gUnknownMaintainerEmail = "$gMaintainerEmail";
 $gPackageSource = "$gConfigDir/indices/sources";
 
 $gWebDomain will probably exist already; change it as shown above.
 
+$gSubscriptionDomain is optional.
+
 $gMaintainerFileOverride is the name of a file used to manually override the
 Maintainers file (which is often automatically generated).
 
index 7719933ae95f96f84fa8949d6c100574b014b990..148b0002d3e605a13a3689349624ffccf3ea4045 100755 (executable)
@@ -14,7 +14,7 @@ require './common.pl';
 require '/etc/debbugs/config';
 require '/etc/debbugs/text';
 
-use vars(qw($gHTMLTail $gSpoolDir));
+use vars(qw($gEmailDomain $gHTMLTail $gSpoolDir));
 
 my %param = readparse();
 
@@ -327,7 +327,7 @@ print "<HTML><HEAD>\n" .
     "</HEAD>\n" .
     '<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080">' .
     "\n";
-print "<H1>" .  "$debbugs::gProject $debbugs::gBug report logs - <A HREF=\"mailto:$ref\@bugs.debian.org\">$short</A>" .
+print "<H1>" .  "$debbugs::gProject $debbugs::gBug report logs - <A HREF=\"mailto:$ref\@$gEmailDomain\">$short</A>" .
       "<BR>" . htmlsanit($status{subject}) . "</H1>\n";
 
 print "$descriptivehead\n";
index 135df92c869e98f657f0f38c35356d9ba3f6192d..aebd4402f2ae438d4e0ad71094c89eee1ac366e3 100755 (executable)
@@ -31,6 +31,8 @@ require "text";
 &template("sources", "$gConfigDir/indices");
 
 &template("nextnumber", $gSpoolDir);
+&touch("$gSpoolDir/index.archive.realtime");
+&touch("$gSpoolDir/index.db.realtime");
 
 # stuff used when testing (comment out the above)
 #unshift @INC, "../";
@@ -72,6 +74,15 @@ sub template {
   }
 } 
 
+sub touch {
+  my $name = shift;
+  unless (-f $name) {
+    open TOUCH, ">> $name" or die "open $name: $!";
+    close TOUCH;
+    print "created empty $name.\n";
+  }
+}
+
 sub writefiles {
   local ($html, $text, $name) = @_;
 # first HTML
index 4db27fd6f6d778cbaa2bae78d26d71e4ac403c1d..19b4ccd9ac902b1f4ea4eef516eb6f66711838ce 100644 (file)
@@ -1,5 +1,5 @@
 # This is the bugs.debian.org debbugs configuration file.
-# $Id: config.debian,v 1.14 2002/10/03 12:49:43 cjwatson Exp $
+# $Id: config.debian,v 1.15 2002/11/17 22:45:16 cjwatson Exp $
 
 # Domains
 $gEmailDomain = "bugs.debian.org";
@@ -10,6 +10,7 @@ $gCGIHost = "bugs.debian.org";
 $gCGIPath = "/cgi-bin/";
 $gCGIDomain = "http://$gCGIHost$gCGIPath";
 $gMirrors = "";                                                # comma separated list
+$gSubscriptionDomain = "packages.qa.debian.org";
 
 # Project identification
 $gProject = "Debian";
index 6089ba3cf733b51cb0e7f9b22a15453e0febe562..1371059ab07b3f5f2d0cc794e537d55de8edb78a 100644 (file)
@@ -1,6 +1,6 @@
 # This is the template debbugs configuration file.
 # You *must* edit it in order for debbugs to work.
-# $Id: config.in,v 1.15 2002/11/17 16:00:54 cjwatson Exp $
+# $Id: config.in,v 1.16 2002/11/17 22:45:16 cjwatson Exp $
 
 # Domains
 $gEmailDomain = "bugs.something";                      # e.g. bugs.debian.org
@@ -12,6 +12,7 @@ $gWebDomain = "$gWebHost/$gWebHostBugDir";
 $gCGIDomain = "$gWebDomain/Bugs/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
 
 # Project identification
 $gProject = "Something";                               # e.g. Debian
index 806f28fab12e936f4c41522edf1d24edb6bf159d..7b50c2b5b1174aee8668b62b2ef08eafaf6655fd 100755 (executable)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl
-# $Id: db2html.in,v 1.10 2002/10/15 23:33:37 cjwatson Exp $
+# $Id: db2html.in,v 1.11 2002/11/17 22:45:16 cjwatson Exp $
 # usage: db2html [-diff] [-stampfile=<stampfile>] [-lastrun=<days>] <wwwbase>
 
 #load the necessary libraries/configuration
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require("$config_path/config");
 require("$config_path/text");
index c80a3abf2d295619333766a44faa5be6f886695c..e424d2f6b86e84bc97b8ee338da6ad4b35725e04 100755 (executable)
@@ -1,5 +1,5 @@
 # -*- perl -*-
-# $Id: errorlib.in,v 1.16 2002/11/17 21:04:34 cjwatson Exp $
+# $Id: errorlib.in,v 1.17 2002/11/17 22:45:16 cjwatson Exp $
 
 sub F_SETLK { 6; } sub F_WRLCK{ 1; }
 $flockstruct= 'sslll'; # And there ought to be something for this too.
@@ -143,10 +143,10 @@ sub bughook_archive {
        &filelock("debbugs.trace.lock");
        &appendfile("debbugs.trace","archive $ref\n");
        my $line = update_realtime(
-               "/org/bugs.debian.org/spool/index.db.realtime", 
+               "$gSpoolDir/index.db.realtime", 
                $ref,
                "REMOVE");
-       update_realtime("/org/bugs.debian.org/spool/index.archive.realtime",
+       update_realtime("$gSpoolDir/index.archive.realtime",
                $ref, $line);
        &unfilelock;
 }      
@@ -171,7 +171,7 @@ sub bughook {
                        $firstpkg, $ref, $stuff[1], $whendone, $stuff[0],
                        $severity, $stuff[5];
 
-       update_realtime("/org/bugs.debian.org/spool/index.db.realtime", $ref, $k);
+       update_realtime("$gSpoolDir/index.db.realtime", $ref, $k);
 
        &unfilelock;
 }
index 4c004eef28050ded8d5b4d42b5cf642c33bee2bd..3bf368b5accbfde4688d12faa42e667f55b6021c 100755 (executable)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl
-# $Id: expire.in,v 1.13 2002/11/17 21:04:34 cjwatson Exp $
+# $Id: expire.in,v 1.14 2002/11/17 22:45:16 cjwatson Exp $
 
 # Load modules and set envirnment
 use File::Copy;
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require("$config_path/config");
 require("$config_path/text");
index ff53dc4318c84448d6db2b8d44f61918599bcce8..697fbb0ffe3c806a75b2d9e881bdccd1348ecfcb 100755 (executable)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl
-# $Id: html-control.in,v 1.7 2001/08/16 17:43:45 doogie Exp $
+# $Id: html-control.in,v 1.8 2002/11/17 22:45:16 cjwatson Exp $
 
 use POSIX;
 
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require("$config_path/config");
 require("$lib_path/errorlib");
index 6d5d98920ec4bc6f905b1ce99eed284f392cd345..bb6b04de5924edbd93d01e2a93eb5d42e191a309 100755 (executable)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl
-# $Id: html-install.in,v 1.3 2001/08/16 17:46:00 doogie Exp $
+# $Id: html-install.in,v 1.4 2002/11/17 22:45:16 cjwatson Exp $
 # Takes 1 argument - directory tree to install into
 # Tree _must_ be synch'd with one used by db2html to generate file
 
 use POSIX;
-$config_path = '/org/bugs.debian.org/etc';
+$config_path = '/etc/debbugs';
 
 require("$config_path/config");
 $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
index ee74bce4953e77a21a750b0d2d88a14e2eaa6962..294d0e45d4b21fb0f5d0acd060ec0629e7a6afcd 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/perl
-# $Id: mailsummary.in,v 1.9 2002/09/22 15:20:08 cjwatson Exp $
+# $Id: mailsummary.in,v 1.10 2002/11/17 22:45:16 cjwatson Exp $
 
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require("$config_path/config");
 require("$lib_path/errorlib");
index 64af4c4eeb4beea4727c3cf66ebae870ed9b42b9..8d9d282713bc0b4b78648b8716d145d53bec09b7 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: process.in,v 1.56 2002/11/11 10:19:44 joy Exp $
+# $Id: process.in,v 1.57 2002/11/17 22:45:16 cjwatson Exp $
 #
 # Usage: process nn
 # Temps:  incoming/Pnn
@@ -7,8 +7,8 @@
 use Mail::Address;
 use MIME::Parser;
 
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require "$config_path/config";
 require "$lib_path/errorlib";
@@ -1000,10 +1000,12 @@ sub checkmaintainers {
     $anymaintfound=0; $anymaintnotfound=0;
     for $p (split(m/[ \t?,()]+/,$s_package)) {
         $p =~ y/A-Z/a-z/;
-       if (defined($pkgsrc{$p})) {
-           push @addsrcaddrs, "$pkgsrc{$p}\@packages.qa.debian.org";
-       } else {
-           push @addsrcaddrs, "$p\@packages.qa.debian.org";
+       if (defined $gSubscriptionDomain) {
+           if (defined($pkgsrc{$p})) {
+               push @addsrcaddrs, "$pkgsrc{$p}\@$gSubscriptionDomain";
+           } else {
+               push @addsrcaddrs, "$p\@$gSubscriptionDomain";
+           }
        }
         if (defined($maintainerof{$p})) {
            print DEBUG "maintainer add >$p|$maintainerof{$p}<\n";
index 745ad50232edc3532ef9db4771ac9616cb4cdfbb..e62a5ed4f81525ddd1a29c20ad54e12071833314 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: processall.in,v 1.8 2002/10/06 22:54:48 cjwatson Exp $
+# $Id: processall.in,v 1.9 2002/11/17 22:45:16 cjwatson Exp $
 #
 # Usage: processall
 #
@@ -8,8 +8,8 @@
 # Creates: incoming/E.nn
 # Stop;    process/stop
 
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require "$config_path/config";
 require "$lib_path/errorlib";
index 57ca1ed33a2214790b2465b5f4aa4fb4e3b40493..4ea2e9c0897e9e8a5a18168c062b94b6ea75231c 100755 (executable)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl -w
-# $Id: rebuild.in,v 1.4 2001/08/16 17:51:33 doogie Exp $
+# $Id: rebuild.in,v 1.5 2002/11/17 22:45:16 cjwatson Exp $
 
 # Load modules and set envirnment
 use File::Copy;
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require("$config_path/config");
 require("$lib_path/errorlib");
index 92427913a9c97fcc0fbbe277bc026c8d7c147d33..2fe600fe55777adeb638edd3b4c3478028673179 100755 (executable)
@@ -1,16 +1,16 @@
 #!/usr/bin/perl
-# $Id: receive.in,v 1.13 2002/11/04 16:32:02 cjwatson Exp $
+# $Id: receive.in,v 1.14 2002/11/17 22:45:16 cjwatson Exp $
 # usage: mail is piped directly into program
 
 #set umask in order to have group-writable incoming/*
 #umask(002);
 
 #load configuration file
-$config_path = '/org/bugs.debian.org/etc';
-#$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+#$lib_path = '/usr/lib/debbugs';
 
 require "$config_path/config";
-$ENV{'PATH'} = '/org/bugs.debian.org/scripts:'.$ENV{'PATH'};
+$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'};
 
 #set source of mail delivery
 #sets any prefix needed to get mailer to add it to error mail
index 4c1167384f6f064612ddf81e8b6eab78d497d0e1..f01450d5f86a930b94897e15f02286c5cb4e7737 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: service.in,v 1.61 2002/11/08 14:01:33 ajt Exp $
+# $Id: service.in,v 1.62 2002/11/17 22:45:16 cjwatson Exp $
 # ^ more or less ^
 #
 # Usage: service <code>.nn
@@ -9,8 +9,8 @@ use Mail::Address;
 use File::Copy;
 use MIME::Parser;
 
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require "$config_path/config";
 require "$lib_path/errorlib";
@@ -962,10 +962,12 @@ sub addmaintainers {
     for $p (split(m/[ \t?,()]+/,$_[0])) {
        $p =~ y/A-Z/a-z/;
         $pshow= ($p =~ m/[-+.a-z0-9]+/ ? $& : '');
-        if (defined($pkgsrc{$p})) {
-           push @bcc, "$pkgsrc{$p}\@packages.qa.debian.org";
-       } else {
-           push @bcc, "$p\@packages.qa.debian.org";
+       if (defined $gSubscriptionDomain) {
+           if (defined($pkgsrc{$p})) {
+               push @bcc, "$pkgsrc{$p}\@$gSubscriptionDomain";
+           } else {
+               push @bcc, "$p\@$gSubscriptionDomain";
+           }
        }
         if (defined($maintainerof{$p})) {
            $addmaint= $maintainerof{$p};
index bac741f3a4693489dba6cd9c665f668b242b6ad4..29e607ddbef37636bc33724282fbf64c3656abc2 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/perl
-# $Id: summary.in,v 1.5 2001/08/19 02:09:18 doogie Exp $
+# $Id: summary.in,v 1.6 2002/11/17 22:45:16 cjwatson Exp $
 
-$config_path = '/org/bugs.debian.org/etc';
-$lib_path = '/org/bugs.debian.org/scripts';
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
 
 require("$config_path/config");
 require("$lib_path/errorlib");