Skip to content

Commit

Permalink
builder: Don't use fakeroot
Browse files Browse the repository at this point in the history
We're inside of a clean rootfs container, we can just build as root,
using fakeroot is unneccessary.
  • Loading branch information
joebonrichie committed Aug 30, 2024
1 parent c5da1d1 commit 4db3d5f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,7 @@ func (p *Package) GetSourceDir(o *Overlay) string {
// GetSourceDirInternal will return the chroot-internal source directory
// for the given build type.
func (p *Package) GetSourceDirInternal() string {
if p.Type == PackageTypeXML {
return "/var/cache/eopkg/archives"
}

return filepath.Join(BuildUserHome, "YPKG", "sources")
return "/var/cache/eopkg/archives"
}

// CopyAssets will copy all of the required assets into the builder root.
Expand Down Expand Up @@ -326,7 +322,7 @@ func (p *Package) BuildYpkg(notif PidNotifier, usr *UserInfo, pman *EopkgManager
ymlFile := filepath.Join(wdir, filepath.Base(p.Path))

// Now build the package
cmd := fmt.Sprintf("/bin/su %s -- fakeroot ypkg-build -D %s %s", BuildUser, wdir, ymlFile)
cmd := fmt.Sprintf("ypkg-build -D %s %s", wdir, ymlFile)
if DisableColors {
cmd += " -n"
}
Expand Down Expand Up @@ -408,7 +404,7 @@ func (p *Package) BuildXML(notif PidNotifier, pman *EopkgManager, overlay *Overl
func (p *Package) GenerateABIReport(notif PidNotifier, overlay *Overlay) error {
wdir := p.GetWorkDirInternal()

cmd := fmt.Sprintf("cd %s; abi-wizard %s/YPKG/root/%s/install", wdir, BuildUserHome, p.Name)
cmd := fmt.Sprintf("cd %s; abi-wizard /var/ypkg-root/root/%s/install", wdir, p.Name)
if err := ChrootExec(notif, overlay.MountPoint, cmd); err != nil {
slog.Warn("Failed to generate abi report", "reason", err)
return nil
Expand Down

0 comments on commit 4db3d5f

Please sign in to comment.