mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-06 15:20:12 +00:00
rasdaemon: create recipe for version 0.6.5
Link with libargp on musl Include limits.h Add to packagegroup-meta-oe Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
RDEPENDS_packagegroup-meta-oe-support += "debsums"
|
RDEPENDS_packagegroup-meta-oe-support += "debsums rasdaemon"
|
||||||
|
|||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
From 18786db1ad03716267927d983c83275469a1478a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Fri, 8 May 2020 12:27:19 -0700
|
||||||
|
Subject: [PATCH] Fix system header includes
|
||||||
|
|
||||||
|
Use poll.h instead of sys/poll.h
|
||||||
|
Fixes
|
||||||
|
warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
|
||||||
|
|
||||||
|
Include limits.h for PATH_MAX
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
ras-events.c:359:16: error: 'PATH_MAX' undeclared (first use in this function)
|
||||||
|
359 | char pipe_raw[PATH_MAX];
|
||||||
|
| ^~~~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
ras-events.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/ras-events.c b/ras-events.c
|
||||||
|
index 511c93d..400e740 100644
|
||||||
|
--- a/ras-events.c
|
||||||
|
+++ b/ras-events.c
|
||||||
|
@@ -18,13 +18,14 @@
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
+#include <poll.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
-#include <sys/poll.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <sys/signalfd.h>
|
||||||
|
#include "libtrace/kbuffer.h"
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# /etc/init.d/rasdaemon: start rasdaemon service
|
||||||
|
|
||||||
|
. /etc/init.d/functions
|
||||||
|
|
||||||
|
# Defaults
|
||||||
|
PIDFILE=/var/run/rasdaemon.pid
|
||||||
|
BINFILE=/usr/sbin/rasdaemon
|
||||||
|
SCRIPTNAME=/etc/init.d/rasdaemon
|
||||||
|
|
||||||
|
[ -x $BINFILE ] || exit 0
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting RASdaemon services: "
|
||||||
|
if [ ! -f "$PIDFILE" ]; then
|
||||||
|
start-stop-daemon --start --quiet --exec $BINFILE -- --enable &> /dev/null
|
||||||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $BINFILE -- --record
|
||||||
|
pidof $BINFILE > $PIDFILE
|
||||||
|
fi
|
||||||
|
[ -f $PIDFILE ] && echo "done." || echo "fail."
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Stopping RASdaemon services: "
|
||||||
|
if [ -f "$PIDFILE" ] ; then
|
||||||
|
start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $BINFILE -- --disable &> /dev/null
|
||||||
|
killproc $BINFILE
|
||||||
|
rm $PIDFILE
|
||||||
|
fi
|
||||||
|
[ ! -f $PIDFILE ] && echo "done." || echo "fail."
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status $BINFILE
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $SCRIPTNAME {start|stop|restart|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=RAS daemon to log the RAS events
|
||||||
|
After=syslog.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/rasdaemon -f -r
|
||||||
|
ExecStartPost=/usr/sbin/rasdaemon --enable
|
||||||
|
ExecStop=/usr/sbin/rasdaemon --disable
|
||||||
|
Restart=on-abort
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
DESCRIPTION = "Tools to provide a way to get Platform Reliability, Availability and Serviceability (RAS) reports made via the Kernel tracing events"
|
||||||
|
HOMEPAGE = "http://git.infradead.org/users/mchehab/rasdaemon.git"
|
||||||
|
LICENSE = "GPLv2"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d3070efe0afa3dc41608bd82c00bb0dc"
|
||||||
|
|
||||||
|
SRC_URI = "git://git.infradead.org/users/mchehab/rasdaemon.git;branch=master \
|
||||||
|
file://0001-Fix-system-header-includes.patch \
|
||||||
|
file://rasdaemon.service \
|
||||||
|
file://init"
|
||||||
|
|
||||||
|
SRCREV = "25533c0c55426eeb2ad25dcbdb2b5e4ba4e83d80"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
RDEPENDS_${BPN} = "perl perl-module-file-basename perl-module-file-find perl-module-file-spec perl-module-getopt-long \
|
||||||
|
perl-module-posix perl-module-file-glob libdbi-perl libdbd-sqlite-perl"
|
||||||
|
|
||||||
|
inherit autotools pkgconfig update-rc.d systemd
|
||||||
|
|
||||||
|
PACKAGECONFIG ??= "sqlite3 mce aer extlog devlink diskerror"
|
||||||
|
PACKAGECONFIG[sqlite3] = "--enable-sqlite3,--disable-sqlite3,sqlite3"
|
||||||
|
PACKAGECONFIG[mce] = "--enable-mce,--disable-mce"
|
||||||
|
PACKAGECONFIG[aer] = "--enable-aer,--disable-aer"
|
||||||
|
PACKAGECONFIG[extlog] = "--enable-extlog,--disable-extlog"
|
||||||
|
PACKAGECONFIG[devlink] = "--enable-devlink,--disable-devlink"
|
||||||
|
PACKAGECONFIG[diskerror] = "--enable-diskerror,--disable-diskerror"
|
||||||
|
PACKAGECONFIG[arm] = "--enable-arm,--disable-arm"
|
||||||
|
PACKAGECONFIG[hisi-ns-decode] = "--enable-hisi-ns-decode,--disable-hisi-ns-decode"
|
||||||
|
PACKAGECONFIG[non-standard] = "--enable-non-standard,--disable-non-standard"
|
||||||
|
PACKAGECONFIG[abrt-report] = "--enable-abrt-report,--disable-abrt-report"
|
||||||
|
|
||||||
|
DEPENDS_append_libc-musl = " argp-standalone"
|
||||||
|
LDFLAGS_append_libc-musl = " -largp"
|
||||||
|
|
||||||
|
do_configure_prepend () {
|
||||||
|
( cd ${S}; autoreconf -vfi )
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
install -d ${D}${sysconfdir}/init.d
|
||||||
|
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rasdaemon
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
install -m 0644 ${WORKDIR}/rasdaemon.service ${D}${systemd_unitdir}/system
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN} += "${sbindir}/rasdaemon \
|
||||||
|
${sysconfdir}/init.d \
|
||||||
|
${systemd_unitdir}/system/rasdaemon.service"
|
||||||
|
|
||||||
|
SYSTEMD_SERVICE_${PN} = "rasdaemon.service"
|
||||||
|
SYSTEMD_AUTO_ENABLE = "enable"
|
||||||
|
|
||||||
|
INITSCRIPT_PACKAGES = "${PN}"
|
||||||
|
INITSCRIPT_NAME_${PN} = "rasdaemon"
|
||||||
|
INITSCRIPT_PARAMS_${PN} = "defaults 89"
|
||||||
Reference in New Issue
Block a user