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: 54536 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 906D227BBEC; Fri, 6 Oct 2023 18:32:42 +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 7986227BBE2 for ; Fri, 6 Oct 2023 18:32:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoogI-0006pJ-4C; Fri, 06 Oct 2023 13:32:06 -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 1qoofw-0006l0-MA for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:45 -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 1qoofw-0006YC-E3 for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoogF-0000Wc-06 for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v8 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: Fri, 06 Oct 2023 17:32: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: Liliana Marie Prikler , Maxim Cournoyer , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16966135011941 (code B ref 66099); Fri, 06 Oct 2023 17:32:02 +0000 Received: (at 66099) by debbugs.gnu.org; 6 Oct 2023 17:31:41 +0000 Received: from localhost ([127.0.0.1]:52565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoofp-0000V5-36 for submit@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:40 -0400 Received: from planete-kraus.eu ([89.234.140.182]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoofj-0000UU-TE for 66099@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:35 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 3297bb21; Fri, 6 Oct 2023 17:31:11 +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=061rTtIN0gegOXVEMZEocWmTM/M=; b=x mXKA+NxEnvBsNL6U9wL20cHHdMfRj1RdJykvuVXDxXpCqAFJU9FI4hP7zodKK5FV paPLGoGVMWbeNSqACQ0BeCJicbjsE8R2QSgf1aLwNhCCMI9vxaW1gHXX4RXMFjS8 7n7GDFyPOBlC1l9zXzK85vhlSHsm8y6PVd1WfszvAXk0w2BOTPdm5Fv4hGLazFQ0 jBw7oqSOIYi2G6ozAL6EIaMn+qxuwsfSlSN4P5YsKyMAQois71T8vaBaV2qwF4/A DLGRG4hi+6d2H1f25WIUn2ep2dHV0YubKAKVdQ/SnIQjucELhOG8gbj4R15E9qe6 S+hpj//L11eaCTNf1fvnQ== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 09a75fb3 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 6 Oct 2023 17:31:10 +0000 (UTC) Message-ID: In-Reply-To: References: <0825bf42daa34ee464c5237b04ad6bf90942e489.camel@gmail.com>, , <1a1089275d13e02b4485c5de6e908ece88f5d2b6.camel@gmail.com><87y1ghryel.fsf@gmail.com>, <87pm1try6q.fsf@gmail.com>, <87lechrvhl.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 Everything that eudev searches in "sysconf" is actually searched under /gnu/store/.../etc/udev, as autoconf defines sysconfdir under $prefix by default. The udev-service-type however prepares every file in /etc/udev, without a prefix. To use /etc/udev as the sysconfdir, we must set it as a configure flag. Eudev has a hardware database that installs descriptions of hardware in /etc, but they can also be installed in /lib instead. The manual page recommends to install all hardware description files into /lib/udev/hwdb.d, but this directory will be read-only when installing another hardware-providing package. udevadm hwdb --update searches for hardware files in /etc/udev/hwdb.d, then /lib/udev/hwdb.d, then UDEV_HWDB_PATH. Each package providing hardware descriptions should install them into their respective /lib/udev/hwdb.d, and the udev-service-type is responsible to collect the relevant hardware descriptions and put them all in /etc/udev/hwdb.d. The build system tries, but fails, to install hardware files into /etc. A fix makes it install the hardware files into /lib instead. Another file, an empty /etc/udev.conf, is expected to be installed in /etc/udev, but it is not needed in guix. The hwdb.bin file used to be generated in /etc/udev/hwdb.bin, but since the sysconf dir is now directly /etc, the hwdb.bin index will not be found under /etc/udev/hwdb.bin. * 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 85e3d9845d..c33036b6e0 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4262,10 +4262,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") @@ -4273,8 +4272,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 @@ -4285,6 +4285,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 "udevhwdblibdir = $(udevlibexecdir)/hwdb.d\n") + (format port "include ./files.am"))) + (substitute* "hwdb/files.am" + (("dist_udevhwdb_DATA =") + "dist_udevhwdblib_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")) @@ -4296,19 +4321,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: 54535 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 68A9027BBE9; Fri, 6 Oct 2023 18:32:34 +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 4032B27BBE2 for ; Fri, 6 Oct 2023 18:32:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoogB-0006ny-Ru; Fri, 06 Oct 2023 13:32:00 -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 1qoofw-0006l1-RP for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:45 -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 1qoofw-0006YO-Jd for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoogF-0000Wk-F4 for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v8 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: Fri, 06 Oct 2023 17:32: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: Liliana Marie Prikler , Maxim Cournoyer , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16966135011948 (code B ref 66099); Fri, 06 Oct 2023 17:32:03 +0000 Received: (at 66099) by debbugs.gnu.org; 6 Oct 2023 17:31:41 +0000 Received: from localhost ([127.0.0.1]:52568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qooft-0000VF-0l for submit@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:41 -0400 Received: from planete-kraus.eu ([89.234.140.182]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoofp-0000UU-TW for 66099@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:38 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id c267bf91; Fri, 6 Oct 2023 17:31:17 +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=k+d97SLb+vlGEuQb3iYvz11PVP4=; b=l YtUtvObW7pefUAJKtdAvb/uSNhh5L7Q+m/27ajarUtcwRebQwF9veh3XBZ96ZVeS Z4exxJyRYax7fJJjKC1N+Uld12A3qRM0VBjhKYe+3Pvz0LYR6m8p0V58XA2DXsC/ 21gDosJW6Z8xIF0w3hczIk6tR7NrPvu2cW+f1d45QExsmKSxUh18gPmSx88l2O7n bzAoAUeKa99b5Dl0J7tRvYMCd6rJfSpRF7AIh0yxwcnL8sSEG05nrupycK47Ju+n qIQoA40pw0M807o8CbmCVjDEktIUq2TH/qV69Nm8l3kqqRoe6Dy6TXM015XMdi2Y ksE8Uo+KKHxamQcl6SItA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 3fcedc74 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 6 Oct 2023 17:31:17 +0000 (UTC) Message-ID: <745ab283537534e14ae37e1989ba7baa4178938b.1696610746.git.vivien@planete-kraus.eu> In-Reply-To: References: <0825bf42daa34ee464c5237b04ad6bf90942e489.camel@gmail.com>, , <1a1089275d13e02b4485c5de6e908ece88f5d2b6.camel@gmail.com><87y1ghryel.fsf@gmail.com>, <87pm1try6q.fsf@gmail.com>, <87lechrvhl.fsf@gmail.com> 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 b3f2d2e8b8..30372bf1b5 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2212,19 +2212,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: 54537 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 344FC27BBE2; Fri, 6 Oct 2023 18:32:44 +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 A48BE27BBEA for ; Fri, 6 Oct 2023 18:32:39 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoogK-0006rC-QU; Fri, 06 Oct 2023 13:32:08 -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 1qoofx-0006l7-AS for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:45 -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 1qoofx-0006YY-1o for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoogF-0000Wr-Uk for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v8 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: Fri, 06 Oct 2023 17:32: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: Liliana Marie Prikler , Maxim Cournoyer , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16966135071965 (code B ref 66099); Fri, 06 Oct 2023 17:32:03 +0000 Received: (at 66099) by debbugs.gnu.org; 6 Oct 2023 17:31:47 +0000 Received: from localhost ([127.0.0.1]:52571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoofy-0000Vc-DO for submit@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:46 -0400 Received: from planete-kraus.eu ([89.234.140.182]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoofv-0000UU-Tg for 66099@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:44 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 9f195b6a; Fri, 6 Oct 2023 17:31:23 +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=rJOSnSnmweLGN0RaufMBzY2kw/Q=; b=Y /pxeosNk8SyPbm3asKbH+M0TaLZCZ5cyzdmRZXxv2d/3pzZ6HGOunVrU6q7mK//V ny+Zjd5wOdaV8XfslKD35CLtj93qcCSMt9Pfs05ma+ty60wvvKSJhABAbymvfP55 JOidjeQZ+XVXH2cdQfpqDiei+kxzLfRLBALdFnZO6fyam0683q1TJ/wCWZPl6p/y opZAziOve6GsAx/EULrqX8RXf+iGLzqdcyc7syepIgmJqw5xZEOf8AMx/3imOrgT cVXgHQ81IqV4E9cMjLmcZeM5P+1usDLTV0vzmWbysrhMNIcATCu86pnLBa2eS9KJ J2rGTwOZQbSpjKLWXX3qw== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id bafbb626 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 6 Oct 2023 17:31:23 +0000 (UTC) Message-ID: <1e9635cac8aa08da17be6f1270552e3f4dfbdd40.1696610746.git.vivien@planete-kraus.eu> In-Reply-To: References: <0825bf42daa34ee464c5237b04ad6bf90942e489.camel@gmail.com>, , <1a1089275d13e02b4485c5de6e908ece88f5d2b6.camel@gmail.com><87y1ghryel.fsf@gmail.com>, <87pm1try6q.fsf@gmail.com>, <87lechrvhl.fsf@gmail.com> 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 30372bf1b5..0bf0568a4e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2184,9 +2184,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)) @@ -2197,39 +2197,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 conf.d + (string-append #$output + "/lib/udev/" + #$subdirectory + ".d")) (define file-copy-dest - (string-append rules.d "/" #$file-name)) + (string-append conf.d "/" #$file-name)) - (mkdir-p rules.d) + (mkdir-p conf.d) (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: 54533 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 365EC27BBEA; Fri, 6 Oct 2023 18:32:09 +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 9FE6A27BBE2 for ; Fri, 6 Oct 2023 18:32:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoogD-0006nz-Ut; Fri, 06 Oct 2023 13:32:03 -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 1qoofx-0006lb-O0 for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:45 -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 1qoofx-0006Yg-FA for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoogG-0000Wy-Bd for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v8 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: Fri, 06 Oct 2023 17:32:04 +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: Liliana Marie Prikler , Maxim Cournoyer , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16966135121983 (code B ref 66099); Fri, 06 Oct 2023 17:32:04 +0000 Received: (at 66099) by debbugs.gnu.org; 6 Oct 2023 17:31:52 +0000 Received: from localhost ([127.0.0.1]:52574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoog3-0000Vu-VH for submit@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:52 -0400 Received: from planete-kraus.eu ([89.234.140.182]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoog1-0000UU-Tv for 66099@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:50 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 216ea6d6; Fri, 6 Oct 2023 17:31:29 +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=dN/6T1jAXW6zqtpJRIsLQF9Ti94=; b=y i96cK2GTPdhGYFpSkRIJeVgd0pJI2ucCMcXKSbkSPb6sDVg58pjp9vvQGSehIKj6 HJ4e5FUtCjGecRs1KJuko2j/i6Cp94e2i0ENxGyt1C70caQ26AfsqjpvyZynNASe bxLCVADoggw/uD4TTQttPVEpovZu5mgnLo5v1NJJuiBk8KxuFYa4Yre/H8ranz1G f8cMYCfwmaL8oIZg2ETpAj2Xf4k4RqjW//0jsmkEfLAQrQ14pgQ7ss8a87Yc1mgj RUeLHKKezP0QbBmmbixYfrTMZcjcjN7IiuE4BwIMmaMXk5iPKHFoWCGf+uG3P6bN B2xeRadaV36E/WmS3EABg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 8c2313d8 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 6 Oct 2023 17:31:28 +0000 (UTC) Message-ID: <49d22daea7adba540d15321c247da1388010c76c.1696610746.git.vivien@planete-kraus.eu> In-Reply-To: References: <0825bf42daa34ee464c5237b04ad6bf90942e489.camel@gmail.com>, , <1a1089275d13e02b4485c5de6e908ece88f5d2b6.camel@gmail.com><87y1ghryel.fsf@gmail.com>, <87pm1try6q.fsf@gmail.com>, <87lechrvhl.fsf@gmail.com> 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 directory now includes hwdb.d and hwdb.bin, which is computed immediately. The documentation has been reworked so as to explain why creating udev rules or hwdb needs helper functions for configuration or extension. The hwdb.bin file is conditionally computed by a native version of eudev, that may be configured in the udev-service-type configuration. The condition is that both target and native eudev have the same version. If so, we can reasonably expect that the hwdb.bin file created by native eudev can later be read by target eudev. * 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 | 62 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 101 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 46591b2f64..ec0bd688f0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19322,9 +19322,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 @@ -19332,10 +19346,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 @@ -19358,6 +19379,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. @@ -19377,6 +19403,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. @@ -19401,12 +19432,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 0bf0568a4e..0ca7f2af4a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -81,6 +81,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) @@ -150,11 +151,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? @@ -2181,8 +2186,10 @@ (define-record-type* udev-configuration? (udev udev-configuration-udev ;file-like (default eudev)) - (rules udev-configuration-rules ;list of file-like - (default '()))) + (rules udev-configuration-rules ;package-like file-like + (default '())) + (hardware udev-configuration-hardware ;package-like file-like + (default '()))) (define (udev-configurations-union subdirectory packages) "Return the union of the lib/udev/SUBDIRECTORY.d directories found in each @@ -2224,6 +2231,10 @@ (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)) +(define (udev-hardware file-name contents) + "Return a directory with a udev hardware file FILE-NAME containing CONTENTS." + (udev-configuration-file "hwdb" 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 of FILE." @@ -2248,6 +2259,10 @@ (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 (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" 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, @@ -2355,13 +2370,30 @@ (define udev.conf (define (udev-etc config) (match-record config - (udev rules) + (udev rules hardware) + (let* ((hwdb.d + (udev-configurations-union "hwdb" (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" #$hwdb.d) + (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.d" ,hwdb.d) + ,@(if hwdb.bin + `(("hwdb.bin" ,hwdb.bin)) + '())))))))) (define udev-service-type (service-type (name 'udev) @@ -2370,12 +2402,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} @@ -2410,6 +2445,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: 54534 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 7978027BBE9; Fri, 6 Oct 2023 18:32:22 +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 5BCBC27BBE2 for ; Fri, 6 Oct 2023 18:32:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoogM-0006sL-MY; Fri, 06 Oct 2023 13:32: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 ) id 1qoofz-0006lp-HS for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:55 -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 1qoofx-0006Yo-Si for guix-patches@gnu.org; Fri, 06 Oct 2023 13:31:47 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoogG-0000X6-PD for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v8 5/6] gnu: libgudev: Update to 238. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Oct 2023 17:32:04 +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: Liliana Marie Prikler , Maxim Cournoyer , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16966135192002 (code B ref 66099); Fri, 06 Oct 2023 17:32:04 +0000 Received: (at 66099) by debbugs.gnu.org; 6 Oct 2023 17:31:59 +0000 Received: from localhost ([127.0.0.1]:52577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoogA-0000WD-Sr for submit@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:59 -0400 Received: from planete-kraus.eu ([89.234.140.182]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoog9-0000UU-U6 for 66099@debbugs.gnu.org; Fri, 06 Oct 2023 13:31:58 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 4cb8d12b; Fri, 6 Oct 2023 17:31:37 +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=8IllG/iUYeuMh4Fe17WtACJeN8U=; b=t gATjwaF0sl6Qmj2rwtfDeTdxXetLvx0jMfqtQ7MtHGzx2cmjWVBCjNCyTDvfX7pv C+Iy2UdbLKV2x9VbJqzUVECT/NP+kcmx0xEG7r4KjZ6Uct7VX1SIpw2coE3rhSX2 h+ZDWupG8lKMPkMJPP1cV2mZ502D2MjB0bIrv2XLJBPHkYr2W+89t+7/SWwnNnvP B67b4Aj4Wto5JP6xhIMMB7xMOaGTk8UQxVJANk1SCIQDBBBAGE2mji4/Kw8qydwd NU0oi4IyseSbVFTsQIBYyVB17zM1SGjCIEVFIT+Ak8Pc8rzmqzouSMLU4Y79Cydx UtCEsi26pTLfHAWhE9DpQ== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 6307c6ad (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 6 Oct 2023 17:31:36 +0000 (UTC) Message-ID: <0eed23771cad33bdc798d934374c783be7a4cbee.1696610746.git.vivien@planete-kraus.eu> In-Reply-To: References: <0825bf42daa34ee464c5237b04ad6bf90942e489.camel@gmail.com>, , <1a1089275d13e02b4485c5de6e908ece88f5d2b6.camel@gmail.com><87y1ghryel.fsf@gmail.com>, <87pm1try6q.fsf@gmail.com>, <87lechrvhl.fsf@gmail.com> 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 eaceb76e1e..4ea3dc455a 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: 54538 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 CC7FB27BBE9; Fri, 6 Oct 2023 18:32:56 +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 A5CB127BBE2 for ; Fri, 6 Oct 2023 18:32:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoogv-00079Z-7n; Fri, 06 Oct 2023 13:32: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 1qoogt-000792-Jc for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:43 -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 1qoogt-0006kY-BT for guix-patches@gnu.org; Fri, 06 Oct 2023 13:32:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoohC-0000Yc-7s for guix-patches@gnu.org; Fri, 06 Oct 2023 13:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v8 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: Fri, 06 Oct 2023 17:33: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: Liliana Marie Prikler , Maxim Cournoyer , 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16966135312085 (code B ref 66099); Fri, 06 Oct 2023 17:33:02 +0000 Received: (at 66099) by debbugs.gnu.org; 6 Oct 2023 17:32:11 +0000 Received: from localhost ([127.0.0.1]:52586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoogN-0000XY-6W for submit@debbugs.gnu.org; Fri, 06 Oct 2023 13:32:11 -0400 Received: from planete-kraus.eu ([89.234.140.182]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoogK-0000UU-VG for 66099@debbugs.gnu.org; Fri, 06 Oct 2023 13:32:09 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id a94b660d; Fri, 6 Oct 2023 17:31: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:mime-version :content-type:content-transfer-encoding:to:cc; s=albinoniB; bh=U 4Q95r5OzDlerBhawFCb592wjQg=; b=jqYZry9MpWachHRTYqEk0BtqebMxxn0X8 yMVnih1fQ9T3QmVWfeLBYM0n/6Cyu7uyKLs4d3WgkDNHCxQFsiK/SZalZZYW08Yl eT2UwllGuTLqHl7YGA/ZnRdy+GaT+BeVGFw5n5rLpNAFbKcF9DVvv2ZGG1+IlVrf Lgm46Cshak4cF3FJSVWcZgiKvCKJYcWvaJk59fkeFzBIAn4+zOwCPLnCjrY+JIoO HpD3aUzdlVMgyrgxHnsf6knSTuQTgY3wHURP1vjQ2xMztU0paPKany2C7uUq9V9E FzAjLCaH4dT3nQZyzI58iZqQ4eXi8/MzMjNPuv1j8dMyDHyMg19uA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 137a44d3 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 6 Oct 2023 17:31:48 +0000 (UTC) Message-ID: In-Reply-To: References: <0825bf42daa34ee464c5237b04ad6bf90942e489.camel@gmail.com>, , <1a1089275d13e02b4485c5de6e908ece88f5d2b6.camel@gmail.com><87y1ghryel.fsf@gmail.com>, <87pm1try6q.fsf@gmail.com>, <87lechrvhl.fsf@gmail.com> 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 The new eudev now can install hwdb files. Upower has some, but they should get installed in upower’s output, not eudev’s. The phases needed a rework. Now the 32-bit-specific test fix is always there, except it may be empty. test_bluetooth_hidpp_mouse fails, after calling into a bluez dbus method. * 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 4ea3dc455a..3f773aae8a 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))