Bug 2216434

Summary: pcs: Will start to FTBFS after bug 2166383
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: pcsAssignee: Michal Pospisil <mpospisi>
Status: ON_QA --- QA Contact: cluster-qe <cluster-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 9.3CC: cluster-maint, idevat, mjw, mlisik, mmazoure, mpospisi, nhostako, omular, tojeline
Target Milestone: rcKeywords: Triaged
Target Release: 9.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.11.6-2.el9 Doc Type: No Doc Update
Doc Text:
This has no effect on the resulting rpm package (other than the fact it's actually possible to build it).
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 2166383    

Description Florian Weimer 2023-06-21 10:46:51 UTC
The failure looks like this:

+ /usr/lib/rpm/find-debuginfo.sh -j2 -m -i -S debugsourcefiles.list
/var/tmp/rpm-tmp.tqsMgC: line 83: /usr/lib/rpm/find-debuginfo.sh: No such file or directory

Currently, bug 2166383 does not add the %__find_debuginfo macro, so the fix won't be able to match the what may have been done in Fedora.

(A more general comment: If debuginfo generation is broken for this package, we should fix that properly, and not by running find-debuginfo manually.)

Comment 1 Michal Pospisil 2023-06-21 15:10:36 UTC
We are aware of this issue because we already saw it in Fedora. However, we thought that this change would only appear in RHEL10. The plan is to BuildRequire the debugedit package and invoke the find-debuginfo script from %{_bindir}/find-debuginfo (or just by calling find-debuginfo).

DebugInfo generation is not broken. We do not have a DebugInfo package since pcs is written in Python/Ruby. However, we bundle some rubygems that have C extensions for which we generate MiniDebugInfo with find-debuginfo.sh. The fix in Fedora for this issue was to replace (and stop bundling) the last unpackaged rubygems. Calling the find-debuginfo script is not necessary in Fedora anymore. That is not the situation in RHEL because no rubygems that we use are packaged there. We still need to call find-debuginfo to generate MiniDebugInfo for those C extensions of our bundled rubygems.

Since we do not plan on making another package for RHEL 9.3 and this is a build-time issue, this will be fixed in 9.4. But if we have to do another build for 9.3, the fix will be included there of course.

Comment 3 Michal Pospisil 2023-07-12 16:16:04 UTC
Call to `/usr/lib/rpm/find-debuginfo.sh` was changed to `find-debuginfo` along with adding `BuildRequires: debugedit`. Mock build and scratch build both pass with find-debuginfo from debugedit. From the build.log:

BEFORE:
+ /usr/lib/rpm/find-debuginfo.sh -j2 -m -i -S debugsourcefiles.list
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcs/pcs_bundled/packages/tornado/speedups.abi3.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/ffi-1.15.5/ffi_c.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/nio4r-2.5.9/nio4r_ext.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/puma-6.3.0/puma/puma_http11.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/ffi-1.15.5/ext/ffi_c/ffi_c.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/nio4r-2.5.9/ext/nio4r/nio4r_ext.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-1.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/puma-6.3.0/ext/puma_http11/puma_http11.so

AFTER:
+ find-debuginfo -j2 -m -i -S debugsourcefiles.list
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcs/pcs_bundled/packages/tornado/speedups.abi3.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/ffi-1.15.5/ffi_c.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/nio4r-2.5.9/nio4r_ext.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/puma-6.3.0/puma/puma_http11.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/ffi-1.15.5/ext/ffi_c/ffi_c.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/nio4r-2.5.9/ext/nio4r/nio4r_ext.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/puma-6.3.0/ext/puma_http11/puma_http11.so

Comment 4 Michal Pospisil 2023-07-14 09:57:39 UTC
DevTestResults:

The build passed: https://kojihub.stream.centos.org/koji/taskinfo?taskID=2481924. From the build.log:

+ find-debuginfo -j2 -m -i -S debugsourcefiles.list
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcs/pcs_bundled/packages/tornado/speedups.abi3.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/ffi-1.15.5/ffi_c.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/nio4r-2.5.9/nio4r_ext.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/extensions/x86_64-linux/3.0.0/puma-6.3.0/puma/puma_http11.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/ffi-1.15.5/ext/ffi_c/ffi_c.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/nio4r-2.5.9/ext/nio4r/nio4r_ext.so
extracting debug info from /builddir/build/BUILDROOT/pcs-0.11.6-2.el9.x86_64/usr/lib64/pcsd/vendor/bundle/gems/puma-6.3.0/ext/puma_http11/puma_http11.so

Comment 6 Michal Pospisil 2023-07-19 14:30:03 UTC
(In reply to Michal Pospisil from comment #3)
> Call to `/usr/lib/rpm/find-debuginfo.sh` was changed to `find-debuginfo`
> along with adding `BuildRequires: debugedit`. Mock build and scratch build
> both pass with find-debuginfo from debugedit.

For verification purposes, this is the aforementioned fix that can be spotted in pcs.spec upon extracting the pcs srpm: https://gitlab.com/redhat/centos-stream/rpms/pcs/-/commit/a8b1b4c1d87e71cfaed3b04075b503678f67f548#40a712d386be33f54f38783a3533ad4fb9bfdfa9_386_392