* [bug#61939] [PATCH 1/3] gnu: rasdaemon: Refactor package.
2023-03-03 15:52 [bug#61939] [PATCH 0/3] Update rasdaemon to 0.8.0 Bruno Victal
@ 2023-03-03 15:54 ` Bruno Victal
2023-03-03 15:54 ` [bug#61939] [PATCH 2/3] gnu: Add libtraceevent Bruno Victal
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bruno Victal @ 2023-03-03 15:54 UTC (permalink / raw)
To: 61939; +Cc: Bruno Victal
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 <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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#61939] [PATCH 2/3] gnu: Add libtraceevent.
2023-03-03 15:52 [bug#61939] [PATCH 0/3] Update rasdaemon to 0.8.0 Bruno Victal
2023-03-03 15:54 ` [bug#61939] [PATCH 1/3] gnu: rasdaemon: Refactor package Bruno Victal
@ 2023-03-03 15:54 ` Bruno Victal
2023-03-03 15:54 ` [bug#61939] [PATCH 3/3] gnu: rasdaemon: Update to 0.8.0 Bruno Victal
2023-03-10 21:15 ` bug#61939: [PATCH 0/3] Update rasdaemon " Nicolas Goaziou
3 siblings, 0 replies; 5+ messages in thread
From: Bruno Victal @ 2023-03-03 15:54 UTC (permalink / raw)
To: 61939; +Cc: Bruno Victal, Petr Hodina
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(+)
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#61939] [PATCH 3/3] gnu: rasdaemon: Update to 0.8.0.
2023-03-03 15:52 [bug#61939] [PATCH 0/3] Update rasdaemon to 0.8.0 Bruno Victal
2023-03-03 15:54 ` [bug#61939] [PATCH 1/3] gnu: rasdaemon: Refactor package Bruno Victal
2023-03-03 15:54 ` [bug#61939] [PATCH 2/3] gnu: Add libtraceevent Bruno Victal
@ 2023-03-03 15:54 ` Bruno Victal
2023-03-10 21:15 ` bug#61939: [PATCH 0/3] Update rasdaemon " Nicolas Goaziou
3 siblings, 0 replies; 5+ messages in thread
From: Bruno Victal @ 2023-03-03 15:54 UTC (permalink / raw)
To: 61939; +Cc: Bruno Victal
* 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(-)
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#61939: [PATCH 0/3] Update rasdaemon to 0.8.0
2023-03-03 15:52 [bug#61939] [PATCH 0/3] Update rasdaemon to 0.8.0 Bruno Victal
` (2 preceding siblings ...)
2023-03-03 15:54 ` [bug#61939] [PATCH 3/3] gnu: rasdaemon: Update to 0.8.0 Bruno Victal
@ 2023-03-10 21:15 ` Nicolas Goaziou
3 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2023-03-10 21:15 UTC (permalink / raw)
To: Bruno Victal; +Cc: 61939-done, phodina
Hello,
Bruno Victal <mirai@makinata.eu> writes:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread