From patchwork Tue Sep 19 11:23:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54493 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 4E78F27BBEC; Thu, 5 Oct 2023 06:10:25 +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 6692827BBE2 for ; Thu, 5 Oct 2023 06:10:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGcN-0003ep-2N; Thu, 05 Oct 2023 01:09:47 -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 1qoGcK-0003eR-Ni for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09: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 1qoGcK-0004T9-Df for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoGcc-0001GJ-Dd for guix-patches@gnu.org; Thu, 05 Oct 2023 01:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v7 1/5] gnu: eudev: Update libudev version to 251. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 05:10: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@gmail.com, 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16964825594728 (code B ref 66099); Thu, 05 Oct 2023 05:10:02 +0000 Received: (at 66099) by debbugs.gnu.org; 5 Oct 2023 05:09:19 +0000 Received: from localhost ([127.0.0.1]:45725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGbs-0001E8-1Q for submit@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:19 -0400 Received: from planete-kraus.eu ([89.234.140.182]:42922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGbm-0001Dv-Mj for 66099@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:14 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 70335266; Thu, 5 Oct 2023 05:08:51 +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 m5CsLOVtOGpO9S73OY7H5XS2yQ=; b=tDOjmRme5XmtIAv0kje9Wq5/orO+Elmj8 8iCUNA5/bGhqiT3TYfcvID020GkYzP7ZYC6gPPmAI+NaOhp7mZXtuINWKkGbhTf1 vJ3fkvi9ou8BYNtSvCRchSMwux51SLUv7E5Nwlt1Je8pbVbINeJWOOVLsf4csXY/ a8O49Kj6A3lfyEX+I67Q+j9GuWNbAWTaWnzad0SOPdrgUvXtDW0Di/g4c/WvP4oJ D9UoUVwwsz7QBfu/r1thp9iQ8GeVZEPwZLyXvqKxdPsUds/er2Dt5GbsqzxZWgOT JUxb5A9YCrQvpqU/sVYF8UJ57KXEIBKbKAzLsURdwe58k7gYJYxYQ== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 502a1814 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 5 Oct 2023 05:08:51 +0000 (UTC) Message-ID: <5336473ade7d12a8c96f7212dad22c9fb3d18524.1696482243.git.vivien@planete-kraus.eu> In-Reply-To: References: <69e084520f189ab5f8a80afc7011a9b1ae911d2a.camel@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 has significant improvements from 3.2.12, but they are not released yet. The package version number has already been bumped to 3.2.14, but since it is not released yet, we still advertise it as 3.2.12. Everything that eudev searches in "sysconf" (/etc/udev/*) is actually searched under its installation prefix. The udev-service-type however prepares every file in /etc/udev, without a prefix. Eudev has a hardware database that installs descriptions of hardware in /etc, but they should go to /lib prior to being used. The build system can’t install to /etc, and should not, because this directory is owned by the udev-service-type. So they are installed directly in /lib. Another file, an empty /etc/udev.conf, is simply ignored. 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 a post-v3.2.12 commit. [snippet]: New snippet to override the version number. [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 | 64 ++++++++++++++----- .../patches/eudev-rules-directory.patch | 9 +-- 2 files changed, 52 insertions(+), 21 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 85e3d9845d..e75ed0b233 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4263,18 +4263,31 @@ (define-public earlyoom (define-public eudev ;; The post-systemd fork, maintained by Gentoo. + (define commit + "c5bae0b656513463f92808f324f8fcbe34a0b401") + (define revision "1") (package (name "eudev") - (version "3.2.11") + ;; Remove the snippet when upgrading to a released version + (version (git-version "3.2.12" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/gentoo/eudev") - (commit (string-append "v" version)))) + (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 - "0dzaqwjnl55f69ird57wb6skahc6l7zs1slsrzqqfhww33icp6av")) - (patches (search-patches "eudev-rules-directory.patch")))) + "0rqyzmp8kcnxiy1hq13pr2syp4krnf6q97xwlr0bwcd6x4grbak4")) + (patches (search-patches "eudev-rules-directory.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; configure.ac uses 3.2.14 as the version number, but it + ;; is not released yet. Remove the snippet once a later + ;; version is released. + (substitute* "configure.ac" + (("AC_INIT\\(\\[eudev\\],\\[3.2.14\\]") + "AC_INIT([eudev],[3.2.12]")))))) (build-system gnu-build-system) (arguments (list @@ -4285,6 +4298,28 @@ (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 _ + ;; eudev wants to install its provided hwdb files in /etc, but + ;; we want them in 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 =")) + ;; eudev wants to install a template udev.conf into /etc, but we + ;; do not care. + (substitute* "src/udev/Makefile.am" + (("dist_udevconf_DATA =") + "dist_noinst_DATA =")) + ;; eudev thinks we want to make sure /etc/udev/rules.d exists + ;; when installing - we do not. + (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 +4331,14 @@ (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" + "--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 Wed Oct 4 21:05:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54491 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 42FF527BBEB; Thu, 5 Oct 2023 06:10:19 +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 8ED7527BBE2 for ; Thu, 5 Oct 2023 06:10:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGcO-0003fM-6f; Thu, 05 Oct 2023 01:09: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 1qoGcN-0003en-11 for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:47 -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 1qoGcL-0004TE-AT for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoGcc-0001GQ-Q0 for guix-patches@gnu.org; Thu, 05 Oct 2023 01:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v7 2/5] services: udev: unify udev-rule and file->udev-rule. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 05:10: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@gmail.com, 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16964825674750 (code B ref 66099); Thu, 05 Oct 2023 05:10:02 +0000 Received: (at 66099) by debbugs.gnu.org; 5 Oct 2023 05:09:27 +0000 Received: from localhost ([127.0.0.1]:45728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGc2-0001EY-Pk for submit@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:27 -0400 Received: from planete-kraus.eu ([89.234.140.182]:42922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGc1-0001Dv-82 for 66099@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:25 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id dbbd25e5; Thu, 5 Oct 2023 05:09:05 +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=+jfvvqfw0rbioHPFn5mlbydGaJ4=; b=B rV9jjb0Py0mcRhIkdDHLqTOaW95fJqbkZcmPtFdPFcSQ54ZshiKMs60izX2OMxVQ BMZhE24qZ13PtVPciVGBr0hkRDiOnGFll0GsFoiUsXczjBa2cz0KfI6Fxoeob3v7 DHB6l5DWtL2rYpj46I9YCAbIF19XeZt8p74jU8OwrMpoOXYfYZFvHwWBeatzWweZ yZ+sEVbPAHiYwwLRpLKOv9j6ljd5NMg5fkUGAYgPaKAqQGPDBkZij8FsuWTuHyM1 jwNTIKx/PZBDhBQVsgXLahpwZTmed9nWJ5OSfVNkMgaW0quDUD0gEPK88dFyefgo mTszDgzBC7XFkU2AICc2Q== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 4037f9c4 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 5 Oct 2023 05:09:05 +0000 (UTC) Message-ID: <77c5be1f9c3b50fdd4f61cf2e4f80b6900b89a65.1696482243.git.vivien@planete-kraus.eu> In-Reply-To: References: <69e084520f189ab5f8a80afc7011a9b1ae911d2a.camel@gmail.com> Date: Wed, 4 Oct 2023 23:05:19 +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): Implements in terms of file->udev-rule. Use texinfo in docstring. --- gnu/services/base.scm | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index b3f2d2e8b8..190803b780 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2211,20 +2211,9 @@ (define (udev-rules-union packages) (computed-file "udev-rules" build)) (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))))))) + "Return a directory with a udev rule file @var{file-name} containing +@var{contents}." + (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 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: 54494 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 5ACD527BBE2; Thu, 5 Oct 2023 06:10:27 +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 092E027BBEA for ; Thu, 5 Oct 2023 06:10:22 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGcP-0003fs-At; Thu, 05 Oct 2023 01:09:49 -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 1qoGcN-0003eo-1C for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:47 -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 1qoGcL-0004TM-9k for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoGcd-0001GY-66 for guix-patches@gnu.org; Thu, 05 Oct 2023 01:10:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v7 3/5] gnu: udev-service-type: accept hwdb file extensions. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 05:10: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@gmail.com, 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16964825794781 (code B ref 66099); Thu, 05 Oct 2023 05:10:03 +0000 Received: (at 66099) by debbugs.gnu.org; 5 Oct 2023 05:09:39 +0000 Received: from localhost ([127.0.0.1]:45731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGcE-0001F0-3a for submit@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:38 -0400 Received: from planete-kraus.eu ([89.234.140.182]:42922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGcC-0001Dv-8o for 66099@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:37 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id ce81c2cb; Thu, 5 Oct 2023 05:09:16 +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=g00As9j+mbB2gC+pBiwBRbAQaCs=; b=j +7qbMSVlGtQ/74A/XwKYCfYKC0CnYVsSfcOAd+X1f898Pyzbe2EqoZXEdk0JJiqL gC6RtF1pgKKyOdJmqOHT8sCA4vXMgSSA43gNQV1GY9mHReCF4Nt2yS+R0YJzQ4dW paE83yDTu2S242JugLHrsX/5xRzPSr+CtuUZZs2UOo72/rl3/jX/tvFbV9UJGzm7 2QYBR1adWXX35vJsR3Vofjxxc1bL1wohOaJRGw4IHNvRIuHiosKXimitk43e13yh BA0tXO533Vo3bqVQCMlRJnsRZQpOmQ9MnjFp3EBcnypmmXYpAvoPkfIYFJxRnP7y bAWXW5E6fcPL62GoLBTRA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 12fb4c15 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 5 Oct 2023 05:09:15 +0000 (UTC) Message-ID: <53b29725dbfa2210a4b29105828c611550a8eab7.1696482243.git.vivien@planete-kraus.eu> In-Reply-To: References: <69e084520f189ab5f8a80afc7011a9b1ae911d2a.camel@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 "rules" field in the udev-configuration record can now hold both rules and hwdb files. The udev-rules-union has been made generic, and renamed to udev-configuration-union, so that it works with either rules or hwdb files. Some udev-related auxiliary functions in (gnu services base) had non-texinfo variable references in their docstrings ("FILE-NAME" instead of "@var{file-name}"). 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-configuration-union): Make udev-rules-union generic. (udev-hwdb): New function. (file->udev-rule): Fix docstring. (file->udev-hwdb): New function. (udev-rules-service): Fix docstring. (udev-hwdb-service): New function. (udev-etc): Add hwdb.d and hwdb.bin. (module): Export udev-hwdb, file->udev-hwdb, and udev-hwdb-service. (): Add the native-udev field. * doc/guix.texi (Base Services)[udev-service-type]: Explain configuration and extension values. * doc/guix.texi (Base Services)[udev-hwdb]: Document it. [udev-hwdb-service]: Same. * doc/guix.texi (Base Services)[udev-configuration]: Document the native-udev field. --- doc/guix.texi | 52 +++++++++++++++++++----- gnu/services/base.scm | 94 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 122 insertions(+), 24 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 46591b2f64..3310271ec8 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 hwdb files matters, the +configuration items for rules and hwdb 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 @code{lib/udev/rules.d} and optional hwdb files in +@code{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. However, to generate a +configuration or an extension, it is advised to use @code{udev-rule} and +@code{file->udev-rule} for rules, and @code{udev-hwdb} and +@code{file->udev-hwdb} for hwdb files. + +In an operating-system declaration, this service type can be +@emph{extended} using procedures @code{udev-rules-service} and +@code{udev-hwdb-service}. @end defvar @deftp {Data Type} udev-configuration @@ -19334,8 +19348,18 @@ Base Services @item @code{udev} (default: @code{eudev}) (type: file-like) Package object of the udev service. +@item @code{native-udev} (default: @code{eudev}) (type: file-like) +Native udev package to compile @code{hwdb.bin}. The trie format used for +@code{hwdb.bin} must be compatible with the @code{udev} and +@code{native-udev} fields of the udev configuration. To avoid generating +@code{hwdb.bin}, pass @code{#f} as the @code{native-udev} field. + +In any case, if the package version string differs between @code{udev} +and @code{native-udev}, @code{hwdb.bin} is @strong{not} created. + @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 or udev-hwdb files under a +sub-directory. @end table @end deftp @@ -19358,6 +19382,11 @@ Base Services @end lisp @end deffn +@deffn {Procedure} udev-hwdb @var{file-name} @var{contents} +Return a udev-hwdb 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 +19406,11 @@ Base Services @end lisp @end deffn +@deffn {Procedure} udev-hwdb-service @var{name} @var{hwdb} +Return a service that extends @code{udev-service-type} with +@var{hwdb}. The service name is @code{@var{name}-udev-hwdb}. +@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 +19435,10 @@ 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. +@deffn {Procedure} file->udev-hwdb @var{file-name} @var{file} +Return a udev-hwdb 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 190803b780..00916a35e4 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) @@ -153,8 +154,11 @@ (define-module (gnu services base) udev-service-type udev-service ; deprecated udev-rule + udev-hwdb file->udev-rule + file->udev-hwdb udev-rules-service + udev-hwdb-service login-configuration login-configuration? @@ -2181,12 +2185,15 @@ (define-record-type* udev-configuration? (udev udev-configuration-udev ;file-like (default eudev)) - (rules udev-configuration-rules ;list of file-like + (native-udev udev-configuration-native-udev + (default eudev)) + (rules udev-configuration-rules ;list of rule- and + ;hwdb-providing packages (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-configuration-union subdirectory packages) + "Return the union of the @code{lib/udev/@var{subdirectory}.d} directories found +in each item of @var{packages}." (define build (with-imported-modules '((guix build union) (guix build utils)) @@ -2197,7 +2204,8 @@ (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 @@ -2208,15 +2216,21 @@ (define (udev-rules-union packages) (union-build #$output (filter-map rules-sub-directory '#$packages))))) - (computed-file "udev-rules" build)) + (computed-file (string-append "udev-" subdirectory) build)) (define (udev-rule file-name contents) "Return a directory with a udev rule file @var{file-name} containing @var{contents}." (file->udev-rule file-name (plain-file file-name contents))) +(define (udev-hwdb file-name contents) + "Return a directory with a udev hwdb file @var{file-name} containing +@var{contents}." + (file->udev-hwdb 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." + "Return a directory with a udev rule file @var{file-name} which is a copy of +@var{file}." (computed-file file-name (with-imported-modules '((guix build utils)) #~(begin @@ -2231,6 +2245,23 @@ (define (file->udev-rule file-name file) (mkdir-p rules.d) (copy-file #$file file-copy-dest))))) +(define (file->udev-hwdb file-name file) + "Return a directory with a udev hwdb file @var{file-name} which is a copy of +@var{file}." + (computed-file file-name + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (define hwdb.d + (string-append #$output "/lib/udev/hwdb.d")) + + (define file-copy-dest + (string-append hwdb.d "/" #$file-name)) + + (mkdir-p hwdb.d) + (copy-file #$file file-copy-dest))))) + (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, @@ -2338,13 +2369,35 @@ (define udev.conf (define (udev-etc config) (match-record config - (udev rules) + (udev native-udev rules) + (let* ((hwdb.d + (udev-configuration-union "hwdb" (cons* udev rules))) + (hwdb.bin + (and native-udev + (equal? (package-version udev) + (package-version native-udev)) + (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 native-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))))))))) + ,(udev-configuration-union + "rules" + (cons* udev kvm-udev-rule + rules))) + ("hwdb.d" ,hwdb.d) + ,@(if hwdb.bin + `(("hwdb.bin" ,hwdb.bin)) + '())))))))) (define udev-service-type (service-type (name 'udev) @@ -2373,10 +2426,10 @@ (define-deprecated (udev-service #:key (udev eudev) (rules '())) (udev-configuration (udev udev) (rules rules)))) (define* (udev-rules-service name rules #:key (groups '())) - "Return a service that extends udev-service-type with RULES and -account-service-type with GROUPS as system groups. This works by creating a -singleton service type NAME-udev-rules, of which the returned service is an -instance." + "Return a service that extends udev-service-type with @var{rules} and +@code{account-service-type} with @var{groups} as system groups. This works by +creating a singleton service type @code{@var{name}-udev-rules}, of which the +returned service is an instance." (let* ((name (symbol-append name '-udev-rules)) (account-extension (const (map (lambda (group) @@ -2393,6 +2446,19 @@ (define* (udev-rules-service name rules #:key (groups '())) (description "This service adds udev rules.")))) (service type #f))) +(define (udev-hwdb-service name hwdb-files) + "Return a service that extends udev-service-type with @var{hwdb-files}, named +@code{@var{name}-udev-hwdb}." + (let* ((name (symbol-append name '-udev-hwdb)) + (udev-extension (const (list hwdb-files))) + (type (service-type + (name name) + (extensions (list + (service-extension + udev-service-type udev-extension))) + (description "This service adds udev hwdb 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: 54492 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 DD6B127BBE9; Thu, 5 Oct 2023 06:10:20 +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 43FAD27BBE2 for ; Thu, 5 Oct 2023 06:10:19 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGcP-0003ff-2u; Thu, 05 Oct 2023 01:09:49 -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 1qoGcN-0003em-03 for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:47 -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 1qoGcL-0004TQ-I9 for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoGcd-0001Gh-I3 for guix-patches@gnu.org; Thu, 05 Oct 2023 01:10:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v7 4/5] gnu: libgudev: Update to 238. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 05:10: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@gmail.com, 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16964825874803 (code B ref 66099); Thu, 05 Oct 2023 05:10:03 +0000 Received: (at 66099) by debbugs.gnu.org; 5 Oct 2023 05:09:47 +0000 Received: from localhost ([127.0.0.1]:45734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGcN-0001FP-12 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:47 -0400 Received: from planete-kraus.eu ([89.234.140.182]:42922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGcL-0001Dv-9U for 66099@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:45 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id d85f705b; Thu, 5 Oct 2023 05:09:25 +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=V E8RAFBC9qf8jEe3gv7lKATdwrOXwLuzyHzfu/kMxmrZbXMZgWdwnTjn7cSmozwwI gmXtcMWeTE3Z3Pwrew2IbiOLWVqNdBGDBZmiA/TB/qagLWdmV43s/nQtb4lLB1ob pzXRvSVoYbg7HhBcZaugr7qia6e6q539HmmH8JuXOCQLO5ZQuI9cdm3NuKX1t0Cs GMe6Ss187p6S0slHr3jXhFTsAgPOXf/lAeQzBQalZbN1eY5WUNBLXyTDsLN3Y5zy tR676+Na8QOi7zTmoS/3JPVPx2iHcxlDTnNIUFfs+LZ/BRQ38wCsLpf1XqZGVqyy DAJe0Hm1eerxC4gg0arhA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 456d86a0 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 5 Oct 2023 05:09:25 +0000 (UTC) Message-ID: In-Reply-To: References: <69e084520f189ab5f8a80afc7011a9b1ae911d2a.camel@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: 54490 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 1A13E27BBE9; Thu, 5 Oct 2023 06:10: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=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 C34F927BBE2 for ; Thu, 5 Oct 2023 06:10:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGcQ-0003fw-LY; Thu, 05 Oct 2023 01:09:50 -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 1qoGcN-0003ey-8e for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:47 -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 1qoGcM-0004UF-Vu for guix-patches@gnu.org; Thu, 05 Oct 2023 01:09:47 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoGcd-0001Go-Vl for guix-patches@gnu.org; Thu, 05 Oct 2023 01:10:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v7 5/5] gnu: upower: Update to 1.90.2. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 05:10: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@gmail.com, 66099@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.16964825964825 (code B ref 66099); Thu, 05 Oct 2023 05:10:03 +0000 Received: (at 66099) by debbugs.gnu.org; 5 Oct 2023 05:09:56 +0000 Received: from localhost ([127.0.0.1]:45737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGcW-0001Fk-AN for submit@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:56 -0400 Received: from planete-kraus.eu ([89.234.140.182]:42922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGcT-0001Dv-9w for 66099@debbugs.gnu.org; Thu, 05 Oct 2023 01:09:54 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 5405c536; Thu, 5 Oct 2023 05:09:33 +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=lLwGFu+tVIobrOx8XoBdMi4DLKMlVyQz0 k2AQi/TaSDg0CFzTPmS2dANA/sZhP5u/jZiMk1sBfWPm1jMXy17I27QaE0TEZFEV tAaSyVbERpUJ8KVC8H/60ygNJiEiLz3QC80vfhUx+p8GtQbD0jN7Ldqc4qgEymK0 uJhx9n+dPUcawdcP3w2nkBCoDFlqP4/T0X4JmTJRnfcgdvs4cuv4GAmv5WACqXeR 0tOMp5h7K4uYTdwLzBFqCQaVbNZlTB6QewzNJLAn1Bcm4g0Gjk8bGc0PYJ4W4Gay lJgCLlTGDpnUJSgaxLUcNPcjm5mlRb2FT0jkbqqLt1IutBwka5vHg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 5f4c8abe (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 5 Oct 2023 05:09:33 +0000 (UTC) Message-ID: <1d1ca103f706928cdf7c9008fa00e67af66a6a91.1696482243.git.vivien@planete-kraus.eu> In-Reply-To: References: <69e084520f189ab5f8a80afc7011a9b1ae911d2a.camel@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))