unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: mirai@makinata.eu
To: 59859@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#59859] [PATCH] gnu: rasdaemon: Add missing inputs and rewrite using G-Exps.
Date: Tue,  6 Dec 2022 15:51:34 +0000	[thread overview]
Message-ID: <f90029d2b0646e8b97a616cbe70422b3e6df900c.1670341868.git.mirai@makinata.eu> (raw)

From: Bruno Victal <mirai@makinata.eu>

* gnu/packages/linux.scm (rasdaemon)[arguments]: Rewrite using G-Expressions and add missing inputs.
---
 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 49e90a9ba6..2d3d50c5e1 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9472,27 +9472,37 @@ (define-public rasdaemon
        (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")

base-commit: b94724e8b2102be0fe9d19e9dfe44d6f7101bd4b
-- 
2.38.1





             reply	other threads:[~2022-12-06 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 15:51 mirai [this message]
2022-12-14 11:43 ` bug#59859: [PATCH] gnu: rasdaemon: Add missing inputs and rewrite using G-Exps Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f90029d2b0646e8b97a616cbe70422b3e6df900c.1670341868.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=59859@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).