summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGordon GECOS <u@adam>2020-10-30 09:29:56 -0400
committerGordon GECOS <u@adam>2020-10-30 09:33:58 -0400
commitf86c499a64a7a8808b7e249babf2f2cfda4cb498 (patch)
tree418317459e9b642b1749cf3ff6f1680c1dac1da7 /Makefile
parent0dd716651c9edf7e860f3aa7cd33039db842a17d (diff)
use samizdat.seed.btrfs as image name
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 4 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index d0dd637..b6a1188 100644
--- a/Makefile
+++ b/Makefile
@@ -140,8 +140,8 @@ update-submodules:
140install-submodules: cmd=install 140install-submodules: cmd=install
141install-submodules: update-submodules $(INSTALL_SUBMODULES) 141install-submodules: update-submodules $(INSTALL_SUBMODULES)
142 142
143rootfs = samizdat.btrfs 143rootfs = samizdat.seed.btrfs
144patchfs = $(patsubst %.btrfs,%.patch.btrfs,$(rootfs)) 144patchfs = $(patsubst %.seed.btrfs,%.patch.btrfs,$(rootfs))
145rootfs_verity = rootfs/$(rootfs).verity 145rootfs_verity = rootfs/$(rootfs).verity
146 146
147.PHONY: rootfs rootfs-deps 147.PHONY: rootfs rootfs-deps
@@ -216,7 +216,6 @@ get_min_size="$$(btrfs inspect-internal min-dev-size --id 1 $@.mnt | (read b _;
216 mv $@~tmp $@ 216 mv $@~tmp $@
217 sudo chmod 644 $@ 217 sudo chmod 644 $@
218 218
219
220root_hash = $(shell sed -ne 's/^Root hash: *//p' < $<.log) 219root_hash = $(shell sed -ne 's/^Root hash: *//p' < $<.log)
221 220
222veritymount: rootfs/samizdat.seed.btrfs.verity.sh 221veritymount: rootfs/samizdat.seed.btrfs.verity.sh
@@ -228,22 +227,8 @@ veritymount: rootfs/samizdat.seed.btrfs.verity.sh
228%.verity.log.asc: %.verity.log 227%.verity.log.asc: %.verity.log
229 sudo gpg --armor --detach-sign $^ 228 sudo gpg --armor --detach-sign $^
230 229
231rootfs/samizdat.seed.btrfs: rootfs/samizdat.btrfs 230rootfs/%.btrfs:
232ifneq ($(shell id -u),0) 231 $(SUDO_MAKE) -C rootfs $(notdir $@)
233 $(SUDO_MAKE) $@
234else
235 @while umount $$PWD/$@~tmp; do continue; done
236 cp --reflink $< $@~tmp
237 btrfstune -f -S0 $@~tmp
238 test -d $@.mnt || mkdir $@.mnt
239 mount -t btrfs -o rw $@~tmp $@.mnt
240 #bash -c "time btrfs fi defrag -c -r $@.mnt"
241 s=$(get_min_size) && (set -x; btrfs fi resize 1:$$s $@.mnt && truncate -s "$$s" $@~tmp)
242 umount $@.mnt
243 losetup -f $<
244 btrfstune -S1 $@~tmp
245 mv $@~tmp $@
246endif
247 232
248debian_dist := $(shell lsb_release -cs) 233debian_dist := $(shell lsb_release -cs)
249 234