Your message dated Thu, 22 Dec 2016 11:04:30 +0000
with message-id <[email protected]>
and subject line Bug#848249: fixed in diffoscope 64
has caused the Debian Bug report #848249,
regarding diffoscope: set_locale needs to call tzset
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
848249: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848249
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: diffoscope
Severity: minor
Tags: patch
diffoscope sets the timezone to UTC to ensure that timezones are consistent
from diff output tools. However, it does not call tzset after it does this.
Because of this, C code running in the same process may continue to see and
use the user's original timezone. In particular, the python-magic module
that wraps libmagic is susceptible to this.
I believe this is the source of test_gzip.metadata test failures that have
been reported in, e.g., #817193. Test failures look inconsistent because
you'll only see it if (a) you're using the python-magic wrapper module, and
(b) your current timezone does not align with UTC.
A patch is attached.
-- System Information:
Debian Release: 8.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-rc6+ (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From de145d41ed76e57dcae8dbfc1c7404171ac9c2d8 Mon Sep 17 00:00:00 2001
From: Brett Smith <[email protected]>
Date: Thu, 15 Dec 2016 12:14:42 -0500
Subject: [PATCH] diffoscope: set_locale calls tzset.
This is necessary to update timezone information for C code we've pulled in
that might've already called it. In particular, the python-magic libmagic
wrapper can be affected by this, and print out gzip mtimes in the user's
timezone.
Accordingly, we call set_locale as a test fixture in test_gzip to make sure
things are set up correctly for the metadata difference tests.
---
diffoscope/__init__.py | 2 ++
tests/comparators/test_gzip.py | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/diffoscope/__init__.py b/diffoscope/__init__.py
index b1bb1d4..827445f 100644
--- a/diffoscope/__init__.py
+++ b/diffoscope/__init__.py
@@ -23,6 +23,7 @@ import logging
import platform
import tempfile
import functools
+import time
from distutils.spawn import find_executable
@@ -90,6 +91,7 @@ def set_locale():
os.environ[var] = 'C'
os.environ['LC_CTYPE'] = 'C.UTF-8'
os.environ['TZ'] = 'UTC'
+ time.tzset()
temp_files = []
diff --git a/tests/comparators/test_gzip.py b/tests/comparators/test_gzip.py
index a448820..6481ef6 100644
--- a/tests/comparators/test_gzip.py
+++ b/tests/comparators/test_gzip.py
@@ -25,7 +25,7 @@ from diffoscope.comparators import specialize
from diffoscope.comparators.gzip import GzipFile
from diffoscope.comparators.binary import FilesystemFile, NonExistingFile
-from utils import data, load_fixture
+from utils import data, load_fixture, set_locale
TEST_FILE1_PATH = data('test1.gz')
TEST_FILE2_PATH = data('test2.gz')
--
2.1.4
--- End Message ---
--- Begin Message ---
Source: diffoscope
Source-Version: 64
We believe that the bug you reported is fixed in the latest version of
diffoscope, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Chris Lamb <[email protected]> (supplier of updated diffoscope package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 22 Dec 2016 10:37:36 +0000
Source: diffoscope
Binary: diffoscope
Architecture: source
Version: 64
Distribution: unstable
Urgency: medium
Maintainer: Reproducible builds folks
<[email protected]>
Changed-By: Chris Lamb <[email protected]>
Description:
diffoscope - in-depth comparison of files, archives, and directories
Closes: 848249 848814
Changes:
diffoscope (64) unstable; urgency=medium
.
[ Chris Lamb ]
* Avoid shelling out to colordiff by implementing highlighting in Python
directly.
* Split out trydiffoscope client and binary package from main diffoscope
repository so that it can be more-easily released on PyPI.
* Memoize calls to ``distutils.spawn.find_executable`` to avoid excessive
stat(1) syscalls.
* Remove temporary profiling file introduced in 97bddd18a.
* comparators.directory:
- Correct `source` attribute of lsattr-based Difference instances.
- Add comment regarding why difficult to optimise calls to lsattr
* Internally guarantee to all progress observers that we will be processing
something.
* bin/diffoscope:
- Ensure that running from Git always uses that checkout's modules.
- Use os.path.join "properly" as we are already using it.
- Use typical sys.path.insert(0, ...) method to modify sys.path.
- Use immutable tuple over mutable list for clarity.
* comparators.debian: No need to keep .buildinfo file descriptor open.
* Suggest command-line for signing of PyPI uploads.
* Improve documentation of new tests/conftest.py file.
.
[ Maria Glukhova ]
* Remove test data causing problems during build with Python 3.4.
* Change icc-recognizing regexp to reflect changes in file type description.
(Closes: #848814)
.
[ Brett Smith ]
* set_locale should call tzset. (Closes: #848249)
* Ensure set_locale fixture runs before all tests.
.
[ Emanuel Bronshtein ]
* Use js-beautify as JavaScript code beautifier for .js files (with tests).
* CSS & HTML changes:
- Disable referrer and window.opener leakage.
- Disable compatibility mode usage in IE.
- Use double quotes for HTML attributes.
- Fix unclosed element span.
- CSS optimizations.
- Add fallback color to rgba usage.
- Fix CSS markup warnings.
* Change all HTTP URLs to HTTPS where applicable.
.
[ Baptiste Daroussin ]
* comparators/directory: add compatibily with FreeBSD's getfacl.
* Improve portability by not relying on /dev/fd.
.
[ Reiner Herrmann ]
* Improved support for Android apk files.
* Fix wording in Comparators.get_members comment.
.
[ Mattia Rizzolo ]
* presenters/html: Namespace the diffoscope CSS class.
Checksums-Sha1:
f8645944936ae38a4131aa457fb86dd45d534393 2896 diffoscope_64.dsc
9067e624a2ca0df4b83e415c5d28e9725dfa2a98 312732 diffoscope_64.tar.xz
Checksums-Sha256:
1ca3d3ed5d3b65abe650f301ab8a5cab06e44c36eb4c0828b5d6cfaa47d2780a 2896
diffoscope_64.dsc
1ef2b14194a650a990732dfb4e1573c8196c6b370fdaf222d18486f55256afc2 312732
diffoscope_64.tar.xz
Files:
c3959362563c2e0150d9e40711a03772 2896 devel optional diffoscope_64.dsc
c3a5743d65462882323284d084342305 312732 devel optional diffoscope_64.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlhbr6cACgkQHpU+J9Qx
HliubhAAq1FAL4eh0EjSKDmXHmRFes4qlnUx4BaRCRod5IYt/c5YT0m8DDfYcrmE
TsrvXZKncMp+/KdEKQmn9YJRuB26GFxX9EWWKeqi0yuavxkB9fcCUSpvygn09r6S
mQT17uYSdhPZFJzMjMHkGROOnP+9ZzfjZRnP0ZivtvszFDCiFFDHrtYb/TZYquvR
sli8wSvNG8GV1gsZ1K7en3d+sZLlaC08LNTALW0hwYen+c84CTKvR56lcTiNDnRf
GUIMMf2g8MlpHq1KtR7wKowmv39sgMwHBPRBeU+vYjy6UONUUOdQGKJw4FlhNJ6A
+DeNbaQDrNmMlpsqTeTicP6Zy+/pSFSkrCK++TfAUGKicLWsVXGYZedSGYxqJcbo
0/V3BdOYDUNLWQ7S3JBA+OXJmOFdRhRMJ1ol7EcYMdGK8yhtLRgaA6nxVpfFbD7i
WW3GB3jKV7dMQeWQd8lLd0kbIeVLPU2RIokPf6KLqS8xJD2p9gfN7RYltkZa+kgI
NoLP1P2N6G7YZ0y3b+wR0IliqkMEID54zi2BJ2TGQEFsUYELzCp7EN6mhrl3s2dp
sYqsjxuLtvwRWrLmDEVfE2WuniUBZmsMNkf8QSJB1+ObzZpqcD7GXswtwvSgfWcY
iVzoVBKb1Z+JdcFWEtUh1ReFkMFtBjHf3KsjKQ7fk9B3crpPHQ0=
=tCjU
-----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________
Reproducible-builds mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds