Bug 1902514 - Conditionals for %{?_enable_debug_packages} and %{with benchtests} seem to be mixed up
Summary: Conditionals for %{?_enable_debug_packages} and %{with benchtests} seem to be...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: DJ Delorie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2020989
TreeView+ depends on / blocked
 
Reported: 2020-11-29 21:04 UTC by Robert Scheck
Modified: 2021-11-15 20:55 UTC (History)
12 users (show)

Fixed In Version: glibc-2.32.9000-23.fc34
Clone Of:
Environment:
Last Closed: 2021-01-19 12:48:22 UTC
Type: Bug
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description Robert Scheck 2020-11-29 21:04:03 UTC
Description of problem:
It seems like the conditionals for %{?_enable_debug_packages} and %{with benchtests} have been mixed up in the spec file. Building with "--define '_enable_debug_packages 0' --without benchtests" leads to build failures.

Version-Release number of selected component (if applicable):
glibc-2.28-127.el8

How reproducible:
Everytime with "--define '_enable_debug_packages 0' --without benchtests" options at build-time.

Actual results:
--- 8< ---
--- glibc.spec
+++ glibc.spec.rsc
@@ -1514,8 +1514,8 @@ cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/gl
 cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
 cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
 cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
+%endif
 
-%if 0%{?_enable_debug_packages}
 # The #line directives gperf generates do not give the proper
 # file name relative to the build directory.
 pushd locale
@@ -1875,6 +1875,7 @@ test $(wc -l < libnsl.filelist) -eq 1
 # glibc-benchtests
 ###############################################################################
 
+%if %{with benchtests}
 # List of benchmarks.
 find build-%{target}/benchtests -type f -executable | while read b; do
        echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
@@ -1899,6 +1900,7 @@ echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist
 # glibc-debuginfocommon, and glibc-debuginfo
 ###############################################################################
 
+%if 0%{?_enable_debug_packages}
 find_debuginfo_args='--strict-build-id -g -i'
 %ifarch %{debuginfocommonarches}
 find_debuginfo_args="$find_debuginfo_args \
--- 8< ---

Expected results:
Above patch or better being applied to glibc.spec

Comment 1 Carlos O'Donell 2020-11-30 17:08:13 UTC
Thanks for the report.

We need to resolve this in Fedora first so I'm moving this to Fedora and then we can backport this into RHEL as required.

Comment 5 DJ Delorie 2020-12-16 21:25:44 UTC
I applied a slightly different, but fully tested, patch to Fedora's spec file.

Comment 7 Carlos O'Donell 2021-01-19 12:48:22 UTC
DJ fixed this with committ 2410c90637aa98f6ce116cfed5dd6ed742b6341d.


Note You need to log in before you can comment on or make changes to this bug.