aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/rasdaemon/APKBUILD61
-rw-r--r--testing/rasdaemon/libargp.patch11
-rw-r--r--testing/rasdaemon/rasdaemon.initd20
3 files changed, 92 insertions, 0 deletions
diff --git a/testing/rasdaemon/APKBUILD b/testing/rasdaemon/APKBUILD
new file mode 100644
index 0000000000..6b44689363
--- /dev/null
+++ b/testing/rasdaemon/APKBUILD
@@ -0,0 +1,61 @@
+# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
+# Maintainer: Henrik Riomar <henrik.riomar@gmail.com>
+pkgname=rasdaemon
+pkgver=0.6.2
+pkgrel=0
+pkgdesc="utility to receive RAS error tracings"
+url="http://www.infradead.org/~mchehab/rasdaemon/"
+arch="x86_64"
+license="GPL-2.0-or-later"
+depends="dmidecode
+ perl
+ perl-dbd-sqlite
+ "
+makedepends="argp-standalone
+ sqlite-dev
+ autoconf
+ automake
+ libtool
+ "
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc"
+source="https://www.infradead.org/~mchehab/rasdaemon/rasdaemon-$pkgver.tar.bz2
+ libargp.patch
+ $pkgname.initd
+ "
+builddir="$srcdir/rasdaemon-$pkgver"
+
+prepare() {
+ default_prepare
+ autoreconf -i
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --enable-aer \
+ --enable-extlog \
+ --enable-mce \
+ --enable-sqlite3
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+}
+
+sha512sums="d8c1ee2cc801124837b3a0739f3016a206165306e300ce51e6aac2cef56bb65479f96cdb019ba3a5cffeba94e7b67ca22686d4ac94bfa8a8a1145db6ba51096b rasdaemon-0.6.2.tar.bz2
+83a484ab7b19dc22c2dae7636929379a70d775194566ee98012a783c7a2afa0b216ebe8b49f34f05bfe395f8f1e434ca7e739991943514faf3888689a284b781 libargp.patch
+edee5b32765b3c89ab82e5cd410b0b381aa58470fdaed3a94516aa954845123b661a4923435f7d0bc9c33fb9b1e42a611dc1aa629a5db7d3e431164e4cd432cf rasdaemon.initd"
diff --git a/testing/rasdaemon/libargp.patch b/testing/rasdaemon/libargp.patch
new file mode 100644
index 0000000000..6c2973a738
--- /dev/null
+++ b/testing/rasdaemon/libargp.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -47,7 +47,7 @@
+ if WITH_HISI_NS_DECODE
+ rasdaemon_SOURCES += non-standard-hisi_hip07.c
+ endif
+-rasdaemon_LDADD = -lpthread $(SQLITE3_LIBS) libtrace/libtrace.a
++rasdaemon_LDADD = -lpthread -largp $(SQLITE3_LIBS) libtrace/libtrace.a
+
+ include_HEADERS = config.h ras-events.h ras-logger.h ras-mc-handler.h \
+ ras-aer-handler.h ras-mce-handler.h ras-record.h bitfield.h ras-report.h \
diff --git a/testing/rasdaemon/rasdaemon.initd b/testing/rasdaemon/rasdaemon.initd
new file mode 100644
index 0000000000..221d238320
--- /dev/null
+++ b/testing/rasdaemon/rasdaemon.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+
+description="daemon to receive RAS error tracings"
+
+pidfile=/run/"$RC_SVCNAME".pid
+command=/usr/sbin/rasdaemon
+command_args="--foreground --record"
+command_background=true
+
+depend() {
+ need localmount sysfs
+}
+
+start_post() {
+ "${command}" --enable
+}
+
+stop_post() {
+ "${command}" --disable
+}