diff options
author | Li xin <lixin.fnst@cn.fujitsu.com> | 2015-06-25 11:23:38 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-07-16 13:26:36 -0400 |
commit | 21a4ebcbc172c25008ab855c82d13ac918caa18a (patch) | |
tree | 303e75a05c300070c2de8445bbf919a425729b75 /meta-networking | |
parent | 13335849c35fb61660248d6b4c0d8da4031f3635 (diff) | |
download | meta-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')
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 @@ | |||
1 | From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001 | ||
2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
3 | Date: Thu, 25 Jun 2015 11:44:27 +0900 | ||
4 | Subject: [PATCH] plmcd: error fix | ||
5 | |||
6 | ld: cannot find -lsystemd-daemon | ||
7 | collect2: error: ld returned 1 exit status | ||
8 | |||
9 | Signed-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 | |||
15 | diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am | ||
16 | index 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 = \ | ||
28 | diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in | ||
29 | index 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 | -- | ||
42 | 1.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] | ||
2 | Description=PLMCBOOT Program | ||
3 | After=network.target | ||
4 | ConditionPathExists=@SYSCONFDIR@/plmcd.conf | ||
5 | |||
6 | [Service] | ||
7 | Type=oneshot | ||
8 | ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -s | ||
9 | ExecStop=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf -x | ||
10 | RemainAfterExit=yes | ||
11 | |||
12 | [Install] | ||
13 | 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 000000000..1d48e7764 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/plmcd.service | |||
@@ -0,0 +1,15 @@ | |||
1 | [Unit] | ||
2 | Description=Plmcd Daemon | ||
3 | Requires=plmcboot.service | ||
4 | After=network.target plmcboot.service | ||
5 | ConditionPathExists=@SYSCONFDIR@/plmcd.conf | ||
6 | |||
7 | [Service] | ||
8 | Type=forking | ||
9 | ExecStart=@SBINDIR@/plmcd -c @SYSCONFDIR@/plmcd.conf | ||
10 | ExecStartPost=/bin/touch /var/lock/subsys/plmcd | ||
11 | ExecStopPost=/bin/rm -rf /var/lock/subsys/plmcd | ||
12 | PIDFile=/var/run/plmcd.pid | ||
13 | |||
14 | [Install] | ||
15 | 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 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" | |||
14 | inherit autotools useradd systemd pkgconfig | 14 | inherit autotools useradd systemd pkgconfig |
15 | 15 | ||
16 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ | 16 | SRC_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 | ||
19 | SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c" | 23 | SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c" |
20 | SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590" | 24 | SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590" |
@@ -29,11 +33,24 @@ USERADD_PACKAGES = "${PN}" | |||
29 | GROUPADD_PARAM_${PN} = "-f -r opensaf" | 33 | GROUPADD_PARAM_${PN} = "-f -r opensaf" |
30 | USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" | 34 | USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" |
31 | 35 | ||
32 | SYSTEMD_SERVICE_${PN} += "opensafd.service" | 36 | SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service" |
33 | SYSTEMD_AUTO_ENABLE = "disable" | 37 | SYSTEMD_AUTO_ENABLE = "disable" |
34 | 38 | ||
39 | PACKAGECONFIG[systemd] = "--enable-systemd-daemon" | ||
40 | |||
41 | do_configure_prepend () { | ||
42 | ( cd ${S}; autoreconf -f -i -s ) | ||
43 | } | ||
44 | |||
45 | EXTRA_OECONF += " --libdir=${libdir}/opensaf " | ||
46 | EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf " | ||
47 | |||
48 | PKGLIBDIR="${libdir}/opensaf/opensaf" | ||
49 | |||
35 | FILES_${PN} += "${localstatedir}/run" | 50 | FILES_${PN} += "${localstatedir}/run" |
36 | 51 | ||
52 | FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a" | ||
53 | |||
37 | RDEPENDS_${PN} += "bash python" | 54 | RDEPENDS_${PN} += "bash python" |
38 | 55 | ||
39 | INSANE_SKIP_${PN} = "dev-so" | 56 | INSANE_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 | } |