From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eCViNz1FHmUgEQAA9RJhRA:P1 (envelope-from ) for ; Thu, 05 Oct 2023 07:10:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eCViNz1FHmUgEQAA9RJhRA (envelope-from ) for ; Thu, 05 Oct 2023 07:10:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7FAD24ABC3 for ; Thu, 5 Oct 2023 07:10:21 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniB header.b=tDOjmRme; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696482621; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wikngoesKhmawREUa2KKL5DIVMmobBgkS6xDo5IThTw=; b=jOTsPbimeoA5GDF7dqllLviKtA9/vmQxUnjehH51a5U2LkiEkjkl4VkxCnAXHR19TiiHIU tkP2RHwS5lZ9qrdLqVQXXK2npXjq4YHVvlvIt7yfAHI2kW6Kb15dl4IQdtUDHI73hSWvS7 BLINGbF0u+oOmJZR79HwgLtOJSZ8DAK9qoQA81Wpg0tW/0MU0Dl2OzY+TF6DJW3yybz7ld oPM0CyTU64tiRq4uJdL0rl7N5qq56c2RKIiCVyABTNlYOtprBcAT/dXq1In4d8rXpxgRsW riVIyJO45nanHPzx3FBldpuayjzPhWZBdtGNVKsnkKAj4FNcxyx7gPU1cVYbcQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696482621; a=rsa-sha256; cv=none; b=Z3MSjW0BIIjkwnM1RKKVmQYhFRnHaZJpvLzgVYv7OPIpAtsCZU/Kdsp4WDayvHZBzO39au NVDbg3LHX7+WaSwhB4TC0GxFlUloxZNmgAP1acrGzE7v/Ze/i4/7JoZsyLx3uCwtI2meDj q85ZQg3qJHkIm6Fn8Ae1nzW4Q2vyQhR5vMIXOLHh3sk30g/Rg5di3g0ojx4bw6codV4xzh j+LthdKLrr4hWmemkHrj6x+96+5h/2VpiCEsyqVByJxYE07byuj2X9ngC7Jo2bjb0mrrzC 1Todip390WlE2+GOyt0LY/WnMbhPAJWp+u3MtgIvoDDDM8iP6mRh1q+J+Uk/Xw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniB header.b=tDOjmRme; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 From: Vivien Kraus via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -4.24 X-Migadu-Spam-Score: -4.24 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 7FAD24ABC3 X-TUID: EECqe0Nq4Not 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); -- 2.41.0