diff --git a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot index 33a64cb1d5..7df218823e 100755 --- a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot +++ b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if ((NO_BUILD)); then + exit 0 +fi + # shellcheck source=/dev/null . /usr/lib/os-release diff --git a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot index 498c52e011..a8e4e7e90f 100755 --- a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot +++ b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if ((NO_BUILD)); then + exit 0 +fi + # shellcheck source=/dev/null . /usr/lib/os-release diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot index 52a23a53b5..2015a4b46c 100755 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot +++ b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if ((NO_BUILD)); then + exit 0 +fi + # shellcheck source=/dev/null . /usr/lib/os-release diff --git a/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot index 83b5a7e666..2fe3d9464c 100755 --- a/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot +++ b/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if ((NO_BUILD)); then + exit 0 +fi + # shellcheck source=/dev/null . /usr/lib/os-release ID="${ID%-*}" diff --git a/mkosi.images/system/mkosi.extra/usr/lib/systemd/coredump.conf b/mkosi.images/system/mkosi.extra/usr/lib/systemd/coredump.conf new file mode 100644 index 0000000000..cde9785d28 --- /dev/null +++ b/mkosi.images/system/mkosi.extra/usr/lib/systemd/coredump.conf @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Coredump] +Storage=journal diff --git a/mkosi.images/system/mkosi.extra/usr/lib/systemd/system/user@.service.d/99-SYSTEMD_UNIT_PATH.conf b/mkosi.images/system/mkosi.extra/usr/lib/systemd/system/user@.service.d/99-SYSTEMD_UNIT_PATH.conf index fa634935cb..d0093b7e24 100644 --- a/mkosi.images/system/mkosi.extra/usr/lib/systemd/system/user@.service.d/99-SYSTEMD_UNIT_PATH.conf +++ b/mkosi.images/system/mkosi.extra/usr/lib/systemd/system/user@.service.d/99-SYSTEMD_UNIT_PATH.conf @@ -1,2 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + [Service] PassEnvironment=SYSTEMD_UNIT_PATH diff --git a/mkosi.images/system/mkosi.postinst.chroot b/mkosi.images/system/mkosi.postinst.chroot index 5683d5ca53..de333f364b 100755 --- a/mkosi.images/system/mkosi.postinst.chroot +++ b/mkosi.images/system/mkosi.postinst.chroot @@ -38,7 +38,7 @@ TTYVHangup=no CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG EOF # ASAN and syscall filters aren't compatible with each other. - find / -name '*.service' -type f -exec sed -i 's/^\(MemoryDeny\|SystemCall\)/# \1/' {} + + find /usr /etc -name '*.service' -type f -exec sed -i 's/^\(MemoryDeny\|SystemCall\)/# \1/' {} + # `systemd-hwdb update` takes > 50s when built with sanitizers so let's not run it by default. systemctl mask systemd-hwdb-update.service