From: Don Armstrong Date: Tue, 18 Jul 2006 01:21:45 +0000 (-0700) Subject: * Add soap support to debbugs X-Git-Tag: release/2.6.0~585^2^2~94 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=942db6e3447020e7d7132b4cedce161ba720cdf7;p=debbugs.git * Add soap support to debbugs --- diff --git a/Debbugs/SOAP/Usertag.pm b/Debbugs/SOAP/Usertag.pm new file mode 100644 index 00000000..2ee7cea0 --- /dev/null +++ b/Debbugs/SOAP/Usertag.pm @@ -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; diff --git a/Debbugs/User.pm b/Debbugs/User.pm index 7591e4d1..4c831e1e 100644 --- a/Debbugs/User.pm +++ b/Debbugs/User.pm @@ -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 index 00000000..d31cb9e4 --- /dev/null +++ b/cgi/soap.cgi @@ -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; + diff --git a/debian/changelog b/debian/changelog index af1d1265..702405fc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 20 Jun 2003 18:57:25 +0100 diff --git a/debian/control b/debian/control index c681a8e6..711a58f2 100644 --- a/debian/control +++ b/debian/control @@ -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 diff --git a/scripts/config.debian b/scripts/config.debian index 7f5f4fe8..193e7b52 100644 --- a/scripts/config.debian +++ b/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"; diff --git a/scripts/config.in.default b/scripts/config.in.default index 10dfae69..d8c8ea10 100644 --- a/scripts/config.in.default +++ b/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