[Pkg-gnupg-commit] [gnupg2] 01/02: avoid FTBFS when TZ=UTC-12 (Closes: #874617)

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Sep 8 06:19:16 UTC 2017


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

dkg pushed a commit to branch master
in repository gnupg2.

commit 437dd582164537a0e07f033b76d1e4e7f225eb69
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Sep 8 02:09:24 2017 -0400

    avoid FTBFS when TZ=UTC-12 (Closes: #874617)
---
 ...ix-a-test-which-specifies-expiration-date.patch | 47 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 48 insertions(+)

diff --git a/debian/patches/0020-tests-Fix-a-test-which-specifies-expiration-date.patch b/debian/patches/0020-tests-Fix-a-test-which-specifies-expiration-date.patch
new file mode 100644
index 0000000..1a49ddf
--- /dev/null
+++ b/debian/patches/0020-tests-Fix-a-test-which-specifies-expiration-date.patch
@@ -0,0 +1,47 @@
+From: NIIBE Yutaka <gniibe at fsij.org>
+Date: Fri, 8 Sep 2017 14:21:29 +0900
+Subject: tests: Fix a test which specifies expiration date.
+
+* tests/openpgp/quick-key-manipulation.scm: Fix expiration time
+comparison.
+
+--
+
+This is a bug fix for Amelia Earhart who is probably in UTC-12.
+
+When expiration date is specified, GnuPG interprets it as noon of the
+date in local time.
+
+Before this fix, the test compared the value by 2145916800 which is
+2038-01-01 00:00:00 in UTC with allowance of 1 day.  When the test
+was ran in UTC-12 timezone, it failed because of noon in the timezone
+is midnight of the next day in UTC.
+
+GnuPG-bug-id: 3393
+Reported-by: Daniel Kahn Gillmor
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+(cherry picked from commit 17f764dd4972a063fe09c4b9d2846e8efcb25c7a)
+---
+ tests/openpgp/quick-key-manipulation.scm | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm
+index c21abfe..2023f17 100755
+--- a/tests/openpgp/quick-key-manipulation.scm
++++ b/tests/openpgp/quick-key-manipulation.scm
+@@ -178,11 +178,11 @@
+   (lambda (subkey)
+     (assert (= 1 (:alg subkey)))
+     (assert (string-contains? (:cap subkey) "s"))
+-    (assert (time-matches? 2145916800    ;; 2038-01-01
+-			   ;; 4260207600 ;; 2105-01-01
++    (assert (time-matches? 2145960000    ;; UTC 2038-01-01 12:00:00
++			   ;; 4260254400 ;; UTC 2105-01-01 12:00:00
+ 			   (string->number (:expire subkey))
+-			   ;; This is off by 12h, but I guess it just
+-			   ;; choses the middle of the day.
++			   ;; GnuPG choses the middle of the day (local time)
++			   ;; when no hh:mm:ss is specified
+ 			   (days->seconds 1))))
+   (lambda (subkey)
+     (assert (= 1 (:alg subkey)))
diff --git a/debian/patches/series b/debian/patches/series
index 30da6b9..12014db 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,3 +17,4 @@ update-defaults/0016-gpg-Default-to-SHA-512-for-all-signature-types-on-RS.patch
 update-defaults/0017-gpg-Prefer-SHA-512-and-SHA-384-in-default-preference.patch
 update-defaults/0018-gpg-default-to-AES-256.patch
 update-defaults/0019-agent-default-to-protection-that-takes-300ms-up-from.patch
+0020-tests-Fix-a-test-which-specifies-expiration-date.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list