aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/app/app_sep.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-09-17 02:30:10 +0900
committerOphestra <cat@gensokyo.uk>2026-09-17 02:30:10 +0900
commit4078289cdadb4def6ae28428ce8bf3c7907f66f1 (patch)
treefd7c9dd9192cc4bb9aeb94c1efb7411687535231 /cmd/app/app_sep.go
parent3fbdf138bb7ce07319d2c9e3d89b3a3892e139d2 (diff)
cmd/app: alternative merged template layout
This implements an optional, alternative template layout to accommodate ZFS and equivalent setups where each template occupies a different filesystem. In such a setup, the default, separate workdir is unusable as overlayfs requires the workdir to reside on the same filesystem as the writable upperdir. The "merge" build tag enables this alternative behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/app/app_sep.go')
-rw-r--r--cmd/app/app_sep.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/app/app_sep.go b/cmd/app/app_sep.go
new file mode 100644
index 00000000..9ec98e41
--- /dev/null
+++ b/cmd/app/app_sep.go
@@ -0,0 +1,15 @@
+//go:build !merge
+
+package main
+
+import "hakurei.app/check"
+
+// template returns the pathname of an upperdir.
+func (b *base) template(template string) *check.Absolute {
+ return b.append("template", template)
+}
+
+// work returns the pathname of a workdir.
+func (b *base) work(template string) *check.Absolute {
+ return b.append("work", template)
+}