From 4078289cdadb4def6ae28428ce8bf3c7907f66f1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 17 Sep 2026 02:30:10 +0900 Subject: 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 --- cmd/app/app_merged.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cmd/app/app_merged.go (limited to 'cmd/app/app_merged.go') diff --git a/cmd/app/app_merged.go b/cmd/app/app_merged.go new file mode 100644 index 00000000..e0a31f94 --- /dev/null +++ b/cmd/app/app_merged.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, "upper") +} + +// work returns the pathname of a workdir. +func (b *base) work(template string) *check.Absolute { + return b.append("template", template, "work") +} -- cgit v1.3.1