From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +KfzFqEYAmSIIAEAbAwnHQ (envelope-from ) for ; Fri, 03 Mar 2023 16:56:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qHeiFaEYAmTpAgEAG6o9tA (envelope-from ) for ; Fri, 03 Mar 2023 16:56:17 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DEA042F5D1 for ; Fri, 3 Mar 2023 16:56:16 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677858976; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=w6u/uc3uUL+9HNaTVF1NuS9fQ8EGVL5X017KG4XyUg8=; b=CmgIgMnDJlja/TlYqokVS7S/8u7/elzG66oQXgwI3Yvn3FEbB43fXQINlSsih6cMUXNZtr 8kMh/YzCQHUGZekCBKqcK8Z01u0SrlFZGhwaxuF2okpM8Woxwoqv8WCUnwvTQ+oaAn9lCv c7dpIoJHB3SfYaqEAa1dYFMsvTdSX2Poar/L6vf21OWMZ09/dO3eoPdCrB9KFDX1EJDgiP CZD31xJ2ti+PCJcBuFY9cZ1yHsYKKpZ43m7hYqzz/foyzBJDiNbwFZsxI3sW9okwAaCSeC STol+m4JRF2QuNj0LMieZln+LgQ9TJKQ95CbhRf2jB+zWpnXbMb5yUsfVq4F8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677858976; a=rsa-sha256; cv=none; b=Y8g8E0RKb+IqOwR+/saUDcS2/SCFqXSA5sGe8FpUxELn0mBZXv8LkaMwZQWuJINJ51Y/S7 9v/bJ5tWZ59iT5HUN0I8JhdnAZZWtcWd7w709Z5ue6aJhS9YLymg6i2GOCq3maat1rt3jr sA5mcLSCwx+7rONHiGWoFZeTi/Pq+R/vSVcyD7xIbhJYPkl+iqErk1sHPQYO5NK0abCYqP vXleAF/bw+lmY5sZWehIO9XCzWpZ2n1KXrh3bzjBWeOy25TyXYWKiRD6qVtXLkPGMmV7sL fkRisSlC+cF6cm+GawIzieGELt0aeaiEVTz7eFtkXFdutH8EvPIsHSzffgoL0A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY7lS-0004VA-V9; Fri, 03 Mar 2023 10:56:11 -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 1pY7lK-000469-Mr for guix-patches@gnu.org; Fri, 03 Mar 2023 10:56:04 -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 1pY7lK-0001Y1-Eh for guix-patches@gnu.org; Fri, 03 Mar 2023 10:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pY7lK-0004GA-Ao for guix-patches@gnu.org; Fri, 03 Mar 2023 10:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61939] [PATCH 1/3] gnu: rasdaemon: Refactor package. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Mar 2023 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61939 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61939@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61939-submit@debbugs.gnu.org id=B61939.167785891116298 (code B ref 61939); Fri, 03 Mar 2023 15:56:02 +0000 Received: (at 61939) by debbugs.gnu.org; 3 Mar 2023 15:55:11 +0000 Received: from localhost ([127.0.0.1]:33760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY7kS-0004Eh-IO for submit@debbugs.gnu.org; Fri, 03 Mar 2023 10:55:11 -0500 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:43748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY7kQ-0004EG-E1 for 61939@debbugs.gnu.org; Fri, 03 Mar 2023 10:55:07 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id B71DF208D8 for <61939@debbugs.gnu.org>; Fri, 3 Mar 2023 16:55:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6737380097; Fri, 3 Mar 2023 16:55:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GOfzbU2hBdTc; Fri, 3 Mar 2023 16:55:03 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 09FA480079; Fri, 3 Mar 2023 16:55:02 +0100 (CET) From: Bruno Victal Date: Fri, 3 Mar 2023 15:54:20 +0000 Message-Id: <5d6e38e37c79bc8b6af3f78a4f7ef0a3eea01157.1677858305.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: X-Migadu-Spam-Score: -2.20 X-Spam-Score: -2.20 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: DEA042F5D1 List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: 5Y42C3hXUv6b With commit 9367354a4e57506a7090143e423fa620f86eeed1, rasdaemon no longer creates /var/lib/rasdaemon at install time. * gnu/packages/linux.scm (rasdaemon)[arguments]: Remove obsolete patch. Prefer wrap-program to brittle 'fix-dmidecode-and-modprobe phase. --- gnu/packages/linux.scm | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 3601744c51..545d53fe91 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -69,6 +69,7 @@ ;;; Copyright © 2022 Hilton Chain ;;; Copyright © 2022 Stefan ;;; Copyright © 2022 Demis Balbach +;;; Copyright © 2023 Bruno Victal ;;; ;;; This file is part of GNU Guix. ;;; @@ -9580,21 +9581,15 @@ (define-public rasdaemon ;; 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")))))) + (("^test .* sysconfdir=/etc\n$") "")))) (add-after 'wrap 'wrap-rasdaemon - (lambda _ - (wrap-program (string-append #$output "/sbin/ras-mc-ctl") - `("PERL5LIB" ":" prefix ,(string-split (getenv "PERL5LIB") #\:)))))))) + (lambda* (#:key inputs #:allow-other-keys) + (let ((path (map dirname + (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) (home-page "https://github.com/mchehab/rasdaemon") (synopsis "Platform Reliability, Availability, and Serviceability tools") -- 2.39.1