Bug 2213054

Summary: python27:2.7/python-markupsafe debug symbols are not stripped.
Product: Red Hat Enterprise Linux 8 Reporter: Charalampos Stratakis <cstratak>
Component: python-markupsafeAssignee: Charalampos Stratakis <cstratak>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.9CC: torsava
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-14 15:36:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Charalampos Stratakis 2023-06-07 00:59:16 UTC
rpminspect on RHEL8 is complaining of debugging symbols present in python-markupsafe.

More specifically .symtab is present in /usr/lib64/python2.7/site-packages/markupsafe/_speedups.so on all archs.

Inspecting the build logs I can see that on the python3 build we get:

"""
running install_scripts
+ rm /builddir/build/BUILDROOT/python-markupsafe-0.23-19.el8.aarch64//usr/lib64/python3.6/site-packages/markupsafe/_speedups.c
+ /usr/lib/rpm/find-debuginfo.sh -j8 --strict-build-id -m -i --build-id-seed 0.23-19.el8 --unique-debug-suffix -0.23-19.el8.aarch64 --unique-debug-src-base python-markupsafe-0.23-19.el8.aarch64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/MarkupSafe-0.23
extracting debug info from /builddir/build/BUILDROOT/python-markupsafe-0.23-19.el8.aarch64/usr/lib64/python3.6/site-packages/markupsafe/_speedups.cpython-36m-aarch64-linux-gnu.so
/usr/lib/rpm/sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match.
12 blocks
+ /usr/lib/rpm/check-buildroot
"""

With the compiler flags being:
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I/usr/include/python3.6m -c markupsafe/_speedups.c -o build/temp.linux-aarch64-3.6/markupsafe/_speedups.o

While on the python2 build:
"""
Copying MarkupSafe.egg-info to /builddir/build/BUILDROOT/python-markupsafe-0.23-19.module+el8.9.0+18326+1b5baeee.aarch64/usr/lib64/python2.7/site-packages/MarkupSafe-0.23-py2.7.egg-info
running install_scripts
+ rm /builddir/build/BUILDROOT/python-markupsafe-0.23-19.module+el8.9.0+18326+1b5baeee.aarch64//usr/lib64/python2.7/site-packages/markupsafe/_speedups.c
+ /usr/lib/rpm/check-buildroot
"""

With the compiler flags being:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -I/usr/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-aarch64-2.7/markupsafe/_speedups.o

So the find-debuginfo script is not running.

Comment 2 Charalampos Stratakis 2023-06-08 12:53:03 UTC
This was done due to weird filtering from modularity related to the debuginfo packages. The best way forward would be to disable the rpminspect warnings through an rpminspect.yaml file.

Comment 4 Charalampos Stratakis 2023-07-11 14:03:06 UTC
PR is merged.

Comment 11 errata-xmlrpc 2023-11-14 15:36:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: python27:2.7 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:7042