diff --git a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot index dc45e25990..ce1e162ebf 100755 --- a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot @@ -31,10 +31,6 @@ fi VERSION="$(cat meson.version)" RELEASE="$(date "+%Y%m%d%H%M%S" --date "@$TS")" -DIST="$(rpm --eval %dist)" -ARCH="$(rpm --eval %_arch)" -SRCDEST="/usr/src/debug/systemd-$VERSION-${RELEASE}${DIST}.$ARCH" - COMMON_MACRO_OVERRIDES=( --define "toolchain $( ((LLVM)) && echo clang || echo gcc)" --define "_fortify_level 0" @@ -47,7 +43,7 @@ COMMON_MACRO_OVERRIDES=( # TODO: Drop -U_FORTIFY_SOURCE when we switch to CentOS Stream 10. MKOSI_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE" if ((WITH_DEBUG)); then - MKOSI_CFLAGS="$MKOSI_CFLAGS -fdebug-prefix-map=../src=$SRCDEST" + MKOSI_CFLAGS="$MKOSI_CFLAGS -fdebug-prefix-map=../src=/usr/src/debug/systemd" fi if ((LLVM)); then # TODO: Remove -fno-sanitize-function when https://github.com/systemd/systemd/issues/29972 is fixed. @@ -105,6 +101,7 @@ CXX_LD="$( ((LLVM)) && echo lld)" \ --define "__brp_check_rpaths %{nil}" \ --define "__elf_exclude_path ^/usr/lib/systemd/tests/unit-tests/.*$" \ --define "__script_requires %{nil}" \ + --define "_find_debuginfo_opts --unique-debug-src-base \"%{name}\"" \ --define "_find_debuginfo_dwz_opts %{nil}" \ --define "_fixperms true" \ --undefine _package_note_flags \ diff --git a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot index 82e81cc9d8..95d747cd93 100755 --- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot @@ -36,13 +36,9 @@ fi VERSION="$(cat meson.version)" RELEASE="$(date "+%Y%m%d%H%M%S" --date "@$TS")" -DIST="$(rpm --eval %dist)" -ARCH="$(rpm --eval %_arch)" -SRCDEST="/usr/src/debug/systemd-$VERSION-${RELEASE}${DIST}.$ARCH" - MKOSI_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE" if ((WITH_DEBUG)); then - MKOSI_CFLAGS="$MKOSI_CFLAGS -fdebug-prefix-map=../src=$SRCDEST" + MKOSI_CFLAGS="$MKOSI_CFLAGS -fdebug-prefix-map=../src=/usr/src/debug/systemd" fi if ((LLVM)); then # TODO: Remove -fno-sanitize-function when https://github.com/systemd/systemd/issues/29972 is fixed. @@ -104,6 +100,7 @@ build() { --define "__elf_exclude_path ^/usr/lib/systemd/tests/unit-tests/.*$" \ --define "__script_requires %{nil}" \ --define "_find_debuginfo_dwz_opts %{nil}" \ + --define "_find_debuginfo_opts --unique-debug-src-base \"%{name}\"" \ --define "_fixperms true" \ --noclean \ "$@" \