From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ACmnJddJgWAUIgAAgWs5BA (envelope-from ) for ; Thu, 22 Apr 2021 12:03:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kM9MIddJgWBQEgAAbx9fmQ (envelope-from ) for ; Thu, 22 Apr 2021 10:03:03 +0000 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 815EFC87D for ; Thu, 22 Apr 2021 12:03:02 +0200 (CEST) Received: from localhost ([::1]:56634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZWAn-0003Qr-GT for larch@yhetil.org; Thu, 22 Apr 2021 06:03:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZW8t-0002mB-79 for guix-patches@gnu.org; Thu, 22 Apr 2021 06:01:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZW8r-0002pz-UG for guix-patches@gnu.org; Thu, 22 Apr 2021 06:01:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZW8r-0005Cx-T0 for guix-patches@gnu.org; Thu, 22 Apr 2021 06:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47905] gnu: Add rasdaemon. Resent-From: elaexuotee@wilsonb.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Apr 2021 10:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47905 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Leo Famulari Cc: 47905@debbugs.gnu.org Received: via spool by 47905-submit@debbugs.gnu.org id=B47905.161908565720001 (code B ref 47905); Thu, 22 Apr 2021 10:01:01 +0000 Received: (at 47905) by debbugs.gnu.org; 22 Apr 2021 10:00:57 +0000 Received: from localhost ([127.0.0.1]:32803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZW8e-0005CN-Bu for submit@debbugs.gnu.org; Thu, 22 Apr 2021 06:00:56 -0400 Received: from m42-5.mailgun.net ([69.72.42.5]:19877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZW8W-0005C1-Rt for 47905@debbugs.gnu.org; Thu, 22 Apr 2021 06:00:47 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1619085644; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=bq+KolXwfbu5btDynqn9x5DVwlc+obGFd5vq3efkii0=; b=48dD+lQi+Kz9L4pTESz13OxDs2vYh0VQwuWo+IMrISYJhxOEL2QqA1aM0L1ZCpvi7epJNyV/ MZZZfrTB20EQLZZIYHQ5hjXotw9Mj49SR5PichSY9539OApTs16DZr7nc3NORBAU4AQJzTg1 hiy+VYGNNsmSvSew03lBa39+jstDulNmJsMK0kG4Ft2nCqcB2JADyEaBT6zMH1lt3us0a+ww CBgWjz5VN91LJ0pXuNeMSWnX2d+a/n4OehLqJGDqWwvuzxPJ4ESbbMXtkVa6jG9YPav8EPp8 wAI6NKCbUbrghvX5ZbsuP06jEg+XBn6z7BlAQi48cRkcuvgzSY90gw== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyI1NGFiNSIsICI0NzkwNUBkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 60814926febcffa80f48f794 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Thu, 22 Apr 2021 10:00:05 GMT Received: from localhost (x096178.dynamic.ppp.asahi-net.or.jp [122.249.96.178]) by wilsonb.com (Postfix) with ESMTPSA id 1E3D0A328B; Thu, 22 Apr 2021 10:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1619085603; bh=bq+KolXwfbu5btDynqn9x5DVwlc+obGFd5vq3efkii0=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=TbUasbWdvvmXyappGOwQlB0qbeXyrPDYojr0mz3z5ej13pSuea0If8C5RfDi62L13 zbgSA1DfWvpiWrDSZomfQUQlvUQLHG0vDOrKx/Rq+on0JRzgQiwGAAq/wuef7F2qdZ 9CJlBA8Sg3tzyHNcAJ9YcQPp0LCxC0CEVpYeixlvjAWz89Dn6PbGVHUp39TaUr13Vp SWwldO37J+TmfSQo2VeNlsFNIQx8DYdRhiwhG6YZ/d60s7jC5LhJQdDq1/43vNzJAm O7RDvzAJ1w56NvSSeP/8HfDSyLJYnwxLPB5WHPOL3TEh1rRduYjC0ZdIqD+9j7JRv0 aSknZvUE6ECAVz15T/Pxe0SlFVM8/H+m77pl94RBT8r/oLtzDlUWB6qK7TrkbAoBJP zT/C6B6g6itMhKcfQlXTfPvxbYb4NttWvS3x8DZUfx9gCQp85P8S6kr5vCa8A0Z7NP KLh1v6hOkn9MzW37jf9HjgWUvlJGzvlIFx8zRmUo0B/MPQYCh9YNWMiHGFPG4W5wj8 v5tYooVn8AxcjaAZjUpiQTXT3rh2CCKvch9UlseWf30BHNn3o9Cxntt5OQN4SfqUBP +as5PI8gUVdPlPVVq4n5KQQF95BF+iqpXNZ+chNMF2Z4uSaX/hW0DJ+Eiq4dZrHHn2 7/iyWF/YIICW4HQSXy9VZR8U= Date: Thu, 22 Apr 2021 19:01:20 +0900 References: <31MWDEN7Q9XOV.2001N5J6G4U9K@wilsonb.com> <34GOUL165TOWY.3FR9YU3I80NFA@wilsonb.com> In-Reply-To: Message-Id: <377TR65TD6KJY.2JY05ANZ7375P@wilsonb.com> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_0d33e8e03f6f767c601c41e7_=_" 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: elaexuotee@wilsonb.com X-ACL-Warn: , elaexuotee--- via Guix-patches From: elaexuotee--- via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619085782; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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: dkim-signature; bh=bq+KolXwfbu5btDynqn9x5DVwlc+obGFd5vq3efkii0=; b=gVmA+ac046bRMg54X0qYnNwIWi9zi9pSoVIHA9F8PTSgljS6IXqBvJZ3k63+WLTESBEsrK BvpJ9UXYShztyeczbt7x296feQfadNZaA9/w3msSkU409kONXxBzgy5cmjKr3n1oZ6C+FV 5qmzGq+dZdamkHd8nu0mzr1N/fwYTMIpmHHT/nEq+kZ7cai492+B+E2SkPCBPi9n9Y1e76 m/VR06a2ToiRmoW9GiJc//DtMrKgTbHfrNBuNO2MtvUXblOy0xeptJhf4M3okauQn14WD8 27qeg7eUneVQgPk6TTIgNcTvJBbTv6m8UhzY5BKbYHty40DB7eK1hk3s5G9lFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619085782; a=rsa-sha256; cv=none; b=CQbVoekAVV+p3lPuGYrnWEKDmGKwckvbI1C4pyJbSRO+dp2dngOywDyL+jO9XBfZXetGFL 7v+6qXonUXnkqsHtRsu4ya32vDLTl8CV4LsmwscPmK6s26TjyTj5DvGYrVjSA0TUzlNaSO 2Lykdy6TDAZzBb+s40gKwGtRTfi2JrIGtYqgahM8eqqRd1WkA6dX0J7E4Xfh2DJFbmqVTX QWnz1ljsGp35DFLc+8+SJcAtZTPxnTWXi7aNC98fKprQ80oZG6cYjDs4fvBBli14ZDj6MM yHI34aHO0VjlMELPIsxnUPzPQtFwSLfem4JnV9rJW4qPhllFMWSrzuUsYdtMXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mg.wilsonb.com header.s=krs header.b=48dD+lQi; dkim=fail ("headers rsa verify failed") header.d=wilsonb.com header.s=201703 header.b=TbUasbWd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.84 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mg.wilsonb.com header.s=krs header.b=48dD+lQi; dkim=fail ("headers rsa verify failed") header.d=wilsonb.com header.s=201703 header.b=TbUasbWd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 815EFC87D X-Spam-Score: -2.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: rS6PrtW3O0Sd This is a multipart message in MIME format. ------_=_0d33e8e03f6f767c601c41e7_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Leo Famulari wrote: > On Tue, Apr 20, 2021 at 04:10:54PM +0900, elaexuotee@wilsonb.com wrote: > > This patch updates the license field to contain lgpl2.1, gpl2, and gpl2= +. >=20 > As mentioned in a previous reply, it should contain only gpl2 [0], unless= > upstream has explicitly given us a license to distribute rasdaemon under > the other licenses. >=20 > [0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D47905#35 Fixed! Thanks for holding my hand on this. That above link cleared up a l= ot of lingering questions I had. Anyway, in addition to the license fix, I also noticed that the daemon automatically logs to syslogd, so I stripped out /var/log/rasdaemon.log, including the references in the documentation. Let me know what you think. Cheers! ------_=_0d33e8e03f6f767c601c41e7_=_ Content-Disposition: attachment; filename=0001-gnu-Add-rasdaemon.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom d31cb88e5c34cc0b650ff181ebb6a0d85d045f9d Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" =44ate: Tue, 20 Apr 2021 11:49:26 +0900 =53ubject: [PATCH] gnu: Add rasdaemon. =54o: guix-patches@gnu.org =0A* gnu/packages/linux.scm (rasdaemon): New variable. =2A gnu/services/linux.scm (rasdaemon-configuration) =20 (rasdaemon-configuration?, rasdaemon-configuration-record?) =20 (rasdaemon-service-type): New variables. =2A doc/guix.texi (Linux Services): Document it. =2D-- =20doc/guix.texi | 81 ++++++++++++++++++++++++++++++++++++++++++ =20gnu/packages/linux.scm | 45 +++++++++++++++++++++++ =20gnu/services/linux.scm | 49 +++++++++++++++++++++++++ =203 files changed, 175 insertions(+) =0Adiff --git a/doc/guix.texi b/doc/guix.texi =69ndex 58bcfbdbb5..72be2a1367 100644 =2D-- a/doc/guix.texi =2B++ b/doc/guix.texi =40@ -88,6 +88,7 @@ Copyright @copyright{} 2020 John Soo@* =20Copyright @copyright{} 2020 Jonathan Brielmaier@* =20Copyright @copyright{} 2020 Edgar Vincent@* =20Copyright @copyright{} 2021 Maxime Devos@* =2BCopyright @copyright{} 2021 B. Wilson@* =20= =20Permission is granted to copy, distribute and/or modify this document =20under the terms of the GNU Free Documentation License, Version 1.3 or =40@ -31457,6 +31458,86 @@ parameters, can be done as follow: =20@end lisp =20@end deffn =20= =2B@cindex rasdaemon =2B@cindex Platform Reliability, Availability and Serviceability daemon =2B@subsubheading Rasdaemon Service =2B =2BThe Rasdaemon service provides a daemon which monitors the platform Reli= =61blity, =2BAvailability and Serviceability (RAS) reports from the Linux kernel trac= =65 =2Bevents, logging them to syslogd. =2B =2BReliability, Availability and Serviceability is a concept used on server= =73 meant =2Bto measure their robustness. =2B =2B@strong{Relability} is the probability that a system will produce correc= =74 =2Boutputs: =2B =2B@itemize @bullet =2B@item Generally measured as Mean Time Between Failures (MTBF), and =2B@item Enhanced by features that help to avoid, detect and repair hardwar= =65. =2Bfaults =2B@end itemize =2B =2B@strong{Availability} is the probability that a system is operational at= =20a =2Bgiven time: =2B =2B@itemize @bullet =2B@item Generally measured as a percentage of downtime per a period of tim= =65, and =2B@item Often uses mechanisms to detect and correct hardware faults in run= =74ime. =2B@end itemize =2B =2B@strong{Serviceability} is the simplicity and speed with which a system = =63an be =2Brepaired or maintained: =2B =2B@itemize @bullet =2B@item Generally measured on Mean Time Between Repair (MTBR). =2B@end itemize =2B =2B =2BAmong the monitoring measures, the most usual ones include: =2B =2B@itemize @bullet =2B@item CPU =E2=80=93 detect errors at instruction execution and at L1/L2/= =4C3 caches; =2B@item Memory =E2=80=93 add error correction logic (ECC) to detect and co= =72rect errors; =2B@item I/O =E2=80=93 add CRC checksums for transferred data; =2B@item Storage =E2=80=93 RAID, journal file systems, checksums, Self-Moni= =74oring, =2BAnalysis and Reporting Technology (SMART). =2B@end itemize =2B =2BBy monitoring the number of occurrences of error detections, it is possi= =62le to =2Bidentify if the probability of hardware errors is increasing, and, on su= =63h =2Bcase, do a preventive maintenance to replace a degraded component while = =74hose =2Berrors are correctable. =2B =2BFor detailed information about the types of error events gathered and ho= =77 to =2Bmake sense of them, see the kernel administrator's guide at =2B@url{https://www.kernel.org/doc/html/latest/admin-guide/ras.html}. =2B =2B@defvr {Scheme Variable} rasdaemon-service-type =2BService type for the @command{rasdaemon} service. It accepts a =2B@code{rasdaemon-configuration} object. Instantiating like =2B =2B@lisp =2B(service rasdaemon-service-type) =2B@end lisp =2B =2Bwill load with a default configuration, which monitors all events and lo= =67s to =2Bsyslogd. =2B@end defvr =2B =2B@deftp {Data Type} rasdaemon-configuration =2BThe data type representing the configuration of @command{rasdaemon}. =2B =2B@table @asis =2B@item @code{record?} (default: @code{#f}) =2B =2BA boolean indicating whether to record the events in an SQLite database.= =20 This =2Bprovides a more structured access to the information contained in the lo= =67 file. =2BThe database location is hard-coded to @file{/var/lib/rasdaemon/ras-mc_e= =76ent.db}. =2B =2B@end table =2B@end deftp =2B =20@cindex zram =20@cindex compressed swap =20@cindex Compressed RAM-based block devices =64iff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm =69ndex 1ea9d80834..3685debb38 100644 =2D-- a/gnu/packages/linux.scm =2B++ b/gnu/packages/linux.scm =40@ -53,6 +53,7 @@ =20;;; Copyright =C2=A9 2020 Zhu Zihao =20;;; Copyright =C2=A9 2020 David Dashyan =20;;; Copyright =C2=A9 2020 pukkamustard =2B;;; Copyright =C2=A9 2021 B. Wilson =20;;; =20;;; This file is part of GNU Guix. =20;;; =40@ -130,6 +131,7 @@ =20 #:use-module (gnu packages sdl) =20 #:use-module (gnu packages serialization) =20 #:use-module (gnu packages slang) =2B #:use-module (gnu packages sqlite) =20 #:use-module (gnu packages texinfo) =20 #:use-module (gnu packages tls) =20 #:use-module (gnu packages valgrind) =40@ -8037,3 +8039,46 @@ kernel side implementation.") =20read-only file system optimized for resource-scarce devices. This packa= =67e =20provides user-space tools for creating EROFS file systems.") =20 (license license:gpl2+))) =2B =2B(define-public rasdaemon =2B (package =2B (name "rasdaemon") =2B (version "0.6.6") =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/mchehab/rasdaemon") =2B (commit (string-append "v" version)))) =2B (file-name (git-file-name name version)) =2B (sha256 =2B (base32 "13g39x19lfjf9izdcb0nlyfjrgpliivhv4nw3ndgyzi59l3yqc0v"))= =29) =2B (native-inputs `(("autoconf" ,autoconf) =2B ("automake" ,automake) =2B ("libtool" ,libtool))) =2B (inputs `(("sqlite" ,sqlite))) =2B (arguments =2B `(#:configure-flags '("--enable-all" =2B "--localstatedir=3D/var") =2B #:phases =2B (modify-phases %standard-phases =2B (add-before 'configure 'munge-autotools =2B (lambda _ =2B ;; For some reason upstream forces sysconfdir=3D/etc. This= =20results =2B ;; in EPERM during the install phase. Removing the offendi= =6Eg =2B ;; line lets sysconfdir correctly pick up DESTDIR. =2B (substitute* "configure.ac" =2B (("^test .* sysconfdir=3D/etc\n$") "")) =2B ;; Upstream tries to create /var/lib/rasdaemon at install t= =69me. =2B ;; This results in EPERM on guix. Instead, the service sho= =75ld =2B ;; create this at activation time. =2B (substitute* "Makefile.am" =2B (("^\\s*\\$\\(install_sh\\) -d .*@RASSTATEDIR@.*$") "")))= =29))) =2B (build-system gnu-build-system) =2B (home-page "https://github.com/mchehab/rasdaemon") =2B (synopsis "Platform Reliability, Availability and Serviceability too= =6Cs") =2B (description "The @code{rasdaemon} program is a daemon which monitor= =73 the =2Bplatform Reliablity, Availability and Serviceability (RAS) reports from = =74he =2BLinux kernel trace events. These trace events are logged in =2B/sys/kernel/debug/tracing, reporting them via syslog/journald.") =2B (license license:gpl2))) =64iff --git a/gnu/services/linux.scm b/gnu/services/linux.scm =69ndex 340b330030..2eb02ac5a3 100644 =2D-- a/gnu/services/linux.scm =2B++ b/gnu/services/linux.scm =40@ -3,6 +3,7 @@ =20;;; Copyright =C2=A9 2020 Brice Waegeneire =20;;; Copyright =C2=A9 2020 Efraim Flashner =20;;; Copyright =C2=A9 2021 raid5atemyhomework =2B;;; Copyright =C2=A9 2021 B. Wilson =20;;; =20;;; This file is part of GNU Guix. =20;;; =40@ -47,6 +48,11 @@ =20= =20 kernel-module-loader-service-type =20= =2B rasdaemon-configuration =2B rasdaemon-configuration? =2B rasdaemon-configuration-record? =2B rasdaemon-service-type =2B =20 zram-device-configuration =20 zram-device-configuration? =20 zram-device-configuration-size =40@ -188,6 +194,49 @@ representation." =20 (extend append) =20 (default-value '()))) =20= =2B=0C =2B;;; =2B;;; Reliability, Availability, and Serviceability (RAS) daemon =2B;;; =2B =2B(define-record-type* =2B rasdaemon-configuration make-rasdaemon-configuration =2B rasdaemon-configuration? =2B (record? rasdaemon-configuration-record? (default #f))) =2B =2B(define (rasdaemon-configuration->command-line-args config) =2B "Translate to its command line arguments =2B representation" =2B (let ((record? (rasdaemon-configuration-record? config))) =2B `(,(file-append rasdaemon "/sbin/rasdaemon") =2B "--foreground" ,@(if record? '("--record") '())))) =2B =2B(define (rasdaemon-activation config) =2B (let ((record? (rasdaemon-configuration-record? config)) =2B (rasdaemon-dir "/var/lib/rasdaemon")) =2B (with-imported-modules '((guix build utils)) =2B #~(if #$record? (mkdir-p #$rasdaemon-dir))))) =2B =2B(define (rasdaemon-shepherd-service config) =2B (shepherd-service =2B (documentation "Run rasdaemon") =2B (provision '(rasdaemon)) =2B (requirement '(syslogd)) =2B (start #~(make-forkexec-constructor =2B '#$(rasdaemon-configuration->command-line-args config))) =2B (stop #~(make-kill-destructor)))) =2B =2B(define rasdaemon-service-type =2B (service-type =2B (name 'rasdaemon) =2B (default-value (rasdaemon-configuration)) =2B (extensions =2B (list (service-extension shepherd-root-service-type =2B (compose list rasdaemon-shepherd-service)) =2B (service-extension activation-service-type rasdaemon-activatio= =6E))) =2B (compose concatenate) =2B (description "Run @command{rasdaemon}, the RAS monitor"))) =2B =20=0C =20;;; =20;;; Kernel module loader. =2D-=20 =32.31.1 =0A= ------_=_0d33e8e03f6f767c601c41e7_=_--