]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Add soap support to debbugs
authorDon Armstrong <don@volo>
Tue, 18 Jul 2006 01:21:45 +0000 (18:21 -0700)
committerDon Armstrong <don@volo>
Tue, 18 Jul 2006 01:21:45 +0000 (18:21 -0700)
Debbugs/SOAP/Usertag.pm [new file with mode: 0644]
Debbugs/User.pm
cgi/soap.cgi [new file with mode: 0644]
debian/changelog
debian/control
scripts/config.debian
scripts/config.in.default

diff --git a/Debbugs/SOAP/Usertag.pm b/Debbugs/SOAP/Usertag.pm
new file mode 100644 (file)
index 0000000..2ee7cea
--- /dev/null
@@ -0,0 +1,18 @@
+package Debbugs::SOAP::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;
index 7591e4d113030df4cfeedc729e1b079f029b57e1..4c831e1ef1feddc613312e32f7147559f37f4781 100644 (file)
@@ -53,7 +53,10 @@ BEGIN {
     $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 write_usertags {
 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);
 }
diff --git a/cgi/soap.cgi b/cgi/soap.cgi
new file mode 100644 (file)
index 0000000..d31cb9e
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/perl -wT
+
+package debbugs;
+
+use SOAP::Transport::HTTP;
+
+use Debbugs::SOAP::Usertag;
+
+SOAP::Transport::HTTP::CGI
+    -> dispatch_to('Debbugs::SOAP::Usertag')
+    -> handle;
+
index af1d1265a13565ff456dfe4a7924d1146eae32cf..702405fc8eb5e29e7f11f455b373510a5d7ab61a 100644 (file)
@@ -123,6 +123,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
     - Don't lc owner or forwarded at submit time (closes: #288384)
     - Explain how to close bugs in the ack message (closes: #37605)
     - Make the moreinfo ack more general (closes: #70810)
+    - Add SOAP support (closes: #377520) Thanks to Raphael Hertzog.
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
index c681a8e661239481c49c45c71be7b70248dc1fb5..711a58f2c38ff018b9d52975e9661a66e8db5388 100644 (file)
@@ -8,7 +8,7 @@ Build-Depends-Indep: debhelper
 
 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
index 7f5f4fe8b8fe2378c5eb63b2d233a70676659e7d..193e7b528d65e3c4d9ca1a59bb8344c6b6b19946 100644 (file)
@@ -4,6 +4,7 @@
 # Domains
 $gEmailDomain = "bugs.debian.org";
 $gListDomain = "lists.debian.org";
+$gWebHostBugDir = "";
 $gWebDomain = "www.debian.org/Bugs";
 $gHTMLSuffix = "";
 $gPackagePages = "packages.debian.org";
index 10dfae6988dca66054282afe6bc229ccd2596022..d8c8ea10e568ffe9a073743d0f920b15c2450a31 100644 (file)
@@ -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