diff --git a/builder/build.go b/builder/build.go index e534dee..1f3f3be 100644 --- a/builder/build.go +++ b/builder/build.go @@ -338,7 +338,7 @@ func (p *Package) BuildYpkg(notif PidNotifier, usr *UserInfo, pman *EopkgManager } // need to properly quote the innner -c 'command' syntax - suCmd := fmt.Sprintf("strace /bin/su %s --command='%s'", BuildUser, buildCmd) + //suCmd := fmt.Sprintf("strace /bin/su %s --command='%s'", BuildUser, buildCmd) if p.CanCCache { // Start an sccache server to work around #87 @@ -352,9 +352,9 @@ func (p *Package) BuildYpkg(notif PidNotifier, usr *UserInfo, pman *EopkgManager } slog.Info("Now starting build", "package", p.Name) - slog.Info("Build", "command", suCmd) + slog.Info("Build", "command", buildCmd) - if err := RootlesskitExec(notif, overlay.MountPoint, suCmd); err != nil { + if err := RootlesskitExec(notif, overlay.MountPoint, buildCmd); err != nil { return fmt.Errorf("Failed to start build of package, reason: %w\n", err) } diff --git a/builder/util.go b/builder/util.go index d869c0f..a6404b0 100644 --- a/builder/util.go +++ b/builder/util.go @@ -212,7 +212,8 @@ func ChrootExec(notif PidNotifier, dir, command string) error { // using the 'solbuild' user (expected to exist a priori and have /etc/sub{g,u}id files), // such that we can store the PID for long running tasks. func RootlesskitExec(notif PidNotifier, dir, command string) error { - rootlesskitCmd := fmt.Sprintf("-c rootlesskit chroot %s %s", dir, command) + rootlesskitCmd := fmt.Sprintf( + "-c rootlesskit --copy-up=/var/cache/eopkg/archives chroot %s %s", dir, command) args := []string{"solbuild", rootlesskitCmd} c := exec.Command("/bin/su", args...) c.Stdout = os.Stdout