Files
buildroot/package/rasdaemon/0001-rasdaemon-fix-build-when-sqlite-isn-t-enabled.patch
Bastien Curutchet 7b8892e900 package/rasdaemon: new package
Rasdaemon is a tool that aims at replacing edac-tool and provide a way
to collect all hardware error events reported by the Linux kernel in a
common framework.

This commit adds a new package to support rasdaemon in the 'Hardware
handling' section. It depends on libtraceevent to detect the ftrace
events generated by the kernel. There is currently a build issue when
sqlite isn't availaible while it's supposed to be an optional
dependency. This build issue is fixed by patch 0001 (which has been
also submitted to the rasdaemon project itself).

Support for the PCIe AER events is optionnal and implies a dependency on
pciutils so also add a dedicated 'sub-option' to enable it.

Add a SYSV init script to start / stop the daemon

Add myself to the DEVELOPERS file.

Reviewed-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-12-30 20:56:44 +01:00

47 lines
1.2 KiB
Diff

From 8eaf25c30554c7cc457406ce5895b8087904cb2b Mon Sep 17 00:00:00 2001
From: Bastien Curutchet <bastien.curutchet@bootlin.com>
Date: Wed, 17 Dec 2025 11:38:52 +0100
Subject: [PATCH] rasdaemon: fix build when sqlite isn't enabled
Build without SQLite enabled through --enable-sqlite3 still fails if
sqlite isn't available:
> CC rasdaemon-rasdaemon.o
> In file included from rasdaemon.c:17:
> ras-record.h:11:10: fatal error: sqlite3.h: No such file or directory
> 11 | #include <sqlite3.h>
> | ^~~~~~~~~~~
> compilation terminated.
Include the sqlite header only if the SQLite feature is enabled.
Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Upstream: https://github.com/mchehab/rasdaemon/pull/234
---
ras-record.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ras-record.h b/ras-record.h
index 21edcd6..cb03f4e 100644
--- a/ras-record.h
+++ b/ras-record.h
@@ -8,7 +8,6 @@
#ifndef __RAS_RECORD_H
#define __RAS_RECORD_H
-#include <sqlite3.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
@@ -320,6 +319,8 @@ struct ras_cxl_memory_sparing_event;
#ifdef HAVE_SQLITE3
+#include <sqlite3.h>
+
struct sqlite3_priv {
sqlite3 *db;
sqlite3_stmt *stmt_mc_event;
--
2.52.0