On Sat, 16 Aug 2025, Raphael Hertzog wrote:
> So I had a quick look at the code and tried to produce a patch. Please
> find it attached.
I noticed that I made this patch on the master branch of the git
repository. However it applies fine on the debian branch too
and I couldn't find any further changes to make.
However I added an extra commit to change the name of the service
in the web page, so I'm attaching the two patches that I have against
the debian branch now.
BTW I noticed that the debian branch uses a $config{package_tracking_domain}
but there's no $gPackageTrackingDomain in example/config.debian, you might
want to add it in the tracker-related section that I added.
Cheers,
--
⢀⣴⠾⠻⢶⣦⠀ Raphaël Hertzog <[email protected]>
⣾⠁⢠⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋ The Debian Handbook: https://debian-handbook.info/get/
⠈⠳⣄⠀⠀⠀⠀ Debian Long Term Support: https://deb.li/LTS
>From b74f4c2aff73a5371d35d95fb7e2971a28bfc814 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <[email protected]>
Date: Sat, 16 Aug 2025 19:26:05 +0200
Subject: [PATCH 1/2] Simplify logic to forward mails to tracker.debian.org
I'm not sure in what context Debbugs::Recipients is used but there
it now relies on the config parameter 'cc_all_mails_to_addr' and I put
it as an example in examples/config.debian.
scripts/process seems to be not relying on Debbugs::Recipients so I
simply changed the logic to add a copy to
dispatch@$config{subscription_domain} and I dropped the logic to add
one recipient per source package. From what I can see, in the end
Debbugs sends a single email to many recipients, so tracker.debian.org
doesn't need multiple copies. It knows how to reconstitute the list of
affected source packages.
---
Debbugs/Recipients.pm | 23 +----------------------
examples/config.debian | 5 ++++-
scripts/process | 15 +--------------
3 files changed, 6 insertions(+), 37 deletions(-)
diff --git a/Debbugs/Recipients.pm b/Debbugs/Recipients.pm
index 29b92f7..196654f 100644
--- a/Debbugs/Recipients.pm
+++ b/Debbugs/Recipients.pm
@@ -115,27 +115,6 @@ sub add_recipients {
my $ref = $param{data}{bug_num};
for my $p (splitpackages($param{data}{package})) {
$p = lc($p);
- if (defined $config{subscription_domain}) {
- my @source_packages = binary_to_source(binary => $p,
- source_only => 1,
- );
- if (@source_packages) {
- for my $source (@source_packages) {
- _add_address(recipients => $param{recipients},
- address => "$source\@".$config{subscription_domain},
- reason => $source,
- type => 'bcc',
- );
- }
- }
- else {
- _add_address(recipients => $param{recipients},
- address => "$p\@".$config{subscription_domain},
- reason => $p,
- type => 'bcc',
- );
- }
- }
if (defined $param{data}{severity} and defined $config{strong_list} and
isstrongseverity($param{data}{severity})) {
_add_address(recipients => $param{recipients},
@@ -186,7 +165,7 @@ sub add_recipients {
length $config{cc_all_mails_to_addr}
) {
_add_address(recipients => $param{recipients},
- address => $config{cc_all_mails_to},
+ address => $config{cc_all_mails_to_addr},
reason => "cc_all_mails_to",
bug_num => $param{data}{bug_num},
type => 'bcc',
diff --git a/examples/config.debian b/examples/config.debian
index 193e7b5..5f51787 100644
--- a/examples/config.debian
+++ b/examples/config.debian
@@ -10,7 +10,10 @@ $gHTMLSuffix = "";
$gPackagePages = "packages.debian.org";
$gCGIDomain = "bugs.debian.org/cgi-bin";
$gMirrors = ""; # comma separated list
-$gSubscriptionDomain = "packages.qa.debian.org";
+
+# Tracker integration
+$gSubscriptionDomain = "tracker.debian.org";
+$gCcAllMailsToAddr = "[email protected]";
# Project identification
$gProject = "Debian";
diff --git a/scripts/process b/scripts/process
index d98cafa..296839a 100755
--- a/scripts/process
+++ b/scripts/process
@@ -154,7 +154,6 @@ our $maintainerschecked = 0;
#maintainer address for this message
our @maintaddrs;
# other src addresses
-our @addsrcaddrs;
our @resentccs;
our @bccs;
@@ -482,7 +481,7 @@ if ($codeletter eq 'D' || $codeletter eq 'F')
# This array is used to specify bcc in the cases where we're using create_mime_message.
my @generalbcc = @generalcc;
if (defined $config{subscription_domain} and length $config{subscription_domain}) {
- @generalbcc = (@generalbcc, @addsrcaddrs);
+ @generalbcc = (@generalbcc, 'dispatch@'.$config{subscription_domain});
}
if (defined $config{bug_subscription_domain} and length $config{bug_subscription_domain}) {
@generalbcc = (@generalbcc, "bugs=$ref\@$config{bug_subscription_domain}");
@@ -765,7 +764,6 @@ if (@maintaddrs && ($codeletter eq 'B' || $codeletter eq 'M')) {
);
}
-@bccs = @addsrcaddrs;
if (defined $gStrongList and isstrongseverity($data->{severity})) {
push @bccs, "$gStrongList\@$gListDomain";
}
@@ -1319,17 +1317,6 @@ sub checkmaintainers {
$p =~ /((?:src:)?[a-z0-9.+-]+)/;
$p = $1;
next unless defined $p;
- 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 {"$_\@$config{subscription_domain}"} @source;
- } else {
- push @addsrcaddrs, "$p\@$config{subscription_domain}";
- }
- }
# this is utter hackery until we switch to Debbugs::Recipients
my @maints = package_maintainer(binary => $p);
if (@maints) {
--
2.50.1
>From 0ad2bc9c218d06dc3ea31e7dd0dcde5563046eee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <[email protected]>
Date: Sat, 16 Aug 2025 20:46:40 +0200
Subject: [PATCH 2/2] Use "Debian Package Tracker/DPT" instead of "Package
Tracking System/PTS"
Also fix some inconsistency in the variable used to decide whether
to add a link to the package tracker.
Note that the sample config file doesn't have any value for
$config{package_tracking_domain}...
---
Debbugs/CGI/Pkgreport.pm | 12 ++++++------
templates/en_US/cgi/bugreport_pkginfo.tmpl | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm
index 6f29e93..790c6a1 100644
--- a/Debbugs/CGI/Pkgreport.pm
+++ b/Debbugs/CGI/Pkgreport.pm
@@ -143,12 +143,12 @@ sub generate_package_info{
push @references, sprintf "to the <a href=\"%s\">%s package page</a>",
html_escape("$config{package_pages}/$package"), html_escape("$package");
}
- if (defined $config{subscription_domain} and
- length $config{subscription_domain}) {
- my $ptslink = $param{binary} ? $srcforpkg : $package;
- # the pts only wants the source, and doesn't care about src: (#566089)
- $ptslink =~ s/^src://;
- push @references, q(to the <a href=").html_escape("$config{package_tracking_domain}/$ptslink").q(">Package Tracking System</a>);
+ if (defined $config{package_tracking_domain} and
+ length $config{package_tracking_domain}) {
+ my $tracker_pkg = $param{binary} ? $srcforpkg : $package;
+ # the package tracker only wants the source, and doesn't care about src: (#566089)
+ $tracker_pkg =~ s/^src://;
+ push @references, q(to the <a href=").html_escape("$config{package_tracking_domain}/pkg/$tracker_pkg").q(">Debian Package Tracker</a>);
}
# Only output this if the source listing is non-trivial.
if ($param{binary} and $srcforpkg) {
diff --git a/templates/en_US/cgi/bugreport_pkginfo.tmpl b/templates/en_US/cgi/bugreport_pkginfo.tmpl
index c063588..aa0bfeb 100644
--- a/templates/en_US/cgi/bugreport_pkginfo.tmpl
+++ b/templates/en_US/cgi/bugreport_pkginfo.tmpl
@@ -12,7 +12,7 @@
if (exists $package->{source} and not $package->{is_source}) {
$output .= q(Source for ).package_links(package=>$package->{package}).qq( is ).
package_links(source => $package->{source}).
- q{ (<a href="https://tracker.debian.org/pkg/}.html_escape(uri_escape($package->{source})).qq{">PTS</a>, }.
+ q{ (<a href="https://tracker.debian.org/pkg/}.html_escape(uri_escape($package->{source})).qq{">DPT</a>, }.
q{<a href="https://buildd.debian.org/}.html_escape(uri_escape($package->{source})).qq{">buildd</a>, }.
q{<a href="https://qa.debian.org/popcon.php?package=}.html_escape(uri_escape($package->{source})).qq{">popcon</a>)}.
qq(. );
--
2.50.1