[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: gnu: rasdaemon: Add missing inputs and rewrite using G-Exps.
From: |
guix-commits |
Subject: |
06/06: gnu: rasdaemon: Add missing inputs and rewrite using G-Exps. |
Date: |
Wed, 14 Dec 2022 06:45:30 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 8125c22ea2b61b1bbe7acb8741f8895b4d1f6f9f
Author: Bruno Victal <mirai@makinata.eu>
AuthorDate: Tue Dec 6 15:51:34 2022 +0000
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>
---
gnu/packages/linux.scm | 50 ++++++++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 73f3275838..e0129ac9de 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9512,27 +9512,37 @@ provides user-space tools for creating EROFS file
systems.")
(sha256
(base32 "0r0339mg4rc12p63iiq2kwdqn1zjakyiv014i2a2l9s8v5rjik41"))))
(native-inputs (list autoconf automake libtool))
- (inputs (list perl sqlite))
+ (inputs (list perl perl-dbd-sqlite sqlite dmidecode kmod))
(arguments
- `(#:configure-flags
- (list "--enable-all"
- ;; Don't install unused /etc/sysconfig/rasdaemon environment file.
- "--with-sysconfdefdir=."
- "--localstatedir=/var")
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'munge-autotools
- (lambda _
- ;; For some reason upstream forces sysconfdir=/etc. This results
- ;; in EPERM during the install phase. Removing the offending
- ;; line lets sysconfdir correctly pick up DESTDIR.
- (substitute* "configure.ac"
- (("^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@.*$") "")))))))
+ (list
+ #:configure-flags
+ #~(list "--enable-all"
+ ;; Don't install unused /etc/sysconfig/rasdaemon environment
file.
+ "--with-sysconfdefdir=."
+ "--localstatedir=/var")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'munge-autotools
+ (lambda _
+ ;; For some reason upstream forces sysconfdir=/etc. This results
+ ;; in EPERM during the install phase. Removing the offending
+ ;; line lets sysconfdir correctly pick up DESTDIR.
+ (substitute* "configure.ac"
+ (("^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
+ (lambda _
+ (wrap-program (string-append #$output "/sbin/ras-mc-ctl")
+ `("PERL5LIB" ":" prefix ,(string-split (getenv "PERL5LIB")
#\:))))))))
(build-system gnu-build-system)
(home-page "https://github.com/mchehab/rasdaemon")
(synopsis "Platform Reliability, Availability, and Serviceability tools")
- branch master updated (85dcea59f6 -> 8125c22ea2), guix-commits, 2022/12/14
- 02/06: doc: Fix formatting for 'computed-file'., guix-commits, 2022/12/14
- 03/06: gnu: Add bolt., guix-commits, 2022/12/14
- 04/06: gnu: bolt: Update to 0.9.4., guix-commits, 2022/12/14
- 05/06: gnu: Add aspell-dict-nb., guix-commits, 2022/12/14
- 01/06: services: configuration: Remove orphan reference to example., guix-commits, 2022/12/14
- 06/06: gnu: rasdaemon: Add missing inputs and rewrite using G-Exps.,
guix-commits <=