added my Recipes
This commit is contained in:
@@ -0,0 +1 @@
|
||||
RDEPENDS:packagegroup-meta-oe-support += "debsums rasdaemon"
|
||||
@@ -0,0 +1,56 @@
|
||||
SUMMARY = "Miscellaneous utilities specific to Debian"
|
||||
SUMMARY:${PN}-cron = "Cron scripts to control automatic debsum checking"
|
||||
DESCRIPTION = "A tool for verification of installed package files against \
|
||||
MD5 checksums debsums can verify the integrity of installed package files \
|
||||
against MD5 checksums installed by the package, or generated from a .deb \
|
||||
archive."
|
||||
DESCRIPTION:${PN}-cron = "Cron scripts to control automatic system integrity \
|
||||
checking via debsums."
|
||||
SECTION = "base"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://debian/copyright;md5=770d751553e6559e9eaefd2e11ccf7e9"
|
||||
|
||||
SRC_URI = "http://snapshot.debian.org/archive/debian/20170530T212108Z/pool/main/d/debsums/debsums_2.2.2.tar.xz"
|
||||
SRC_URI[md5sum] = "82b0710855a7e5212d4358163a269e79"
|
||||
SRC_URI[sha256sum] = "aa61896f93a6bbfe0161c21dcd67529ae8e1ec8c3ccf244523c52c4ad8253d97"
|
||||
|
||||
# the package is taken from snapshots.debian.org; that source is static and goes stale
|
||||
# so we check the latest upstream from a directory that does get updated
|
||||
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
|
||||
|
||||
inherit perlnative gettext
|
||||
|
||||
DEPENDS += "po4a-native"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/${sysconfdir}/cron.daily ${D}/${sysconfdir}/cron.weekly
|
||||
install -d ${D}/${sysconfdir}/cron.monthly ${D}${sbindir} ${D}${bindir}
|
||||
install -d ${D}${mandir}/man1 ${D}${mandir}/man8
|
||||
install -m 0755 debsums ${D}${bindir}/
|
||||
install -m 0755 rdebsums ${D}${bindir}/
|
||||
install -m 0755 debsums_init ${D}${sbindir}
|
||||
install -m 0644 man/debsums.1 ${D}${mandir}/man1/
|
||||
install -m 0644 man/rdebsums.1 ${D}${mandir}/man1/
|
||||
install -m 0644 man/debsums_init.8 ${D}${mandir}/man8/
|
||||
install -m 0644 debian/cron.daily \
|
||||
${D}/${sysconfdir}/cron.daily/debsums
|
||||
install -m 0644 debian/cron.weekly \
|
||||
${D}/${sysconfdir}/cron.weekly/debsums
|
||||
install -m 0644 debian/cron.monthly \
|
||||
${D}/${sysconfdir}/cron.monthly/debsums
|
||||
# Must exist, defaults to empty.
|
||||
touch ${D}/${sysconfdir}/debsums-ignore
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-cron"
|
||||
|
||||
RDEPENDS:${PN} = "dpkg dpkg-perl libfile-fnmatch-perl perl \
|
||||
perl-module-constant perl-module-digest-md5 \
|
||||
perl-module-errno perl-module-fcntl \
|
||||
perl-module-file-basename perl-module-file-copy \
|
||||
perl-module-file-find perl-module-file-glob \
|
||||
perl-module-file-path perl-module-file-spec \
|
||||
perl-module-file-temp perl-module-getopt-long \
|
||||
perl-module-posix"
|
||||
|
||||
FILES:${PN}-cron = "${sysconfdir}/cron.*"
|
||||
@@ -0,0 +1,35 @@
|
||||
From e415152b51eacab8705b6b3274cc0d1a274772e0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 30 Aug 2022 19:54:35 -0700
|
||||
Subject: [PATCH] libtrace: Use XSI version of strerror_r on non glibc systems
|
||||
|
||||
The version used is glibc specific therefore make it so
|
||||
and provide a fallback for non-glibc systems
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/mchehab/rasdaemon/pull/70]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
libtrace/event-parse.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/libtrace/event-parse.c b/libtrace/event-parse.c
|
||||
index 6c705c3..6b651d5 100644
|
||||
--- a/libtrace/event-parse.c
|
||||
+++ b/libtrace/event-parse.c
|
||||
@@ -5071,7 +5071,13 @@ int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum,
|
||||
const char *msg;
|
||||
|
||||
if (errnum >= 0) {
|
||||
+#if defined(__GLIBC__)
|
||||
msg = strerror_r(errnum, buf, buflen);
|
||||
+#else
|
||||
+ if (strerror_r(errnum, buf, buflen) != 0)
|
||||
+ snprintf(buf, buflen, "unknown error %i", errnum);
|
||||
+ msg = buf;
|
||||
+#endif
|
||||
if (msg != buf) {
|
||||
size_t len = strlen(msg);
|
||||
memcpy(buf, msg, min(buflen - 1, len));
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -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,51 @@
|
||||
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 = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d3070efe0afa3dc41608bd82c00bb0dc"
|
||||
|
||||
SRC_URI = "git://github.com/mchehab/rasdaemon.git;branch=master;protocol=https \
|
||||
file://0001-libtrace-Use-XSI-version-of-strerror_r-on-non-glibc-.patch \
|
||||
file://rasdaemon.service \
|
||||
file://init"
|
||||
|
||||
SRCREV = "c2255178a49f62c53009a456bc37dd5e37332f09"
|
||||
|
||||
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_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