Alias for module-rtkit causes rpmbuild to fail on Fedora 35 in check-rpaths
The recent commit modules: Provide an alias for module-rtkit causes rpmbuild on Fedora 35 to fail (in for example pipewire-nightly-copr).
- PipeWire version: 0.3.43 (master)
- Distribution: Fedora 35
- Environment: COPR
Description of Problem
The build fails in check-rpaths with:
ERROR 0002: file '/usr/lib64/pipewire-0.3/libpipewire-module-rtkit.so' contains an invalid 'XXXX' in [$ORIGIN/../pipewire:XXXX]
Background:
Fedora 35 introduced a change Broken RPATH will fail rpmbuild that enables broken RPATH detection.
One category appears to be
an RPATH references .. of an absolute path; this will break the functionality when the path before .. is a symlink
which may be the problem in the alias for module-rtkit. The meson.build
in src/modules
has a custom target that issues a command ['ln', '-sf', fs.name(pipewire_module_rt.full_path()), '@OUTPUT@'],
and I am guessing that is being detected in the check-rpaths
script.
As attempt to temporarily work around the rpmbuild failure I added %global __brp_check_rpaths %{nil}
on top of the rpm SPEC, but that stops all rpaths being checked so is not a real solution. Once the RPM is built, on install I do not see a symbolic link in /usr/lib64
and reading the RPATH shows a bad value, eg.:
readelf -d /usr/lib64/pipewire-0.3/libpipewire-module-rtkit.so | grep 'R.*PATH'
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../pipewire:XXXX]
Is it possible, perhaps, instead of using a symbolic link rather copy the libpipewire-module-rt.so
to libpipewire-module-rtkit.so
so the file has a good RPATH?