Article View: linux.debian.bugs.dist
Article #873Bug#1126092: argparse-manpage: please make the output reproducible
From: Vagrant Cascadian
Date: Wed, 14 Oct 2026 19:10
Date: Wed, 14 Oct 2026 19:10
118 lines
6304 bytes
6304 bytes
--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="
--=-=-=
Content-Type: text/plain
On 2026-09-23, Vagrant Cascadian wrote:
> On 2026-01-21, Chris Lamb wrote:
>> Whilst working on the Reproducible Builds effort [0], we noticed that
>> argparse-manpage generates nondeterministic manpages.
>>
>> This appears to be a regression from version 4.5 which correctly used
>> utcfromtimestamp to parse SOURCE_DATE_EPOCH to a Python datetime
>> object. However, 4.7 uses fromtimestamp (cf. "utcfromtimestamp"), so
>> the generated manual pages differ depending on the surrounding timezone.
>>
>> This is affecting at least the src:psutils and src:virtme-ng packages,
>> but there are likely more.
...
> I would like to perform a Non-Maintainer Upload (NMU) applying this
> patch in the next week or two.
I have uploaded an NMU to DELAYED/10, debdiff attached.
A merge request with the NMU updates also submitted at:
https://salsa.debian.org/freeipa-team/argparse-manpage/-/merge_requests/2
live well,
vagrant
--=-=-=
Content-Type: text/plain
Content-Disposition: inline; filename=argparse-manpage_4.7-1.1.debdiff.txt
Content-Transfer-Encoding: quoted-printable
diff -Nru argparse-manpage-4.7/debian/changelog argparse-manpage-4.7/debian=
/changelog
=2D-- argparse-manpage-4.7/debian/changelog 2026-01-20 07:13:58.000000000 -=
0800
+++ argparse-manpage-4.7/debian/changelog 2026-10-14 11:46:01.000000000 -07=
00
@@ -1,3 +1,12 @@
+argparse-manpage (4.7-1.1) unstable; urgency=3Dmedium
+
+ * Non-maintainer upload.
+
+ [ Chris Lamb ]
+ * debian/patches: Use UTC timestamps. (Closes: #1126092)
+
+ -- Vagrant Cascadian <vagrant@reproducible-builds.org> Wed, 14 Oct 2026 =
11:46:01 -0700
+
argparse-manpage (4.7-1) unstable; urgency=3Dmedium
=20
* New upstream release. (Closes: #1125994)
diff -Nru argparse-manpage-4.7/debian/patches/0001-argparse_manpage-compat.=
py-Use-utcfromtimestamp-for-.patch argparse-manpage-4.7/debian/patches/0001=
-argparse_manpage-compat.py-Use-utcfromtimestamp-for-.patch
=2D-- argparse-manpage-4.7/debian/patches/0001-argparse_manpage-compat.py-U=
se-utcfromtimestamp-for-.patch 1969-12-31 16:00:00.000000000 -0800
+++ argparse-manpage-4.7/debian/patches/0001-argparse_manpage-compat.py-Use=
-utcfromtimestamp-for-.patch 2026-10-14 11:41:54.000000000 -0700
@@ -0,0 +1,31 @@
+From d2960777d40d282644f6238a0d74059fe56fcf79 Mon Sep 17 00:00:00 2001
+From: Chris Lamb <lamby@debian.org>
+Date: Wed, 21 Jan 2026 10:54:44 -0800
+Subject: [PATCH] argparse_manpage/compat.py: Use utcfromtimestamp for
+ consistent dates. (Closes: #1126092)
+
+This appears to be a regression from version 4.5 which correctly used
+utcfromtimestamp to parse SOURCE_DATE_EPOCH to a Python datetime
+object. However, 4.7 uses fromtimestamp (cf. "utcfromtimestamp"), so
+the generated manual pages differ depending on the surrounding timezone.
+
+https://reproducible-builds.org/docs/timezones/
+---
+ argparse_manpage/compat.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/argparse_manpage/compat.py b/argparse_manpage/compat.py
+index 7567b7e..752f3d3 100644
+--- a/argparse_manpage/compat.py
++++ b/argparse_manpage/compat.py
+@@ -63,6 +63,6 @@ def get_reproducible_date():
+ Return current datetime string, but respect SOURCE_DATE_EPOCH environ=
ment
+ variable if specified.
+ """
+- return datetime.datetime.fromtimestamp(
++ return datetime.datetime.utcfromtimestamp(
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
+ *_TZ_ARGS).strftime('%Y-%m-%d')
+--=20
+2.47.3
+
diff -Nru argparse-manpage-4.7/debian/patches/series argparse-manpage-4.7/d=
ebian/patches/series
=2D-- argparse-manpage-4.7/debian/patches/series 1969-12-31 16:00:00.000000=
000 -0800
+++ argparse-manpage-4.7/debian/patches/series 2026-10-14 11:42:07.00000000=
0 -0700
@@ -0,0 +1 @@
+0001-argparse_manpage-compat.py-Use-utcfromtimestamp-for-.patch
--=-=-=--
--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCas/RKQAKCRDcUY/If5cW
qmN9APwOjT5qdLVg+MHQbh8pWhSJaie0lhGWNMWurl7xN2+viQD+JbIvOPQaKJ9W
+9szkbEP6GGH8WeohZ3uMJAZ5RpHTwI=
=nzdP
-----END PGP SIGNATURE-----
--==-=-=--
Technical Details
Message-ID:
<NOcwq-5vXm-31@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<MfLUe-cfB2-19@gated-at.bofh.it> <NGCR3-1peq-5@gated-at.bofh.it> <MfLUe-cfB2-19@gated-at.bofh.it> <NGCR3-1peq-5@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Vagrant Cascadian <vagrant@reproducible-builds.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1126092: argparse-manpage: please make the output reproducible Date: Wed, 14 Oct 2026 21:10:02 +0200 Message-ID: <NOcwq-5vXm-31@gated-at.bofh.it> References: <MfLUe-cfB2-19@gated-at.bofh.it> <NGCR3-1peq-5@gated-at.bofh.it> <MfLUe-cfB2-19@gated-at.bofh.it> <NGCR3-1peq-5@gated-at.bofh.it> X-Original-To: Chris Lamb <lamby@debian.org>, 1126092@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Oct 14 19:01:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Vagrant Cascadian <vagrant@reproducible-builds.org>, 1126092@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: pkg-freeipa-devel@alioth-lists.debian.net X-Debian-Pr-Message: followup 1126092 X-Debian-Pr-Package: src:argparse-manpage X-Debian-Pr-Keywords: patch X-Debian-Pr-Source: argparse-manpage MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996813 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 118 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 14 Oct 2026 11:59:53 -0700 X-Original-Message-ID: <87cxtct8eu.fsf@wireframe> X-Original-References: <176901786105.179690.3516680633201603553@bigcat> <87qzij4py2.fsf@wireframe> <176901786105.179690.3516680633201603553@bigcat> <87qzij4py2.fsf@wireframe>