From 0deebbc3c5b93b0ff3ba068d595648075658bff2 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 12 Jul 2023 03:42:42 +0200 Subject: [PATCH] Strip the LTO bytecode from python.o Resolves: rhbz#2213527 --- python39.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python39.spec b/python39.spec index a5d28d1..2b088ec 100644 --- a/python39.spec +++ b/python39.spec @@ -17,7 +17,7 @@ URL: https://www.python.org/ #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} License: Python # Exclude i686 arch. Due to a modularity issue it's being added to the @@ -1272,6 +1272,11 @@ touch %{buildroot}%{_bindir}/python3-config touch %{buildroot}%{_bindir}/python3-debug touch %{buildroot}%{_bindir}/python3-debug-config +# Strip the LTO bytecode from python.o +# Based on the fedora brp-strip-lto scriptlet +# https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/9dd5528cf9805ebfe31cff04fe7828ad06a6023f/f/brp-strip-lto +find %{buildroot} -type f -name 'python.o' -print0 | xargs -0 \ +bash -c "strip -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 \"\$@\"" ARG0 # ====================================================== # Checks for packaging issues @@ -2001,6 +2006,10 @@ fi # ====================================================== %changelog +* Wed Jul 12 2023 Charalampos Stratakis - 3.9.16-3 +- Strip the LTO bytecode from python.o +Resolves: rhbz#2213527 + * Mon Jun 19 2023 Petr Viktorin - 3.9.16-2 - Add filters for tarfile extraction (CVE-2007-4559, PEP-706) Resolves: rhbz#263261