@@ -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 \
@@ -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
new file mode 100644
@@ -0,0 +1,110 @@
+From ca8607912b6da3ce87ecd8a7209f23840fec5a90 Mon Sep 17 00:00:00 2001
+Message-ID: <ca8607912b6da3ce87ecd8a7209f23840fec5a90.1696185684.git.vivien@planete-kraus.eu>
+From: Vivien Kraus <vivien@planete-kraus.eu>
+Date: Sun, 1 Oct 2023 20:40:40 +0200
+Subject: [PATCH] Squashed commit of the following:
+
+commit dacff83d872c1dcb563439f98c9b974e244fcd46
+Author: Boian Bonev <bbonev@ipacct.com>
+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 <bbonev@ipacct.com>
+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
+
@@ -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);