* [meta-networking][PATCH] opensaf: Fix warning and add systemd service files.
@ 2015-06-25 3:23 Li xin
2015-06-25 14:56 ` Martin Jansa
2015-07-16 18:52 ` Joe MacDonald
0 siblings, 2 replies; 6+ messages in thread
From: Li xin @ 2015-06-25 3:23 UTC (permalink / raw)
To: openembedded-devel
1) WARNING: The recipe opensaf is trying to install files into a
shared area when those files already exist,so set
--libdir=${libdir}/opensaf
2) Add systemd service file plmcboot.service and plmcd.service.
3) opensaf depends on openhpi,so add it.
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
.../opensaf/opensaf/0001-plmcd-error-fix.patch | 43 ++++++++++++++++++++++
.../opensaf/opensaf/plmcboot.service | 13 +++++++
.../recipes-daemons/opensaf/opensaf/plmcd.service | 15 ++++++++
.../recipes-daemons/opensaf/opensaf_4.5.0.bb | 29 +++++++++++++--
4 files changed, 97 insertions(+), 3 deletions(-)
create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
new file mode 100644
index 0000000..624cd2d
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
@@ -0,0 +1,43 @@
+From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Thu, 25 Jun 2015 11:44:27 +0900
+Subject: [PATCH] plmcd: error fix
+
+ld: cannot find -lsystemd-daemon
+collect2: error: ld returned 1 exit status
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ contrib/plmc/plmcd/Makefile.am | 2 +-
+ contrib/plmc/plmcd/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am
+index 8d847f2..dd7913a 100644
+--- a/contrib/plmc/plmcd/Makefile.am
++++ b/contrib/plmc/plmcd/Makefile.am
+@@ -32,7 +32,7 @@ plmcd_SOURCES = \
+ plmcd_LDFLAGS = -lpthread
+
+ if ENABLE_SYSTEMD
+-plmcd_LDFLAGS += -lsystemd-daemon
++plmcd_LDFLAGS += -lsystemd
+ endif
+
+ plmcd_LDADD = \
+diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in
+index 0185dc4..e40513a 100644
+--- a/contrib/plmc/plmcd/Makefile.in
++++ b/contrib/plmc/plmcd/Makefile.in
+@@ -106,7 +106,7 @@ build_triplet = @build@
+ host_triplet = @host@
+ target_triplet = @target@
+ sbin_PROGRAMS = plmcd$(EXEEXT)
+-@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd-daemon
++@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd
+ subdir = plmcd
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+--
+1.8.4.2
+
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
new file mode 100644
index 0000000..76ec73a
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=PLMCBOOT Program
+After=network.target
+ConditionPathExists=@SYSCONFDIR@/plmcd.conf
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -s
+ExecStop=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -x
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
new file mode 100644
index 0000000..1d48e77
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Plmcd Daemon
+Requires=plmcboot.service
+After=network.target plmcboot.service
+ConditionPathExists=@SYSCONFDIR@/plmcd.conf
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf
+ExecStartPost=/bin/touch /var/lock/subsys/plmcd
+ExecStopPost=/bin/rm -rf /var/lock/subsys/plmcd
+PIDFile=/var/run/plmcd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
index 5895b46..0c236f0 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
@@ -14,7 +14,11 @@ HOMEPAGE = "http://www.opensaf.org"
inherit autotools useradd systemd pkgconfig
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
- file://install-samples-from-srcdir.patch"
+ file://install-samples-from-srcdir.patch \
+ file://plmcd.service \
+ file://plmcboot.service \
+ file://0001-plmcd-error-fix.patch \
+ "
SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c"
SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590"
@@ -23,17 +27,32 @@ SECTION = "admin"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
-DEPENDS = "libxml2 python"
+DEPENDS = "libxml2 python openhpi"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "-f -r opensaf"
USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
-SYSTEMD_SERVICE_${PN} += "opensafd.service"
+SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
SYSTEMD_AUTO_ENABLE = "disable"
+PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
+
+do_configure_prepend () {
+ ( cd ${S}; autoreconf -f -i -s )
+}
+
+EXTRA_OECONF += ' --with-hpi-interface=B03 \
+ --libdir=${libdir}/opensaf \
+ --enable-ais-plm '
+EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
+
+PKGLIBDIR="${libdir}/opensaf/opensaf"
+
FILES_${PN} += "${localstatedir}/run"
+FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
+
RDEPENDS_${PN} += "bash python"
INSANE_SKIP_${PN} = "dev-so"
@@ -45,4 +64,8 @@ do_install_append() {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/plmc*.service ${D}/${systemd_unitdir}/system
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/plmc*.service
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/plmc*.service
+
}
--
1.8.4.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-networking][PATCH] opensaf: Fix warning and add systemd service files.
2015-06-25 3:23 [meta-networking][PATCH] opensaf: Fix warning and add systemd service files Li xin
@ 2015-06-25 14:56 ` Martin Jansa
2015-07-16 18:52 ` Joe MacDonald
1 sibling, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2015-06-25 14:56 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 7350 bytes --]
On Thu, Jun 25, 2015 at 11:23:38AM +0800, Li xin wrote:
> 1) WARNING: The recipe opensaf is trying to install files into a
> shared area when those files already exist,so set
> --libdir=${libdir}/opensaf
>
> 2) Add systemd service file plmcboot.service and plmcd.service.
>
> 3) opensaf depends on openhpi,so add it.
openhpi is found only in meta-openclovis layers and meta-networking
doesn't depend on it, why is this dependency needed, can it be
optional (by default disabled) with PACKAGECONFIG?
http://layers.openembedded.org/layerindex/branch/master/recipes/?q=openhpi
>
> Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
> ---
> .../opensaf/opensaf/0001-plmcd-error-fix.patch | 43 ++++++++++++++++++++++
> .../opensaf/opensaf/plmcboot.service | 13 +++++++
> .../recipes-daemons/opensaf/opensaf/plmcd.service | 15 ++++++++
> .../recipes-daemons/opensaf/opensaf_4.5.0.bb | 29 +++++++++++++--
> 4 files changed, 97 insertions(+), 3 deletions(-)
> create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
> create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
> create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
>
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
> new file mode 100644
> index 0000000..624cd2d
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
> @@ -0,0 +1,43 @@
> +From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001
> +From: Li xin <lixin.fnst@cn.fujitsu.com>
> +Date: Thu, 25 Jun 2015 11:44:27 +0900
> +Subject: [PATCH] plmcd: error fix
> +
> +ld: cannot find -lsystemd-daemon
> +collect2: error: ld returned 1 exit status
> +
> +Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
> +---
> + contrib/plmc/plmcd/Makefile.am | 2 +-
> + contrib/plmc/plmcd/Makefile.in | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am
> +index 8d847f2..dd7913a 100644
> +--- a/contrib/plmc/plmcd/Makefile.am
> ++++ b/contrib/plmc/plmcd/Makefile.am
> +@@ -32,7 +32,7 @@ plmcd_SOURCES = \
> + plmcd_LDFLAGS = -lpthread
> +
> + if ENABLE_SYSTEMD
> +-plmcd_LDFLAGS += -lsystemd-daemon
> ++plmcd_LDFLAGS += -lsystemd
> + endif
> +
> + plmcd_LDADD = \
> +diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in
> +index 0185dc4..e40513a 100644
> +--- a/contrib/plmc/plmcd/Makefile.in
> ++++ b/contrib/plmc/plmcd/Makefile.in
> +@@ -106,7 +106,7 @@ build_triplet = @build@
> + host_triplet = @host@
> + target_triplet = @target@
> + sbin_PROGRAMS = plmcd$(EXEEXT)
> +-@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd-daemon
> ++@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd
> + subdir = plmcd
> + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> + am__aclocal_m4_deps = $(top_srcdir)/configure.ac
> +--
> +1.8.4.2
> +
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
> new file mode 100644
> index 0000000..76ec73a
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
> @@ -0,0 +1,13 @@
> +[Unit]
> +Description=PLMCBOOT Program
> +After=network.target
> +ConditionPathExists=@SYSCONFDIR@/plmcd.conf
> +
> +[Service]
> +Type=oneshot
> +ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -s
> +ExecStop=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -x
> +RemainAfterExit=yes
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
> new file mode 100644
> index 0000000..1d48e77
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
> @@ -0,0 +1,15 @@
> +[Unit]
> +Description=Plmcd Daemon
> +Requires=plmcboot.service
> +After=network.target plmcboot.service
> +ConditionPathExists=@SYSCONFDIR@/plmcd.conf
> +
> +[Service]
> +Type=forking
> +ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf
> +ExecStartPost=/bin/touch /var/lock/subsys/plmcd
> +ExecStopPost=/bin/rm -rf /var/lock/subsys/plmcd
> +PIDFile=/var/run/plmcd.pid
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> index 5895b46..0c236f0 100644
> --- a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> @@ -14,7 +14,11 @@ HOMEPAGE = "http://www.opensaf.org"
> inherit autotools useradd systemd pkgconfig
>
> SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
> - file://install-samples-from-srcdir.patch"
> + file://install-samples-from-srcdir.patch \
> + file://plmcd.service \
> + file://plmcboot.service \
> + file://0001-plmcd-error-fix.patch \
> + "
>
> SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c"
> SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590"
> @@ -23,17 +27,32 @@ SECTION = "admin"
> LICENSE = "LGPLv2.1"
> LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
>
> -DEPENDS = "libxml2 python"
> +DEPENDS = "libxml2 python openhpi"
>
> USERADD_PACKAGES = "${PN}"
> GROUPADD_PARAM_${PN} = "-f -r opensaf"
> USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
>
> -SYSTEMD_SERVICE_${PN} += "opensafd.service"
> +SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
> SYSTEMD_AUTO_ENABLE = "disable"
>
> +PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
> +
> +do_configure_prepend () {
> + ( cd ${S}; autoreconf -f -i -s )
> +}
> +
> +EXTRA_OECONF += ' --with-hpi-interface=B03 \
> + --libdir=${libdir}/opensaf \
> + --enable-ais-plm '
> +EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
> +
> +PKGLIBDIR="${libdir}/opensaf/opensaf"
> +
> FILES_${PN} += "${localstatedir}/run"
>
> +FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
> +
> RDEPENDS_${PN} += "bash python"
>
> INSANE_SKIP_${PN} = "dev-so"
> @@ -45,4 +64,8 @@ do_install_append() {
> install -d ${D}${systemd_unitdir}/system
> install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
> ${D}${systemd_unitdir}/system
> + install -m 644 ${WORKDIR}/plmc*.service ${D}/${systemd_unitdir}/system
> + sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/plmc*.service
> + sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/plmc*.service
> +
> }
> --
> 1.8.4.2
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-networking][PATCH] opensaf: Fix warning and add systemd service files.
2015-06-25 3:23 [meta-networking][PATCH] opensaf: Fix warning and add systemd service files Li xin
2015-06-25 14:56 ` Martin Jansa
@ 2015-07-16 18:52 ` Joe MacDonald
2015-07-17 2:45 ` [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi Li xin
1 sibling, 1 reply; 6+ messages in thread
From: Joe MacDonald @ 2015-07-16 18:52 UTC (permalink / raw)
To: Li xin; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 7188 bytes --]
All but the openhpi dependency seems to be good on this, so I merged a
modified version of the patch that dropped the AIS/HPI dependency. I'm
putting together a quick patch now that would bring that back in as an
option and disabled by default, as Martin suggested.
-J.
[[oe] [meta-networking][PATCH] opensaf: Fix warning and add systemd service files.] On 15.06.25 (Thu 11:23) Li xin wrote:
> 1) WARNING: The recipe opensaf is trying to install files into a
> shared area when those files already exist,so set
> --libdir=${libdir}/opensaf
>
> 2) Add systemd service file plmcboot.service and plmcd.service.
>
> 3) opensaf depends on openhpi,so add it.
>
> Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
> ---
> .../opensaf/opensaf/0001-plmcd-error-fix.patch | 43 ++++++++++++++++++++++
> .../opensaf/opensaf/plmcboot.service | 13 +++++++
> .../recipes-daemons/opensaf/opensaf/plmcd.service | 15 ++++++++
> .../recipes-daemons/opensaf/opensaf_4.5.0.bb | 29 +++++++++++++--
> 4 files changed, 97 insertions(+), 3 deletions(-)
> create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
> create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
> create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
>
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
> new file mode 100644
> index 0000000..624cd2d
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
> @@ -0,0 +1,43 @@
> +From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001
> +From: Li xin <lixin.fnst@cn.fujitsu.com>
> +Date: Thu, 25 Jun 2015 11:44:27 +0900
> +Subject: [PATCH] plmcd: error fix
> +
> +ld: cannot find -lsystemd-daemon
> +collect2: error: ld returned 1 exit status
> +
> +Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
> +---
> + contrib/plmc/plmcd/Makefile.am | 2 +-
> + contrib/plmc/plmcd/Makefile.in | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am
> +index 8d847f2..dd7913a 100644
> +--- a/contrib/plmc/plmcd/Makefile.am
> ++++ b/contrib/plmc/plmcd/Makefile.am
> +@@ -32,7 +32,7 @@ plmcd_SOURCES = \
> + plmcd_LDFLAGS = -lpthread
> +
> + if ENABLE_SYSTEMD
> +-plmcd_LDFLAGS += -lsystemd-daemon
> ++plmcd_LDFLAGS += -lsystemd
> + endif
> +
> + plmcd_LDADD = \
> +diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in
> +index 0185dc4..e40513a 100644
> +--- a/contrib/plmc/plmcd/Makefile.in
> ++++ b/contrib/plmc/plmcd/Makefile.in
> +@@ -106,7 +106,7 @@ build_triplet = @build@
> + host_triplet = @host@
> + target_triplet = @target@
> + sbin_PROGRAMS = plmcd$(EXEEXT)
> +-@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd-daemon
> ++@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd
> + subdir = plmcd
> + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> + am__aclocal_m4_deps = $(top_srcdir)/configure.ac
> +--
> +1.8.4.2
> +
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
> new file mode 100644
> index 0000000..76ec73a
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
> @@ -0,0 +1,13 @@
> +[Unit]
> +Description=PLMCBOOT Program
> +After=network.target
> +ConditionPathExists=@SYSCONFDIR@/plmcd.conf
> +
> +[Service]
> +Type=oneshot
> +ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -s
> +ExecStop=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -x
> +RemainAfterExit=yes
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
> new file mode 100644
> index 0000000..1d48e77
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
> @@ -0,0 +1,15 @@
> +[Unit]
> +Description=Plmcd Daemon
> +Requires=plmcboot.service
> +After=network.target plmcboot.service
> +ConditionPathExists=@SYSCONFDIR@/plmcd.conf
> +
> +[Service]
> +Type=forking
> +ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf
> +ExecStartPost=/bin/touch /var/lock/subsys/plmcd
> +ExecStopPost=/bin/rm -rf /var/lock/subsys/plmcd
> +PIDFile=/var/run/plmcd.pid
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> index 5895b46..0c236f0 100644
> --- a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> @@ -14,7 +14,11 @@ HOMEPAGE = "http://www.opensaf.org"
> inherit autotools useradd systemd pkgconfig
>
> SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
> - file://install-samples-from-srcdir.patch"
> + file://install-samples-from-srcdir.patch \
> + file://plmcd.service \
> + file://plmcboot.service \
> + file://0001-plmcd-error-fix.patch \
> + "
>
> SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c"
> SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590"
> @@ -23,17 +27,32 @@ SECTION = "admin"
> LICENSE = "LGPLv2.1"
> LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
>
> -DEPENDS = "libxml2 python"
> +DEPENDS = "libxml2 python openhpi"
>
> USERADD_PACKAGES = "${PN}"
> GROUPADD_PARAM_${PN} = "-f -r opensaf"
> USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
>
> -SYSTEMD_SERVICE_${PN} += "opensafd.service"
> +SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
> SYSTEMD_AUTO_ENABLE = "disable"
>
> +PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
> +
> +do_configure_prepend () {
> + ( cd ${S}; autoreconf -f -i -s )
> +}
> +
> +EXTRA_OECONF += ' --with-hpi-interface=B03 \
> + --libdir=${libdir}/opensaf \
> + --enable-ais-plm '
> +EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
> +
> +PKGLIBDIR="${libdir}/opensaf/opensaf"
> +
> FILES_${PN} += "${localstatedir}/run"
>
> +FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
> +
> RDEPENDS_${PN} += "bash python"
>
> INSANE_SKIP_${PN} = "dev-so"
> @@ -45,4 +64,8 @@ do_install_append() {
> install -d ${D}${systemd_unitdir}/system
> install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
> ${D}${systemd_unitdir}/system
> + install -m 644 ${WORKDIR}/plmc*.service ${D}/${systemd_unitdir}/system
> + sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/plmc*.service
> + sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/plmc*.service
> +
> }
> --
> 1.8.4.2
>
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi
2015-07-16 18:52 ` Joe MacDonald
@ 2015-07-17 2:45 ` Li xin
2015-07-17 14:15 ` Joe MacDonald
0 siblings, 1 reply; 6+ messages in thread
From: Li xin @ 2015-07-17 2:45 UTC (permalink / raw)
To: openembedded-devel
opensaf support for the HPI, So provide a PACKAGECONFIG option for openhpi
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
index 3d0175e..6ad8a3d 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
@@ -36,6 +36,8 @@ USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nolog
SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
SYSTEMD_AUTO_ENABLE = "disable"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'openhpi', 'openhpi', '', d)}"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
do_configure_prepend () {
--
1.8.4.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi
2015-07-17 2:45 ` [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi Li xin
@ 2015-07-17 14:15 ` Joe MacDonald
2015-07-20 1:42 ` Li, Xin
0 siblings, 1 reply; 6+ messages in thread
From: Joe MacDonald @ 2015-07-17 14:15 UTC (permalink / raw)
To: Li xin; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]
Hi Li,
[[oe] [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi] On 15.07.17 (Fri 10:45) Li xin wrote:
> opensaf support for the HPI, So provide a PACKAGECONFIG option for openhpi
>
> Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
> ---
> meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> index 3d0175e..6ad8a3d 100644
> --- a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> +++ b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> @@ -36,6 +36,8 @@ USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nolog
> SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
> SYSTEMD_AUTO_ENABLE = "disable"
>
> +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'openhpi', 'openhpi', '', d)}"
AFAIK this won't actually add openhpi to DEPENDS properly unless you are
explicitly defining a DISTRO_FEATURE for it. But it will cause a bunch
of stuff to be rebuilt since PACKAGECONFIG is getting updated and
signatures will be invalidated. Not a big deal, but still not quite
what you're hoping to accomplish, I think.
I was just testing a few other things on my current patch queue and have
a patch for this already, so I'm going to drop this patch for now.
Just for future reference, too, @base_contains is on the way out, you
should use @bb.utils.contains instead.
-J.
> +PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
> PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
>
> do_configure_prepend () {
> --
> 1.8.4.2
>
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi
2015-07-17 14:15 ` Joe MacDonald
@ 2015-07-20 1:42 ` Li, Xin
0 siblings, 0 replies; 6+ messages in thread
From: Li, Xin @ 2015-07-20 1:42 UTC (permalink / raw)
To: Joe MacDonald; +Cc: openembedded-devel@lists.openembedded.org
> -----Original Message-----
> From: Joe MacDonald [mailto:Joe_MacDonald@mentor.com]
> Sent: Friday, July 17, 2015 10:15 PM
> To: Li, Xin/李 欣
> Cc: openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for
> openhpi
>
> Hi Li,
>
> [[oe] [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi] On
> 15.07.17 (Fri 10:45) Li xin wrote:
>
> > opensaf support for the HPI, So provide a PACKAGECONFIG option for
> > openhpi
> >
> > Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
> > ---
> > meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> > b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> > index 3d0175e..6ad8a3d 100644
> > --- a/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> > +++ b/meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb
> > @@ -36,6 +36,8 @@ USERADD_PARAM_${PN} = "-r -g opensaf -d
> > ${datadir}/opensaf/ -s ${sbindir}/nolog SYSTEMD_SERVICE_${PN} +=
> "opensafd.service plmcboot.service plmcd.service"
> > SYSTEMD_AUTO_ENABLE = "disable"
> >
> > +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'openhpi',
> 'openhpi', '', d)}"
>
> AFAIK this won't actually add openhpi to DEPENDS properly unless you are explicitly
> defining a DISTRO_FEATURE for it. But it will cause a bunch of stuff to be rebuilt
> since PACKAGECONFIG is getting updated and signatures will be invalidated. Not
> a big deal, but still not quite what you're hoping to accomplish, I think.
>
> I was just testing a few other things on my current patch queue and have a patch
> for this already, so I'm going to drop this patch for now.
>
> Just for future reference, too, @base_contains is on the way out, you should use
> @bb.utils.contains instead.
I got it. :)
Thank you very much.
Regards,
Li
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-20 1:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 3:23 [meta-networking][PATCH] opensaf: Fix warning and add systemd service files Li xin
2015-06-25 14:56 ` Martin Jansa
2015-07-16 18:52 ` Joe MacDonald
2015-07-17 2:45 ` [meta-networking][PATCH] opensaf: Add PACKAGECONFIG for openhpi Li xin
2015-07-17 14:15 ` Joe MacDonald
2015-07-20 1:42 ` Li, Xin
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.