Compare commits
3 Commits
96f7504403
...
292715b0f6
Author | SHA1 | Date | |
---|---|---|---|
292715b0f6 | |||
b66cfd9a63 | |||
4e8f72022d |
@ -65,7 +65,6 @@ 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,
|
||||||
|
@ -17,7 +17,6 @@ func withNixDaemon(
|
|||||||
) {
|
) {
|
||||||
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 / & " +
|
||||||
@ -65,7 +64,6 @@ 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,15 +301,7 @@ 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