From 7199bebb4cdb6ece2a3caf0f6945ff1494d8d8556fa6fc9ce27f77428b070fee Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 8 Aug 2024 19:32:27 +0000 Subject: [PATCH] - Adding bso1227999-reproducible-builds.patch fixing bsc#1227999 adding reproducibility patches from gh#python/cpython!121872 and gh#python/cpython!121883. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python38?expand=0&rev=162 --- bso1227999-reproducible-builds.patch | 37 +++++++++++++++++++++ python38.changes | 7 ++++ python38.spec | 48 +++++++++++++++------------- 3 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 bso1227999-reproducible-builds.patch diff --git a/bso1227999-reproducible-builds.patch b/bso1227999-reproducible-builds.patch new file mode 100644 index 0000000..b85f4b8 --- /dev/null +++ b/bso1227999-reproducible-builds.patch @@ -0,0 +1,37 @@ +From ac2b8869724d7a57d9b5efbdce2f20423214e8bb Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Tue, 16 Jul 2024 21:39:33 +0200 +Subject: [PATCH] Allow to override build date with SOURCE_DATE_EPOCH + +to make builds reproducible. +See https://reproducible-builds.org/ for why this is good +and https://reproducible-builds.org/specs/source-date-epoch/ +for the definition of this variable. +--- + Doc/conf.py | 3 ++- + Doc/library/functions.rst | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- a/Doc/conf.py ++++ b/Doc/conf.py +@@ -78,7 +78,8 @@ html_short_title = '%s Documentation' % + + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. +-html_last_updated_fmt = '%b %d, %Y' ++html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) ++html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime(html_time)) + + # Path to find HTML templates. + templates_path = ['tools/templates'] +--- a/Doc/library/functions.rst ++++ b/Doc/library/functions.rst +@@ -1238,7 +1238,7 @@ are always available. They are listed h + (where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`, + and :mod:`shutil`. + +- .. audit-event:: open file,mode,flags open ++ .. audit-event:: open path,mode,flags open + + The ``mode`` and ``flags`` arguments may have been modified or inferred from + the original call. diff --git a/python38.changes b/python38.changes index e88aa48..5d9da84 100644 --- a/python38.changes +++ b/python38.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 8 19:30:36 UTC 2024 - Matej Cepl + +- Adding bso1227999-reproducible-builds.patch fixing bsc#1227999 + adding reproducibility patches from gh#python/cpython!121872 + and gh#python/cpython!121883. + ------------------------------------------------------------------- Mon Jul 22 21:20:54 UTC 2024 - Matej Cepl diff --git a/python38.spec b/python38.spec index 5d04b58..e3b11e4 100644 --- a/python38.spec +++ b/python38.spec @@ -192,6 +192,9 @@ Patch44: CVE-2024-0397-memrace_ssl.SSLContext_cert_store.patch # PATCH-FIX-UPSTREAM CVE-2024-4032-private-IP-addrs.patch bsc#1226448 mcepl@suse.com # rearrange definition of private v global IP addresses Patch45: CVE-2024-4032-private-IP-addrs.patch +# PATCH-FIX-UPSTREAM bso1227999-reproducible-builds.patch bsc#1227999 mcepl@suse.com +# reproducibility patches +Patch46: bso1227999-reproducible-builds.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -444,28 +447,29 @@ other applications. %patch -P 05 -p1 %endif -%patch -P 06 -p1 -%patch -P 07 -p1 -%patch -P 08 -p1 -%patch -P 09 -p1 -%patch -P 15 -p1 -%patch -P 23 -p1 -%patch -P 24 -p1 -%patch -P 25 -p1 -%patch -P 27 -p1 -%patch -P 28 -p1 -%patch -P 29 -p1 -%patch -P 32 -p1 -%patch -P 33 -p1 -%patch -P 34 -p1 -%patch -P 36 -p1 -%patch -P 37 -p1 -%patch -P 38 -p1 -%patch -P 41 -p1 -%patch -P 42 -p1 -%patch -P 43 -p1 -%patch -P 44 -p1 -%patch -P 45 -p1 +%patch -p1 -P 06 +%patch -p1 -P 07 +%patch -p1 -P 08 +%patch -p1 -P 09 +%patch -p1 -P 15 +%patch -p1 -P 23 +%patch -p1 -P 24 +%patch -p1 -P 25 +%patch -p1 -P 27 +%patch -p1 -P 28 +%patch -p1 -P 29 +%patch -p1 -P 32 +%patch -p1 -P 33 +%patch -p1 -P 34 +%patch -p1 -P 36 +%patch -p1 -P 37 +%patch -p1 -P 38 +%patch -p1 -P 41 +%patch -p1 -P 42 +%patch -p1 -P 43 +%patch -p1 -P 44 +%patch -p1 -P 45 +%patch -p1 -P 46 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac