Control: tag -1 patch

On Wed, Aug 07, 2024 at 03:37:17PM +0300, Niko Tyni wrote:
> Package: rspamd
> Version: 3.8.1-1.1
> Severity: important
> User: debian-p...@lists.debian.org
> Usertags: perl-5.40-transition
> 
> This package fails its autopkgtest checks with Perl 5.40 (currently
> in experimental.)

>  58s + rspamd_stats --log /dev/null
>  58s Duplicate specification "symbol-bidir|S=s@" for option "s"
>  58s Duplicate specification "exclude-logs|x=i" for option "x"
>  58s Duplicate specification "json|j" for option "j"

The first two are fixed by ignoring option case (which presumably
was the intention in the first place.) But there's a real conflict
between --junk-score and --json for -j.

The attached patches fix these. I moved --json to -J, given it's not
even in the manpage. YMMV.

Hope this helps,
-- 
Niko Tyni   nt...@debian.org
From: Niko Tyni <nt...@debian.org>
Date: Sun, 25 Aug 2024 08:21:34 +0100
X-Dgit-Generated: 3.8.1-1.2 3ca6f8d9d29d6645788ec3802225997b51813713
Subject: rspamd_stats: Configure Getopt::Long to not ignore case

Bug-Debian: https://bugs.debian.org/1078150

---

diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl
index 4fdcf55..b757d20 100755
--- a/utils/rspamd_stats.pl
+++ b/utils/rspamd_stats.pl
@@ -2,7 +2,7 @@
 
 use 5.010;
 use Data::Dumper;
-use Getopt::Long;
+use Getopt::Long qw( :config no_ignore_case );
 use Pod::Usage;
 use Time::Local;
 use IO::Handle;
From: Niko Tyni <nt...@debian.org>
Date: Sun, 25 Aug 2024 08:32:30 +0100
X-Dgit-Generated: 3.8.1-1.2 7709132449186bfab0802c0bb4a013c79363e82e
Subject: rspamd_stats: use -J for --json to fix conflict with --junk-score

Bug-Debian: https://bugs.debian.org/1078150

---

diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl
index b757d20..e262c39 100755
--- a/utils/rspamd_stats.pl
+++ b/utils/rspamd_stats.pl
@@ -57,7 +57,7 @@ GetOptions(
     "end=s"                 => \$endTime,
     "num-logs|n=i"          => \$num_logs,
     "exclude-logs|x=i"      => \$exclude_logs,
-    "json|j"                => \$json,
+    "json|J"                => \$json,
     "help|?"                => \$help,
     "man"                   => \$man
 ) or pod2usage(2);

Reply via email to