From patchwork Sun Jan 26 02:55:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37733 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 75BB727BBEC; Sun, 26 Jan 2025 02:57:27 +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,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham 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 C0E8E27BBE2 for ; Sun, 26 Jan 2025 02:57:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbspd-0005nO-4E; Sat, 25 Jan 2025 21:57:05 -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 1tbspb-0005n0-9D for guix-patches@gnu.org; Sat, 25 Jan 2025 21:57:03 -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 1tbspa-0003vt-86 for guix-patches@gnu.org; Sat, 25 Jan 2025 21:57:02 -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:From:To:In-Reply-To:References:Subject; bh=86zkzZ2h4YUynb8IlDtE8Gxpp4c42k/wqqfQ1vXzaIQ=; b=C9qInGZBn5WIwMSL7Zg1mt88vkOFN881o09NkjOLhG/FNrGPhFHEAj8HCF7bDNHPA9KS3ap2KPZhXza4WKhnx3gI1Fy2dFPu+Enf7V2G3YiesKVSkZaA4M/nn8huw6i/eNj+dFmr+vCZkql+fB7DlwNKr6WtnzGufMvJKT7mVq6Ry6fNK2MFcO5+02djMVe3yneRydx0wCX3zhpxsvVJm11B0kgSQGaxotBTNmKbMKzGJEc1yW8k8n/E4q0VKurGMWqnhsQFvFf9h6Wjx7E3z4RT+MTQzgqbmVK83Sj2NT8BLmlQHTTXR5UYWeEoxd9PW1WP1cY3OiJZoCq+44v4UQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tbspa-0007uy-2H for guix-patches@gnu.org; Sat, 25 Jan 2025 21:57:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75847] [PATCH 1/2] services/desktop: Use transitively propagated GNOME packages for polkit/udev. References: In-Reply-To: Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Jan 2025 02:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75847 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75847@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 75847-submit@debbugs.gnu.org id=B75847.173786021130403 (code B ref 75847); Sun, 26 Jan 2025 02:57:02 +0000 Received: (at 75847) by debbugs.gnu.org; 26 Jan 2025 02:56:51 +0000 Received: from localhost ([127.0.0.1]:53457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbspN-0007uE-DR for submit@debbugs.gnu.org; Sat, 25 Jan 2025 21:56:51 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:51659) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tbspK-0007ts-5J for 75847@debbugs.gnu.org; Sat, 25 Jan 2025 21:56:47 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-216401de828so59337965ad.3 for <75847@debbugs.gnu.org>; Sat, 25 Jan 2025 18:56:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737860199; x=1738464999; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=86zkzZ2h4YUynb8IlDtE8Gxpp4c42k/wqqfQ1vXzaIQ=; b=lxNZlsx967F+znrOL/ENeedDfqhzKjKZgZxcZryR/x+soBxS8U8sr4nHzkAAfG+oly hqvmikNB9aKfcGcjFMtvZYEl37nR0ovGEGsmdeP56qPvB40OzSRNiNfjhwflXhOVzxSX Utqc8wbp763tAKcrKBJJWTptLSOQDad/2racLDoxv163aJrYOP5iEUZOUou5rt3QYTO8 W/JSxXVV4x9dhfBzwtWe3UmIX5338x9yLePlBqBzWNfaKqVaKQiB2VVvLpwMWCfzX7QV jF9ctRvv0Y6JJGU37HR260VhrKSB6jEiSGqx5zoC5HInPg1vbIqTQyBqd94dXbVvzWwo bVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737860199; x=1738464999; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=86zkzZ2h4YUynb8IlDtE8Gxpp4c42k/wqqfQ1vXzaIQ=; b=UXNxigAtlMKTLrgc9Q5tHJclG4vBAc2WiifKXD2Wf4QWW4vWPJiMwcDhBlDU3CzXc5 d7uGAf0pu8b4zhAQB6o7a8a01CAM/H4egAg/s20yUHil6+njkGNi6NlLJ4s8/PTfBjmR gQo5431MbQblpGE/2vr5nWjXjwcc+h9tD1sNFaw1aKv0hbYlpJ7NEvWrzYEECsXku49a 4aywS9XUpwDvLSRGQY1r8DOWq4Ztx/N2P6k0rwbVaGyAx3SNKnLKli5co9icSJ4XcsV3 SDFKF2aYykmf5M9pKYAOe3zAfKaOaFxXlI1aNfDMHN1gBdK36PAj4TBUoz+MkQy85cJs cEKQ== X-Gm-Message-State: AOJu0Yz8gP3BYDOexsPWKaBH/t1ZI9NPsL3mNqCKAE3CjDjxeI0M2UB9 424myL4J7Pfi3MKJEbSFL75oOcgoEcuRfu2U6wwftx+uJ7/UTfNClzKoeBQyaqY= X-Gm-Gg: ASbGnctEkdTbd+U77W5fAT+5ZbSKL7bOE3UHNQAdSGRNNC/w9QtNrAfxbo856OoplwY 0BJ5IvKl2ekbaZm67pTuSzYKrLDoolOHrTUUP25ue6EhfPJH7LKNANa9JFAoCppodQQH5bBFgjk LSp+UKfBSMLZVPLi4xxT7xFZpFxEo0NEu3jn5unfdOhoRFoYRxMy/No5W08jur2MoA6y2Yza5St wyhwmMfQ6AIFf3o01Mw1b5npc4mxzyxU9ExrC2UnM/xKD6HM5U/PGhPIPKq5qk5bdfQyhMomE0S m+yvf0QC0YHgXQfvF2g1xH0= X-Google-Smtp-Source: AGHT+IH2yWnKudro6VxoJsDAUKnXBg2fSe6Zh6By2via2F3zuG3VMLVac5QzSBVt43lkn/YbM0bWZw== X-Received: by 2002:a17:902:ea08:b0:21d:3bd7:afe8 with SMTP id d9443c01a7336-21d3bd7b2acmr345546065ad.49.1737860198740; Sat, 25 Jan 2025 18:56:38 -0800 (PST) Received: from localhost.localdomain ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da414cc20sm39175505ad.165.2025.01.25.18.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2025 18:56:38 -0800 (PST) From: Maxim Cournoyer Date: Sun, 26 Jan 2025 11:55:46 +0900 Message-ID: X-Mailer: git-send-email 2.47.1 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 This is useful for automatically picking up the polkit or udev rules from the GNOME packages propagated inputs (transitively), e.g. spice-gtk from the gnome-boxes package. * gnu/services/desktop.scm (gnome-profile): Add a #:transitive? argument. (gnome-udev-configuration-files): Use it. (gnome-polkit-settings): Likewise. Change-Id: I3597c9d3dc296e8f3e45017bb02e500db0b73783 --- gnu/services/desktop.scm | 42 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 17 deletions(-) base-commit: 4797fb64caf7bf869b0183c96e1c24885313abbc diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index a0291ea222..a214d5b6a2 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1547,7 +1547,7 @@ (define (gnome-udev-configuration-files config) (union-build #$output (search-path-as-list (list "lib/udev" "libexec/udev") - (list #$@(gnome-profile config))) + (list #$@(gnome-profile config #:transitive? #t))) #:create-all-directories? #t) (for-each (lambda (pattern) @@ -1572,7 +1572,7 @@ (define (gnome-polkit-settings config) (union-build output (search-path-as-list (list "share/polkit-1") - (list #$@(gnome-profile config))) + (list #$@(gnome-profile config #:transitive? #t))) #:create-all-directories? #t) (for-each (lambda (pattern) @@ -1581,21 +1581,29 @@ (define (gnome-polkit-settings config) (find-files output pattern))) (list #$@(gnome-desktop-configuration-polkit-ignorelist config)))))))) -(define (gnome-profile config) - "Return a list of packages propagated through CONFIG." - (append - (gnome-desktop-configuration-core-services config) - (gnome-desktop-configuration-shell config) - (gnome-desktop-configuration-utilities config) - (let ((gnome-meta (gnome-desktop-configuration-gnome config))) - (if (maybe-value-set? gnome-meta) - (begin - (warning - (gnome-desktop-configuration-source-location config) - (G_ "Using a meta-package for gnome-desktop is discouraged.~%")) - (list gnome-meta)) - (list))) - (gnome-desktop-configuration-extra-packages config))) +(define* (gnome-profile config #:key transitive?) + "Return the list of the packages specified in CONFIG. When TRANSITIVE? is +#t, also include their transitive propagated inputs." + (define gnome-packages + (append + (gnome-desktop-configuration-core-services config) + (gnome-desktop-configuration-shell config) + (gnome-desktop-configuration-utilities config) + (let ((gnome-meta (gnome-desktop-configuration-gnome config))) + (if (maybe-value-set? gnome-meta) + (begin + (warning + (gnome-desktop-configuration-source-location config) + (G_ "Using a meta-package for gnome-desktop is discouraged.~%")) + (list gnome-meta)) + (list))) + (gnome-desktop-configuration-extra-packages config))) + (if transitive? + (append gnome-packages + (append-map (compose (cut map second <>) ;discard labels + package-transitive-propagated-inputs) + gnome-packages)) + gnome-packages)) (define gnome-desktop-service-type (service-type From patchwork Sun Jan 26 02:55:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37734 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 1B64B27BBE2; Sun, 26 Jan 2025 02:57:28 +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,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham 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 0308A27BBEA for ; Sun, 26 Jan 2025 02:57:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbspd-0005ng-BZ; Sat, 25 Jan 2025 21:57:05 -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 1tbspb-0005n1-9c for guix-patches@gnu.org; Sat, 25 Jan 2025 21:57:03 -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 1tbspa-0003vu-NJ for guix-patches@gnu.org; Sat, 25 Jan 2025 21:57: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:References:In-Reply-To:Date:From:To:Subject; bh=xXXtlOPF0o1jny8+sfrh2pixiLLEorX6oHBarlTKv5Y=; b=GVUT+oxhTRt1YRzbR2RYyLf+orQJ5SgK++WHAOdDreFuZvBzYy7G21VbYCjiwW7j1QjOJm5Y10J5u+AZrQsciULotQU/oYAZ1FAsMO/W6oblo1HS4SjFnN/0DcbB9fnn8w0kTsQ1JzecuSLOSwMK1bbt9VlvV1r+VMA6gWkGjOgPTfP4+wo6Pgi4sEuoeCYL81pom8Wu+WM0XaYhHR1+YymzBNKPDGL3FdWhAy3xtLDUh2+JbxnB9RdRL0MCuc8RrWlVXoQCrRhK7Lwu7ftUlIjgoFSsgB+h33w/VIfheCzCGdMa5bSi2HOLuou0i7/sXdCG1OPOZO04HAJVwDcnkg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tbspa-0007v6-HG; Sat, 25 Jan 2025 21:57:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75847] [PATCH 2/2] services/gnome: Reinstate auto-configuration for GNOME Boxes. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Sun, 26 Jan 2025 02:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75847 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75847@debbugs.gnu.org Cc: Maxim Cournoyer , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 75847-submit@debbugs.gnu.org id=B75847.173786022130428 (code B ref 75847); Sun, 26 Jan 2025 02:57:02 +0000 Received: (at 75847) by debbugs.gnu.org; 26 Jan 2025 02:57:01 +0000 Received: from localhost ([127.0.0.1]:53459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbspU-0007ub-IJ for submit@debbugs.gnu.org; Sat, 25 Jan 2025 21:57:01 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:42105) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tbspN-0007tw-1T for 75847@debbugs.gnu.org; Sat, 25 Jan 2025 21:56:51 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-216395e151bso43448815ad.0 for <75847@debbugs.gnu.org>; Sat, 25 Jan 2025 18:56:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737860202; x=1738465002; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xXXtlOPF0o1jny8+sfrh2pixiLLEorX6oHBarlTKv5Y=; b=Yt0QCwcamnBnGXUbLlmOHhJ2IrpgNVqOD5uKULxbV6qnuhK9gL1QLayOEQo3t61VzR vF/nbxbv/PlE9snuRBnlYANqPbt+VUuK0Bc5bTgmCFgPms9xYb1jPbU066ayzUM2Ybzz +dPPCTHfzptsUaw70bmomwfdTDuXW1ofDG/c/qvEfqXAqxMqvjJMgaHP4e8mxxh9Y21z 2gA/46lLuXsasNN2VLpiZOBqa52P1ElZuYYHCupFUiSWDNbrOlX1WUGtWdHmkr+gBBnc /P3Nw3fV0aaqLi+Xb0Z2mJX2B8Syn7jDXgdNQJqKC4pTkStk/aKRNzLCZZwgaQNqnMBK aLFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737860202; x=1738465002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xXXtlOPF0o1jny8+sfrh2pixiLLEorX6oHBarlTKv5Y=; b=J6mZiHTywh08uX50+4qoFjBKcK8FMfb6hzGl98xJktOnE9jB7nlo7hVWj/UT8spjHO ddvhpnnlRuRaaWcA+Ku+sw2FXDwBNTklPzxgu+pCqJqpQ5ga8ODRuDNMpfWpvcS1BNCX ny1LuFDNrV/KDdhkQNKgt/tcbljE7OPn9BA2ZdcmCwsCZMJvullKkdNNPadW+iPYEC/S rijG13YDiTSdWI+B4HjwtuFN2iBPQHeaGoBDlbIb+d+1PAmwyylIpNqm90r9+2Iktm2m TwJ/oAyiw7N8kNXnn1E6a5Eom79ZRPOAN8Fn9JjRp6K5fWdbIUs1ohurSR63pOSaa/7u 6kiA== X-Gm-Message-State: AOJu0YwPBMuOKPrNx0PsWkbDXEazEcpF7hIFwJOjooT1Kp23qnoQuqq7 0JKB15RyvFEvX8Xg5dazAXp8atae2q76la0VJsQm7RQFfnaJVZ6YG59pOQEJcxk= X-Gm-Gg: ASbGncu7xpcoTuR2gTaalDezQdzypFOZiz61t+23r6KZfpEo//iN8ThZcxF5kslWGAP gcDiTsY9NBfX5fCgLicNgdeoSoe3b+1d9P2CYUJLH7cp9ZRAS26qHYntoduSXzWTP1C4067/uhO 54icFsvVittbvIDzvxOXqtmQZMmJJQEzgbYghMeP7lcaNIVUick/rHkMAHOKv3kDd2kGewevrXU ogRDxnrGUoQ/W5rUNYcjjCoaunrFOJXAjOf2OWw+srE8klfAc05ibYXHHRpcP6hMLZHYeI0LaF7 zSDrR6FfsV33wXMqYDUEcaA= X-Google-Smtp-Source: AGHT+IGE3c9c0N4alb1bZCBdUEFuPSo71h2N/93RALkVEKQs/ugMJS9D+kNRys3yy9sGNT0e0oN++w== X-Received: by 2002:a17:902:f78b:b0:21a:7e04:7021 with SMTP id d9443c01a7336-21d99388964mr188976575ad.24.1737860201968; Sat, 25 Jan 2025 18:56:41 -0800 (PST) Received: from localhost.localdomain ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da414cc20sm39175505ad.165.2025.01.25.18.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2025 18:56:40 -0800 (PST) From: Maxim Cournoyer Date: Sun, 26 Jan 2025 11:55:47 +0900 Message-ID: <2af740fcc6f306a7a00d323fdfdc5cdab46566f8.1737860147.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: 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 Previously to 4722496292 ("Remove gnome-boxes from default GNOME apps."), USB redirection for GNOME Boxes had been working out of the box. Reinstate the extensions that made that possible, so that simply adding the gnome-boxes package back to one of the gnome-desktop-configuration fields does the right thing. * gnu/services/desktop.scm (gnome-setuid-programs): New procedure. (gnome-desktop-service-type) [privileged-program-service-type]: Use it as an extension. * gnu/packages/gnome.scm (gnome-boxes): [inputs]: Move spice-gtk to... [propagated-inputs]: ... here. [description]: Document extra steps necessary to enable the USB redirection feature. Change-Id: If84e8a2e0c480ddd1d7cd294890fad1ae2a76987 --- gnu/packages/gnome.scm | 32 ++++++++++++++++++++++++-------- gnu/services/desktop.scm | 21 ++++++++++++++++++++- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index c831d5ee0d..1225570c3c 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -39,7 +39,7 @@ ;;; Copyright © 2019, 2024, 2025 Giacomo Leidi ;;; Copyright © 2019 Jelle Licht ;;; Copyright © 2019 Jonathan Frederickson -;;; Copyright © 2019-2024 Maxim Cournoyer +;;; Copyright © 2019-2025 Maxim Cournoyer ;;; Copyright © 2019, 2020 Martin Becze ;;; Copyright © 2019 David Wilson ;;; Copyright © 2019, 2020 Raghav Gururajan @@ -12813,22 +12813,38 @@ (define-public gnome-boxes libxml2 qemu-minimal ;for qemu-img sparql-query - spice-gtk tracker vte webkitgtk-for-gtk3)) + (propagated-inputs + ;; Propagating spice-gtk is necessary so that the gnome-desktop-service + ;; type configures the polkit actions necessary for the USB redirection + ;; feature to work when gnome-boxes added as a extra GNOME package. + (list spice-gtk)) (home-page "https://wiki.gnome.org/Apps/Boxes") (synopsis "View, access, and manage remote and virtual systems") (description "GNOME Boxes is a simple application to view, access, and manage remote and virtual systems. Note that this application requires the @code{libvirt} and @code{virtlog} daemons to run. Use the command @command{info '(guix) Virtualization Services'} to learn how to configure -these services on the Guix System. If you do not use the -@code{gnome-desktop-service-type}, you will also want to extend the -@code{polkit-service-type} with the @code{spice-gtk} package, as well as -configure the @file{libexec/spice-client-glib-usb-acl-helper} executable of -@code{spice-gtk} as setuid, to make it possible to redirect USB devices as a -non-privileged user.") +these services on the Guix System. + +To make it possible to redirect USB devices as a non-privileged user, some +extra configuration is necessary: if you use the +@code{gnome-desktop-service-type}, you should add the @code{gnome-boxes} +package to the @code{extra-packages} field of the +@code{gnome-desktop-configuration}, for example: +@lisp +(service gnome-desktop-service-type + (gnome-desktop-configuration + (extra-packages (list gnome-boxes gnome-essential-extras)))) +@end lisp +If you do @emph{not} use the @code{gnome-desktop-service-type}, you will need +manually extend the @code{polkit-service-type} with the @code{spice-gtk} +package, as well as configure the +@file{libexec/spice-client-glib-usb-acl-helper} executable of @code{spice-gtk} +as setuid, to make it possible to redirect USB devices as a non-privileged +user.") (license (list ;; For data/icons/empty-boxes.png. license:cc-by2.0 diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index a214d5b6a2..abb8eee200 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Sou Bunnbu -;;; Copyright © 2017, 2020, 2022, 2023 Maxim Cournoyer +;;; Copyright © 2017, 2020, 2022, 2023, 2025 Maxim Cournoyer ;;; Copyright © 2017 Nikita ;;; Copyright © 2017, 2019 Hartmut Goebel ;;; Copyright © 2018, 2020, 2022 Efraim Flashner @@ -1605,6 +1605,23 @@ (define* (gnome-profile config #:key transitive?) gnome-packages)) gnome-packages)) +(define (gnome-setuid-programs config) + "Return the list of setuid programs found within the packages specified in +CONFIG, a object." + ;; spice-gtk provides polkit actions for USB redirection in GNOME Boxes; set + ;; its usb-acl-helper script setuid automatically when the gnome-boxes or + ;; spice-gtk packages are added to one of the gnome-desktop-configuration + ;; fields. + (let* ((gnome-packages (gnome-profile config #:transitive? #t)) + (spice-gtk (find (compose (cut string=? "spice-gtk" <>) package-name) + gnome-packages)) + (files `(,@(if spice-gtk + (list (file-append + spice-gtk + "/libexec/spice-client-glib-usb-acl-helper")) + '())))) + (map file-like->setuid-program files))) + (define gnome-desktop-service-type (service-type (name 'gnome-desktop) @@ -1613,6 +1630,8 @@ (define gnome-desktop-service-type gnome-udev-configuration-files) (service-extension polkit-service-type gnome-polkit-settings) + (service-extension privileged-program-service-type + gnome-setuid-programs) (service-extension profile-service-type gnome-profile))) (default-value (gnome-desktop-configuration))