summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f507be0..54658af 100644
--- a/Makefile
+++ b/Makefile
@@ -174,6 +174,14 @@ get_loop_dev="$$(sudo losetup -n -O name -j $@~tmp)"
174get_backing_file="$$(sudo losetup -n -O back-file -j $@~tmp)" 174get_backing_file="$$(sudo losetup -n -O back-file -j $@~tmp)"
175get_min_size="$$(btrfs inspect-internal min-dev-size --id 1 $@.mnt | (read b _; echo $$b))" 175get_min_size="$$(btrfs inspect-internal min-dev-size --id 1 $@.mnt | (read b _; echo $$b))"
176 176
177%.btrfs.verity: %.btrfs
178 sudo veritysetup format $< $@ > $@.log
179 sudo chmod 644 $@
180 h=$$(sed -ne 's/^Root hash:[ \t]*//p' $@.log) && [ "$$h" ]
181
182%.btrfs.verity.log.asc: %.btrfs.verity.log
183 sudo gpg --armor --detach-sign $^
184
177rootfs/samizdat.seed.btrfs: rootfs/samizdat.btrfs 185rootfs/samizdat.seed.btrfs: rootfs/samizdat.btrfs
178ifneq ($(shell id -u),0) 186ifneq ($(shell id -u),0)
179 $(SUDO_MAKE) $@ 187 $(SUDO_MAKE) $@
@@ -282,7 +290,8 @@ gold.iso: rootfs/seed.iso reused-child
282 --protective-msdos-label 290 --protective-msdos-label
283 mv $@~tmp $@ 291 mv $@~tmp $@
284 292
285rootfs/seed.iso: rootfs/samizdat.seed.btrfs 293rootfs/seed.iso: $(addprefix rootfs/samizdat.seed.btrf, s \
294 $(if $(VERITY), s.verity s.verity.log $(if $(VERITY_SIGN), s.verity.log.asc)))
286 rm -f $@~tmp 295 rm -f $@~tmp
287 touch $@~tmp 296 touch $@~tmp
288 fallocate -n -l 10G $@~tmp 297 fallocate -n -l 10G $@~tmp
@@ -293,7 +302,7 @@ rootfs/seed.iso: rootfs/samizdat.seed.btrfs
293 -volid SamizdatLive \ 302 -volid SamizdatLive \
294 -pathspecs on \ 303 -pathspecs on \
295 -follow link \ 304 -follow link \
296 -add /rootfs/samizdat.btrfs=$< -- \ 305 -add $^ -- \
297 -follow default 306 -follow default
298 mv $@~tmp $@ 307 mv $@~tmp $@
299 308