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 --- hst/config.go | 5 ----- hst/hst.go | 5 ++--- hst/hst_test.go | 10 +++++++--- 3 files changed, 9 insertions(+), 11 deletions(-) (limited to 'hst') diff --git a/hst/config.go b/hst/config.go index e2f95d14..8f17de97 100644 --- a/hst/config.go +++ b/hst/config.go @@ -98,11 +98,6 @@ type ( Filesystem []FilesystemConfigJSON `json:"filesystem"` // create symlinks inside container filesystem Link []LinkConfig `json:"symlink"` - - // read-only /etc directory - Etc *container.Absolute `json:"etc,omitempty"` - // automatically set up /etc symlinks - AutoEtc bool `json:"auto_etc"` } LinkConfig struct { diff --git a/hst/hst.go b/hst/hst.go index 6654a4b7..6d0f9a2f 100644 --- a/hst/hst.go +++ b/hst/hst.go @@ -98,6 +98,7 @@ func Template() *Config { }, Filesystem: []FilesystemConfigJSON{ {&FSBind{container.AbsFHSRoot, container.AbsFHSVarLib.Append("hakurei/base/org.debian"), true, false, false, true}}, + {&FSBind{container.AbsFHSEtc, container.AbsFHSEtc, false, false, false, true}}, {&FSEphemeral{Target: container.AbsFHSTmp, Write: true, Perm: 0755}}, {&FSOverlay{ Target: container.MustAbs("/nix/store"), @@ -112,9 +113,7 @@ func Template() *Config { Target: container.MustAbs("/data/data/org.chromium.Chromium"), Write: true}}, {&FSBind{Source: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}}, }, - Link: []LinkConfig{{container.AbsFHSRunUser.Append("65534"), container.FHSRunUser + "150"}}, - Etc: container.AbsFHSEtc, - AutoEtc: true, + Link: []LinkConfig{{container.AbsFHSRunUser.Append("65534"), container.FHSRunUser + "150"}}, }, } } diff --git a/hst/hst_test.go b/hst/hst_test.go index 897bf930..553533b0 100644 --- a/hst/hst_test.go +++ b/hst/hst_test.go @@ -109,6 +109,12 @@ func TestTemplate(t *testing.T) { "write": true, "special": true }, + { + "type": "bind", + "dst": "/etc/", + "src": "/etc/", + "special": true + }, { "type": "ephemeral", "dst": "/tmp/", @@ -154,9 +160,7 @@ func TestTemplate(t *testing.T) { "target": "/run/user/65534", "linkname": "/run/user/150" } - ], - "etc": "/etc/", - "auto_etc": true + ] } }` -- cgit v1.3.1