[libparse-debianchangelog-perl] 01/03: Add patch to remove support for broken timezone names.

gregor herrmann gregoa at debian.org
Tue Jul 14 17:17:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libparse-debianchangelog-perl.

commit 8497d53af357a59ae10a80234082aeb0c3f537bd
Author: gregor herrmann <gregoa at debian.org>
Date:   Tue Jul 14 19:01:21 2015 +0200

    Add patch to remove support for broken timezone names.
    
    Thanks: Guillem Jover for the bug report and the patch.
    Closes: #792414
---
 .../Remove-support-for-broken-timezone.patch       | 47 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 48 insertions(+)

diff --git a/debian/patches/Remove-support-for-broken-timezone.patch b/debian/patches/Remove-support-for-broken-timezone.patch
new file mode 100644
index 0000000..c8a06b7
--- /dev/null
+++ b/debian/patches/Remove-support-for-broken-timezone.patch
@@ -0,0 +1,47 @@
+From ca50d8718c5e3f0cd334541c24d966a69e64c86e Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at debian.org>
+Date: Tue, 14 Jul 2015 17:18:16 +0200
+Subject: [PATCH] Parse::DebianChangelog: 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 <mail at example.org>  Sat, 30 May 2015 03:18:43 +0200 (CEST)
+
+is bogus, and it only accepts one character. As in:
+
+ -- Name <mail at 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 <guillem at debian.org>
+
+Bug-Debian: https://bugs.debian.org/792414
+
+---
+ lib/Parse/DebianChangelog.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/Parse/DebianChangelog.pm
++++ b/lib/Parse/DebianChangelog.pm
+@@ -407,7 +407,7 @@
+ 	} elsif (m/^\S/) {
+ 	    $self->_do_parse_error($file, $.,
+ 				  __g( "badly formatted heading line" ), "$_");
+-	} elsif (m/^ \-\- (?<name>.*) <(?<email>.*)>(?<sep>  ?)(?<date>(?:\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}(\s+\([^\\\(\)]\))?)$/o) {
++	} elsif (m/^ \-\- (?<name>.*) <(?<email>.*)>(?<sep>  ?)(?<date>(?:\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4})$/o) {
+ 	    $expect eq 'more change data or trailer' ||
+ 		$self->_do_parse_error($file, $.,
+ 				       __g( "found trailer where expected %s",
diff --git a/debian/patches/series b/debian/patches/series
index bbbd593..cc4ebf9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ Updated-German-translations.patch
 Fix-test-failures-due-to-changed-Changes-field.patch
 P-DC-Support-open-handles-as-input.patch
 Build.PL-when-a-PO_BUILD_DATE-environment-variable-i.patch
+Remove-support-for-broken-timezone.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libparse-debianchangelog-perl.git



More information about the Pkg-perl-cvs-commits mailing list