From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jcChR3Qpcz2xf5 for ; Sat, 28 Nov 2026 14:43:35 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jcChM5dM4z2x9t for ; Sat, 28 Nov 2026 14:43:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4jcChL6ccdzFc for ; Sat, 28 Nov 2026 14:43:30 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1795877011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X3pUWGyVVmIjD6Vwee/fVRCaxWE5XCZ8TETxKfXd3WY=; b=cQPxQ33d1tlvZcBDe6Gem/+rr4yzqYaLq0XQd8XpgoiVQcIkEZid4KRvuIzzFCISsscgiR 5XTkGipFCxRNNMBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1795877011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X3pUWGyVVmIjD6Vwee/fVRCaxWE5XCZ8TETxKfXd3WY=; b=Jzr2vUCnlUVlX0BKmfPEo4RfZzqnDd/zmC/2+gisbrDvSM7bGBm8QGo6+sX+HLOX4aiQoc cc0Ynu213O/6cMJ7MTGsejeShsMlztuLyf/Mxz5I96CgQm+vWxZPzgOF2bZIEkSHchucwl 8F6lyyX0Y/UjcCcI5D35S0Bg9pIGRS+/hxDx5GtCMGJFH7Z9pNkmSyrG1NkQYxWfrA3xiD f5tgjIXzhj9yDR8R12uMBMBIGWYmCOnzQmCqMyKSXAoCQCTUjBomscXdSSiKKhdqJRJO6T FhRogPyCFT1lWXdfUP9Jeqrmm6yfyF8221k34h4/5iiCi+JrQyv5CcQs6u4utg== From: Michael Tremer Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: Mime-Version: 1.0 Subject: Building IPFire without root Message-Id: <160DDC42-5284-4BE5-99C7-1E9BE722A273@ipfire.org> Date: Sat, 28 Nov 2026 14:43:30 +0000 To: "IPFire: Development-List" 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 . 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=