diff --git a/.gitignore b/.gitignore index 8c4331e54f..aa20b80602 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.log *.o *.plist +*.py[co] *.stamp *.swp *.trs @@ -39,6 +40,8 @@ /exported-* /hostnamectl /image.raw +/image.raw.cache-pre-dev +/image.raw.cache-pre-inst /install-tree /journalctl /libtool @@ -46,6 +49,8 @@ /localectl /loginctl /machinectl +/mkosi.builddir/ +/mkosi.cache/ /mtd_probe /networkctl /scsi_id @@ -182,7 +187,6 @@ /test-daemon /test-date /test-device-nodes -/test-dnssec-complex /test-dhcp-client /test-dhcp-option /test-dhcp-server @@ -191,6 +195,7 @@ /test-dns-domain /test-dns-packet /test-dnssec +/test-dnssec-complex /test-efi-disk.img /test-ellipsize /test-engine @@ -252,9 +257,9 @@ /test-ndisc-rs /test-netlink /test-netlink-manual -/test-networkd-conf /test-network /test-network-tables +/test-networkd-conf /test-ns /test-nss /test-parse-util @@ -280,10 +285,10 @@ /test-seccomp /test-selinux /test-set -/test-sizeof /test-sigbus /test-signal-util /test-siphash24 +/test-sizeof /test-sleep /test-socket-util /test-stat-util @@ -316,7 +321,6 @@ /v4l_id Makefile.in __pycache__/ -*.py[co] aclocal.m4 config.h config.h.in diff --git a/mkosi.build b/mkosi.build index 2231118da5..a36460c6f5 100755 --- a/mkosi.build +++ b/mkosi.build @@ -20,15 +20,19 @@ # This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi). # Simply invoke "mkosi" in the project directory to build an OS image. +# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it +# as out-of-tree build dir. Otherwise, let's make up our own builddir. +[ -z "$BUILDDIR" ] && BUILDDIR=build + export LC_CTYPE=C.UTF-8 -meson build -ninja -C build all -ninja -C build test -ninja -C build install +test -f "$BUILDDIR"/build.ninja || meson "$BUILDDIR" +ninja -C "$BUILDDIR" all +ninja -C "$BUILDDIR" test +ninja -C "$BUILDDIR" install -mkdir -p $DESTDIR/etc +mkdir -p "$DESTDIR"/etc -cat > $DESTDIR/etc/issue < "$DESTDIR"/etc/issue <