Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder: Don't use fakeroot #107

Merged
merged 3 commits into from
Sep 16, 2024
Merged

builder: Don't use fakeroot #107

merged 3 commits into from
Sep 16, 2024

Conversation

joebonrichie
Copy link
Contributor

@joebonrichie joebonrichie commented Aug 30, 2024

We're inside of a clean rootfs container, we can just build as root, using fakeroot is unnecessary.

Depends on getsolus/ypkg#94

Closes #66

@joebonrichie joebonrichie force-pushed the drop-fakeroot branch 5 times, most recently from 9159a7d to 4764755 Compare September 8, 2024 18:57
We're inside of a clean rootfs container, we can just build as root,
using fakeroot is unnecessary.
Intended to replace ChrootExecStdin() in order to maintain more control
over how we chroot in the environment.
@ermo
Copy link
Contributor

ermo commented Sep 15, 2024

I've built a couple of packages with this (with the requisite ypkg version built and installed in my local repo).

It appears to work.

ermo
ermo previously approved these changes Sep 16, 2024
Copy link
Contributor

@ermo ermo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have yet to see this fail and it unfailingly results in a tangible speedup.

Without this PR, e.g. libgtk-4 built in 5m56s. With this PR, libgtk-4 built in 5m15s.

Approved.

Not sure what's going on with the CI linter tests though...

With ChrootShell() we can drop usage of the chroot binary, as well as
choose the initial workdir to spawn in to.

As the files are now build as root, they are owned by root so chroot
as root but start at the buildUser home directory.
Copy link
Contributor

@ermo ermo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ermo ermo merged commit e4c0a3d into master Sep 16, 2024
1 check passed
@ermo ermo deleted the drop-fakeroot branch September 16, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write our own chroot support using syscall instead of calling chroot binary
2 participants