=== added directory 'Debbugs/SOAP'
=== added file 'Debbugs/SOAP/Usertag.pm'
--- /dev/null	
+++ Debbugs/SOAP/Usertag.pm	
@@ -0,0 +1,18 @@
+package Usertag;
+
+use Debbugs::User;
+
+sub get_usertag {
+    my ($class, $email, $tag) = @_;
+    my %ut = ();
+    Debbugs::User::read_usertags(\%ut, $email);
+    if (defined($tag) and $tag ne "") {
+	# Remove unwanted tags
+	foreach (keys %ut) {
+	    delete $ut{$_} unless $_ eq $tag;
+	}
+    }
+    return \%ut;
+}
+
+1;

=== added file 'cgi/soap.cgi'
--- /dev/null	
+++ cgi/soap.cgi	
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -wT
+
+package debbugs;
+
+use SOAP::Transport::HTTP;
+use vars qw($gSoapDir $gLibDir);
+
+BEGIN {
+    require '/etc/debbugs/config';
+    if (defined($gLibDir) && $gLibDir) {
+	push @INC, $gLibDir;
+    }
+}
+
+SOAP::Transport::HTTP::CGI
+    -> dispatch_to($gSoapDir, 'Usertag')
+    -> handle;
+

=== modified file 'Debbugs/User.pm'
--- Debbugs/User.pm	
+++ Debbugs/User.pm	
@@ -53,7 +53,10 @@
     $EXPORT_TAGS{all} = [@EXPORT_OK];
 }
 
-my $gSpoolPath = "/org/bugs.debian.org/spool";
+my $gSpoolDir = "/org/bugs.debian.org/spool";
+if (defined($debbugs::gSpoolDir)) {
+    $gSpoolDir = $debbugs::gSpoolDir;
+}
 
 # Obsolete compatability functions
 
