@@ -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 \
@@ -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
@@ -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);
new file mode 100644
@@ -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 <vivien@planete-kraus.eu>
+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
+