mkosi: Disable unique debug source names
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 15 Jul 2024 15:15:43 +0000 (17:15 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 16 Jul 2024 13:15:14 +0000 (15:15 +0200)
commit0b9df91ce2a5cd3f3b7f36de15a10e64040ad311
treed0d67fcbda765772a4f3a081ff911c5fdfe1e77a
parent89904fc10c57b28d064f7abbde97a636000e1323
mkosi: Disable unique debug source names

We use -fdebug-prefix-map= because debugedit doesn't work for us (for
a currently unknown reason since it's the most obtuse code I've ever
had the pleasure of reading). With all the unique macros enabled, the
destination directory we pass to -fdebug-prefix-map= includes the package
release. The release is either the timestamp of the current commit or
the current time if the working tree is dirty. This means it generally
changes every time we rerun the build script. However, meson only reads
compiler arguments the first time it is invoked or if --wipe is specified.
This means that on a rerun -fdebug-prefix-map= will be configured wrong
and the build will fail.

Let's prevent this from happening by disabling the unique debug source
names by overriding the --unique-debug-src-base option that is passed to
find-debuginfo.sh by rpm via the _find_debuginfo_opts macro.

(cherry picked from commit 88221219a3290ee20de27aa030c2b23f03d8238a)
mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot
mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot