From patchwork Tue Dec 6 15:51:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 45074 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 96F2427BBEE; Tue, 6 Dec 2022 15:53:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7672927BBEB for ; Tue, 6 Dec 2022 15:53:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2aFl-0004P0-Dl; Tue, 06 Dec 2022 10:53:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2aFi-0004Oq-VD for guix-patches@gnu.org; Tue, 06 Dec 2022 10:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2aFi-0005Wd-Fq for guix-patches@gnu.org; Tue, 06 Dec 2022 10:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2aFh-0005BG-T4 for guix-patches@gnu.org; Tue, 06 Dec 2022 10:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59859] [PATCH] gnu: rasdaemon: Add missing inputs and rewrite using G-Exps. Resent-From: mirai@makinata.eu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Dec 2022 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59859 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59859@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167034193819899 (code B ref -1); Tue, 06 Dec 2022 15:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Dec 2022 15:52:18 +0000 Received: from localhost ([127.0.0.1]:43664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2aF0-0005Ar-Au for submit@debbugs.gnu.org; Tue, 06 Dec 2022 10:52:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:56572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2aEu-0005Ak-Nt for submit@debbugs.gnu.org; Tue, 06 Dec 2022 10:52:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2aEu-00049a-8W for guix-patches@gnu.org; Tue, 06 Dec 2022 10:52:12 -0500 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2aEp-0005PK-Mr for guix-patches@gnu.org; Tue, 06 Dec 2022 10:52:11 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id A606520D03 for ; Tue, 6 Dec 2022 16:51:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 5810180096; Tue, 6 Dec 2022 16:51:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ScfkoB5gSmW9; Tue, 6 Dec 2022 16:51:50 +0100 (CET) Received: from guix-nuc.home.arpa (bl12-93-156.dsl.telepac.pt [85.245.93.156]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 095BF80093; Tue, 6 Dec 2022 16:51:49 +0100 (CET) From: mirai@makinata.eu Date: Tue, 6 Dec 2022 15:51:34 +0000 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=185.26.107.241; envelope-from=mirai@makinata.eu; helo=smtpmciv5.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Bruno Victal * 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(-) base-commit: b94724e8b2102be0fe9d19e9dfe44d6f7101bd4b 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")