Message ID | cover.1743007256.git.ludo@gnu.org |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5331927BBE9; Wed, 26 Mar 2025 16:50:36 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3310227BBE2 for <patchwork@mira.cbaines.net>; Wed, 26 Mar 2025 16:50:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1txTxB-0003M2-SO; Wed, 26 Mar 2025 12:50:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1txTx6-0003H1-H7 for guix-patches@gnu.org; Wed, 26 Mar 2025 12:50:07 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1txTx6-0007HI-1e for guix-patches@gnu.org; Wed, 26 Mar 2025 12:50:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=aFmmRy+HlVyt/e6KG6sz9L/1zXIk5BHQ47HMYuYANCs=; b=i5Za2y/KexUvW2z79YFPZKZ/X+DeiJ1kAz3vZa91qigaY1nwrpoPs0GhCwItJqsaf4iwpMtnV8+7TX7k/VR+L/cCqy23DYBhLB8XFugNQquL0BqVFZdfNtZzA3NiEiU4dzQgUK1906kDfi2P8Cs7GBvJ7n0cxaLMngN+izGEsjO6LMEZqhYgalcAOglfw/ZuRHkLHEmNk9c+NurjBzqzjk1kiq95e1cwUACNrBNXAo7y9dBOkvrbl/S4rjDzLASIb31rTHlOqNkGg2ZeyOLir2TrQ1rgpuV1AoKFBtt/qBQIXn4wg71AnEEUDZ2UuYlZvnUPE15uOHlEiOVsIYx5Hg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1txTx4-0000Pq-28; Wed, 26 Mar 2025 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77288] [PATCH 0/6] Rootless guix-daemon on Guix System Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: pelzflorian@pelzflorian.de, julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Wed, 26 Mar 2025 16:50:01 +0000 Resent-Message-ID: <handler.77288.B.17430077671493@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77288 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77288@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Reepca Russelstein <reepca@russelstein.xyz>, Florian Pelz <pelzflorian@pelzflorian.de>, Julien Lepiller <julien@lepiller.eu> X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz <pelzflorian@pelzflorian.de>, Julien Lepiller <julien@lepiller.eu> Received: via spool by submit@debbugs.gnu.org id=B.17430077671493 (code B ref -1); Wed, 26 Mar 2025 16:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Mar 2025 16:49:27 +0000 Received: from localhost ([127.0.0.1]:44118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1txTwU-0000O0-Oc for submit@debbugs.gnu.org; Wed, 26 Mar 2025 12:49:27 -0400 Received: from lists.gnu.org ([2001:470:142::17]:35688) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ludo@gnu.org>) id 1txTwR-0000Nj-Sz for submit@debbugs.gnu.org; Wed, 26 Mar 2025 12:49:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1txTw5-0002or-GL for guix-patches@gnu.org; Wed, 26 Mar 2025 12:49:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1txTw2-0006zf-G1; Wed, 26 Mar 2025 12:48:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=aFmmRy+HlVyt/e6KG6sz9L/1zXIk5BHQ47HMYuYANCs=; b=OjvLW9AVKewWCE wRFKw5+9o/mRbMwbFEpcj3rnEgqPSD1B1xDNKstMYpd4Q7VVzUas7RPBR51uz6AnPG1uB8Um9l8Oa itpcRvBYO8cHHMvfWD4/6pLoZwqDWiaLlyTQvZovmagCygxmyf93JG8DrFnEoMCdv3VaE6hCNW5qv 4+CMyQivBqWfexCs1zt3j5flYer/1K5doFkshO7Pdyvn4Cl3PPF3xR8oUesgrzyjkP2LvJP3VubZF LSqMIOGA5ci/IlTsU4uT/UIwshLS550o4G0criYS7y+S4Gl3XzJmv9z/s1FJvstghDkREelo/hGiw WfExrGXkzFv6VBFvuTfw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Date: Wed, 26 Mar 2025 17:48:38 +0100 Message-ID: <cover.1743007256.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
Rootless guix-daemon on Guix System
|
|
Message
Ludovic Courtès
March 26, 2025, 4:48 p.m. UTC
Hello Guix, This is a followup to <https://issues.guix.gnu.org/75810>, which also depends on <https://issues.guix.gnu.org/77189>, allowing us to run ‘guix-daemon’ without root privileges on Guix System. It is the second step of the migration path outlined in <https://issues.guix.gnu.org/75810#111-lineno40>. This is made difficult by the fact that all this is stateful: if I switch my system to unprivileged mode, then the store and all the data files of the daemon must have their owner changed to ‘guix-daemon’. This is implemented by an intermediate ‘guix-ownership’ one-shot service, which completes instantaneously in the normal case and chowns if when switching from privileged to unprivileged and vice versa. This service remains in ‘starting’ state until it is done. Another complication is that of /gnu/store being mounted read-only. To provide the ‘guix-ownership’ and ‘guix-daemon’ processes write access to the store, they are started by a wrapper that creates a new mount namespace and remounts the store read-write (similar to ‘makeStoreWritable’ in the daemon). An open issue is ‘--keep-failed’: currently /tmp/guix-build-* directories will remain owned by ‘guix-daemon’ as was discussed in the initial message at <https://issues.guix.gnu.org/75810>. It’s a regression, but maybe it’s acceptable if we consider that this feature is primarily used on single-user machines. For now, the installation procedure creates /gnu/store, /var/guix, etc. with root:root ownership. Eventually, if/when we settle on unprivileged guix-daemon, we should change that code to have guix-daemon:guix-daemon as the owner. Ludovic Courtès (6): syscalls: Add ‘unshare’. services: account: Create /var/guix/profiles/per-user/$USER. tests: guix-daemon: Send system log output to /dev/console. tests: guix-daemon: Wait for the ‘guix-daemon’ service to be up. services: guix: Allow ‘guix-daemon’ to run without root privileges. DRAFT news: Add entry about unprivileged guix-daemon on Guix System. doc/guix.texi | 30 +++++++ etc/news.scm | 24 ++++++ gnu/services/base.scm | 187 ++++++++++++++++++++++++++++++++++++---- gnu/system/shadow.scm | 19 +++- gnu/tests/base.scm | 60 +++++++++++-- guix/build/syscalls.scm | 18 ++++ tests/syscalls.scm | 9 ++ 7 files changed, 325 insertions(+), 22 deletions(-) base-commit: 1a69acce515de9be9b95df04c553a47a808e5034