Bug 2321818

Summary: Profile script in elfutils-debuginfod-client throws error on login
Product: [Fedora] Fedora Reporter: Nathan G. Grennan <redhat-bugzilla>
Component: elfutilsAssignee: Mark Wielaard <mjw>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: amerey, fche, jakub, mcermak, me, mjw, suraj.ghimire7
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-04-29 11:54:28 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 Nathan G. Grennan 2024-10-25 18:36:47 UTC
Description of problem:
  I installed the latest updates. On logging into an account with zsh as it's shell I get the error below. I did explicitly test and don't see the error when bash is the shell.

  I would uninstall the package, but perl, python, and more are dependent on it. I suspect the ideal case would be if the shared library and the command line tool combined with the profile scripts should be broken into two separate packages. This seems like an extremely obscure feature.

  Using dnf provides I didn't even find a package that provides /etc/debuginfod/*.certpath.

Version-Release number of selected component (if applicable):
elfutils-debuginfod-client-0.192-3.fc40.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Update to elfutils-debuginfod-client-0.192-3.fc40.x86_64
2. Login to an account with zsh as the shell

Actual results:
/etc/profile.d/debuginfod.sh:14: no matches found: /etc/debuginfod/*.certpath

Expected results:
No error

Additional info:
ls /etc/debuginfod 
elfutils.urls

Comment 1 Nathan G. Grennan 2024-10-25 18:43:45 UTC
I see on a Fedora 41 system that is still on 0.191, elfutils-debuginfod-client-0.191-8.fc41.x86_64, that the if statement about certpath is missing. So it seems like it got added with 0.192.

Comment 2 Nathan G. Grennan 2024-10-26 22:31:43 UTC
I found the error message can be worked around with "sudo touch /etc/debuginfod/test.certpath".

ls -al /etc/debuginfod 
total 20
drwxr-xr-x    2 root root  4096 Oct 26 15:29 .
drwxr-xr-x. 157 root root 12288 Oct 25 11:28 ..
-rw-r--r--    1 root root    38 Oct 21 17:00 elfutils.urls
-rw-r--r--    1 root root     0 Oct 26 15:29 test.certpath

Comment 3 Nathan G. Grennan 2024-10-26 22:50:41 UTC
So with the right configure option added, like for debuginfod-urls, the file will get created during the build. The packaging is already setup with a glob, so the elfutils.certpath file gets added to the elfutils-debuginfod-client package.

Here is the needed patch for the elfutils spec file.

--- elfutils.spec	2024-10-24 00:00:00.000000000 +0000
+++ elfutils.spec.new	2024-10-26 22:47:56.698193853 +0000
@@ -325,6 +325,7 @@
 %configure CFLAGS="$RPM_OPT_FLAGS" \
 %if "%{?dist_debuginfod_url}"
 	--enable-debuginfod-urls=%{dist_debuginfod_url} \
+        --enable-debuginfod-ima-cert-path=%{_sysconfdir}/debuginfod \
 %endif
 %if %{enable_stacktrace}
 	--enable-stacktrace \

Comment 4 Nathan G. Grennan 2024-10-26 22:58:32 UTC
I used the above patch against elfutils-0.192-4.fc40.src.rpm, and it fixed my issue.

rpm -ql elfutils-debuginfod-client-0.192-4.fc40.x86_64
/etc/debuginfod/elfutils.certpath
/etc/debuginfod/elfutils.urls
/etc/profile.d/debuginfod.csh
/etc/profile.d/debuginfod.sh
/usr/bin/debuginfod-find
/usr/lib/.build-id
/usr/lib/.build-id/0e/bf0c3a810ee6e6eb07f3337a7ff956576fe6bc
/usr/lib/.build-id/78
/usr/lib/.build-id/78/af9fdfa7dd0c8fbcae1f822fc56dd445c1fb3f
/usr/lib64/libdebuginfod-0.192.so
/usr/lib64/libdebuginfod.so.1
/usr/share/fish/vendor_conf.d/debuginfod.fish
/usr/share/man/man1/debuginfod-find.1.gz
/usr/share/man/man7/debuginfod-client-config.7.gz

ls -al /etc/debuginfod 
total 24
drwxr-xr-x    2 root root  4096 Oct 26 15:55 .
drwxr-xr-x. 157 root root 12288 Oct 26 15:55 ..
-rw-r--r--    1 root root    16 Oct 23 17:00 elfutils.certpath
-rw-r--r--    1 root root    38 Oct 23 17:00 elfutils.urls

cat /etc/debuginfod/elfutils.certpath 
/etc/debuginfod

Comment 5 Nathan G. Grennan 2024-10-28 00:16:39 UTC
I am now seeing the same issue with Fedora 41 since it has been updated to elfutils-debuginfod-client-0.192-4.fc41.x86_64.

Comment 6 Fedora Update System 2024-10-29 19:55:12 UTC
FEDORA-2024-bdb7146ddc (elfutils-0.192-5.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-bdb7146ddc

Comment 7 Fedora Update System 2024-10-30 01:22:38 UTC
FEDORA-2024-bdb7146ddc has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-bdb7146ddc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-bdb7146ddc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Nathan G. Grennan 2024-10-30 21:16:57 UTC
I can confirm that elfutils-debuginfod-client-0.192-5.fc41.x86_64 fixes it.

Comment 9 Fedora Update System 2024-10-31 01:37:47 UTC
FEDORA-2024-bdb7146ddc (elfutils-0.192-5.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Aoife Moloney 2025-04-28 14:03:43 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 11 Mark Wielaard 2025-04-29 11:54:28 UTC
This was fixed in 0.192-5 also for f40 (latest is 0.192-9 also in f40).