Package: root-system
Version: 5.34.19+dfsg-1
Severity: wishlist
Tags: patch

Hi!

As pointed out in
<https://lists.debian.org/debian-policy/2015/06/msg00034.html>, the
changelog trailer part of the regex to support timezone names is bogus.
And it seems the best thing to do is to remove it instead of fixing it.
For more details either see tha above mail or the commit message on the
attached patch. Beware, that the patch has only been tested with the
changelog from this same package.

Thanks,
Guillem
From c8b1387c79dd111cb66aade8f4fd85fc22364ed2 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@debian.org>
Date: Tue, 14 Jul 2015 17:34:30 +0200
Subject: [PATCH] makerpmcl: Remove support for broken timezone names
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The Debian changelog trailer regex intended to support a timezone name
inside parenthesis, like this:

 -- Name <m...@example.org>  Sat, 30 May 2015 03:18:43 +0200 (CEST)

is bogus, and it only accepts one character. As in:

 -- Name <m...@example.org>  Sat, 30 May 2015 03:18:43 +0200 (C)

which while also “valid”, as per RFC822, they are pretty much useless
as per RFC5322. It seems the regex was “inherited” from the dpkg
implementation which has kept that part unchanged since its inception
in dpkg 1.3.0, 1996-08.

So let's just drop it instead of fixing the regex, given that the
timezone name has never been accepted, many time-parsing functions
ignore it, it is redundant, declared obsolete by RFC5322 and Debian
policy dropped an explicit reference to it due to bug 569174.

Signed-off-by: Guillem Jover <guil...@debian.org>
---
 build/package/lib/makerpmcl.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/package/lib/makerpmcl.pl b/build/package/lib/makerpmcl.pl
index bf14b54..efb879e 100755
--- a/build/package/lib/makerpmcl.pl
+++ b/build/package/lib/makerpmcl.pl
@@ -56,7 +56,7 @@ while (<STDIN>) {
         # $f{'Changes'}.= " $_\n  \n";
     } elsif (m/^\S/) {
 	&clerror("badly formatted heading line");
-    } elsif (m/^ \-\- (.*) <(.*)>  ((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}(\s+\([^\\\(\)]\))?)$/) {
+    } elsif (m/^ \-\- (.*) <(.*)>  ((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4})$/) {
         $expect eq 'more change data or trailer' ||
             &clerror("found trailer where expected $expect");
         $f{'Maintainer'}= "$1 <$2>" unless defined($f{'Maintainer'});
-- 
2.4.3.573.g4eafbef

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to