hst/config: remove data field, rename dir to home
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m13s
Test / Hakurei (push) Successful in 3m10s
Test / Hpkg (push) Successful in 4m5s
Test / Sandbox (race detector) (push) Successful in 4m27s
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Successful in 1m28s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m13s
Test / Hakurei (push) Successful in 3m10s
Test / Hpkg (push) Successful in 4m5s
Test / Sandbox (race detector) (push) Successful in 4m27s
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Successful in 1m28s
There is no reason to give the home directory special treatment, as this behaviour can be quite confusing. The home directory also does not necessarily require its own mount point, it could be provided by a parent or simply be ephemeral. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -42,11 +42,10 @@ type (
|
||||
Username string `json:"username,omitempty"`
|
||||
// absolute path to shell
|
||||
Shell *container.Absolute `json:"shell"`
|
||||
// absolute path to home directory in the init mount namespace
|
||||
Data *container.Absolute `json:"data"`
|
||||
// directory to enter and use as home in the container mount namespace, nil for Data
|
||||
Dir *container.Absolute `json:"dir,omitempty"`
|
||||
// extra acl ops, dispatches before container init
|
||||
// directory to enter and use as home in the container mount namespace
|
||||
Home *container.Absolute `json:"home"`
|
||||
|
||||
// extra acl ops to perform before setuid
|
||||
ExtraPerms []*ExtraPermConfig `json:"extra_perms,omitempty"`
|
||||
|
||||
// numerical application id, used for init user namespace credentials
|
||||
|
||||
@@ -65,8 +65,7 @@ func Template() *Config {
|
||||
|
||||
Username: "chronos",
|
||||
Shell: container.AbsFHSRun.Append("current-system/sw/bin/zsh"),
|
||||
Data: container.AbsFHSVarLib.Append("hakurei/u0/org.chromium.Chromium"),
|
||||
Dir: container.MustAbs("/data/data/org.chromium.Chromium"),
|
||||
Home: container.MustAbs("/data/data/org.chromium.Chromium"),
|
||||
ExtraPerms: []*ExtraPermConfig{
|
||||
{Path: container.AbsFHSVarLib.Append("hakurei/u0"), Ensure: true, Execute: true},
|
||||
{Path: container.AbsFHSVarLib.Append("hakurei/u0/org.chromium.Chromium"), Read: true, Write: true, Execute: true},
|
||||
|
||||
@@ -61,8 +61,7 @@ func TestTemplate(t *testing.T) {
|
||||
},
|
||||
"username": "chronos",
|
||||
"shell": "/run/current-system/sw/bin/zsh",
|
||||
"data": "/var/lib/hakurei/u0/org.chromium.Chromium",
|
||||
"dir": "/data/data/org.chromium.Chromium",
|
||||
"home": "/data/data/org.chromium.Chromium",
|
||||
"extra_perms": [
|
||||
{
|
||||
"ensure": true,
|
||||
|
||||
Reference in New Issue
Block a user