@@ -83,7 +86,7 @@
 sub filefromemail {
     my $e = shift;
     my $l = length($e) % 7;
-    return "$gSpoolPath/user/$l/" . join("", 
+    return "$gSpoolDir/user/$l/" . join("", 
         map { m/^[0-9a-zA-Z_+.-]$/ ? $_ : sprintf("%%%02X", ord($_)) }
             split //, $e);
 }

=== modified file 'cgi/bugreport.cgi'
--- cgi/bugreport.cgi	
+++ cgi/bugreport.cgi	
@@ -9,13 +9,19 @@
 use IO::Scalar;
 use IO::File;
 
+use vars(qw($gEmailDomain $gHTMLTail $gSpoolDir $gWebDomain));
+
+BEGIN {
+    require '/etc/debbugs/config';
+    require '/etc/debbugs/text';
+
+    if (defined($gLibDir) and $gLibDir) {
+	push @INC, $gLibDir;
+    }
+}
+
 #require '/usr/lib/debbugs/errorlib';
 require './common.pl';
-
-require '/etc/debbugs/config';
-require '/etc/debbugs/text';
-
-use vars(qw($gEmailDomain $gHTMLTail $gSpoolDir $gWebDomain));
 
 # for read_log_records
 use Debbugs::Log;

=== modified file 'cgi/pkgindex.cgi'
--- cgi/pkgindex.cgi	
+++ cgi/pkgindex.cgi	
@@ -5,11 +5,16 @@
 use strict;
 use POSIX qw(strftime tzset nice);
 
+BEGIN {
+    require '/etc/debbugs/config';
+    require '/etc/debbugs/text';
+    if (defined($gLibDir) and $gLibDir) {
+	push @INC, $gLibDir;
+    }
+}
+
 #require '/usr/lib/debbugs/errorlib';
 require './common.pl';
-
-require '/etc/debbugs/config';
-require '/etc/debbugs/text';
 
 nice(5);
 

=== modified file 'cgi/pkgreport.cgi'
--- cgi/pkgreport.cgi	
+++ cgi/pkgreport.cgi	
@@ -5,15 +5,20 @@
 use strict;
 use POSIX qw(strftime tzset nice);
 
+use vars qw($gPackagePages $gWebDomain %gSeverityDisplay @gSeverityList);
+
+BEGIN {
+    require '/etc/debbugs/config';
+    require '/etc/debbugs/text';
+    if (defined($gListDir) and $gListDir) {
+	push @INC, $gListDir;
+    }
+}
+
 #require '/usr/lib/debbugs/errorlib';
 require './common.pl';
 
-require '/etc/debbugs/config';
-require '/etc/debbugs/text';
-
 use Debbugs::User;
-
-use vars qw($gPackagePages $gWebDomain %gSeverityDisplay @gSeverityList);
 
 if (defined $ENV{REQUEST_METHOD} and $ENV{REQUEST_METHOD} eq 'HEAD') {
     print "Content-Type: text/html; charset=utf-8\n\n";

=== modified file 'debian/control'
--- debian/control	
+++ debian/control	
@@ -8,7 +8,7 @@
 
 Package: debbugs
 Architecture: all
-Depends: perl5 | perl, exim4 | mail-transport-agent, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl
+Depends: perl5 | perl, exim4 | mail-transport-agent, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl
 Recommends: httpd, links | lynx
 Suggests: spamassassin (>= 3.0)
 Description: The bug tracking system based on the active Debian BTS

=== modified file 'scripts/config.debian'
--- scripts/config.debian	
+++ scripts/config.debian	
@@ -4,6 +4,7 @@
 # Domains
 $gEmailDomain = "bugs.debian.org";
 $gListDomain = "lists.debian.org";
+$gWebHostBugDir = "";
 $gWebDomain = "www.debian.org/Bugs";
 $gHTMLSuffix = "";
 $gPackagePages = "packages.debian.org";
@@ -72,6 +73,8 @@
 $gIncomingDir = "incoming";				# unprocessed e-mails
 $gWebDir = "/org/bugs.debian.org/www";			# base location of web pages
 $gDocDir = "/org/ftp.debian.org/ftp/doc";		# location of text doc files
+$gLibDir = "";                                          # location of Debbugs perl modules (if non-standard)
+$gSoapDir = "/usr/share/perl5/Debbugs/SOAP"             # location of objects shared by SOAP
 
 # Required data files
 $gMaintainerFile = "$gConfigDir/Maintainers";

=== modified file 'scripts/config.in'
--- scripts/config.in	
+++ scripts/config.in	
@@ -65,6 +65,8 @@
 $gIncomingDir = "incoming";				# unprocessed e-mails
 $gWebDir = "/var/lib/debbugs/www";			# base location of web pages
 $gDocDir = "/var/lib/debbugs/www/txt";			# location of text doc files
+$gLibDir = "";						# location of Debbugs perl modules (if non-standard)
+$gSoapDir = "/usr/share/perl5/Debbugs/SOAP"             # location of objects shared by SOAP
 
 # Required data files
 $gMaintainerFile = "$gConfigDir/Maintainers";

=== modified file 'scripts/config.in.default'
--- scripts/config.in.default	
+++ scripts/config.in.default	
@@ -2,6 +2,7 @@
 #domains
 $gEmailDomain = "bugs.top.domain";		#bugs.debian.org
 $gListDomain = "lists.top.domain";		#lists.debian.org
+$gWebHostBugDir = "";
 $gWebDomain = "www.top.domain";			#www.debian.org/Bugs
 $gCGIDomain = "cgi.top.domain";			#cgi.debian.org
 
@@ -19,6 +20,8 @@
 $gIncomingDir = "incoming";				#unprocessed emails
 $gWebDir = "/var/lib/debbugs/www";		#base location of web pages
 $gDocDir = "/usr/lib/debbugs";			#location of doc files
+$gLibDir = "";					#location of Debbugs perl modules (if non-standard)
+$gSoapDir = "/usr/share/perl5/Debbugs/SOAP"             # location of objects shared by SOAP
 
 #data files
 $gMaintainerFile = "/etc/debbugs/Maintainers";

