-
Notifications
You must be signed in to change notification settings - Fork 209
fix(rpm): debuginfo support on more distributions #1006
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
base: main
Are you sure you want to change the base?
fix(rpm): debuginfo support on more distributions #1006
Conversation
2056729 to
1a89eb1
Compare
5dbe86a to
d618ca4
Compare
d618ca4 to
85bada1
Compare
cgrindel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks reasonable to me. However, there appear to be some CI failures.
This enables RPM debuginfo package generation across different Linux distributions (tested on Rocky and Ubuntu in CI) by implementing RPM version-based detection if possible, and falling back to the existing OS release-based detection otherwise. There's indeed a clear pivot in RPM versions for that matter: - RPM < 4.18 uses `buildsubdir .` (which happens to be called the "CENTOS" type in the present project), - RPM >= 4.18 is incompatible with the former: ``` rm: refusing to remove '.' or '..' directory: skipping '.' ``` It therefore uses `buildsubdir BUILD_SUB` (called the "FEDORA" type here). RedHat distros have `redhat-rpm-config` with `%_enable_debug_packages` that auto-invokes `%debug_package` (rpm-software-management/rpm#2204). Debian/Ubuntu ship vanilla upstream RPM without this configuration: ``` output 'tests/rpm/test_debuginfo_rpm-debuginfo-1-0..rpm' was not created ``` The present change therefore adds `%debug_package` only when applicable: `%{!?_enable_debug_packages:%debug_package}`. Also, since RPM 4.14, unique debug package filenames are enabled by default, leading to variadic filenames being generated: ``` Executing tests from //tests/rpm:test_golden_debuginfo_rpm_contents ----------------------------------------------------------------------------- 29c29 < /usr/lib/debug/test_debuginfo-1-0.x86_64.debug --- > /usr/lib/debug/test_debuginfo.debug FAIL: files "tests/rpm/test_debuginfo_rpm_contents.txt" and "tests/rpm/test_debuginfo_rpm_contents.txt.golden" differ ``` The change makes debug package filenames consistent across distributions by means of: `%undefine _unique_debug_names` (safe no-op on older RPM versions).
b358709 to
15c0143
Compare
cgrindel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @aiuto Would you like to take a look?
|
@kellyma2 IIRC, you're the only one who knows about rpm debug. |
This enables RPM debuginfo package generation across different Linux distributions (tested on Rocky and Ubuntu in CI) by implementing RPM version-based detection if possible, and falling back to the existing OS release-based detection otherwise.
There's indeed a clear pivot in RPM versions for that matter:
buildsubdir .(which happens to be called the "CENTOS" type in the present project),buildsubdir BUILD_SUB(called the "FEDORA" type here).RedHat distros have
redhat-rpm-configwith%_enable_debug_packagesthat auto-invokes%debug_package(rpm-software-management/rpm#2204). Debian/Ubuntu ship vanilla upstream RPM without this configuration:The present change therefore adds
%debug_packageonly when applicable:%{!?_enable_debug_packages:%debug_package}.Also, since RPM 4.14, unique debug package filenames are enabled by default, leading to variadic filenames being generated:
The change makes debug package filenames consistent across distributions by means of:
%undefine _unique_debug_names(safe no-op on older RPM versions).