From 0dcac55a0c3fcbb2d48028a4474ccecb37bb22fc Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 25 Aug 2025 19:13:31 +0900 Subject: hst/config: remove container etc field This no longer needs special treatment since it can be specified as a generic filesystem entry. Signed-off-by: Ophestra --- cmd/hpkg/app.go | 3 +-- cmd/hpkg/with.go | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'cmd/hpkg') diff --git a/cmd/hpkg/app.go b/cmd/hpkg/app.go index e35dbf98..cd548dc8 100644 --- a/cmd/hpkg/app.go +++ b/cmd/hpkg/app.go @@ -94,6 +94,7 @@ func (app *appInfo) toHst(pathSet *appPathSet, pathname *container.Absolute, arg Tty: app.Tty || flagDropShell, MapRealUID: app.MapRealUID, Filesystem: []hst.FilesystemConfigJSON{ + {FilesystemConfig: &hst.FSBind{Target: container.AbsFHSEtc, Source: pathSet.cacheDir.Append("etc"), Special: true}}, {FilesystemConfig: &hst.FSBind{Source: pathSet.nixPath.Append("store"), Target: pathNixStore}}, {FilesystemConfig: &hst.FSBind{Source: pathSet.metaPath, Target: hst.AbsTmp.Append("app")}}, {FilesystemConfig: &hst.FSBind{Source: container.AbsFHSEtc.Append("resolv.conf"), Optional: true}}, @@ -108,8 +109,6 @@ func (app *appInfo) toHst(pathSet *appPathSet, pathname *container.Absolute, arg {pathBin, pathSwBin.String()}, {container.AbsFHSUsrBin, pathSwBin.String()}, }, - Etc: pathSet.cacheDir.Append("etc"), - AutoEtc: true, }, ExtraPerms: []*hst.ExtraPermConfig{ {Path: dataHome, Execute: true}, diff --git a/cmd/hpkg/with.go b/cmd/hpkg/with.go index acb503d1..21adeec4 100644 --- a/cmd/hpkg/with.go +++ b/cmd/hpkg/with.go @@ -49,6 +49,7 @@ func withNixDaemon( SeccompFlags: seccomp.AllowMultiarch, Tty: dropShell, Filesystem: []hst.FilesystemConfigJSON{ + {FilesystemConfig: &hst.FSBind{Target: container.AbsFHSEtc, Source: pathSet.cacheDir.Append("etc"), Special: true}}, {FilesystemConfig: &hst.FSBind{Source: pathSet.nixPath, Target: pathNix, Write: true}}, }, Link: []hst.LinkConfig{ @@ -56,8 +57,6 @@ func withNixDaemon( {pathBin, pathSwBin.String()}, {container.AbsFHSUsrBin, pathSwBin.String()}, }, - Etc: pathSet.cacheDir.Append("etc"), - AutoEtc: true, }, }), dropShell, beforeFail) } @@ -89,6 +88,7 @@ func withCacheDir( SeccompFlags: seccomp.AllowMultiarch, Tty: dropShell, Filesystem: []hst.FilesystemConfigJSON{ + {FilesystemConfig: &hst.FSBind{Target: container.AbsFHSEtc, Source: workDir.Append(container.FHSEtc), Special: true}}, {FilesystemConfig: &hst.FSBind{Source: workDir.Append("nix"), Target: pathNix}}, {FilesystemConfig: &hst.FSBind{Source: workDir, Target: hst.AbsTmp.Append("bundle")}}, }, @@ -97,8 +97,6 @@ func withCacheDir( {pathBin, pathSwBin.String()}, {container.AbsFHSUsrBin, pathSwBin.String()}, }, - Etc: workDir.Append(container.FHSEtc), - AutoEtc: true, }, }, dropShell, beforeFail) } -- cgit v1.3.1