[PATCH 0/3] Update rasdaemon to 0.8.0

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Bruno Victal
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 3 Mar 2023 16:52
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
cover.1677858305.git.mirai@makinata.eu
Note: libtraceevent dependency was cherry-picked from the work by Petr Hodina at #60018
and was patched to simplify the package definition and fix some minor inaccuracies.

Bruno Victal (2):
gnu: rasdaemon: Refactor package.
gnu: rasdaemon: Update to 0.8.0.

Petr Hodina (1):
gnu: Add libtraceevent.

gnu/packages/linux.scm | 74 ++++++++++++++++++++++++++++++++----------
1 file changed, 56 insertions(+), 18 deletions(-)


base-commit: c6480edbe3260a3bfb48361ca73e666b6d473f42
--
2.39.1
B
B
Bruno Victal wrote on 3 Mar 2023 16:54
[PATCH 2/3] gnu: Add libtraceevent.
(address . 61939@debbugs.gnu.org)
bab385f58eb4450a94687980a93bdeb00e7d1d17.1677858305.git.mirai@makinata.eu
From: Petr Hodina <phodina@protonmail.com>

* gnu/packages/linux.scm (libtraceevent): New variable.

Co-authored-by: Bruno Victal <mirai@makinata.eu>
---
gnu/packages/linux.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 545d53fe91..16a9d9aa90 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9636,6 +9636,45 @@ (define-public libgpiod
license:gpl2+ ;; gpio-tools
license:lgpl3+)))) ;; C++ bindings
+(define-public libtraceevent
+ (package
+ (name "libtraceevent")
+ (version "1.7.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git")
+ (commit (string-append name "-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1kbl11lqh8cadi6r3qqxx68idr7597l6i50pr5p5mdgsf6k2i83c"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (substitute* "Makefile"
+ (("/bin/pwd") "pwd"))
+ (substitute* "scripts/utils.mk"
+ (("/bin/pwd") "pwd"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ;no test suite
+ #:make-flags
+ #~(list
+ (string-append "pkgconfig_dir=" #$output "/lib/pkgconfig")
+ (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/")
+ (synopsis "Linux kernel trace event library")
+ (description "This package provides library to parse raw trace event
+formats.")
+ (license (list license:gpl2
+ license:lgpl2.1))))
+
(define-public libtree
(package
(name "libtree")
--
2.39.1
B
B
Bruno Victal wrote on 3 Mar 2023 16:54
[PATCH 1/3] gnu: rasdaemon: Refactor package.
(address . 61939@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
5d6e38e37c79bc8b6af3f78a4f7ef0a3eea01157.1677858305.git.mirai@makinata.eu
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(-)

Toggle diff (44 lines)
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 <hako@ultrarare.space>
;;; Copyright © 2022 Stefan <stefan-guix@vodafonemail.de>
;;; Copyright © 2022 Demis Balbach <db@minikn.xyz>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; 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
B
B
Bruno Victal wrote on 3 Mar 2023 16:54
[PATCH 3/3] gnu: rasdaemon: Update to 0.8.0.
(address . 61939@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
dbd721b8a8193f1563c01cc1dfaed1beccdf4e7b.1677858305.git.mirai@makinata.eu
* gnu/packages/linux.scm (rasdaemon): Update to 0.8.0.
[inputs]: Add pkg-config, libtraceevent.
[arguments]: Rename README.md to README.
---
gnu/packages/linux.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 16a9d9aa90..25d0c2cefa 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9554,7 +9554,7 @@ (define-public erofs-utils
(define-public rasdaemon
(package
(name "rasdaemon")
- (version "0.7.0")
+ (version "0.8.0")
(source
(origin
(method git-fetch)
@@ -9563,9 +9563,9 @@ (define-public rasdaemon
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1a3ycx1g2zyshlna9fg8c9329m8wia42vkmlh2awfab0ngwi3g50"))))
- (native-inputs (list autoconf automake libtool))
- (inputs (list perl perl-dbd-sqlite sqlite dmidecode kmod))
+ (base32 "0m3j1hz9rqcvwmrimpakd239s0ppzaplkykhf9wyh55xmmry8z85"))))
+ (native-inputs (list autoconf automake libtool pkg-config))
+ (inputs (list libtraceevent perl perl-dbd-sqlite sqlite dmidecode kmod))
(arguments
(list
#:configure-flags
@@ -9575,6 +9575,10 @@ (define-public rasdaemon
"--localstatedir=/var")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'rename-README
+ (lambda _
+ ;; Required by autoreconf
+ (rename-file "README.md" "README")))
(add-before 'configure 'munge-autotools
(lambda _
;; For some reason upstream forces sysconfdir=/etc. This results
--
2.39.1
N
N
Nicolas Goaziou wrote on 10 Mar 2023 22:15
Re: [bug#61939] [PATCH 0/3] Update rasdaemon to 0.8.0
(name . Bruno Victal)(address . mirai@makinata.eu)
871qlw71go.fsf@nicolasgoaziou.fr
Hello,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (7 lines)
> Bruno Victal (2):
> gnu: rasdaemon: Refactor package.
> gnu: rasdaemon: Update to 0.8.0.
>
> Petr Hodina (1):
> gnu: Add libtraceevent.

Applied. Thank you.

Regards,
--
Nicolas Goaziou
Closed
?