From b5cd4af4570661b4009a3949cf626e3389bf2c9a Mon Sep 17 00:00:00 2001 From: mustard Date: Mon, 20 Oct 2025 17:09:44 +0200 Subject: [PATCH] debug: bundle --- Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0b171ef..34bca4a 100644 --- a/Makefile +++ b/Makefile @@ -18,13 +18,20 @@ check-dom0 = $(error this target must be run in dom0) check-domu = @true endif -BUNDLEOUT := .bundles/dom0.bundle -BUNDLEIN := .bundles/domu.bundle +BUNDLEIN := .bundles/qubes-mgmt-salt clean-workdir = git init -q -b $* && git diff --quiet && git diff --cached --quiet || (echo 'dirty tree; check git status' && false) -create-bundle = git show-ref --verify --quiet refs/remotes/$(1)/$* \ - || git bundle create $(BUNDLEOUT) $(1)/$* +.PHONY: guard-domu +guard-domu: + @ if [ "`hostname`" != "`qubesdb-read /name`" ]; then \ + echo "This task must be run in a guest domain"; \ + exit 1; \ + fi + +create-bundle: guard-domu + mkdir -p .bundles + git bundle create - --all > .bundles/qubes-mgmt-salt .PHONY: pull pull/% pull: pull/$(shell git branch --show-current) @@ -35,9 +42,9 @@ pull/%: $(clean-workdir) echo "creating bundle" - qvm-run -p $(GUEST) "cd $(GUEST_REPO) && $(call create-bundle,dom0)" $(BUNDLEIN) + qvm-run -p $(GUEST) "cat $(GUEST_REPO)/qubes-mgmt-salt" $(BUNDLEIN) git remote add $(GUEST) $(BUNDLEIN) || true