All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] rasdaemon: create recipe for version 0.6.5
@ 2020-05-07 10:37 Beni
  2020-05-09  2:53 ` [oe] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Beni @ 2020-05-07 10:37 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Beniamin Sandu

Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
---
 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"
+
+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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-oe][PATCH] rasdaemon: create recipe for version 0.6.5
  2020-05-07 10:37 [meta-oe][PATCH] rasdaemon: create recipe for version 0.6.5 Beni
@ 2020-05-09  2:53 ` Khem Raj
  2020-05-28 13:49   ` Beni
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2020-05-09  2:53 UTC (permalink / raw)
  To: openembeded-devel; +Cc: Beniamin Sandu

On Thu, May 7, 2020 at 3:37 AM Beni <beniaminsandu@gmail.com> wrote:
>
> Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
> ---
>  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
>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-oe][PATCH] rasdaemon: create recipe for version 0.6.5
  2020-05-09  2:53 ` [oe] " Khem Raj
@ 2020-05-28 13:49   ` Beni
  0 siblings, 0 replies; 3+ messages in thread
From: Beni @ 2020-05-28 13:49 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 6365 bytes --]

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 <raj.khem@gmail.com> a scris:

> On Thu, May 7, 2020 at 3:37 AM Beni <beniaminsandu@gmail.com> wrote:
> >
> > Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
> > ---
> >  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
> >
> > 
>

[-- Attachment #2: Type: text/html, Size: 8719 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-28 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 10:37 [meta-oe][PATCH] rasdaemon: create recipe for version 0.6.5 Beni
2020-05-09  2:53 ` [oe] " Khem Raj
2020-05-28 13:49   ` Beni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.