Skip to content

Commit

Permalink
Disable build-id links without debug packages
Browse files Browse the repository at this point in the history
This commit disables the generation of build-id links when debugging
packages are disabled. This is required because otherwise different
versions of the kernel-devel (or kernel-latest-devel) packages conflict
with each other due to symbolic links in /usr/lib/.build-id/.

Reproducing this issue is straightforward: Attempt to install
kernel-devel and kernel-latest-devel concurrently.

Here is the output from dnf in one instance, where I already had
kernel-latest-devel installed and was attempting to install
kernel-devel:

  file /usr/lib/.build-id/10/426e215ebe20c87b885515b0c3a9b3284e0a68 \
    from install of kernel-devel-1000:5.10.90-1.fc32.qubes.x86_64
    conflicts with file from package \
    kernel-latest-devel-1000:5.16.5-1.fc32.qubes.x86_64

This specific symbolic link is for
  /usr/src/kernels/5.16.5-1.fc32.qubes.x86_64/scripts/asn1_compiler
but there are about ten different symbolic links in conflict.

This issue appears to occur because debug_package is disabled, which
causes rpm to not run find-debuginfo.sh. If find-debuginfo.sh were to
run, it would have been able to re-compute the build identifiers from
scratch, and thanks to its --build-id-seed argument (see output of "rpm
--showrc"), it would have ensured a unique build identifier.

However, given that the kernel's debugging symbols are disabled in the
default Qubes OS kernel spec file, enabling debug_package would most
likely not be useful. Hence, this commit disables the generation of
build-id links for the kernel packages when debug_package is disabled.

(cherry picked from commit a4ddc54)
  • Loading branch information
m-v-b authored and marmarek committed Jun 10, 2022
1 parent 81a447f commit f610551
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

%if !%{with_debuginfo}
%global debug_package %{nil}
%define _build_id_links none
%define setup_config --disable CONFIG_DEBUG_INFO
%else
%define setup_config --enable CONFIG_DEBUG_INFO --disable CONFIG_DEBUG_INFO_REDUCED
Expand Down

0 comments on commit f610551

Please sign in to comment.