gnu: eudev: Add variant with corrected Btrfs rules.
Discussed at <https://bugs.gnu.org/39926>. * gnu/packages/linux.scm (eudev/btrfs-fix): New variable. * gnu/services/base.scm (<udev-configuration>)[udev]: Default to it. (udev-service): Likewise for #:udev.
This commit is contained in:
parent
8ab060b68b
commit
24a4a635fd
@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
|
||||
@ -2870,6 +2870,26 @@ device nodes from /dev/, handles hotplug events and loads drivers at boot
|
||||
time.")
|
||||
(license license:gpl2+)))
|
||||
|
||||
;; TODO: Merge with eudev on the next rebuild cycle.
|
||||
(define-public eudev/btrfs-fix
|
||||
(package/inherit
|
||||
eudev
|
||||
(version (string-append (package-version eudev) "-1"))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments eudev)
|
||||
((#:phases phases '%standard-phases)
|
||||
`(modify-phases ,phases
|
||||
(add-before 'configure 'patch-bindir-in-btrfs-rules
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; The "@bindir@" substitution incorrectly expands to a literal
|
||||
;; "${exec_prefix}" (see <https://bugs.gnu.org/39926>). Work
|
||||
;; around it.
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(substitute* "rules/64-btrfs.rules.in"
|
||||
(("@bindir@")
|
||||
(string-append out "/bin")))
|
||||
#t)))))))))
|
||||
|
||||
(define-public eudev-with-hwdb
|
||||
(deprecated-package "eudev-with-hwdb" eudev))
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
|
||||
;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||
@ -1918,7 +1918,7 @@ archive}). If that is not the case, the service will fail to start."
|
||||
udev-configuration make-udev-configuration
|
||||
udev-configuration?
|
||||
(udev udev-configuration-udev ;<package>
|
||||
(default eudev))
|
||||
(default eudev/btrfs-fix))
|
||||
(rules udev-configuration-rules ;list of <package>
|
||||
(default '())))
|
||||
|
||||
@ -2116,7 +2116,7 @@ the udev rules in use.")
|
||||
directory dynamically. Get extra rules from the packages listed in the
|
||||
@code{rules} field of its value, @code{udev-configuration} object.")))
|
||||
|
||||
(define* (udev-service #:key (udev eudev) (rules '()))
|
||||
(define* (udev-service #:key (udev eudev/btrfs-fix) (rules '()))
|
||||
"Run @var{udev}, which populates the @file{/dev} directory dynamically. Get
|
||||
extra rules from the packages listed in @var{rules}."
|
||||
(service udev-service-type
|
||||
|
Loading…
Reference in New Issue
Block a user