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: 54474 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 A132F27BBEC; Wed, 4 Oct 2023 11:03:29 +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 A69D127BBE2 for ; Wed, 4 Oct 2023 11:03:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnyil-0000Wx-EB; Wed, 04 Oct 2023 06:03:11 -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 1qnyiL-0000Ou-Q5 for guix-patches@gnu.org; Wed, 04 Oct 2023 06:02: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 1qnyiK-0007BP-TB for guix-patches@gnu.org; Wed, 04 Oct 2023 06:02:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnyic-0003QJ-IR for guix-patches@gnu.org; Wed, 04 Oct 2023 06:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v5 1/4] gnu: eudev: Update libudev version to 251. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Oct 2023 10:03: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.169641376513118 (code B ref 66099); Wed, 04 Oct 2023 10:03:02 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 10:02:45 +0000 Received: from localhost ([127.0.0.1]:41607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyiH-0003PS-Ug for submit@debbugs.gnu.org; Wed, 04 Oct 2023 06:02:45 -0400 Received: from planete-kraus.eu ([89.234.140.182]:34064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyiC-0003On-M6 for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 06:02:40 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 2f364442; Wed, 4 Oct 2023 10:02: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:mime-version :content-type:content-transfer-encoding:to:cc; s=albinoniB; bh=h 2+Q5ja6OZF2TbkPqAMhSW+hyfw=; b=KZZU7jElNABXfrViWuh0EMPl01VIt709h PMyUb971Pi6984bZLhSmq80Ivx5KGOHxurAPOrqS8PaVjS7xMOBBZsgwkZwfvYJJ vNDT+GB6TRHFjL/j0zZHPwjMTY8itIBsXI6ziC3ngZXZUaDfJfGJP0Vctysz6Tde hqjFqwD9m12P3mvhFVUptSIT/dPlkHQAwTF/5TBUT9kRuGTIFqckZfgxyuf05ttq IoNy5PUQiCkc9zHZDYnE23uJTp5t+7rF9F+r9WUaHDArr2lH6JvFmWvxy9HH5Q6g fpVqlYMY6bWU8Ir2Y/YkTsoX40tJtMaEelyifDR7mEE7zAuvcU9cA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 3a6c98da (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 10:02:17 +0000 (UTC) Message-ID: In-Reply-To: References: , <15094b9735aedadd8e86b7c6c07ab53619b3e589.camel@gmail.com>, , <0a7a4690a881ab96b46df519a2f7c32c227e2ed6.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, the version number is downgraded to 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. [#: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-set-version-to-3.2.12.patch: New file. * gnu/packages/linux.scm (eudev): Use it here. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/patches/eudev-rules-directory.patch: Rebase it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 55 +++++++++++++------ .../patches/eudev-rules-directory.patch | 9 +-- .../patches/eudev-set-version-to-3.2.12.patch | 25 +++++++++ 4 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 gnu/packages/patches/eudev-set-version-to-3.2.12.patch diff --git a/gnu/local.mk b/gnu/local.mk index 72c9954492..73beb8daff 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1127,6 +1127,7 @@ dist_patch_DATA = \ %D%/packages/patches/esmini-use-pkgconfig.patch \ %D%/packages/patches/esmtp-add-lesmtp.patch \ %D%/packages/patches/eudev-rules-directory.patch \ + %D%/packages/patches/eudev-set-version-to-3.2.12.patch \ %D%/packages/patches/exercism-disable-self-update.patch \ %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 85e3d9845d..e1959fde3d 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4263,18 +4263,22 @@ (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") + (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" + "eudev-set-version-to-3.2.12.patch")))) (build-system gnu-build-system) (arguments (list @@ -4285,6 +4289,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 +4322,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); diff --git a/gnu/packages/patches/eudev-set-version-to-3.2.12.patch b/gnu/packages/patches/eudev-set-version-to-3.2.12.patch new file mode 100644 index 0000000000..9221269e08 --- /dev/null +++ b/gnu/packages/patches/eudev-set-version-to-3.2.12.patch @@ -0,0 +1,25 @@ +From 6a8fdb8a14dc9e0480c68426edcf3f4b55e9cfe3 Mon Sep 17 00:00:00 2001 +Message-ID: <6a8fdb8a14dc9e0480c68426edcf3f4b55e9cfe3.1696356960.git.vivien@planete-kraus.eu> +From: Vivien Kraus +Date: Tue, 3 Oct 2023 20:15:48 +0200 +Subject: [PATCH] Revert "bump version to 3.2.14" + +This reverts commit df220edbc585d2e7a08ed8ad90770fefd0e60bb5. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0d9a135bc..069fdfb87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,5 +1,5 @@ + AC_PREREQ([2.68]) +-AC_INIT([eudev],[3.2.14],[https://github.com/gentoo/eudev/issues]) ++AC_INIT([eudev],[3.2.12],[https://github.com/gentoo/eudev/issues]) + AC_SUBST(UDEV_VERSION, 251) + AC_CONFIG_SRCDIR([src/udev/udevd.c]) + +-- +2.41.0 + 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: 54475 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 A3D8F27BBE2; Wed, 4 Oct 2023 11:03:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D4D7527BBEA for ; Wed, 4 Oct 2023 11:03:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnyiW-0000Ps-VN; Wed, 04 Oct 2023 06:02:57 -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 1qnyiL-0000Ow-Qc for guix-patches@gnu.org; Wed, 04 Oct 2023 06:02: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 1qnyiL-0007BQ-AE for guix-patches@gnu.org; Wed, 04 Oct 2023 06:02:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnyic-0003QU-VJ for guix-patches@gnu.org; Wed, 04 Oct 2023 06:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v5 2/4] gnu: udev-service-type: accept hwdb file extensions. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Oct 2023 10:03: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.169641377413139 (code B ref 66099); Wed, 04 Oct 2023 10:03:02 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 10:02:54 +0000 Received: from localhost ([127.0.0.1]:41610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyiT-0003Pq-KS for submit@debbugs.gnu.org; Wed, 04 Oct 2023 06:02:54 -0400 Received: from planete-kraus.eu ([89.234.140.182]:34064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyiR-0003On-MI for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 06:02:52 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 49fd8351; Wed, 4 Oct 2023 10:02:32 +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=P8DWGs8iChk95tviP8qgTVFed04=; b=T 8SfvdXUA6ZzzdpcRZYJpRhvGm1NJEt3rMEssETVGhhjs2nVuccgI3blltGQosE8P eJzPv8tf+LWMvVhOOONV4qjrCX1R+v0aW4Ok728Zh/nyouH2iiDOskwcHjtC9df7 /rTDBFS5KGAb3SeHT4qfpRgahZ1b/0UmFVduvcFgou1ZsiA1vGPSIPz96tyS4NQY 5bL9liGmeJiXXn3VKit1UFgfZ5jmR0OYM62ATX6BVN411/barq8Tb/Ot6NVwOXVv D5BFoGpfdrsHhApOgHYr3+fe9KsPFaci58NncI+4pASBT/x3kcIGBMIoj1dURQwc BI4ly9r0KfCJNJps1ynTQ== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id cf7e4896 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 10:02:32 +0000 (UTC) Message-ID: In-Reply-To: References: , <15094b9735aedadd8e86b7c6c07ab53619b3e589.camel@gmail.com>, , <0a7a4690a881ab96b46df519a2f7c32c227e2ed6.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, 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}"). udev-rule and file->udev-rule have very similar effects. file->udev-rule operates on a file-like, and udev-rule on plain string contents. Now udev-rule calls file->udev-rule with a plain-file file-like object. 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-things-union): Make udev-rules-union generic. (udev-rules-union): Use udev-things-union. (udev-hwdb-union): New function. (udev-rule): Fix docstring and call file->udev-rule. (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 | 103 +++++++++++++++++++++++++++++++++--------- 2 files changed, 123 insertions(+), 32 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 b3f2d2e8b8..c813293697 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,11 +2185,14 @@ (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 +(define (udev-things-union what packages) + "Return the union of the @code{lib/udev/@var{what}.d} directories found in each item of @var{packages}." (define build (with-imported-modules '((guix build union) @@ -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/" what ".d") + #$(string-append "/libexec/udev/" what ".d"))) (define (rules-sub-directory directory) ;; Return the sub-directory of DIRECTORY containing udev rules, or @@ -2208,10 +2216,27 @@ (define (udev-rules-union packages) (union-build #$output (filter-map rules-sub-directory '#$packages))))) - (computed-file "udev-rules" build)) + (computed-file (string-append "udev-" what) build)) + +(define (udev-rules-union packages) + (udev-things-union "rules" packages)) + +(define (udev-hwdb-union packages) + (udev-things-union "hwdb" packages)) (define (udev-rule file-name contents) - "Return a directory with a udev rule file FILE-NAME containing 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 @var{file-name} which is a copy of +@var{file}." (computed-file file-name (with-imported-modules '((guix build utils)) #~(begin @@ -2220,26 +2245,27 @@ (define (udev-rule file-name contents) (define rules.d (string-append #$output "/lib/udev/rules.d")) + (define file-copy-dest + (string-append rules.d "/" #$file-name)) + (mkdir-p rules.d) - (call-with-output-file - (string-append rules.d "/" #$file-name) - (lambda (port) - (display #$contents port))))))) + (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." +(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 rules.d - (string-append #$output "/lib/udev/rules.d")) + (define hwdb.d + (string-append #$output "/lib/udev/hwdb.d")) (define file-copy-dest - (string-append rules.d "/" #$file-name)) + (string-append hwdb.d "/" #$file-name)) - (mkdir-p rules.d) + (mkdir-p hwdb.d) (copy-file #$file file-copy-dest))))) (define kvm-udev-rule @@ -2349,13 +2375,33 @@ (define udev.conf (define (udev-etc config) (match-record config - (udev rules) + (udev native-udev rules) + (let* ((hwdb.d + (udev-hwdb-union (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))))))))) + rules))) + ("hwdb.d" ,hwdb.d) + ,@(if hwdb.bin + `(("hwdb.bin" ,hwdb.bin)) + '())))))))) (define udev-service-type (service-type (name 'udev) @@ -2384,10 +2430,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) @@ -2404,6 +2450,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: 54476 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 9E34D27BBEA; Wed, 4 Oct 2023 11:04:00 +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 12A9427BBE2 for ; Wed, 4 Oct 2023 11:04:00 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnyjT-0000rA-SH; Wed, 04 Oct 2023 06:03:55 -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 1qnyjK-0000pn-A8 for guix-patches@gnu.org; Wed, 04 Oct 2023 06:03:48 -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 1qnyjI-0007Os-R2 for guix-patches@gnu.org; Wed, 04 Oct 2023 06:03:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnyja-0003SN-Eh for guix-patches@gnu.org; Wed, 04 Oct 2023 06:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v5 3/4] gnu: libgudev: Update to 238. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Oct 2023 10:04: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.169641378613203 (code B ref 66099); Wed, 04 Oct 2023 10:04:02 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 10:03:06 +0000 Received: from localhost ([127.0.0.1]:41616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyif-0003Qt-Iw for submit@debbugs.gnu.org; Wed, 04 Oct 2023 06:03:05 -0400 Received: from planete-kraus.eu ([89.234.140.182]:53376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyid-0003Qb-Qk for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 06:03:04 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 59a0297f; Wed, 4 Oct 2023 10:02:45 +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=U UBmjaaAJrnIeaiFs+i/BqLoGkpYYsu9qEQIiwFzUhwId9sDung724CNMzkPmXZU7 pvJZUq8tw1tmVmPeB53T2ylAc/mJ8OhEHI8WvbolLqgVNkHGKRYl1H73cyIcLJhv UlHnyczGeffHH4f4IG9GeH0gDkUHY12WgasxZsemhuzyehA9bA5jaizpturPBIy6 qx7KtiTQr8RzZMNnb9Zc+zTJWkammTI/JQClB/1FE+Y0WRQkvD8L3yWvAcfU4xjH bk/dLrbwODhIcKsRyt1d/9v3H77R2di8oFYdSsFrtmv7U3fvtjNTpUVozAkXRefK Jh0MAu//acW/aH30Bkxkg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id ab97ceeb (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 10:02:44 +0000 (UTC) Message-ID: In-Reply-To: References: , <15094b9735aedadd8e86b7c6c07ab53619b3e589.camel@gmail.com>, , <0a7a4690a881ab96b46df519a2f7c32c227e2ed6.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: 54477 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 0679827BBE9; Wed, 4 Oct 2023 11:04:15 +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 0A99827BBE2 for ; Wed, 4 Oct 2023 11:04:13 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnyjR-0000qY-ML; Wed, 04 Oct 2023 06:03:53 -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 1qnyjK-0000po-AC for guix-patches@gnu.org; Wed, 04 Oct 2023 06:03:48 -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 1qnyjJ-0007Ot-8z for guix-patches@gnu.org; Wed, 04 Oct 2023 06:03:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnyja-0003SV-Sx for guix-patches@gnu.org; Wed, 04 Oct 2023 06:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v5 4/4] gnu: upower: Update to 1.90.2. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Oct 2023 10:04: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.169641379913233 (code B ref 66099); Wed, 04 Oct 2023 10:04:02 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 10:03:19 +0000 Received: from localhost ([127.0.0.1]:41619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyis-0003RN-Uw for submit@debbugs.gnu.org; Wed, 04 Oct 2023 06:03:19 -0400 Received: from planete-kraus.eu ([89.234.140.182]:49004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyiq-0003RF-RP for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 06:03:17 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 59c5e20c; Wed, 4 Oct 2023 10:02:58 +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=mWwgAx9IkoFO77USD7rZ3N6ceQa8mDocF IA9FADZzjeTdw25xhhh20MtQUERr5RRnPjrNDO2dPdejBV5ANQazs29LuvV1U1ff dpsvaohQUTX6aQSfRnEGYeL82VsbivMyp9Rvoh6j7qWKwQ4dKRqSa9SyXaFFxacm pjDSeG7PeAvHIBqpwr2ULmbyWTeVgRbMH0xsZHtmKt1h9zifySO+qsCnKjNIQLBQ Ijp61GW0LVJe9xCtZb3MGXuBDaPTNvUOGZlOD2Lj7jvKN69T0r16QfNK7b38D9Aq XeU2WuoDtfeOvuyNT3f9ESbywglHVB57KhmzNMmOotvyKJKJTxynQ== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id da3aa11b (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 10:02:58 +0000 (UTC) Message-ID: In-Reply-To: References: , <15094b9735aedadd8e86b7c6c07ab53619b3e589.camel@gmail.com>, , <0a7a4690a881ab96b46df519a2f7c32c227e2ed6.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))