mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 22:38:07 -05:00
gnu: rasdaemon: Add missing inputs and rewrite using G-Exps.
* gnu/packages/linux.scm (rasdaemon)[arguments]: Rewrite using G-Expressions. Add 'fix-dmidecode-and-modprobe' and 'wrap-rasdaemon' phases. [inputs]: Add perl-dbd-sqlite, dmidecode, and kmod. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
acab89748d
commit
8125c22ea2
1 changed files with 30 additions and 20 deletions
|
@ -9512,27 +9512,37 @@ (define-public rasdaemon
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0r0339mg4rc12p63iiq2kwdqn1zjakyiv014i2a2l9s8v5rjik41"))))
|
(base32 "0r0339mg4rc12p63iiq2kwdqn1zjakyiv014i2a2l9s8v5rjik41"))))
|
||||||
(native-inputs (list autoconf automake libtool))
|
(native-inputs (list autoconf automake libtool))
|
||||||
(inputs (list perl sqlite))
|
(inputs (list perl perl-dbd-sqlite sqlite dmidecode kmod))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(list
|
||||||
(list "--enable-all"
|
#:configure-flags
|
||||||
;; Don't install unused /etc/sysconfig/rasdaemon environment file.
|
#~(list "--enable-all"
|
||||||
"--with-sysconfdefdir=."
|
;; Don't install unused /etc/sysconfig/rasdaemon environment file.
|
||||||
"--localstatedir=/var")
|
"--with-sysconfdefdir=."
|
||||||
#:phases
|
"--localstatedir=/var")
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-before 'configure 'munge-autotools
|
#~(modify-phases %standard-phases
|
||||||
(lambda _
|
(add-before 'configure 'munge-autotools
|
||||||
;; For some reason upstream forces sysconfdir=/etc. This results
|
(lambda _
|
||||||
;; in EPERM during the install phase. Removing the offending
|
;; For some reason upstream forces sysconfdir=/etc. This results
|
||||||
;; line lets sysconfdir correctly pick up DESTDIR.
|
;; in EPERM during the install phase. Removing the offending
|
||||||
(substitute* "configure.ac"
|
;; line lets sysconfdir correctly pick up DESTDIR.
|
||||||
(("^test .* sysconfdir=/etc\n$") ""))
|
(substitute* "configure.ac"
|
||||||
;; Upstream tries to create /var/lib/rasdaemon at install time.
|
(("^test .* sysconfdir=/etc\n$") ""))
|
||||||
;; This results in EPERM on guix. Instead, the service should
|
;; Upstream tries to create /var/lib/rasdaemon at install time.
|
||||||
;; create this at activation time.
|
;; This results in EPERM on guix. Instead, the service should
|
||||||
(substitute* "Makefile.am"
|
;; create this at activation time.
|
||||||
(("^\\s*\\$\\(install_sh\\) -d .*@RASSTATEDIR@.*$") "")))))))
|
(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
|
||||||
|
(lambda _
|
||||||
|
(wrap-program (string-append #$output "/sbin/ras-mc-ctl")
|
||||||
|
`("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")
|
||||||
|
|
Loading…
Reference in a new issue