[packages/python3-dns] Rel 2
arekm
arekm at pld-linux.org
Wed Nov 11 02:11:03 CET 2026
commit b239ddb8645cb84eab92feb1fc9c1ee16b9b13ef
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Nov 11 02:10:37 2026 +0100
Rel 2
Fix RRSIG time conversion past 2038 with 32-bit time_t (i686 FTBFS).
dnspython-sigtime-32bit-time_t.patch | 24 ++++++++++++++++++++++++
python3-dns.spec | 4 +++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/python3-dns.spec b/python3-dns.spec
index c8939ca..4908233 100644
--- a/python3-dns.spec
+++ b/python3-dns.spec
@@ -7,12 +7,13 @@ Summary: dnspython - a DNS toolkit for Python 3
Summary(pl.UTF-8): dnspython - zestaw narzędzi do DNS dla Pythona 3
Name: python3-%{module}
Version: 2.9.2
-Release: 1
+Release: 2
License: ISC
Group: Development/Languages/Python
Source0: https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-%{version}.tar.gz
# Source0-md5: 7b46ef88a095ea615709c6bbb62c34e3
Patch0: dnspython-tests-feature-gates.patch
+Patch1: dnspython-sigtime-32bit-time_t.patch
URL: https://www.dnspython.org/
BuildRequires: python3-build
BuildRequires: python3-devel >= 1:3.11
@@ -59,6 +60,7 @@ komunikatach, nazwach i rekordach w DNS-ie.
%prep
%setup -q -n dnspython-%{version}
%patch -P0 -p1
+%patch -P1 -p1
%build
%py3_build_pyproject
diff --git a/dnspython-sigtime-32bit-time_t.patch b/dnspython-sigtime-32bit-time_t.patch
new file mode 100644
index 0000000..aaf16f9
--- /dev/null
+++ b/dnspython-sigtime-32bit-time_t.patch
@@ -0,0 +1,24 @@
+# time.gmtime() overflows a 32-bit time_t (i686) for RRSIG times past 2038
+--- a/dns/rdtypes/rrsigbase.py
++++ b/dns/rdtypes/rrsigbase.py
+@@ -18,7 +18,6 @@
+ import base64
+ import datetime
+ import struct
+-import time
+ from typing import TypeVar
+
+ import dns._text_util
+@@ -57,7 +56,11 @@
+
+
+ def posixtime_to_sigtime(what):
+- return time.strftime("%Y%m%d%H%M%S", time.gmtime(what))
++ # time.gmtime() overflows a 32-bit time_t past 2038; signature times run to 2106
++ value = datetime.datetime(1970, 1, 1, tzinfo=datetime.UTC) + datetime.timedelta(
++ seconds=what
++ )
++ return value.strftime("%Y%m%d%H%M%S")
+
+
+ T = TypeVar("T", bound="RRSIGBase")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-dns.git/commitdiff/b239ddb8645cb84eab92feb1fc9c1ee16b9b13ef
More information about the pld-cvs-commit
mailing list