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: 54484 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 36D0A27BBEA; Wed, 4 Oct 2023 22:46:10 +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 5070A27BBE2 for ; Wed, 4 Oct 2023 22:46:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo9gf-0004sG-73; Wed, 04 Oct 2023 17:45: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 1qo9ge-0004mZ-Am for guix-patches@gnu.org; Wed, 04 Oct 2023 17:45:44 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo9gd-0008U8-Ql for guix-patches@gnu.org; Wed, 04 Oct 2023 17:45:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo9gv-00059b-Ka for guix-patches@gnu.org; Wed, 04 Oct 2023 17:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v6 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: Wed, 04 Oct 2023 21:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 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.169645592819752 (code B ref 66099); Wed, 04 Oct 2023 21:46:01 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 21:45:28 +0000 Received: from localhost ([127.0.0.1]:45490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9gK-00058P-Tz for submit@debbugs.gnu.org; Wed, 04 Oct 2023 17:45:28 -0400 Received: from planete-kraus.eu ([89.234.140.182]:45438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9gE-000588-VS for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 17:45:22 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id e70f1efe; Wed, 4 Oct 2023 21:45:00 +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=CeXsBUkpb4Z0GqjqdeTp7dFNLG6AJANQv vaadGXma+nmBMrN5ClNEw9paHcEOZpvnaE/fAtoHnGjR/3jTGGeV2NQCCBPAnrIf 1bZknu6r/ZCFfbMvx+pUzu7tUXci7c7PYdl8S2mPQdgdV4Ble4u9bijqvBl7K2Ln LgTbigj39Q8VCqlyNtymY33YwPiO12yWoilVfztdpLtZAWe2H6Qk4goYBKhvk4mi babp/JJXzIGbdHvw9t3kmruXxkYcSAOmMd/UKECTx2QZs2TxQnWV1WmjJpAZsNz3 GJY2nYAi4YJ6/rgm6rh2P1xvLk8BshpU8jWdts3SBJi0BZBCbfvNw== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id a6593bf9 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 21:44:59 +0000 (UTC) Message-ID: <1ed2985a00d92f2c274fcd473fd99c6f6881f689.1696455422.git.vivien@planete-kraus.eu> In-Reply-To: References: <42e4b490bce80a94f1afb7f5843d77823058150a.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 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: 54485 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 0683427BBEA; Wed, 4 Oct 2023 22:47: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=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 3FB2627BBE9 for ; Wed, 4 Oct 2023 22:46:59 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo9hi-0005S9-15; Wed, 04 Oct 2023 17:46: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 1qo9hd-0005Q7-Ae for guix-patches@gnu.org; Wed, 04 Oct 2023 17:46: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 1qo9hc-0000CB-TM for guix-patches@gnu.org; Wed, 04 Oct 2023 17:46:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo9ht-0005Bt-Uf for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v6 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: Wed, 04 Oct 2023 21:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 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.169645597919865 (code B ref 66099); Wed, 04 Oct 2023 21:47:01 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 21:46:19 +0000 Received: from localhost ([127.0.0.1]:45494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9hC-0005AL-MP for submit@debbugs.gnu.org; Wed, 04 Oct 2023 17:46:18 -0400 Received: from planete-kraus.eu ([89.234.140.182]:51252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9hA-0005AC-Ta for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 17:46:17 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 081b11e5; Wed, 4 Oct 2023 21:45: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:to:cc :mime-version; s=albinoniB; bh=z/GLnF0Jh9PFfGO+K1XBvxIS2mQ=; b=s 50F1ZcKbSft92UFpyoeUCxHU/k3ARSksCWDil0FJCeZyIWUOutM27UC3jSCukeer 5FrtHuQis/OQ4G972aGMfRtrIgucDL2L3xaBFVgyOMNSHJEGfLzsRJ5LPEQKOJAR q/RspntCDImU4Dax5DBeTY+o4c1vSDDwPi+c60KsOPkN+yen4kSQWje9hq+Ilnx/ W9AYzy8oQgh4CmsOxOPDxiTQx5NM+R8OjA/bkz0is2sAEgQSqaYTeCZeUTrTBhjl dDSymjoJ3d6++PbsttVABL1o0P2hLUAEqiRBVPiyd02NaU5pjRCu4qMi6QtV1ogF M+HH3hPiQtdhLhWG+hbWA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id b2cfacbd (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 21:45:57 +0000 (UTC) Message-ID: <7f63dfc3b0cc8321212f024bddc1c4625fadfe45.1696455423.git.vivien@planete-kraus.eu> In-Reply-To: References: <42e4b490bce80a94f1afb7f5843d77823058150a.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): Implement 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: 54486 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 13D2927BBEC; Wed, 4 Oct 2023 22:48:05 +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 EBC1927BBE2 for ; Wed, 4 Oct 2023 22:48:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo9ie-0007GV-66; Wed, 04 Oct 2023 17:47: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 1qo9ia-0007EJ-Ql for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47: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 1qo9ia-0000Iu-Fp for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo9is-0005Ek-93 for guix-patches@gnu.org; Wed, 04 Oct 2023 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v6 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: Wed, 04 Oct 2023 21:48: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.169645603119994 (code B ref 66099); Wed, 04 Oct 2023 21:48:02 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 21:47:11 +0000 Received: from localhost ([127.0.0.1]:45498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9i2-0005CP-25 for submit@debbugs.gnu.org; Wed, 04 Oct 2023 17:47:10 -0400 Received: from planete-kraus.eu ([89.234.140.182]:37796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9i0-0005CH-7b for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 17:47:09 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 34e49650; Wed, 4 Oct 2023 21:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=g00As9j+mbB2gC+pBiwBRbAQaCs=; b=g QFNizIeUkb8uXQnfn9SY4N6NfoKsrKyDvTQiG+o/h8doaHg5A61UEjiXjOf5D+9h DEvSr2I14AWrXWTYu/9XegfaoRdINACQ/ew6NkRaf9oeZWpux0xRW04sqg6cZh5v PNKhX5aH3Su1EwilRzKX+oLddsScKSTnkn6AzmXDnSd0E64RZxspx+4eNVh+bQ8A Kv2I/yqpB1JQDnrX/6eDwLZu5lPjAaP3hM542O+vqxRCIukXQ7tr98by3FnaFvUS UQLhJbRyixuohk9g+OmeMjosXUVAqEjJHpd+B+bAlLwqRMkGn0ltT/vUumdoJFOm OfWmZlptgk4xP4xHoCH0g== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 65f24201 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 21:46:49 +0000 (UTC) Message-ID: In-Reply-To: References: <42e4b490bce80a94f1afb7f5843d77823058150a.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: 54488 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 98F3627BBEA; Wed, 4 Oct 2023 22:48:07 +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 426BE27BBE2 for ; Wed, 4 Oct 2023 22:48:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo9id-0007GI-UV; Wed, 04 Oct 2023 17:47: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 1qo9ib-0007EK-4M for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47: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 1qo9ia-0000J5-Sl for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo9is-0005Es-N8 for guix-patches@gnu.org; Wed, 04 Oct 2023 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v6 4/5] 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 21:48: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.169645603720017 (code B ref 66099); Wed, 04 Oct 2023 21:48:02 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 21:47:17 +0000 Received: from localhost ([127.0.0.1]:45501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9i8-0005Cn-Tg for submit@debbugs.gnu.org; Wed, 04 Oct 2023 17:47:17 -0400 Received: from planete-kraus.eu ([89.234.140.182]:37796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9i6-0005CH-Of for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 17:47:15 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 4509cea5; Wed, 4 Oct 2023 21:46:55 +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=k MGthhBnEEcf3IG4ysIRA1hUwaU39lGG6/C47fp2iNx0lilesXd8RcfTKVretQP9e IFRvfA+A/O5vxBZ+jD1Fq9eL5yiEHn+yM2qWC/pLb6sCSCRuVLr1/y7qM+vAZ4hZ N6kxa0gQf2O4ELAUruCozsNMap9pzU39GfBUuCW6PmWlDy+ET9X9s6PCoZCyokUy jiKaAXyrTP3XlUA+27GD/MWv+46sPEnoarYC0Q7dBS3JeZ918peVM+Jf7HCCg8L2 aukJq8ElakPwOd5S4ScE9nf3FAo39TjwyNNuSAoXZ3gsWhvFz8s79q75o5Htz7oi aL7c8Jle7NxX0fsJwBILg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 83da440b (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 21:46:55 +0000 (UTC) Message-ID: <3482b977166652b2c8bd04c6cb21b7c40190c0ed.1696455423.git.vivien@planete-kraus.eu> In-Reply-To: References: <42e4b490bce80a94f1afb7f5843d77823058150a.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: 54487 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 8B65B27BBED; Wed, 4 Oct 2023 22:48:06 +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 79F9F27BBEA for ; Wed, 4 Oct 2023 22:48:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo9id-0007G1-UE; Wed, 04 Oct 2023 17:47: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 1qo9ib-0007EL-Ig for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47: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 1qo9ib-0000JN-AL for guix-patches@gnu.org; Wed, 04 Oct 2023 17:47:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo9it-0005F3-4a for guix-patches@gnu.org; Wed, 04 Oct 2023 17:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v6 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: Wed, 04 Oct 2023 21:48: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.169645605020047 (code B ref 66099); Wed, 04 Oct 2023 21:48:03 +0000 Received: (at 66099) by debbugs.gnu.org; 4 Oct 2023 21:47:30 +0000 Received: from localhost ([127.0.0.1]:45504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9iM-0005DH-86 for submit@debbugs.gnu.org; Wed, 04 Oct 2023 17:47:30 -0400 Received: from planete-kraus.eu ([89.234.140.182]:57424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9iJ-0005D8-U7 for 66099@debbugs.gnu.org; Wed, 04 Oct 2023 17:47:28 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 9ba36648; Wed, 4 Oct 2023 21:47:09 +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=x8OVLcWTg0kk942fWgbBfeVz8VtwgkPtw QDaFaGv2uNf9NnjRxCVEe3OZypTslL5xzQ2/tLxdtTUSVOcGx1dVJMM+q7GyPIyX A+DNWQ6mZB28iUChd6r96k65j3se7PHXs0HepeRVPc8KjhHm0s8uy7/ZaZmt6pA4 /IMlKWs59khhLN0FvWiXZpqQYs1Y2Ik0fU3Uaa2wywkD0oCjf8ANzfmv18/O40Jq Y7uUADWKk7iLmisIBDvLs2cvUoB+HjLgYOQuVyPCp882vNY+hY+x1GUeSK6T3ue8 bO/fK+n6meVvDd+dfDPcvaCpfllQH3uHncyRx7hoSxCSKXtNUey4w== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id dfd99cc3 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 21:47:09 +0000 (UTC) Message-ID: <462502fb5334412e329a91c6e906bd09571b650f.1696455423.git.vivien@planete-kraus.eu> In-Reply-To: References: <42e4b490bce80a94f1afb7f5843d77823058150a.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))