gnu: rasdaemon: Refactor package.
* gnu/packages/linux.scm (rasdaemon)[arguments]: Remove obsolete patch. Prefer wrap-program to brittle 'fix-dmidecode-and-modprobe phase. With commit 9367354a4e57506a7090143e423fa620f86eeed1, rasdaemon no longer creates /var/lib/rasdaemon at install time. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
parent
949160f521
commit
7b4f47f066
1 changed files with 9 additions and 14 deletions
|
@ -69,6 +69,7 @@
|
||||||
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
|
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
;;; Copyright © 2022 Stefan <stefan-guix@vodafonemail.de>
|
;;; Copyright © 2022 Stefan <stefan-guix@vodafonemail.de>
|
||||||
;;; Copyright © 2022, 2023 Demis Balbach <db@minikn.xyz>
|
;;; Copyright © 2022, 2023 Demis Balbach <db@minikn.xyz>
|
||||||
|
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -9668,21 +9669,15 @@ provides user-space tools for creating EROFS file systems.")
|
||||||
;; in EPERM during the install phase. Removing the offending
|
;; in EPERM during the install phase. Removing the offending
|
||||||
;; line lets sysconfdir correctly pick up DESTDIR.
|
;; line lets sysconfdir correctly pick up DESTDIR.
|
||||||
(substitute* "configure.ac"
|
(substitute* "configure.ac"
|
||||||
(("^test .* sysconfdir=/etc\n$") ""))
|
(("^test .* sysconfdir=/etc\n$") ""))))
|
||||||
;; Upstream tries to create /var/lib/rasdaemon at install time.
|
|
||||||
;; This results in EPERM on guix. Instead, the service should
|
|
||||||
;; create this at activation time.
|
|
||||||
(substitute* "Makefile.am"
|
|
||||||
(("^\\s*\\$\\(install_sh\\) -d .*@RASSTATEDIR@.*$") ""))))
|
|
||||||
(add-after 'install 'fix-dmidecode-and-modprobe
|
|
||||||
(lambda _
|
|
||||||
(substitute* (string-append #$output "/sbin/ras-mc-ctl")
|
|
||||||
(("find_prog \\(\"dmidecode\"\\).*$") (format #f "~s;~%" (string-append #$dmidecode "/sbin/dmidecode")))
|
|
||||||
(("find_prog \\(\"modprobe\"\\).*$") (format #f "~s;~%" (string-append #$kmod "/bin/modprobe"))))))
|
|
||||||
(add-after 'wrap 'wrap-rasdaemon
|
(add-after 'wrap 'wrap-rasdaemon
|
||||||
(lambda _
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(wrap-program (string-append #$output "/sbin/ras-mc-ctl")
|
(let ((path (map dirname
|
||||||
`("PERL5LIB" ":" prefix ,(string-split (getenv "PERL5LIB") #\:))))))))
|
(list (search-input-file inputs "/sbin/dmidecode")
|
||||||
|
(search-input-file inputs "/bin/modprobe")))))
|
||||||
|
(wrap-program (string-append #$output "/sbin/ras-mc-ctl")
|
||||||
|
`("PATH" ":" prefix ,path)
|
||||||
|
`("PERL5LIB" ":" prefix ,(string-split (getenv "PERL5LIB") #\:)))))))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(home-page "https://github.com/mchehab/rasdaemon")
|
(home-page "https://github.com/mchehab/rasdaemon")
|
||||||
(synopsis "Platform Reliability, Availability, and Serviceability tools")
|
(synopsis "Platform Reliability, Availability, and Serviceability tools")
|
||||||
|
|
Reference in a new issue