diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-08-29 17:27:26 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-09-13 17:16:28 -0700 |
commit | 84d5454ade283f60586adfb6f146f2bd76856cb0 (patch) | |
tree | 8d898dcf7942afdf24371201d1aaf773e5cef86d /meta-oe | |
parent | ff36b1a2ff6802788c6c33f76dfbdf56a337c514 (diff) | |
download | meta-openembedded-84d5454ade283f60586adfb6f146f2bd76856cb0.tar.gz |
corosync: fixes for sysvinit and systemd
* Replace ${systemd_unitdir}/system with ${systemd_system_unitdir}
* Remove the upstar settings and don't install upstar config files
* Add volatile for sysvinit and tmpfiles for systemd
* Set the correct bash path for init scripts to avoid QA issue:
| corosync-2.4.2: /usr/share/corosync/corosync contained in package corosync
requires /tmp/hosttools/bash, but no providers found in RDEPENDS_corosync?
[file-rdeps]
* The systemd services are intalled properly by "make install",
no need to install manually.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 8ca8ec9be39ea04c3b89831e6cafa4a67f015f55)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-extended/corosync/corosync_2.4.2.bb | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb b/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb index ec1deaca5..2f3aef299 100644 --- a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb +++ b/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb | |||
@@ -23,9 +23,10 @@ INITSCRIPT_NAME = "corosync-daemon" | |||
23 | 23 | ||
24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | 24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
25 | 25 | ||
26 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_unitdir}/system/,--with-systemddir=" | 26 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd" |
27 | 27 | ||
28 | EXTRA_OECONF = "--with-upstartdir=%{_sysconfdir}/init" | 28 | EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash" |
29 | EXTRA_OEMAKE = "tmpfilesdir_DATA=" | ||
29 | 30 | ||
30 | do_configure_prepend() { | 31 | do_configure_prepend() { |
31 | ( cd ${S} | 32 | ( cd ${S} |
@@ -34,20 +35,17 @@ do_configure_prepend() { | |||
34 | 35 | ||
35 | do_install_append() { | 36 | do_install_append() { |
36 | install -d ${D}${sysconfdir}/sysconfig/ | 37 | install -d ${D}${sysconfdir}/sysconfig/ |
37 | install -d ${D}/${sysconfdir}/init.d | ||
38 | install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync | 38 | install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync |
39 | install -m 0644 ${S}/init/corosync-notifyd.conf.in ${D}${sysconfdir}/sysconfig/corosync-notifyd.conf | 39 | install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd |
40 | install -m 0644 ${S}/init/corosync.conf.in ${D}${sysconfdir}/sysconfig/corosync.conf | 40 | |
41 | install -m 0644 ${S}/init/corosync.in ${D}${sysconfdir}/init.d/corosync | 41 | rm -rf "${D}${localstatedir}/run" |
42 | install -m 0644 ${S}/init/corosync-notifyd.in ${D}${sysconfdir}/init.d/corosync-notifyd | 42 | |
43 | install -d ${D}${sysconfdir}/default/volatiles | ||
44 | echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync | ||
43 | 45 | ||
44 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 46 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
45 | install -d ${D}${systemd_unitdir}/system | 47 | install -d ${D}${sysconfdir}/tmpfiles.d |
46 | install -m 0644 ${S}/init/corosync.service.in ${D}${systemd_unitdir}/system/corosync.service | 48 | echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf |
47 | install -m 0644 ${S}/init/corosync-notifyd.service.in ${D}${systemd_unitdir}/system/corosync-notifyd.service | ||
48 | sed -i -e 's,@INITWRAPPERSDIR@,${sysconfdir}/init.d,g' ${D}${systemd_unitdir}/system/corosync.service | ||
49 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/corosync-notifyd.service | ||
50 | sed -i -e 's,@SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/corosync-notifyd.service | ||
51 | fi | 49 | fi |
52 | } | 50 | } |
53 | 51 | ||