[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Ubuntu dpkg 1.18.2ubuntu3



This e-mail has been sent due to an upload to Ubuntu that contains Ubuntu
changes.  It contains the difference between the new version and the
previous version of the same source package in Ubuntu.
Format: 1.8
Date: Wed, 26 Aug 2015 16:39:42 -0600
Source: dpkg
Binary: libdpkg-dev dpkg dpkg-dev libdpkg-perl dselect
Architecture: source
Version: 1.18.2ubuntu3
Distribution: wily
Urgency: medium
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Changed-By: Adam Conrad <adconrad@ubuntu.com>
Description: 
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Changes: 
 dpkg (1.18.2ubuntu3) wily; urgency=medium
 .
   * Cherrypick fix from git to be less strict about week day parsing.
   * Extend the above to also be less strict about month name parsing.
Checksums-Sha1: 
 67d7ed77fea640d74c0200edc1cc2a42b8eb76f9 2128 dpkg_1.18.2ubuntu3.dsc
 daf882d4ac1ce9d2d713e898ef39b09d9883f558 4334956 dpkg_1.18.2ubuntu3.tar.xz
Checksums-Sha256: 
 8bbfa1af4e73d0336a19a6582149c08ec2d243cb92e77c582c13d184f3da1d22 2128 dpkg_1.18.2ubuntu3.dsc
 2a0d27a0bad02bebf7b4c7d3ac94a43703e399e63ddbe2b81ad115f56a50d280 4334956 dpkg_1.18.2ubuntu3.tar.xz
Files: 
 cabddb038958518f4f7df18442eeefa4 2128 admin required dpkg_1.18.2ubuntu3.dsc
 2a021dcd4d45b0ea7501a27276673bfe 4334956 admin required dpkg_1.18.2ubuntu3.tar.xz
Original-Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
diff -pruN 1.18.2ubuntu2/debian/changelog 1.18.2ubuntu3/debian/changelog
--- 1.18.2ubuntu2/debian/changelog	2015-08-18 19:54:14.000000000 +0000
+++ 1.18.2ubuntu3/debian/changelog	2015-08-26 23:50:32.000000000 +0000
@@ -1,3 +1,10 @@
+dpkg (1.18.2ubuntu3) wily; urgency=medium
+
+  * Cherrypick fix from git to be less strict about week day parsing.
+  * Extend the above to also be less strict about month name parsing.
+
+ -- Adam Conrad <adconrad@ubuntu.com>  Wed, 26 Aug 2015 16:39:42 -0600
+
 dpkg (1.18.2ubuntu2) wily; urgency=medium
 
   * Add a Breaks on dbus (<< 1.8.12-1ubuntu6~) to avoid the noawait trigger.
diff -pruN 1.18.2ubuntu2/scripts/Dpkg/Changelog/Entry/Debian.pm 1.18.2ubuntu3/scripts/Dpkg/Changelog/Entry/Debian.pm
--- 1.18.2ubuntu2/scripts/Dpkg/Changelog/Entry/Debian.pm	2015-07-29 02:11:01.000000000 +0000
+++ 1.18.2ubuntu3/scripts/Dpkg/Changelog/Entry/Debian.pm	2015-08-26 23:48:41.000000000 +0000
@@ -64,7 +64,10 @@ our $regex_header = qr/^(\w$name_chars*)
 
 # The matched content is the maintainer name ($1), its email ($2),
 # some blanks ($3) and the timestamp ($4).
-our $regex_trailer = qr/^ \-\- (.*) <(.*)>(  ?)((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4})\s*$/o;
+our $regex_trailer = qr/^ \-\- (.*) <(.*)>(  ?)(((\w+)\,\s*)?((\d{1,2}\s+)(\w+)\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}))\s*$/o;
+
+my %week_day = map { $_ => 1 } qw(Mon Tue Wed Thu Fri Sat Sun);
+my %month_name = map { $_ => 1 } qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
 
 ## use critic
 
@@ -159,18 +162,26 @@ sub check_header {
 
 sub check_trailer {
     my $self = shift;
+    my $month_spec = '%b';
     my @errors;
     if (defined($self->{trailer}) and $self->{trailer} =~ $regex_trailer) {
 	if ($3 ne '  ') {
 	    push @errors, g_('badly formatted trailer line');
 	}
 
-	my $fmt = '';
-	$fmt .= '%a, ' if defined $5;
-	$fmt .= '%d %b %Y %T %z';
+	# Validate the week day. Date::Parse used to ignore it, but Time::Piece
+	# is much more strict and it does not gracefully handle bogus values.
+	if (defined $5 and not exists $week_day{$6}) {
+	    push @errors, sprintf(g_('ignoring invalid week day \'%s\''), $6);
+	}
+	if (defined $5 and not exists $month_name{$9}) {
+	    push @errors, sprintf(g_('assuming long month name \'%s\''), $9);
+	    $month_spec = '%B';
+	}
 
+	# Ignore the week day ('%a, '), as we have validated it above.
 	local $ENV{LC_ALL} = 'C';
-	unless (defined Time::Piece->strptime($4, $fmt)) {
+	unless (defined Time::Piece->strptime($7, "%d $month_spec %Y %T %z")) {
 	    push @errors, sprintf(g_("couldn't parse date %s"), $4);
 	}
     } else {

Reply to: