summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorLi xin <lixin.fnst@cn.fujitsu.com>2015-06-25 11:23:38 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2015-07-16 13:26:36 -0400
commit21a4ebcbc172c25008ab855c82d13ac918caa18a (patch)
tree303e75a05c300070c2de8445bbf919a425729b75 /meta-networking
parent13335849c35fb61660248d6b4c0d8da4031f3635 (diff)
downloadmeta-openembedded-21a4ebcbc172c25008ab855c82d13ac918caa18a.tar.gz
opensaf: Fix warning and add systemd service files.
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. Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch43
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service13
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service15
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb25
4 files changed, 94 insertions, 2 deletions
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 000000000..624cd2d7b
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
@@ -0,0 +1,43 @@
1From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Thu, 25 Jun 2015 11:44:27 +0900
4Subject: [PATCH] plmcd: error fix
5
6ld: cannot find -lsystemd-daemon
7collect2: error: ld returned 1 exit status
8
9Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
10---
11 contrib/plmc/plmcd/Makefile.am | 2 +-
12 contrib/plmc/plmcd/Makefile.in | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am
16index 8d847f2..dd7913a 100644
17--- a/contrib/plmc/plmcd/Makefile.am
18+++ b/contrib/plmc/plmcd/Makefile.am
19@@ -32,7 +32,7 @@ plmcd_SOURCES = \
20 plmcd_LDFLAGS = -lpthread
21
22 if ENABLE_SYSTEMD
23-plmcd_LDFLAGS += -lsystemd-daemon
24+plmcd_LDFLAGS += -lsystemd
25 endif
26
27 plmcd_LDADD = \
28diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in
29index 0185dc4..e40513a 100644
30--- a/contrib/plmc/plmcd/Makefile.in
31+++ b/contrib/plmc/plmcd/Makefile.in
32@@ -106,7 +106,7 @@ build_triplet = @build@
33 host_triplet = @host@
34 target_triplet = @target@
35 sbin_PROGRAMS = plmcd$(EXEEXT)
36-@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd-daemon
37+@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd
38 subdir = plmcd
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
41--
421.8.4.2
43
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 000000000..76ec73af9
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcboot.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=PLMCBOOT Program
3After=network.target
4ConditionPathExists=@SYSCONFDIR@/plmcd.conf
5
6[Service]
7Type=oneshot
8ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -s
9ExecStop=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -x
10RemainAfterExit=yes
11
12[Install]
13WantedBy=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 000000000..1d48e7764
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service
@@ -0,0 +1,15 @@
1[Unit]
2Description=Plmcd Daemon
3Requires=plmcboot.service
4After=network.target plmcboot.service
5ConditionPathExists=@SYSCONFDIR@/plmcd.conf
6
7[Service]
8Type=forking
9ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf
10ExecStartPost=/bin/touch /var/lock/subsys/plmcd
11ExecStopPost=/bin/rm -rf /var/lock/subsys/plmcd
12PIDFile=/var/run/plmcd.pid
13
14[Install]
15WantedBy=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 5895b4607..3d0175e03 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"
14inherit autotools useradd systemd pkgconfig 14inherit autotools useradd systemd pkgconfig
15 15
16SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ 16SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
17 file://install-samples-from-srcdir.patch" 17 file://install-samples-from-srcdir.patch \
18 file://plmcd.service \
19 file://plmcboot.service \
20 file://0001-plmcd-error-fix.patch \
21 "
18 22
19SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c" 23SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c"
20SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590" 24SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590"
@@ -29,11 +33,24 @@ USERADD_PACKAGES = "${PN}"
29GROUPADD_PARAM_${PN} = "-f -r opensaf" 33GROUPADD_PARAM_${PN} = "-f -r opensaf"
30USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" 34USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
31 35
32SYSTEMD_SERVICE_${PN} += "opensafd.service" 36SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
33SYSTEMD_AUTO_ENABLE = "disable" 37SYSTEMD_AUTO_ENABLE = "disable"
34 38
39PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
40
41do_configure_prepend () {
42 ( cd ${S}; autoreconf -f -i -s )
43}
44
45EXTRA_OECONF += " --libdir=${libdir}/opensaf "
46EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
47
48PKGLIBDIR="${libdir}/opensaf/opensaf"
49
35FILES_${PN} += "${localstatedir}/run" 50FILES_${PN} += "${localstatedir}/run"
36 51
52FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
53
37RDEPENDS_${PN} += "bash python" 54RDEPENDS_${PN} += "bash python"
38 55
39INSANE_SKIP_${PN} = "dev-so" 56INSANE_SKIP_${PN} = "dev-so"
@@ -45,4 +62,8 @@ do_install_append() {
45 install -d ${D}${systemd_unitdir}/system 62 install -d ${D}${systemd_unitdir}/system
46 install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \ 63 install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
47 ${D}${systemd_unitdir}/system 64 ${D}${systemd_unitdir}/system
65 install -m 644 ${WORKDIR}/plmc*.service ${D}/${systemd_unitdir}/system
66 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/plmc*.service
67 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/plmc*.service
68
48} 69}