Compare commits
3 Commits
292715b0f6
...
96f7504403
Author | SHA1 | Date | |
---|---|---|---|
96f7504403 | |||
b058268fac | |||
28260caaa5 |
@ -65,6 +65,7 @@ type appInfo struct {
|
|||||||
func (app *appInfo) toFst(pathSet *appPathSet, argv []string, flagDropShell bool) *fst.Config {
|
func (app *appInfo) toFst(pathSet *appPathSet, argv []string, flagDropShell bool) *fst.Config {
|
||||||
config := &fst.Config{
|
config := &fst.Config{
|
||||||
ID: app.ID,
|
ID: app.ID,
|
||||||
|
Path: argv[0],
|
||||||
Args: argv,
|
Args: argv,
|
||||||
Confinement: fst.ConfinementConfig{
|
Confinement: fst.ConfinementConfig{
|
||||||
AppID: app.AppID,
|
AppID: app.AppID,
|
||||||
|
@ -16,7 +16,8 @@ func withNixDaemon(
|
|||||||
app *appInfo, pathSet *appPathSet, dropShell bool, beforeFail func(),
|
app *appInfo, pathSet *appPathSet, dropShell bool, beforeFail func(),
|
||||||
) {
|
) {
|
||||||
mustRunAppDropShell(ctx, updateConfig(&fst.Config{
|
mustRunAppDropShell(ctx, updateConfig(&fst.Config{
|
||||||
ID: app.ID,
|
ID: app.ID,
|
||||||
|
Path: shellPath,
|
||||||
Args: []string{shellPath, "-lc", "rm -f /nix/var/nix/daemon-socket/socket && " +
|
Args: []string{shellPath, "-lc", "rm -f /nix/var/nix/daemon-socket/socket && " +
|
||||||
// start nix-daemon
|
// start nix-daemon
|
||||||
"nix-daemon --store / & " +
|
"nix-daemon --store / & " +
|
||||||
@ -64,6 +65,7 @@ func withCacheDir(
|
|||||||
app *appInfo, pathSet *appPathSet, dropShell bool, beforeFail func()) {
|
app *appInfo, pathSet *appPathSet, dropShell bool, beforeFail func()) {
|
||||||
mustRunAppDropShell(ctx, &fst.Config{
|
mustRunAppDropShell(ctx, &fst.Config{
|
||||||
ID: app.ID,
|
ID: app.ID,
|
||||||
|
Path: shellPath,
|
||||||
Args: []string{shellPath, "-lc", strings.Join(command, " && ")},
|
Args: []string{shellPath, "-lc", strings.Join(command, " && ")},
|
||||||
Confinement: fst.ConfinementConfig{
|
Confinement: fst.ConfinementConfig{
|
||||||
AppID: app.AppID,
|
AppID: app.AppID,
|
||||||
|
@ -301,7 +301,15 @@ func (l *Symlink) apply(*Params) error {
|
|||||||
return msg.WrapErr(syscall.EBADE,
|
return msg.WrapErr(syscall.EBADE,
|
||||||
fmt.Sprintf("path %q is not absolute", l[1]))
|
fmt.Sprintf("path %q is not absolute", l[1]))
|
||||||
}
|
}
|
||||||
if err := os.Symlink(l[0], toSysroot(l[1])); err != nil {
|
|
||||||
|
target := toSysroot(l[1])
|
||||||
|
if err := ensureFile(target, 0444, 0755); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := os.Remove(target); err != nil {
|
||||||
|
return msg.WrapErr(err, err.Error())
|
||||||
|
}
|
||||||
|
if err := os.Symlink(l[0], target); err != nil {
|
||||||
return msg.WrapErr(err, err.Error())
|
return msg.WrapErr(err, err.Error())
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user