From patchwork Tue Sep 19 11:23:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 54441 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 9C81627BBE9; Sun, 1 Oct 2023 21:27:16 +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 1671E27BBE2 for ; Sun, 1 Oct 2023 21:27:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qn31c-0007v5-Kw; Sun, 01 Oct 2023 16:26: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 1qn31b-0007uW-1d for guix-patches@gnu.org; Sun, 01 Oct 2023 16:26:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qn31Z-0004CO-PT for guix-patches@gnu.org; Sun, 01 Oct 2023 16:26:45 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qn31p-00077D-T0 for guix-patches@gnu.org; Sun, 01 Oct 2023 16:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66099] [PATCH gnome-team v4 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: Sun, 01 Oct 2023 20:27: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 , 66099@debbugs.gnu.org Cc: , rg@raghavgururajan.name, maxim.cournoyer@gmail.com Received: via spool by 66099-submit@debbugs.gnu.org id=B66099.169619197327237 (code B ref 66099); Sun, 01 Oct 2023 20:27:01 +0000 Received: (at 66099) by debbugs.gnu.org; 1 Oct 2023 20:26:13 +0000 Received: from localhost ([127.0.0.1]:35458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qn312-00075E-WA for submit@debbugs.gnu.org; Sun, 01 Oct 2023 16:26:13 -0400 Received: from planete-kraus.eu ([89.234.140.182]:59580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qn310-000755-Mx for 66099@debbugs.gnu.org; Sun, 01 Oct 2023 16:26:11 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 6fd9a6ca; Sun, 1 Oct 2023 20:25:53 +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=TgpVzCdq0KT8n6nBtrO782p0yhY=; b=J Xg0MpTDft9s1N/+wqLmP5LlnXsi9Bm7EwiiPeQPPIQEvSsFCSpxrYK3H2wlClUpQ /ATnfW4MFjzLN8O3uNg+8Y87WgdrfhPvelNp4g82sXTgAVVU4y09kN0eaqFh68ZS 48DpIGWzvUEOg7LrBcNGqpleMp9/cMLVZuEQi6jf0vlOxUa1rsK2Z3XAAVKXQY+z Becgmfs5htq3hfHhNBaZJ/4Ejzmgxr0ln3E9g3mwEWMwjNe16KICOPKFJOVnu8cs BoCyxaqnoOmVei/5BqJ6oPYqyIDsGmnHld3QI3880DkTRbK+8P4D3l1VwjigfkfM Wi8I4fWlnl7joEbpfL4Wg== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 317f163c (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 1 Oct 2023 20:25:53 +0000 (UTC) Message-ID: In-Reply-To: References: 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 Support for version 251 is only provided as a pull request for now: https://github.com/eudev-project/eudev/pull/253 This pull request is included as a patch, without the version bump. Eudev now has a hardware database that installs descriptions of hardware in /etc, but they should go to /lib prior to being used. A new phase moves the hwdb files from /etc to /lib. Some commits have been added since 3.2.12, in order to support search paths for udev hwdb, and fixing a regression. * gnu/packages/linux.scm (eudev): Update to a post-v3.2.12 commit. [#:phases] : New phase. : Update accordingly. [native-search-paths]: Add UDEV_HWDB_PATH and UDEV_HWDB_BIN. * gnu/packages/patches/eudev-libudev-251-compat.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 | 39 ++++--- .../patches/eudev-libudev-251-compat.patch | 110 ++++++++++++++++++ .../patches/eudev-rules-directory.patch | 9 +- 4 files changed, 141 insertions(+), 18 deletions(-) create mode 100644 gnu/packages/patches/eudev-libudev-251-compat.patch diff --git a/gnu/local.mk b/gnu/local.mk index 72c9954492..b9880332f3 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-libudev-251-compat.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..254cca715e 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 + "2e4dd05900e7b42d96cd7bdd5689c8ee431fb000") + (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")))) + "0kl2lmp759wix83pxnax2p9954b6w3j8zqzgxl99nm6brl8cx11i")) + (patches (search-patches "eudev-rules-directory.patch" + "eudev-libudev-251-compat.patch")))) (build-system gnu-build-system) (arguments (list @@ -4297,18 +4301,25 @@ (define-public eudev (substitute* (string-append #$output "/lib/libudev.la") (("old_library=.*") "old_library=''\n"))))) - (add-after 'install 'build-hwdb + (add-after 'install 'allow-eudev-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")))))) + ;; eudev distributes the hwdb, but each file has to be enabled + ;; by being copied under /lib/udev/hwdb.d. We accept all of + ;; them. + (symlink (string-append #$output "/etc/udev/hwdb.d") + (string-append #$output "/lib/udev/hwdb.d"))))) #:configure-flags #~(list "--enable-manpages"))) + (native-search-paths + (list (search-path-specification + (variable "UDEV_HWDB_PATH") + (files '("lib/udev/hwdb.d"))) + ;; Never install a hwdb.bin file, always let the udev-hwdb-bin + ;; profile hook generate it. + (search-path-specification + (variable "UDEV_HWDB_BIN") + (files '("lib/udev/hwdb.bin")) + (file-type 'regular) + (separator #f)))) (native-inputs (list autoconf automake diff --git a/gnu/packages/patches/eudev-libudev-251-compat.patch b/gnu/packages/patches/eudev-libudev-251-compat.patch new file mode 100644 index 0000000000..b24893d79c --- /dev/null +++ b/gnu/packages/patches/eudev-libudev-251-compat.patch @@ -0,0 +1,110 @@ +From ca8607912b6da3ce87ecd8a7209f23840fec5a90 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Vivien Kraus +Date: Sun, 1 Oct 2023 20:40:40 +0200 +Subject: [PATCH] Squashed commit of the following: + +commit dacff83d872c1dcb563439f98c9b974e244fcd46 +Author: Boian Bonev +Date: Fri Aug 11 23:14:02 2023 +0000 + + Export dummies for + + - udev_device_has_current_tag + - udev_device_get_current_tags_list_entry + + since the current eudev device database does not support the concept of + current tags + +commit 7d2123ead5a15d4b2aff70eafc6f7b9b2f6527ac +Author: Boian Bonev +Date: Fri Aug 11 22:08:27 2023 +0000 + + Bump udev version to 251 +--- + configure.ac | 2 +- + src/libudev/libudev-device.c | 11 +++++++++++ + src/libudev/libudev.h | 2 ++ + src/libudev/libudev.sym | 6 ++++++ + 4 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 3e31b0ebc..069fdfb87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + AC_PREREQ([2.68]) + AC_INIT([eudev],[3.2.12],[https://github.com/gentoo/eudev/issues]) +-AC_SUBST(UDEV_VERSION, 243) ++AC_SUBST(UDEV_VERSION, 251) + AC_CONFIG_SRCDIR([src/udev/udevd.c]) + + AC_USE_SYSTEM_EXTENSIONS +diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c +index d6bc4032a..312d9ee84 100644 +--- a/src/libudev/libudev-device.c ++++ b/src/libudev/libudev-device.c +@@ -1825,6 +1825,12 @@ _public_ struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_dev + return udev_list_get_entry(&udev_device->tags_list); + } + ++_public_ struct udev_list_entry *udev_device_get_current_tags_list_entry(struct udev_device *udev_device) ++{ ++ // TODO: eudev database does not support current tags ++ return udev_device_get_tags_list_entry(udev_device); ++} ++ + /** + * udev_device_has_tag: + * @udev_device: udev device +@@ -1848,6 +1854,11 @@ _public_ int udev_device_has_tag(struct udev_device *udev_device, const char *ta + return false; + } + ++_public_ int udev_device_has_current_tag(struct udev_device *udev_device, const char *tag) { ++ // TODO: eudev database does not support current tags ++ return udev_device_has_tag(udev_device, tag); ++} ++ + #define ENVP_SIZE 128 + #define MONITOR_BUF_SIZE 4096 + static int update_envp_monitor_buf(struct udev_device *udev_device) +diff --git a/src/libudev/libudev.h b/src/libudev/libudev.h +index e4bc18970..62fab107f 100644 +--- a/src/libudev/libudev.h ++++ b/src/libudev/libudev.h +@@ -100,6 +100,7 @@ int udev_device_get_is_initialized(struct udev_device *udev_device); + struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device); + struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device); + struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device); ++struct udev_list_entry *udev_device_get_current_tags_list_entry(struct udev_device *udev_device); + struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_device *udev_device); + const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key); + const char *udev_device_get_driver(struct udev_device *udev_device); +@@ -110,6 +111,7 @@ unsigned long long int udev_device_get_usec_since_initialized(struct udev_device + const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr); + int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, char *value); + int udev_device_has_tag(struct udev_device *udev_device, const char *tag); ++int udev_device_has_current_tag(struct udev_device *udev_device, const char *tag); + + /* + * udev_monitor +diff --git a/src/libudev/libudev.sym b/src/libudev/libudev.sym +index 76726fca7..d56c2aeab 100644 +--- a/src/libudev/libudev.sym ++++ b/src/libudev/libudev.sym +@@ -118,3 +118,9 @@ global: + udev_queue_flush; + udev_queue_get_fd; + } LIBUDEV_199; ++ ++LIBUDEV_247 { ++global: ++ udev_device_has_current_tag; ++ udev_device_get_current_tags_list_entry; ++} LIBUDEV_215; + +base-commit: 2e4dd05900e7b42d96cd7bdd5689c8ee431fb000 +-- +2.41.0 + 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);