Commit 54dadc3
committed
fix(build): suppress debuginfo extraction in RPM spec files
The Linuxfabrik monitoring plugins RPM used to fail to install on
hosts that already had another RPM which shipped ELF binaries
built against the same upstream source - azure-cli being the
reported case, with the error
Error: Transaction test error:
file /usr/lib/.build-id/83/402b2ade... from install of
linuxfabrik-monitoring-plugins conflicts with file from
package azure-cli
Root cause: the spec files never set `%global debug_package
%{nil}`, so rpmbuild's default debuginfo extraction kicked in,
walked every `.so` in the bundled Python venv and installed a
`/usr/lib/.build-id/XX/YY...` symlink for each one into the
*main* package. The build-id hash is derived from the ELF file's
content, and two independent RPMs can legitimately produce the
same hash for the same upstream library - at which point dnf
refuses the install with a file conflict.
Fix: add `%global debug_package %{nil}` at the top of both the
EL and SLE spec files. This disables the automatic debuginfo
package generation, so no build-id symlinks are produced and the
main package only contains the plugin scripts, the sudoers file
and the venv. We don't ship a `-debuginfo` subpackage anyway, so
there is nothing else lost by this change.
Closes #9791 parent 7ae4cab commit 54dadc3
3 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| |||
0 commit comments