gnu: eudev: Update to 3.2.14.
Eudev now has a hardware database /etc/udev/hwdb.bin made up of descriptions installed in the /lib/udev/hwdb.d directory of each package, and more generally, UDEV_HWDB_PATH. This database index is compiled with udevadm hwdb --update. The udev-service-type collects the files and compiles the index. Previously, the hardware description files provided by eudev would be compiled into $prefix/etc/udev/hwdb.bin in the eudev output. * gnu/packages/linux.scm (eudev): Update to 3.2.14. [modules]: Import (guix build utils). [#:phases] <allow-eudev-hwdb>: New phase. <install-in-lib>: New phase. <build-hwdb>: 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.master
parent
d6462be6a8
commit
cde1becfab
|
@ -4327,10 +4327,9 @@ to the in-kernel OOM killer.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public eudev
|
(define-public eudev
|
||||||
;; The post-systemd fork, maintained by Gentoo.
|
|
||||||
(package
|
(package
|
||||||
(name "eudev")
|
(name "eudev")
|
||||||
(version "3.2.11")
|
(version "3.2.14")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference (url "https://github.com/gentoo/eudev")
|
(uri (git-reference (url "https://github.com/gentoo/eudev")
|
||||||
|
@ -4338,8 +4337,9 @@ to the in-kernel OOM killer.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0dzaqwjnl55f69ird57wb6skahc6l7zs1slsrzqqfhww33icp6av"))
|
"1f6lz57igi7iw2ls3fpzgw42bfznam4nf9368h7x8yf1mb737yxz"))
|
||||||
(patches (search-patches "eudev-rules-directory.patch"))))
|
(patches (search-patches "eudev-rules-directory.patch"))
|
||||||
|
(modules '((guix build utils)))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
@ -4350,6 +4350,31 @@ to the in-kernel OOM killer.")
|
||||||
(substitute* "man/make.sh"
|
(substitute* "man/make.sh"
|
||||||
(("/usr/bin/xsltproc")
|
(("/usr/bin/xsltproc")
|
||||||
(search-input-file (or native-inputs inputs) "/bin/xsltproc")))))
|
(search-input-file (or native-inputs inputs) "/bin/xsltproc")))))
|
||||||
|
(add-before 'bootstrap 'install-in-lib
|
||||||
|
(lambda _
|
||||||
|
;; When the udev-service-type instantiates /etc, it collects
|
||||||
|
;; hardware files from the <package>/lib/udev/hwdb.d directories
|
||||||
|
;; of different packages. Since we set sysconfdir to /etc, the
|
||||||
|
;; only package-dependent location we can install hwdb files is
|
||||||
|
;; in <package>/lib/udev/hwdb.d. Eudev is configured to install
|
||||||
|
;; these files in sysconfdir, but they should be placed into
|
||||||
|
;; udevlibexecdir.
|
||||||
|
(copy-file "hwdb/Makefile.am" "hwdb/files.am")
|
||||||
|
(call-with-output-file "hwdb/Makefile.am"
|
||||||
|
(lambda (port)
|
||||||
|
(format port "hardwarelibdir = $(udevlibexecdir)/hwdb.d\n")
|
||||||
|
(format port "include ./files.am")))
|
||||||
|
(substitute* "hwdb/files.am"
|
||||||
|
(("dist_udevhwdb_DATA =")
|
||||||
|
"dist_hardwarelib_DATA ="))
|
||||||
|
;; Do not install the empty udev.conf template.
|
||||||
|
(substitute* "src/udev/Makefile.am"
|
||||||
|
(("dist_udevconf_DATA =")
|
||||||
|
"dist_noinst_DATA ="))
|
||||||
|
;; Do not ensure that /etc/udev/rules.d exists.
|
||||||
|
(substitute* "rules/Makefile.am"
|
||||||
|
(("\\$\\(MKDIR_P\\) \\$\\(DESTDIR\\)\\$\\(udevconfdir\\)/rules\\.d")
|
||||||
|
"true"))))
|
||||||
(add-after 'install 'move-static-library
|
(add-after 'install 'move-static-library
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((source (string-append #$output "/lib/libudev.a"))
|
(let ((source (string-append #$output "/lib/libudev.a"))
|
||||||
|
@ -4361,19 +4386,17 @@ to the in-kernel OOM killer.")
|
||||||
;; such that Libtool looks for it in the usual places.
|
;; such that Libtool looks for it in the usual places.
|
||||||
(substitute* (string-append #$output "/lib/libudev.la")
|
(substitute* (string-append #$output "/lib/libudev.la")
|
||||||
(("old_library=.*")
|
(("old_library=.*")
|
||||||
"old_library=''\n")))))
|
"old_library=''\n"))))))
|
||||||
(add-after 'install 'build-hwdb
|
#:configure-flags
|
||||||
(lambda _
|
#~(list "--enable-manpages"
|
||||||
;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
|
;; By default, autoconf uses $prefix/etc. The udev-service-type
|
||||||
;; similar tools to display product names.
|
;; makes sure /etc is set up with rules and hardware file
|
||||||
;;
|
;; descriptions.
|
||||||
;; XXX: This can't be done when cross-compiling. Find another way
|
"--sysconfdir=/etc")))
|
||||||
;; to generate hwdb.bin for cross-built systems.
|
(native-search-paths
|
||||||
#$@(if (%current-target-system)
|
(list (search-path-specification
|
||||||
#~(#t)
|
(variable "UDEV_HWDB_PATH")
|
||||||
#~((invoke (string-append #$output "/bin/udevadm")
|
(files '("lib/udev/hwdb.d")))))
|
||||||
"hwdb" "--update"))))))
|
|
||||||
#:configure-flags #~(list "--enable-manpages")))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list autoconf
|
(list autoconf
|
||||||
automake
|
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
|
the search path to be customized, but eudev no longer has this, hence
|
||||||
this hack.
|
this hack.
|
||||||
|
|
||||||
--- eudev-3.1.5/src/udev/udev-rules.c 2015-10-13 06:22:14.000000000 +0800
|
--- a/src/udev/udev-rules.c
|
||||||
+++ eudev-3.1.5/src/udev/udev-rules.c 2015-10-16 20:45:38.491934336 +0800
|
+++ b/src/udev/udev-rules.c
|
||||||
@@ -47,15 +47,11 @@
|
@@ -48,16 +48,11 @@ struct uid_gid {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,11 +20,12 @@ this hack.
|
||||||
- "/lib/udev/rules.d",
|
- "/lib/udev/rules.d",
|
||||||
- "/usr/lib/udev/rules.d",
|
- "/usr/lib/udev/rules.d",
|
||||||
-#endif
|
-#endif
|
||||||
|
- "/usr/local/lib/udev/rules.d",
|
||||||
+ NULL, /* placeholder for $EUDEV_RULES_DIRECTORY */
|
+ NULL, /* placeholder for $EUDEV_RULES_DIRECTORY */
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
struct udev_rules {
|
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);
|
udev_rules_check_timestamp(rules);
|
||||||
|
|
||||||
|
|
Reference in New Issue