[oe-commits] [meta-openembedded] 53/54: corosync: add support for extra features
git at git.openembedded.org
git at git.openembedded.org
Tue Aug 29 14:36:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.
commit 89c744b9b0c46ff5f5d285b2327f1d0ff87e3e47
Author: Jackie Huang <jackie.huang at windriver.com>
AuthorDate: Tue Aug 29 17:27:27 2017 +0800
corosync: add support for extra features
* Add support for features: dbus qdevice qnetd snmp
* Add related PACKAGECONFIG
* inherit useradd to add proper user for qnetd service
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
.../recipes-extended/corosync/corosync_2.4.2.bb | 30 +++++++++++++++++++---
1 file changed, 27 insertions(+), 3 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 2f3aef2..7d5a87e 100644
--- a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb
+++ b/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://corosync.github.io/corosync/"
SECTION = "base"
-inherit autotools pkgconfig systemd
+inherit autotools pkgconfig systemd useradd
SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz"
SRC_URI[md5sum] = "547fa78704da53aa35912be58d31035f"
@@ -16,13 +16,23 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d"
DEPENDS = "groff-native nss libqb"
-SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service"
+SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service \
+ ${@bb.utils.contains('PACKAGECONFIG', 'qdevice', 'corosync-qdevice.service', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'corosync-qnetd.service', '', d)} \
+"
SYSTEMD_AUTO_ENABLE = "enable"
INITSCRIPT_NAME = "corosync-daemon"
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+ dbus qdevice qnetd snmp \
+"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[qdevice] = "--enable-qdevices,--disable-qdevices"
+PACKAGECONFIG[qnetd] = "--enable-qnetd,--disable-qnetd"
+PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
+PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd"
EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash"
@@ -43,12 +53,26 @@ do_install_append() {
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('PACKAGECONFIG', 'qnetd', 'true', 'false', d)}; then
+ chown -R coroqnetd:coroqnetd ${D}${sysconfdir}/${BPN}/qnetd
+ echo "d coroqnetd coroqnetd 0770 /var/run/corosync-qnetd none" >> ${D}${sysconfdir}/default/volatiles/05_corosync
+ fi
+
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'qnetd', 'true', 'false', d)}; then
+ install -m 0644 ${S}/conf/tmpfiles.d/corosync-qnetd.conf ${D}${sysconfdir}/tmpfiles.d
+ fi
fi
}
RDEPENDS_${PN} += "bash"
FILES_${PN}-dbg += "${libexecdir}/lcrso/.debug"
+FILES_${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system coroqnetd"
+USERADD_PARAM_${PN} = "--system -d / -M -s /bin/nologin -c 'User for corosync-qnetd' -g coroqnetd coroqnetd"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list