Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression on build-id generation from compressed ELF files #3463

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

pmatilai
Copy link
Member

Another cmake fallout - we even have the define in config.h.in but the actual test was missing, causing us to never use the compression aware dwelf_elf_begin() version.

The only reproducer I'm aware of is a kernel module, and we don't want to pull in the huge kernel-devel to the test CI for this. Manually verified that cmake looks for and finds it:

-- Looking for dwelf_elf_begin in dw
-- Looking for dwelf_elf_begin in dw - found

And building kernel module, before:

$ rpm -qpl /home/pmatilai/rpmbuild/RPMS/x86_64/kmod-lkm_example-1.0-1.x86_64.rpm /lib/modules/6.11.8-300.fc41.x86_64/lkm_example/lkm_example.ko.xz

After:

$ rpm -qpl /home/pmatilai/rpmbuild/RPMS/x86_64/kmod-lkm_example-1.0-1.x86_64.rpm /lib/modules/6.11.8-300.fc41.x86_64/lkm_example/lkm_example.ko.xz /usr/lib/.build-id
/usr/lib/.build-id/db
/usr/lib/.build-id/db/f83477ef46b0e51abd5cc1b9382be1330083c4

Fixes: RHEL-54000

Another cmake fallout - we even have the define in config.h.in but the
actual test was missing, causing us to never use the compression aware
dwelf_elf_begin() version.

The only reproducer I'm aware of is a kernel module, and we don't want
to pull in the huge kernel-devel to the test CI for this. Manually
verified that cmake looks for and finds it:

	-- Looking for dwelf_elf_begin in dw
	-- Looking for dwelf_elf_begin in dw - found

And building kernel module, before:

$ rpm -qpl /home/pmatilai/rpmbuild/RPMS/x86_64/kmod-lkm_example-1.0-1.x86_64.rpm
/lib/modules/6.11.8-300.fc41.x86_64/lkm_example/lkm_example.ko.xz

After:

$ rpm -qpl /home/pmatilai/rpmbuild/RPMS/x86_64/kmod-lkm_example-1.0-1.x86_64.rpm
/lib/modules/6.11.8-300.fc41.x86_64/lkm_example/lkm_example.ko.xz
/usr/lib/.build-id
/usr/lib/.build-id/db
/usr/lib/.build-id/db/f83477ef46b0e51abd5cc1b9382be1330083c4

Fixes: RHEL-54000
@pmatilai pmatilai requested a review from a team as a code owner November 22, 2024 07:58
@pmatilai pmatilai requested review from dmnks and removed request for a team November 22, 2024 07:58
@dmnks
Copy link
Contributor

dmnks commented Nov 22, 2024

Yay, nice find (and one-liner)!

@dmnks dmnks merged commit fe9a914 into rpm-software-management:master Nov 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants