From 07accc3f94e74361f884f2c29556c9104f9da332 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 26 Jun 2019 15:47:04 -0400 Subject: Add makefile target "user-account" The target creates a user account and ensures its home directory is on a btrfs filesystem (creating one if necessary). Btrfs is necessary for fsmgr; it relies on "cp --reflink" --- Makefile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 22993e0..8377a69 100644 --- a/Makefile +++ b/Makefile @@ -48,16 +48,31 @@ else ln -sf /var/cache/kiki/config/tor/hostname ${instdir}/etc/hostname endif +include user.mk + .PHONY: rootfs rootfs: - make -C fsmgr - make -C fsmgr install - make -C rootfs + : git submodule update + $(MAKE) -C fsmgr + $(MAKE) -C fsmgr install + $(MAKE) -C rootfs sudo ln -sf "$$PWD"/rootfs/samizdat.btrfs /srv/nbd/samizdat.btrfs boot: rootfs sudo qemu.sh +reuse_child := $(shell 2>/dev/null read child < reused-child && echo --reuse_child=$$child; true) + +isotest: install + initrd.sh + xorriso-usb.sh $(reuse_child) --bootloader --out samizdat.iso + USE_ISO=y SLOW_BOOT=y qemu.sh + +isotest-nonet: install + initrd.sh + xorriso-usb.sh $(reuse_child) --out samizdat-nonet.iso + USE_ISO=y SLOW_BOOT=y NO_NET=y qemu.sh samizdat-nonet.iso + install: ${bin_programs} samizdat-paths.sh ${compiled_programs} install -p ${bin_programs} ${instdir}${samizdat_bindir} mkdir -p ${instdir}${samizdat_initrd_files_dir} -- cgit v1.2.3