🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Vagrant Cascadian Wed, 14 Oct 2026 19:10
Bug#1126092: argparse-manpage: please make the output reproducible
#873
Author: Vagrant Cascadian
Date: Wed, 14 Oct 2026 19:10
118 lines
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-----
--==-=-=--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads