From 77cb5b35a566e48ba3a5a0608becfc8c43bb66e981cbb3bf7a5f126456b92085 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 18 Jul 2024 22:39:01 +0000 Subject: [PATCH] - Adding bso1227999-reproducible-builds.patch fixing bsc#1227999 adding reproducibility patches from gh#python/cpython!121872 and gh#python/cpython!121883. - Trying %autopatch again (bsc#1189495 seems to be fixed) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python311?expand=0&rev=132 --- bso1227999-reproducible-builds.patch | 37 ++++++++++++++++++++++++++++ python311.changes | 8 ++++++ python311.spec | 20 ++++----------- 3 files changed, 50 insertions(+), 15 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..fb33d18 --- /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 +@@ -316,7 +316,8 @@ html_context = { + } + + # This 'Last updated on:' timestamp is inserted at the bottom of every page. +-html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime()) ++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 +@@ -1356,7 +1356,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/python311.changes b/python311.changes index 1051020..f2ced63 100644 --- a/python311.changes +++ b/python311.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jul 18 22:37:07 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. +- Trying %autopatch again (bsc#1189495 seems to be fixed) + ------------------------------------------------------------------- Mon Jul 15 12:14:05 UTC 2024 - Matej Cepl diff --git a/python311.spec b/python311.spec index 8b54981..8b7ca8b 100644 --- a/python311.spec +++ b/python311.spec @@ -174,6 +174,9 @@ Patch17: CVE-2023-52425-remove-reparse_deferral-tests.patch # PATCH-FIX-UPSTREAM CVE-2024-4032-private-IP-addrs.patch bsc#1226448 mcepl@suse.com # rearrange definition of private v global IP addresses Patch18: CVE-2024-4032-private-IP-addrs.patch +# PATCH-FIX-UPSTREAM bso1227999-reproducible-builds.patch bsc#1227999 mcepl@suse.com +# reproducibility patches +Patch19: bso1227999-reproducible-builds.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -416,26 +419,13 @@ other applications. %prep %setup -q -n %{tarname} -%patch -p1 -P 02 -%patch -p1 -P 03 -%patch -p1 -P 04 -%patch -p1 -P 05 -%patch -p1 -P 06 -%patch -p1 -P 07 -%patch -p1 -P 08 +%autopatch -p1 -M 08 %if 0%{?suse_version} <= 1500 %patch -P 09 -p1 %endif -%patch -p1 -P 10 -%patch -p1 -P 11 -%patch -p1 -P 13 -%patch -p1 -P 14 -%patch -p1 -P 15 -%patch -p1 -P 16 -%patch -p1 -P 17 -%patch -p1 -P 18 +%autopatch -p1 -m 10 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac