Compare commits

..

2 Commits

Author SHA1 Message Date
bafaf3d31d
cmd/fpkg: app bundle helper
All checks were successful
Tests / Go tests (push) Successful in 34s
Nix / NixOS tests (push) Successful in 3m29s
This helper program creates fortify configuration for running an application bundle. The activate action wraps a home-manager activation package and ensures each generation gets activated once.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-28 14:17:01 +09:00
06b3d19829
internal: include path to fortify main program
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-26 12:48:48 +09:00
3 changed files with 0 additions and 18 deletions

View File

@ -13,8 +13,6 @@ type Payload struct {
Exec [2]string Exec [2]string
// bwrap config // bwrap config
Bwrap *bwrap.Config Bwrap *bwrap.Config
// path to outer home directory
Home string
// sync fd // sync fd
Sync *uintptr Sync *uintptr

View File

@ -81,21 +81,6 @@ func main() {
// not fatal // not fatal
} }
// ensure home directory as target user
if s, err := os.Stat(payload.Home); err != nil {
if os.IsNotExist(err) {
if err = os.Mkdir(payload.Home, 0700); err != nil {
fmsg.Fatalf("cannot create home directory: %v", err)
}
} else {
fmsg.Fatalf("cannot access home directory: %v", err)
}
// home directory is created, proceed
} else if !s.IsDir() {
fmsg.Fatalf("data path %q is not a directory", payload.Home)
}
var ic init0.Payload var ic init0.Payload
// resolve argv0 // resolve argv0

View File

@ -49,7 +49,6 @@ func (a *app) Start() error {
Argv: a.seal.command, Argv: a.seal.command,
Exec: shimExec, Exec: shimExec,
Bwrap: a.seal.sys.bwrap, Bwrap: a.seal.sys.bwrap,
Home: a.seal.sys.user.data,
Verbose: fmsg.Verbose(), Verbose: fmsg.Verbose(),
}, },