From patchwork Wed Dec 18 16:21:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 35016 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 695EF27BBE9; Wed, 18 Dec 2024 16:27:48 +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.5 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,URIBL_SBL_A 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 9F20B27BBE2 for ; Wed, 18 Dec 2024 16:27:45 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNwpQ-0001z8-3e; Wed, 18 Dec 2024 11:23:16 -0500 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 ) id 1tNwpD-0001lG-Ax for guix-patches@gnu.org; Wed, 18 Dec 2024 11:23:08 -0500 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 ) id 1tNwpC-0007Gf-Q1 for guix-patches@gnu.org; Wed, 18 Dec 2024 11:23:03 -0500 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:References:In-Reply-To:From:To:Subject; bh=8UvDeqVbh9uVDFlYU2wJC7m2pxQ7RtRS6oaF4owIU3s=; b=nhhhi2sBpiX8SKJfOQiQkx7ChCE1f2zp0Q5RflkMTQwofw29qyWit3PDxxIvLRPqQKg5XHtv32MlydQSYr2nhChwfRRKG9Iis7llzb3xDPqMk0sdN4uHDIy7j8NUv37tyrpHog2p+4/MiA8OjlS7A+iBXV12kegQISdhu6gsOYhKCLUdQbDz4kZRcU9LZ4UymPa8jNoinL028LWTiVYI7cOuqwayyvRPezR8ZSfBxzhbfErKhD2v2PbmvEp4dY48d9wSQ7/HIJbZ22OI7CTLY/e0IHvrqDZwDFZAnszRyOFMpWa1/x0LGIAYiNCWryLsZlIfwktvTzDS/uiCuIN6Uw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNwpC-0003rO-Fs for guix-patches@gnu.org; Wed, 18 Dec 2024 11:23:02 -0500 Subject: bug#72740: Add rootless-podman-service-type Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 18 Dec 2024 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 72740 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Giacomo Leidi Cc: 72740-done@debbugs.gnu.org, Maxim Cournoyer , Florian Pelz , Matthew Trzcinski Mail-Followup-To: 72740@debbugs.gnu.org, ludo@gnu.org, goodoldpaul@autistici.org Received: via spool by 72740-done@debbugs.gnu.org id=D72740.173453896514792 (code D ref 72740); Wed, 18 Dec 2024 16:23:02 +0000 Received: (at 72740-done) by debbugs.gnu.org; 18 Dec 2024 16:22:45 +0000 Received: from localhost ([127.0.0.1]:35710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNwou-0003qV-Ve for submit@debbugs.gnu.org; Wed, 18 Dec 2024 11:22:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNwoq-0003qA-Iq for 72740-done@debbugs.gnu.org; Wed, 18 Dec 2024 11:22:44 -0500 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 ) id 1tNwoi-0007Ao-Ri; Wed, 18 Dec 2024 11:22:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=8UvDeqVbh9uVDFlYU2wJC7m2pxQ7RtRS6oaF4owIU3s=; b=S4KQrnuHc7T4yJgBmGsW iUUXD3ueuA+HKmz5Smi0arsDU1fBAOnjE24G5ohe0NZp4V4RqxXnmIjQQC66j+UpZqwSrKO6QzOuC 5zJXhwTPlm8mwyhJ0UoVHTIOfN9L6bISXrsMlWEI0L6OiFlADi4G9mzeuoYkT1SQL4LZEnhBzm8nU tdSsNehe598jXi9tHvR5xUGeYSU3l9N2gOaqmiGm0LuhBbZfFmQBHuxifzoOqRRo8LTyUlHsDtUtR t/USXUOewmPpau3z4nafNCoX449AAXsx4Oj5NnY3l+mNduzYesG0apvf7OtNhx3C6Xa39fMdOWcO6 eUB34ESvMDM5Pw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= In-Reply-To: <8b98dbb863b7cca61be7006a0e52de76f2ad98af.1724413257.git.goodoldpaul@autistici.org> (Giacomo Leidi's message of "Fri, 23 Aug 2024 13:40:57 +0200") References: <1af98aa934040d79301c290acd719a7710e09800.1724413257.git.goodoldpaul@autistici.org> <8b98dbb863b7cca61be7006a0e52de76f2ad98af.1724413257.git.goodoldpaul@autistici.org> Date: Wed, 18 Dec 2024 17:21:50 +0100 Message-ID: <87r065j71d.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Hi, Giacomo Leidi skribis: > * gnu/services/containers.scm: New file; > (rootless-podman-configuration): new variable; > (rootless-podman-service-subids): new variable; > (rootless-podman-service-accounts): new variable; > (rootless-podman-service-profile): new variable; > (rootless-podman-shepherd-services): new variable; > (rootless-podman-service-etc): new variable; > (rootless-podman-service-type): new variable. > * gnu/local.mk: Test it. > * gnu/local.mk: Add them. > * doc/guix.texi (Miscellaneous Services): Document it. > > Change-Id: I041496474c1027da353bd6852f2554a065914d7a Applied at long last, with the changes below to the manual. Thank you! Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index a05fa68c05..ee2002a712 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41295,18 +41295,24 @@ Miscellaneous Services @cindex Rootless Podman @subsubheading Rootless Podman Service +@cindex rootless podman, container management tool +@cindex podman, rootless +@cindex container management, podman The @code{(gnu services containers)} module provides the following service. -@cindex Rootless Podman, container management tool @defvar rootless-podman-service-type +This is the service type for @url{https://podman.io, Podman} is a +container management tool. -@url{https://www.sylabs.io/singularity/, Singularity} is a container management -tool. In addition to providing a drop-in replacement for Docker, Podman offers -the ability to run containers in rootless mode. This allows regular users to -deploy containers without elevated privileges. +In addition to providing a drop-in replacement for Docker, Podman offers +the ability to run containers in ``root-less'' mode, meaning that regular users can +deploy containers without elevated privileges. It does so mainly by leveraging +two Linux kernel features: unprivileged user namespaces, and subordinate +user and group IDs (@pxref{subordinate-user-group-ids, the subordinate +user and group ID service}). -The @code{rootless-podman-service-type} sets up the Guix System to allow +The @code{rootless-podman-service-type} sets up the system to allow unprivileged users to run @command{podman} commands: @lisp @@ -41325,14 +41331,14 @@ Miscellaneous Services "audio" "video"))) %base-user-accounts)) (services - (list - (service iptables-service-type) - (service rootless-podman-service-type - (rootless-podman-configuration - (subgids - (list (subid-range (name "alice")))) - (subuids - (list (subid-range (name "alice"))))))))) + (append (list (service iptables-service-type) + (service rootless-podman-service-type + (rootless-podman-configuration + (subgids + (list (subid-range (name "alice")))) + (subuids + (list (subid-range (name "alice"))))))) + %base-services))) @end lisp The @code{iptables-service-type} is required for Podman to be able to setup its