rasdaemon: create recipe for version 0.6.5
PATCH 1/1 rasdaemon: create recipe for version 0.6.5
--- meta-oe/recipes-support/rasdaemon/files/init | 43 ++++++++++++++++ .../rasdaemon/files/rasdaemon.service | 12 +++++ .../rasdaemon/rasdaemon_0.6.5.bb | 51 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 meta-oe/recipes-support/rasdaemon/files/init create mode 100644 meta-oe/recipes-support/rasdaemon/files/rasdaemon.service create mode 100644 meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb
meta-oe/recipes-support/rasdaemon/files/init new file +43 -0
@@ -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
meta-oe/recipes-support/rasdaemon/files/rasdaemon.service new file +12 -0
@@ -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
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 90 lines · Beni
Signed-off-by Beniamin Sandu <[email protected]>--- meta-oe/recipes-support/rasdaemon/files/init | 43 ++++++++++++++++ .../rasdaemon/files/rasdaemon.service | 12 +++++ .../rasdaemon/rasdaemon_0.6.5.bb | 51 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 meta-oe/recipes-support/rasdaemon/files/init create mode 100644 meta-oe/recipes-support/rasdaemon/files/rasdaemon.service create mode 100644 meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bbmeta-oe/recipes-support/rasdaemon/files/init new file +43
-0@@ -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 +esacmeta-oe/recipes-support/rasdaemon/files/rasdaemon.service new file +12
-0@@ -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.targetmeta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +6
-0@@ -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 = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d3070efe0afa3dc41608bd82c00bb0dc" + +SRC_URI = "git://git.infradead.org/users/mchehab/rasdaemon.git;branch=master \
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb line 16
Quoted 10 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +10
-0+ 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" +
depending on libdbd-sqlite-perl will make meta-oe depend on meta-perl, so far we have avoided this dependency, is there a way to make this configurable ?
Quoted 39 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +35
-1+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" + +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" --2.25.1
I'm sorry for the late response, I was AFK for a longer time and forgot about this.
I saw your latest patch, thanks for fixing and integrating it.
În sâm., 9 mai 2020 la 05:53, Khem Raj <[email protected]> a scris:
Quoted 162 lines · Beni
Quoted 9 lines
Signed-off-by Beniamin Sandu <[email protected]>--- meta-oe/recipes-support/rasdaemon/files/init | 43 ++++++++++++++++ .../rasdaemon/files/rasdaemon.service | 12 +++++ .../rasdaemon/rasdaemon_0.6.5.bb | 51 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 meta-oe/recipes-support/rasdaemon/files/init create mode 100644meta-oe/recipes-support/rasdaemon/files/rasdaemon.service
Review
Quoted 3 lines
create mode 100644 meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb(quoted diff) +0
-0b/meta-oe/recipes-support/rasdaemon/files/init
Quoted 12 lines
new file mode 100644
index 000000000..216677e73meta-oe/recipes-support/rasdaemon/files/init new file +7
-0@@ -0,0 +1,43 @@ +#! /bin/sh +# /etc/init.d/rasdaemon: start rasdaemon service + +. /etc/init.d/functions + +# Defaults +PIDFILE=/var/run/rasdaemon.pidmeta-oe/recipes-support/rasdaemon/files/init line 17
Quoted 10 lines
meta-oe/recipes-support/rasdaemon/files/init new file +10
-0+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/nullmeta-oe/recipes-support/rasdaemon/files/init line 18
Quoted 1 line
meta-oe/recipes-support/rasdaemon/files/init new file +1
-0+ start-stop-daemon --start --quiet --pidfile$PIDFILE --exec $BINFILE -- --record
meta-oe/recipes-support/rasdaemon/files/init
Quoted 8 lines
meta-oe/recipes-support/rasdaemon/files/init new file +8
-0+ 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/nullReview
Quoted 18 lines
meta-oe/recipes-support/rasdaemon/files/init new file +17
-0+ 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(quoted diff) +0
-0b/meta-oe/recipes-support/rasdaemon/files/rasdaemon.service
Review
Quoted 18 lines
new file mode 100644
index 000000000..4fbf23142meta-oe/recipes-support/rasdaemon/files/rasdaemon.service new file +12
-0@@ -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(quoted diff) +0
-0b/meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb line 1
Quoted 6 lines
new file mode 100644
index 000000000..c1b9fdbaameta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +1
-0@@ -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"
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb
Quoted 5 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +5
-0+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 \
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb
Quoted 8 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +8
-0+ file://rasdaemon.service \ + file://init" + +SRCREV = "25533c0c55426eeb2ad25dcbdb2b5e4ba4e83d80" + +S = "${WORKDIR}/git" + +RDEPENDS_${BPN} = "perl perl-module-file-basename perl-module-file-findperl-module-file-spec perl-module-getopt-long \
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb line 15
Quoted 1 line
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +1
-0+ perl-module-posix perl-module-file-glob libdbi-perllibdbd-sqlite-perl"
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb line 16
Quoted 1 line
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +1
-0+depending on libdbd-sqlite-perl will make meta-oe depend on meta-perl, so far
we have avoided this dependency, is there a way to make this configurable ?meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb
Quoted 11 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +11
-0+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"
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb line 28
Quoted 1 line
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +1
-0+PACKAGECONFIG[non-standard] ="--enable-non-standard,--disable-non-standard"
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb line 29
Quoted 1 line
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +1
-0+PACKAGECONFIG[abrt-report] ="--enable-abrt-report,--disable-abrt-report"
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb
Quoted 10 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +10
-0+ +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
Quoted 16 lines
meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb new file +12
-1+} + +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" --2.25.1