aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2017-08-29 17:27:26 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-31 10:18:33 +0200
commit8ca8ec9be39ea04c3b89831e6cafa4a67f015f55 (patch)
tree69343f8b9a1db21948a1c76a7d8794d661cf4fc0
parentf50e344cffbf0e1513308f0a2c845e21b272f1b5 (diff)
downloadmeta-openembedded-contrib-8ca8ec9be39ea04c3b89831e6cafa4a67f015f55.tar.gz
meta-openembedded-contrib-8ca8ec9be39ea04c3b89831e6cafa4a67f015f55.tar.bz2
meta-openembedded-contrib-8ca8ec9be39ea04c3b89831e6cafa4a67f015f55.zip
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>
-rw-r--r--meta-oe/recipes-extended/corosync/corosync_2.4.2.bb24
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 ec1deaca56..2f3aef2994 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"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_unitdir}/system/,--with-systemddir="
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd"
-EXTRA_OECONF = "--with-upstartdir=%{_sysconfdir}/init"
+EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash"
+EXTRA_OEMAKE = "tmpfilesdir_DATA="
do_configure_prepend() {
( cd ${S}
@@ -34,20 +35,17 @@ do_configure_prepend() {
do_install_append() {
install -d ${D}${sysconfdir}/sysconfig/
- install -d ${D}/${sysconfdir}/init.d
install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync
- install -m 0644 ${S}/init/corosync-notifyd.conf.in ${D}${sysconfdir}/sysconfig/corosync-notifyd.conf
- install -m 0644 ${S}/init/corosync.conf.in ${D}${sysconfdir}/sysconfig/corosync.conf
- install -m 0644 ${S}/init/corosync.in ${D}${sysconfdir}/init.d/corosync
- install -m 0644 ${S}/init/corosync-notifyd.in ${D}${sysconfdir}/init.d/corosync-notifyd
+ install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd
+
+ rm -rf "${D}${localstatedir}/run"
+
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${S}/init/corosync.service.in ${D}${systemd_unitdir}/system/corosync.service
- install -m 0644 ${S}/init/corosync-notifyd.service.in ${D}${systemd_unitdir}/system/corosync-notifyd.service
- sed -i -e 's,@INITWRAPPERSDIR@,${sysconfdir}/init.d,g' ${D}${systemd_unitdir}/system/corosync.service
- sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/corosync-notifyd.service
- sed -i -e 's,@SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/corosync-notifyd.service
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
fi
}