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: > On Thu, May 7, 2020 at 3:37 AM Beni <[email protected]> wrote: > > > > 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.bb > > > > diff --git a/meta-oe/recipes-support/rasdaemon/files/init > b/meta-oe/recipes-support/rasdaemon/files/init > > new file mode 100644 > > index 000000000..216677e73 > > --- /dev/null > > +++ b/meta-oe/recipes-support/rasdaemon/files/init > > @@ -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 > > diff --git a/meta-oe/recipes-support/rasdaemon/files/rasdaemon.service > b/meta-oe/recipes-support/rasdaemon/files/rasdaemon.service > > new file mode 100644 > > index 000000000..4fbf23142 > > --- /dev/null > > +++ b/meta-oe/recipes-support/rasdaemon/files/rasdaemon.service > > @@ -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 > > diff --git a/meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb > b/meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb > > new file mode 100644 > > index 000000000..c1b9fdbaa > > --- /dev/null > > +++ b/meta-oe/recipes-support/rasdaemon/rasdaemon_0.6.5.bb > > @@ -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 \ > > + 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 ? > > > +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 > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#84626): https://lists.openembedded.org/g/openembedded-devel/message/84626 Mute This Topic: https://lists.openembedded.org/mt/74047501/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
