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 +