From: Michael Tremer <michael.tremer@ipfire.org>
To: "IPFire: Development-List" <development@lists.ipfire.org>
Subject: Building IPFire without root
Date: Sat, 28 Nov 2026 14:43:30 +0000 [thread overview]
Message-ID: <160DDC42-5284-4BE5-99C7-1E9BE722A273@ipfire.org> (raw)
Hi all,
./make.sh can now be run as a normal user. This is merged into next.
What it means for you
* You can build on a machine where you have no root access, such as a shared build server or a CI runner.
* A failed or killed build can no longer leave mounts behind. There is no clean to run as root, and nothing on the host system is touched.
* Each command now runs isolated from the host. The build can't see your processes, and it can't write outside the build directories.
Setup
The build maps its users (root, nobody and so on) into a range of subordinate UIDs and GIDs that belong to you. Your account needs:
* A range in /etc/subuid and /etc/subgid, for example usermod --add-subuids 100000-165535 --add-subgids 100000-165535 <user>. Most distributions already create this for new users.
* The newuidmap and newgidmap tools (the uidmap package on Debian).
* A kernel that allows unprivileged user namespaces.
make.sh checks all of this and tells you what is missing. Building as root still works, but now prints a warning.
Trade-offs
* Every command starts about 0.15 to 0.25 s slower, which is only noticeable when nothing needs rebuilding.
* Files from a non-root build belong to your subordinate IDs, so rm -rf on the build directory fails. Use ./make.sh clean.
I built the toolchain and a full x86_64 build this way, and the resulting image boots and installs in QEMU. Other architectures are untested.
Feedback welcome, especially from other architectures and distributions.
Best,
-Michael
reply other threads:[~2026-11-28 14:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160DDC42-5284-4BE5-99C7-1E9BE722A273@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox