From patchwork Tue Sep 19 11:23:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54722 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 8C7B527BBE9; Tue, 10 Oct 2023 20:34:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 B11FC27BBE2 for ; Tue, 10 Oct 2023 20:34:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqIUC-0000De-OC; Tue, 10 Oct 2023 15:33:44 -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 ) id 1qqIUA-0000Cz-8x for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:42 -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 ) id 1qqIU9-0008Jy-2Q for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqIUU-0008N9-Bb for guix-patches@gnu.org; Tue, 10 Oct 2023 15:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v10 1/6] gnu: eudev: Update to 3.2.14. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 19:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Liliana Marie Prikler , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169696641032086 (code B ref 66099); Tue, 10 Oct 2023 19:34:02 +0000 Received: (at 66099) by debbugs.gnu.org; 10 Oct 2023 19:33:30 +0000 Received: from localhost ([127.0.0.1]:36922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITu-0008LN-2H for submit@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:29 -0400 Received: from planete-kraus.eu ([89.234.140.182]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITo-0008KX-H5 for 66099@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:24 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id fa083662; Tue, 10 Oct 2023 19:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=Qr+lhBDDPXg/PsFm3Seq8eSXinQ=; b=V LOJMKsa4XfhmsWc4pVAj4+DDGThq8pyjoSHrs44sp1gmjR9inYhnDaiFC4TuRb35 uS/2uLcJ9V0Us8+YRVyEHAhwwcEKJ5FxBbwiIniP2zmHjr8oHSTCHQ4ltpQRoAFT zVo8cqUsN6popvbjZWYxrd5Tv+gMcIJZaP1TY/HT0agdEs3ZoW0b6pC1zCeftYnw tWKc2WosFmXe4DvTOaLT7bW+6Fi5ByrKPECh7OcbPe/Sf7cmUdWQ/31gqp8+xw2C PYsq17y+uzkvFbn7fl0wCmg+9GaKajYEmYQ+cRyks0eN67XaGEzZcNsUVzzHBmxS 4IQCuFQjQo4Amj6ovj5rQ== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 18b4b678 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 10 Oct 2023 19:32:57 +0000 (UTC) Message-ID: <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> In-Reply-To: References: <87mswte1rx.fsf@gmail.com> Date: Tue, 19 Sep 2023 13:23:22 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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 Eudev now has a hardware database /etc/udev/hwdb.bin made up of descriptions installed in the /lib/udev/hwdb.d directory of each package, and more generally, UDEV_HWDB_PATH. This database index is compiled with udevadm hwdb --update. The udev-service-type collects the files and compiles the index. Previously, the hardware description files provided by eudev would be compiled into $prefix/etc/udev/hwdb.bin in the eudev output. * gnu/packages/linux.scm (eudev): Update to 3.2.14. [modules]: Import (guix build utils). [#:phases] : New phase. : New phase. : Remove phase. [#:configure-flags]: Set sysconfdir to avoid a prefix. [native-search-paths]: Add UDEV_HWDB_PATH. * gnu/packages/patches/eudev-rules-directory.patch: Rebase it. --- gnu/packages/linux.scm | 57 +++++++++++++------ .../patches/eudev-rules-directory.patch | 9 +-- 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index c993e7b9bb..c5049843eb 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4327,10 +4327,9 @@ (define-public earlyoom (license license:expat))) (define-public eudev - ;; The post-systemd fork, maintained by Gentoo. (package (name "eudev") - (version "3.2.11") + (version "3.2.14") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/gentoo/eudev") @@ -4338,8 +4337,9 @@ (define-public eudev (file-name (git-file-name name version)) (sha256 (base32 - "0dzaqwjnl55f69ird57wb6skahc6l7zs1slsrzqqfhww33icp6av")) - (patches (search-patches "eudev-rules-directory.patch")))) + "1f6lz57igi7iw2ls3fpzgw42bfznam4nf9368h7x8yf1mb737yxz")) + (patches (search-patches "eudev-rules-directory.patch")) + (modules '((guix build utils))))) (build-system gnu-build-system) (arguments (list @@ -4350,6 +4350,31 @@ (define-public eudev (substitute* "man/make.sh" (("/usr/bin/xsltproc") (search-input-file (or native-inputs inputs) "/bin/xsltproc"))))) + (add-before 'bootstrap 'install-in-lib + (lambda _ + ;; When the udev-service-type instantiates /etc, it collects + ;; hardware files from the /lib/udev/hwdb.d directories + ;; of different packages. Since we set sysconfdir to /etc, the + ;; only package-dependent location we can install hwdb files is + ;; in /lib/udev/hwdb.d. Eudev is configured to install + ;; these files in sysconfdir, but they should be placed into + ;; udevlibexecdir. + (copy-file "hwdb/Makefile.am" "hwdb/files.am") + (call-with-output-file "hwdb/Makefile.am" + (lambda (port) + (format port "hardwarelibdir = $(udevlibexecdir)/hwdb.d\n") + (format port "include ./files.am"))) + (substitute* "hwdb/files.am" + (("dist_udevhwdb_DATA =") + "dist_hardwarelib_DATA =")) + ;; Do not install the empty udev.conf template. + (substitute* "src/udev/Makefile.am" + (("dist_udevconf_DATA =") + "dist_noinst_DATA =")) + ;; Do not ensure that /etc/udev/rules.d exists. + (substitute* "rules/Makefile.am" + (("\\$\\(MKDIR_P\\) \\$\\(DESTDIR\\)\\$\\(udevconfdir\\)/rules\\.d") + "true")))) (add-after 'install 'move-static-library (lambda _ (let ((source (string-append #$output "/lib/libudev.a")) @@ -4361,19 +4386,17 @@ (define-public eudev ;; such that Libtool looks for it in the usual places. (substitute* (string-append #$output "/lib/libudev.la") (("old_library=.*") - "old_library=''\n"))))) - (add-after 'install 'build-hwdb - (lambda _ - ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and - ;; similar tools to display product names. - ;; - ;; XXX: This can't be done when cross-compiling. Find another way - ;; to generate hwdb.bin for cross-built systems. - #$@(if (%current-target-system) - #~(#t) - #~((invoke (string-append #$output "/bin/udevadm") - "hwdb" "--update")))))) - #:configure-flags #~(list "--enable-manpages"))) + "old_library=''\n")))))) + #:configure-flags + #~(list "--enable-manpages" + ;; By default, autoconf uses $prefix/etc. The udev-service-type + ;; makes sure /etc is set up with rules and hardware file + ;; descriptions. + "--sysconfdir=/etc"))) + (native-search-paths + (list (search-path-specification + (variable "UDEV_HWDB_PATH") + (files '("lib/udev/hwdb.d"))))) (native-inputs (list autoconf automake diff --git a/gnu/packages/patches/eudev-rules-directory.patch b/gnu/packages/patches/eudev-rules-directory.patch index 54fc01c6d5..c4b1cfae39 100644 --- a/gnu/packages/patches/eudev-rules-directory.patch +++ b/gnu/packages/patches/eudev-rules-directory.patch @@ -4,9 +4,9 @@ The old udev 182 supported $UDEV_CONFIG_FILE, which in turn allowed the search path to be customized, but eudev no longer has this, hence this hack. ---- eudev-3.1.5/src/udev/udev-rules.c 2015-10-13 06:22:14.000000000 +0800 -+++ eudev-3.1.5/src/udev/udev-rules.c 2015-10-16 20:45:38.491934336 +0800 -@@ -47,15 +47,11 @@ +--- a/src/udev/udev-rules.c ++++ b/src/udev/udev-rules.c +@@ -48,16 +48,11 @@ struct uid_gid { }; }; @@ -20,11 +20,12 @@ this hack. - "/lib/udev/rules.d", - "/usr/lib/udev/rules.d", -#endif +- "/usr/local/lib/udev/rules.d", + NULL, /* placeholder for $EUDEV_RULES_DIRECTORY */ NULL}; struct udev_rules { -@@ -1704,6 +1700,9 @@ +@@ -1718,6 +1713,9 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) { udev_rules_check_timestamp(rules); From patchwork Thu Oct 5 17:33:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54721 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 400D527BBEA; Tue, 10 Oct 2023 20:34:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 A185927BBE2 for ; Tue, 10 Oct 2023 20:34:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqIUC-0000Df-Ny; Tue, 10 Oct 2023 15:33:44 -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 ) id 1qqIU9-0000Cg-6F for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:41 -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 ) id 1qqIU8-0008Jg-M4 for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqIUU-0008N1-0B for guix-patches@gnu.org; Tue, 10 Oct 2023 15:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v10 2/6] services: udev: Rewrite udev-rule to use file->udev-rule. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 19:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Liliana Marie Prikler , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169696640232060 (code B ref 66099); Tue, 10 Oct 2023 19:34:01 +0000 Received: (at 66099) by debbugs.gnu.org; 10 Oct 2023 19:33:22 +0000 Received: from localhost ([127.0.0.1]:36919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITp-0008L1-Ng for submit@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:21 -0400 Received: from planete-kraus.eu ([89.234.140.182]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITl-0008KX-Gv for 66099@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:18 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 1d48f7c3; Tue, 10 Oct 2023 19:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=0AUk4LfgvemuRiq7Ywyf4FhmA3g=; b=P 74CcKjXiG1zMT7TkHSpeqn5tkdpDBuEl3TtOlQMd/wEl1PLBMUgDXf0CA5tyk9AC 487xa9dB9NOOiO20l3UuG3pfOvUtreb0CHr43MM4htltd8Did+tRmqCYJkLXPJhg sMdMDMMvBWcIDc272D6hXpJIWl6huqgBMTaC2fo4/gwYi8Zr7leWZsLJZPMnIG+M oJL0/BJSkLQAEXO2DfSasAbi9TzgGR7TMxGpQl01zOBTn5JP3ENHTHJnpVMzfQI5 MK/Mx8XjyocCfBMAOX+kIphp5i4CL8cgLt7UIxxrxRC9iKdkwrd8DAO5scVdM2Da uDH/u3k0vA0a13qSD1emg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id ad5eed02 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 10 Oct 2023 19:32:54 +0000 (UTC) Message-ID: <70ae450282e2411c5506447c79adf6a62345344c.1696966139.git.vivien@planete-kraus.eu> In-Reply-To: <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> References: <87mswte1rx.fsf@gmail.com> <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> Date: Thu, 5 Oct 2023 19:33:24 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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 * gnu/services/base.scm (udev-rule): Use file->udev-rule. --- gnu/services/base.scm | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 98d59fd36d..8b54f30ef6 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2262,19 +2262,7 @@ (define (udev-rules-union packages) (define (udev-rule file-name contents) "Return a directory with a udev rule file FILE-NAME containing CONTENTS." - (computed-file file-name - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - - (define rules.d - (string-append #$output "/lib/udev/rules.d")) - - (mkdir-p rules.d) - (call-with-output-file - (string-append rules.d "/" #$file-name) - (lambda (port) - (display #$contents port))))))) + (file->udev-rule file-name (plain-file file-name contents))) (define (file->udev-rule file-name file) "Return a directory with a udev rule file FILE-NAME which is a copy of FILE." From patchwork Thu Oct 5 17:24:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54726 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 3F40127BBEA; Tue, 10 Oct 2023 20:34:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 EFC7127BBE2 for ; Tue, 10 Oct 2023 20:34:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqIUK-0000Gl-6d; Tue, 10 Oct 2023 15:33:52 -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 ) id 1qqIUC-0000Dl-66 for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:44 -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 ) id 1qqIU9-0008K7-P4 for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:42 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqIUV-0008NN-2c for guix-patches@gnu.org; Tue, 10 Oct 2023 15:34:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v10 3/6] services: udev: Make udev-rule helper functions generic. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 19:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Liliana Marie Prikler , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169696641632118 (code B ref 66099); Tue, 10 Oct 2023 19:34:03 +0000 Received: (at 66099) by debbugs.gnu.org; 10 Oct 2023 19:33:36 +0000 Received: from localhost ([127.0.0.1]:36928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqIU3-0008Lw-Bd for submit@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:35 -0400 Received: from planete-kraus.eu ([89.234.140.182]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITx-0008KX-HX for 66099@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:30 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 64571b6c; Tue, 10 Oct 2023 19:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=PVY0dkxKH7fADxZD/9kSDthztj4=; b=Z iZn0fI4ywJ/QLCvb6ltP1RZo7k9mpjeA/dFZhUdQloRJHsejitYVu5ckNAFqRRep ZDXs3ilEubFxUuMIOebNYfHrRkBgL3SPPjFSWwke63ruukkCH9bvmtFcGEGae0ms GkbQAGJyddE2H4zJv1CmdskAeSfjn3lCv/QrdMkzwudpoiYaEgGTs2MR8ihCBf2K qTAGe0zqbcJ0CVAYnsN7WH8Gu13yJ4GmReklKIULkkS/YDfeo6kvzNJyHeLUQf5v DDLYGwnrQ1bM9fkFUpkjNmCIPiGPsL20jfoWk/UzEgellCUmRNx0BEW9U6LSb3qj Sox704PvclRaEdBQfiQqg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 8ce46c0e (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 10 Oct 2023 19:33:06 +0000 (UTC) Message-ID: In-Reply-To: <70ae450282e2411c5506447c79adf6a62345344c.1696966139.git.vivien@planete-kraus.eu> References: <87mswte1rx.fsf@gmail.com> <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> <70ae450282e2411c5506447c79adf6a62345344c.1696966139.git.vivien@planete-kraus.eu> Date: Thu, 5 Oct 2023 19:24:56 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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 * gnu/services/base.scm (udev-configurations-union): New function. (udev-configuration-file): New function, use file->udev-configuration-file. (file->udev-configuration-file): New function. (udev-rules-union): Use udev-configurations-union. (udev-rule): Use udev-configuration-file. (file->udev-rule): Use file->udev-configuration-file. --- gnu/services/base.scm | 50 +++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 8b54f30ef6..10e7383475 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2234,9 +2234,9 @@ (define-record-type* (rules udev-configuration-rules ;list of file-like (default '()))) -(define (udev-rules-union packages) - "Return the union of the @code{lib/udev/rules.d} directories found in each -item of @var{packages}." +(define (udev-configurations-union subdirectory packages) + "Return the union of the lib/udev/SUBDIRECTORY.d directories found in each +item of PACKAGES." (define build (with-imported-modules '((guix build union) (guix build utils)) @@ -2247,39 +2247,57 @@ (define (udev-rules-union packages) (srfi srfi-26)) (define %standard-locations - '("/lib/udev/rules.d" "/libexec/udev/rules.d")) + '(#$(string-append "/lib/udev/" subdirectory ".d") + #$(string-append "/libexec/udev/" subdirectory ".d"))) - (define (rules-sub-directory directory) - ;; Return the sub-directory of DIRECTORY containing udev rules, or - ;; #f if none was found. + (define (configuration-sub-directory directory) + ;; Return the sub-directory of DIRECTORY containing udev + ;; configurations, or #f if none was found. (find directory-exists? (map (cut string-append directory <>) %standard-locations))) (union-build #$output - (filter-map rules-sub-directory '#$packages))))) + (filter-map configuration-sub-directory '#$packages))))) + + (computed-file (string-append "udev-" subdirectory) build)) - (computed-file "udev-rules" build)) +(define (udev-rules-union packages) + "Return the union of the lib/udev/rules.d directories found in each +item of PACKAGES." + (udev-configurations-union "rules" packages)) + +(define (udev-configuration-file subdirectory file-name contents) + "Return a directory with a udev configuration file FILE-NAME containing CONTENTS." + (file->udev-configuration-file subdirectory file-name (plain-file file-name contents))) (define (udev-rule file-name contents) "Return a directory with a udev rule file FILE-NAME containing CONTENTS." - (file->udev-rule file-name (plain-file file-name contents))) + (udev-configuration-file "rules" file-name contents)) -(define (file->udev-rule file-name file) - "Return a directory with a udev rule file FILE-NAME which is a copy of FILE." +(define (file->udev-configuration-file subdirectory file-name file) + "Return a directory with a udev configuration file FILE-NAME which is a copy + of FILE." (computed-file file-name (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) - (define rules.d - (string-append #$output "/lib/udev/rules.d")) + (define configuration-directory + (string-append #$output + "/lib/udev/" + #$subdirectory + ".d")) (define file-copy-dest - (string-append rules.d "/" #$file-name)) + (string-append configuration-directory "/" #$file-name)) - (mkdir-p rules.d) + (mkdir-p configuration-directory) (copy-file #$file file-copy-dest))))) +(define (file->udev-rule file-name file) + "Return a directory with a udev rule file FILE-NAME which is a copy of FILE." + (file->udev-configuration-file "rules" file-name file)) + (define kvm-udev-rule ;; Return a directory with a udev rule that changes the group of /dev/kvm to ;; "kvm" and makes it #o660. Apparently QEMU-KVM used to ship this rule, From patchwork Mon Oct 2 19:08:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54725 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 CE10327BBEA; Tue, 10 Oct 2023 20:34:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 BBA9527BBF0 for ; Tue, 10 Oct 2023 20:34:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqIUD-0000EI-M1; Tue, 10 Oct 2023 15:33:45 -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 ) id 1qqIU9-0000Cf-5g for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:41 -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 ) id 1qqIU8-0008JL-EF for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqIUT-0008Mu-Ir for guix-patches@gnu.org; Tue, 10 Oct 2023 15:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v10 4/6] gnu: udev-service-type: accept hardware description file extensions. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 19:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Liliana Marie Prikler , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169696639732042 (code B ref 66099); Tue, 10 Oct 2023 19:34:01 +0000 Received: (at 66099) by debbugs.gnu.org; 10 Oct 2023 19:33:17 +0000 Received: from localhost ([127.0.0.1]:36915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITk-0008Kk-U4 for submit@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:17 -0400 Received: from planete-kraus.eu ([89.234.140.182]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqITh-0008KX-AJ for 66099@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:15 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id a2bc8da5; Tue, 10 Oct 2023 19:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=ZfjY9C0RBM0X9574VDm412TMowk=; b=W rzpMSX4qq691BLhSgbcmADLNmUHzZIUurFc0eVPh1jOiit2ASlICUbrBXRLPCQ+e 1gtmvCoeix2TUcKrl8lU/I/B6TzApFAmF3KJW+Ui2DXBufY+pScXqKeVxDtmWKLJ KOkE75YwyA97JAQLaxKlexHOLmc7UlsNYPhqLkkj3TQt6a9xiEPduxmadUVQHpq4 4ZJJnuO6S12TtRN1j6TtiW3Gyk82Ra7Gohi+WEj0qd2UFMLwnE2mgH9QD69f9QRi B/hOBvjrtflSG5uLFI3mQKhli8dtw5zjfC/niANEhMcK4l4DYGADUmlZnkcYEhCQ LO+E+k3uw+oCw5WR6BvIw== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 922d3063 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 10 Oct 2023 19:32:49 +0000 (UTC) Message-ID: In-Reply-To: References: <87mswte1rx.fsf@gmail.com> <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> <70ae450282e2411c5506447c79adf6a62345344c.1696966139.git.vivien@planete-kraus.eu> Date: Mon, 2 Oct 2023 21:08:49 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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 The udev-configuration record now has a hardware field. The contents of the /etc/udev directory now includes hwdb.bin, which is computed when the system is instanciated (prior to system activation). The hardware description files used to generate hwdb.bin are not installed in /etc, because they are not required at run-time. The documentation has been reworked so as to explain why creating udev rules or hardware needs helper functions for configuration or extension. * gnu/services/base.scm (udev-hardware): New function. (file->udev-hardware): New function. (udev-hardware-service): New function. (udev-etc): Add hwdb.d and hwdb.bin. (module): Export udev-hardware, file->udev-hardware, and udev-hardware-service. (): Add the native-udev field. (udev-service-type) [extend]: Populate the hardware field. * doc/guix.texi (Base Services)[udev-service-type]: Explain configuration and extension values. * doc/guix.texi (Base Services)[udev-hardware]: Document it. [udev-hardware-service]: Same. * doc/guix.texi (Base Services)[udev-configuration]: Document the native-udev field. --- doc/guix.texi | 57 +++++++++++++++++++++++++++------- gnu/services/base.scm | 72 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 104 insertions(+), 25 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ad26a29513..3530d317ec 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19362,9 +19362,23 @@ Base Services @file{/dev} directory dynamically, whose value is a @code{} object. -This service type can be @emph{extended} using procedures -@code{udev-rules-service} along with @code{file->udev-rule} or -@code{udev-rule} which simplify the process of writing udev rules. +Since the file names for udev rules and hardware description files +matter, the configuration items for rules and hardware cannot simply be +plain file-like objects with the rules content, because the name would +be ignored. Instead, they are directory file-like objects that contain +optional rules in @file{lib/udev/rules.d} and optional hardware files in +@file{lib/udev/hwdb.d}. This way, the service can be configured with +whole packages from which to take rules and hwdb files. + +The @code{udev-service-type} can be @emph{extended} with file-like +directories that respect this hierarchy. For convenience, the +@code{udev-rule} and @code{file->udev-rule} can be used to construct +udev rules, while @code{udev-hardware} and @code{file->udev-hardware} +can be used to construct hardware description files. + +In an @code{operating-system} declaration, this service type can be +@emph{extended} using procedures @code{udev-rules-service} and +@code{udev-hardware-service}. @end defvar @deftp {Data Type} udev-configuration @@ -19372,10 +19386,17 @@ Base Services @table @asis @item @code{udev} (default: @code{eudev}) (type: file-like) -Package object of the udev service. +Package object of the udev service. This package is used at run-time, +when compiled for the target system. In order to generate the +@file{hwdb.bin} hardware index, it is also used when generating the +system definition, compiled for the current system. @item @code{rules} (default: @var{'()}) (type: list-of-file-like) -List of file-like objects denoting udev-rule files. +List of file-like objects denoting udev rule files under a sub-directory. + +@item @code{hardware} (default: @var{'()}) (type: list-of-file-like) +List of file-like objects denoting udev hardware description files under +a sub-directory. @end table @end deftp @@ -19398,6 +19419,11 @@ Base Services @end lisp @end deffn +@deffn {Procedure} udev-hardware @var{file-name} @var{contents} +Return a udev hardware description file named @var{file-name} containing +the hardware information @var{contents}. +@end deffn + @deffn {Procedure} udev-rules-service @var{name} @var{rules} [#:groups '()] Return a service that extends @code{udev-service-type} with @var{rules} and @code{account-service-type} with @var{groups} as system groups. @@ -19417,6 +19443,11 @@ Base Services @end lisp @end deffn +@deffn {Procedure} udev-hardware-service @var{name} @var{hardware} +Return a service that extends @code{udev-service-type} with +@var{hardware}. The service name is @code{@var{name}-udev-hardware}. +@end deffn + @deffn {Procedure} file->udev-rule @var{file-name} @var{file} Return a udev-rule file named @var{file-name} containing the rules defined within @var{file}, a file-like object. @@ -19441,12 +19472,16 @@ Base Services @end lisp @end deffn -Additionally, Guix package definitions can be included in @var{rules} in -order to extend the udev rules with the definitions found under their -@file{lib/udev/rules.d} sub-directory. In lieu of the previous -@var{file->udev-rule} example, we could have used the -@var{android-udev-rules} package which exists in Guix in the @code{(gnu -packages android)} module. +Since guix package definitions can be included in @var{rules} in order +to use all their rules under the @file{lib/udev/rules.d} sub-directory, +then in lieu of the previous @var{file->udev-rule} example, we could +have used the @var{android-udev-rules} package which exists in Guix in +the @code{(gnu packages android)} module. + +@deffn {Procedure} file->udev-hardware @var{file-name} @var{file} +Return a udev hardware description file named @var{file-name} containing +the rules defined within @var{file}, a file-like object. +@end deffn The following example shows how to use the @var{android-udev-rules} package so that the Android tool @command{adb} can detect devices diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 10e7383475..db22ac848e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -82,6 +82,7 @@ (define-module (gnu services base) #:select (mount-flags->bit-mask swap-space->flags-bit-mask)) #:use-module (guix gexp) + #:use-module ((guix packages) #:select (package-version)) #:use-module (guix records) #:use-module (guix modules) #:use-module (guix pki) @@ -152,11 +153,15 @@ (define-module (gnu services base) udev-configuration udev-configuration? udev-configuration-rules + udev-configuration-hardware udev-service-type udev-service ; deprecated udev-rule + udev-hardware file->udev-rule + file->udev-hardware udev-rules-service + udev-hardware-service login-configuration login-configuration? @@ -2232,10 +2237,12 @@ (define-record-type* (udev udev-configuration-udev ;file-like (default eudev)) (rules udev-configuration-rules ;list of file-like - (default '()))) + (default '())) + (hardware udev-configuration-hardware ;list of file-like + (default '()))) (define (udev-configurations-union subdirectory packages) - "Return the union of the lib/udev/SUBDIRECTORY.d directories found in each + "Return the union of the lib/udev/SUBDIRECTORY directories found in each item of PACKAGES." (define build (with-imported-modules '((guix build union) @@ -2247,8 +2254,8 @@ (define (udev-configurations-union subdirectory packages) (srfi srfi-26)) (define %standard-locations - '(#$(string-append "/lib/udev/" subdirectory ".d") - #$(string-append "/libexec/udev/" subdirectory ".d"))) + '(#$(string-append "/lib/udev/" subdirectory) + #$(string-append "/libexec/udev/" subdirectory))) (define (configuration-sub-directory directory) ;; Return the sub-directory of DIRECTORY containing udev @@ -2264,7 +2271,7 @@ (define (udev-configurations-union subdirectory packages) (define (udev-rules-union packages) "Return the union of the lib/udev/rules.d directories found in each item of PACKAGES." - (udev-configurations-union "rules" packages)) + (udev-configurations-union "rules.d" packages)) (define (udev-configuration-file subdirectory file-name contents) "Return a directory with a udev configuration file FILE-NAME containing CONTENTS." @@ -2272,7 +2279,11 @@ (define (udev-configuration-file subdirectory file-name contents) (define (udev-rule file-name contents) "Return a directory with a udev rule file FILE-NAME containing CONTENTS." - (udev-configuration-file "rules" file-name contents)) + (udev-configuration-file "rules.d" file-name contents)) + +(define (udev-hardware file-name contents) + "Return a directory with a udev hardware file FILE-NAME containing CONTENTS." + (udev-configuration-file "hwdb.d" file-name contents)) (define (file->udev-configuration-file subdirectory file-name file) "Return a directory with a udev configuration file FILE-NAME which is a copy @@ -2285,8 +2296,7 @@ (define (file->udev-configuration-file subdirectory file-name file) (define configuration-directory (string-append #$output "/lib/udev/" - #$subdirectory - ".d")) + #$subdirectory)) (define file-copy-dest (string-append configuration-directory "/" #$file-name)) @@ -2296,7 +2306,11 @@ (define (file->udev-configuration-file subdirectory file-name file) (define (file->udev-rule file-name file) "Return a directory with a udev rule file FILE-NAME which is a copy of FILE." - (file->udev-configuration-file "rules" file-name file)) + (file->udev-configuration-file "rules.d" file-name file)) + +(define (file->udev-hardware file-name file) + "Return a directory with a udev hardware file FILE-NAME which is a copy of FILE." + (file->udev-configuration-file "hwdb.d" file-name file)) (define kvm-udev-rule ;; Return a directory with a udev rule that changes the group of /dev/kvm to @@ -2405,13 +2419,27 @@ (define udev.conf (define (udev-etc config) (match-record config - (udev rules) + (udev rules hardware) + (let* ((hardware + (udev-configurations-union "hwdb.d" (cons* udev hardware))) + (hwdb.bin + (computed-file + "hwdb.bin" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (setenv "UDEV_HWDB_PATH" #$hardware) + (invoke #+(file-append udev "/bin/udevadm") + "hwdb" + "--update" + "-o" #$output)))))) `(("udev" ,(file-union "udev" `(("udev.conf" ,udev.conf) ("rules.d" ,(udev-rules-union (cons* udev kvm-udev-rule - rules))))))))) + rules))) + ("hwdb.bin" ,hwdb.bin)))))))) (define udev-service-type (service-type (name 'udev) @@ -2420,12 +2448,15 @@ (define udev-service-type udev-shepherd-service) (service-extension etc-service-type udev-etc))) (compose concatenate) ;concatenate the list of rules - (extend (lambda (config rules) + (extend (lambda (config extensions) (let ((initial-rules - (udev-configuration-rules config))) + (udev-configuration-rules config)) + (initial-hardware + (udev-configuration-hardware config))) (udev-configuration (inherit config) - (rules (append initial-rules rules)))))) + (rules (append initial-rules extensions)) + (hardware (append initial-hardware extensions)))))) (default-value (udev-configuration)) (description "Run @command{udev}, which populates the @file{/dev} @@ -2460,6 +2491,19 @@ (define* (udev-rules-service name rules #:key (groups '())) (description "This service adds udev rules.")))) (service type #f))) +(define (udev-hardware-service name hardware-files) + "Return a service that extends udev-service-type with HARDWARE-FILES, named +NAME-udev-hardware." + (let* ((name (symbol-append name '-udev-hardware)) + (udev-extension (const (list hardware-files))) + (type (service-type + (name name) + (extensions (list + (service-extension + udev-service-type udev-extension))) + (description "This service adds udev hardware files.")))) + (service type #f))) + (define (swap-space->shepherd-service-name space) (let ((target (swap-space-target space))) (symbol-append 'swap- From patchwork Tue Sep 19 11:32:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54723 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 3216627BBEC; Tue, 10 Oct 2023 20:34:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 9D3EE27BBE2 for ; Tue, 10 Oct 2023 20:34:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqIUG-0000Fa-D8; Tue, 10 Oct 2023 15:33:48 -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 ) id 1qqIUC-0000Dn-6m for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:44 -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 ) id 1qqIUA-0008KE-4C for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqIUV-0008NU-E1 for guix-patches@gnu.org; Tue, 10 Oct 2023 15:34:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v10 5/6] gnu: libgudev: Update to 238. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 19:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Liliana Marie Prikler , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169696641632124 (code B ref 66099); Tue, 10 Oct 2023 19:34:03 +0000 Received: (at 66099) by debbugs.gnu.org; 10 Oct 2023 19:33:36 +0000 Received: from localhost ([127.0.0.1]:36930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqIU3-0008Lz-QI for submit@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:36 -0400 Received: from planete-kraus.eu ([89.234.140.182]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqIU1-0008KX-Hc for 66099@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:34 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 4abada53; Tue, 10 Oct 2023 19:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=HYztRqrZPcoGi5Fi7TnaZjA46pE=; b=h PETakZwSAYsNKYCz9Kt5fO4ZLufHX5K636XxvQFi08xa6tzq1z416vDyDXq6NwyN 3bJqxe+KNfKcf2pJhVU62R69WvRTMehZceZDPKmMDiW8snZAbNsW9so/1O54aQE4 QEwTWl8RlUD0sgCcbYt9V6U0dAkZoWa0GGnuAqFCX8rKVYJ6CkfJLdzRG59aYV8r yD/7W79lA935wfydKgDJ57YhIf/gqZIFjgR98x6/QoP2wwIHDhGfk1pUj7qxf2p7 RIsoyqUdzJof9mHU5/5emM6FWMVrDAbaFRbckzwMu5fI3WmCtqb3Y76HAg3kN5U/ QJv0cbUrjCnqno8KitmrA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 0774ef54 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 10 Oct 2023 19:33:09 +0000 (UTC) Message-ID: <1fafc7eb50f13e1e500871ae9189876e3861b45b.1696966139.git.vivien@planete-kraus.eu> In-Reply-To: References: <87mswte1rx.fsf@gmail.com> <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> <70ae450282e2411c5506447c79adf6a62345344c.1696966139.git.vivien@planete-kraus.eu> Date: Tue, 19 Sep 2023 13:32:26 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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 * gnu/packages/gnome.scm (libgudev): Update to 238. --- gnu/packages/gnome.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4ed22d4da0..d8cdd11bd4 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6899,14 +6899,14 @@ (define-public eog-plugins (define-public libgudev (package (name "libgudev") - (version "236") + (version "238") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" version "/" name "-" version ".tar.xz")) (sha256 (base32 - "094mgjmwgsgqrr1i0vd20ynvlkihvs3vgbmpbrhswjsrdp86j0z5")))) + "1laxgdkgmr30aw44sm4rgpsdybwxx5rszcm8c2y3vmy9myqnl9k1")))) (build-system meson-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc. From patchwork Tue Sep 19 11:32:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54724 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 8EB4127BBEA; Tue, 10 Oct 2023 20:34:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 968B427BBEB for ; Tue, 10 Oct 2023 20:34:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqIUH-0000Fz-If; Tue, 10 Oct 2023 15:33:51 -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 ) id 1qqIUC-0000Dm-6m for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:44 -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 ) id 1qqIUA-0008KI-Hi for guix-patches@gnu.org; Tue, 10 Oct 2023 15:33:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqIUV-0008Nc-RH for guix-patches@gnu.org; Tue, 10 Oct 2023 15:34:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v10 6/6] gnu: upower: Update to 1.90.2. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 19:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Liliana Marie Prikler , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169696642432144 (code B ref 66099); Tue, 10 Oct 2023 19:34:03 +0000 Received: (at 66099) by debbugs.gnu.org; 10 Oct 2023 19:33:44 +0000 Received: from localhost ([127.0.0.1]:36933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqIUC-0008MO-6Z for submit@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:44 -0400 Received: from planete-kraus.eu ([89.234.140.182]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqIU6-0008KX-Hl for 66099@debbugs.gnu.org; Tue, 10 Oct 2023 15:33:39 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 7772bdbb; Tue, 10 Oct 2023 19:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:mime-version :content-type:content-transfer-encoding:to:cc; s=albinoniB; bh=p E1Kwtt6HSrQboztKcDKXFr0xrc=; b=unCYHe3aCxskhHBXqvKc1/MoFE02Zk3Sp tjF0pvFsY+QNSulA2GXGLruJCE7WWyl3Zko5l/QwJWuyx7GcAddKhK0dS17hXpHQ R8vANAb00ye6INb+qP5/FClLMNoL/JfEoEaxBDhaBJe/yTefODwm8eTQh7H5nJGC iMTUbqQ+4WJSVIHQTDrqbbSR1i5qi/v2VQIdrSKNrlXbWZTKF0b1zre6GpN9WDU/ 9XMIJvmE4B7gpyIce1aPgcvbNnvttMaOA1ry10Zd4MXTHZm/b4G0BfZpbs7zrG07 vtZTi/USMsEfiXMVwbyu7AvQ95dQaie1XPdDw0J438lF4gqFYRCVA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id d19e9222 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 10 Oct 2023 19:33:15 +0000 (UTC) Message-ID: <7ae77396bb22ea658a297e484204ed66e4636a12.1696966139.git.vivien@planete-kraus.eu> In-Reply-To: <1fafc7eb50f13e1e500871ae9189876e3861b45b.1696966139.git.vivien@planete-kraus.eu> References: <87mswte1rx.fsf@gmail.com> <4744acd296e1c2f5d3f9f14c7cfba3e3696dcac7.1696966139.git.vivien@planete-kraus.eu> <70ae450282e2411c5506447c79adf6a62345344c.1696966139.git.vivien@planete-kraus.eu> <1fafc7eb50f13e1e500871ae9189876e3861b45b.1696966139.git.vivien@planete-kraus.eu> Date: Tue, 19 Sep 2023 13:32:46 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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 Upower has an extra hardware description file for use with udev. It should be installed under upower’s output, not eudev’s. A test is disabled, for calling an unimplemented bluez method. The conditional 'adjust-test-for-excess-precision phase is included in the new 'adjust-test-suite, so that the list of phases is always the same. * gnu/packages/gnome.scm (upower): Update to 1.90.2. [#:configure-flags]: Set udevhwdbdir. [#:phases] : Add this phase unconditionnally : Disable test_bluetooth_hidpp_mouse. [inputs]: Remove dbus-glib. [native-inputs]: Add dbus. --- gnu/packages/gnome.scm | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index d8cdd11bd4..6e3933ec96 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5727,7 +5727,7 @@ (define-public geocode-glib-with-libsoup2 (define-public upower (package (name "upower") - (version "1.90.0") + (version "1.90.2") (source (origin (method git-fetch) @@ -5736,7 +5736,7 @@ (define-public upower (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1g17rm91p8vfpjyb0k2shylrs55nccn3fa890vlk4n9s71sghbzq")) + (base32 "13xp423ycv8imf2cmgf6lii9f01p7x2v19cny7acrmczkc0cqv7d")) (modules '((guix build utils))) (snippet ;; Upstream commit . - (substitute* "src/linux/integration-test.py" - (("assertEqual(.*)40\\.0" _ middle) - (string-append - "assertAlmostEqual" middle "40.0")))))) - #~%standard-phases))) + (string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d") + (string-append "-Dudevhwdbdir=" #$output "/lib/udev/hwdb.d")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'adjust-test-suite + (lambda _ + ;; This test calls an unimplemented bluez dbus method. + (substitute* "src/linux/integration-test.py" + (("test_bluetooth_hidpp_mouse") + "disabled_test_bluetooth_hidpp_mouse")) + #$@(if (target-x86-32?) + ;; Address test failure caused by excess precision + ;; on i686: + ;; . + '((substitute* "src/linux/integration-test.py" + (("assertEqual(.*)40\\.0" _ middle) + (string-append + "assertAlmostEqual" middle "40.0")))) + '())))))) (native-inputs (list `(,glib "bin") ; for gdbus-codegen gobject-introspection @@ -5785,12 +5791,13 @@ (define-public upower python-packaging python-pygobject umockdev + dbus ;; For man pages. docbook-xsl libxslt ; for 'xsltproc' libxml2)) ; for 'XML_CATALOG_FILES' (inputs - (list dbus-glib libgudev libusb)) + (list libgudev libusb)) (propagated-inputs ;; In Requires of upower-glib.pc. (list glib))