From cf5cfc1501dfa661964e8c39ce432b0d4b57093e Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Tue, 5 Sep 2017 15:38:01 -0500 Subject: corosync: Requires net-snmp from meta-networking Signed-off-by: Mark Hatle --- ...001-Include-fcntl.h-for-F_-and-O_-defines.patch | 28 ++++++++ .../recipes-extended/corosync/corosync_2.4.2.bb | 80 ++++++++++++++++++++++ ...001-Include-fcntl.h-for-F_-and-O_-defines.patch | 28 -------- .../recipes-extended/corosync/corosync_2.4.2.bb | 80 ---------------------- 4 files changed, 108 insertions(+), 108 deletions(-) create mode 100644 meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch create mode 100644 meta-networking/recipes-extended/corosync/corosync_2.4.2.bb delete mode 100644 meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch delete mode 100644 meta-oe/recipes-extended/corosync/corosync_2.4.2.bb diff --git a/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch b/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch new file mode 100644 index 0000000000..fe4b0793fe --- /dev/null +++ b/meta-networking/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch @@ -0,0 +1,28 @@ +From 85ea47fedbc96ed9180e08b0d371d9966e3a88da Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 30 Aug 2017 17:28:55 -0700 +Subject: [PATCH] Include fcntl.h for F_* and O_* defines + +Fixes errors like +utils.c:95:22: error: use of undeclared identifier 'O_WRONLY' + +Signed-off-by: Khem Raj +--- + qdevices/utils.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/qdevices/utils.c b/qdevices/utils.c +index 41850b8c..87090853 100644 +--- a/qdevices/utils.c ++++ b/qdevices/utils.c +@@ -39,6 +39,7 @@ + + #include + #include ++#include + #include + #include + #include +-- +2.14.1 + diff --git a/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb b/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb new file mode 100644 index 0000000000..33e74e2ff8 --- /dev/null +++ b/meta-networking/recipes-extended/corosync/corosync_2.4.2.bb @@ -0,0 +1,80 @@ +SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces" +DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \ +APIs and libraries, default configuration files, and an init script." +HOMEPAGE = "http://corosync.github.io/corosync/" + +SECTION = "base" + +inherit autotools pkgconfig systemd useradd + +SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz \ + file://0001-Include-fcntl.h-for-F_-and-O_-defines.patch \ + " +SRC_URI[md5sum] = "547fa78704da53aa35912be58d31035f" +SRC_URI[sha256sum] = "f26e3011309fe4bcce94b1dc20ea8c462f19483a73f3ca62f13b925d011a4ba9" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d" + +DEPENDS = "groff-native nss libqb" + +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)} \ + 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" +EXTRA_OEMAKE = "tmpfilesdir_DATA=" + +do_configure_prepend() { + ( cd ${S} + ${S}/autogen.sh ) +} + +do_install_append() { + install -d ${D}${sysconfdir}/sysconfig/ + install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync + 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('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" diff --git a/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch b/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch deleted file mode 100644 index fe4b0793fe..0000000000 --- a/meta-oe/recipes-extended/corosync/corosync/0001-Include-fcntl.h-for-F_-and-O_-defines.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 85ea47fedbc96ed9180e08b0d371d9966e3a88da Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 30 Aug 2017 17:28:55 -0700 -Subject: [PATCH] Include fcntl.h for F_* and O_* defines - -Fixes errors like -utils.c:95:22: error: use of undeclared identifier 'O_WRONLY' - -Signed-off-by: Khem Raj ---- - qdevices/utils.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/qdevices/utils.c b/qdevices/utils.c -index 41850b8c..87090853 100644 ---- a/qdevices/utils.c -+++ b/qdevices/utils.c -@@ -39,6 +39,7 @@ - - #include - #include -+#include - #include - #include - #include --- -2.14.1 - diff --git a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb b/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb deleted file mode 100644 index 33e74e2ff8..0000000000 --- a/meta-oe/recipes-extended/corosync/corosync_2.4.2.bb +++ /dev/null @@ -1,80 +0,0 @@ -SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces" -DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \ -APIs and libraries, default configuration files, and an init script." -HOMEPAGE = "http://corosync.github.io/corosync/" - -SECTION = "base" - -inherit autotools pkgconfig systemd useradd - -SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz \ - file://0001-Include-fcntl.h-for-F_-and-O_-defines.patch \ - " -SRC_URI[md5sum] = "547fa78704da53aa35912be58d31035f" -SRC_URI[sha256sum] = "f26e3011309fe4bcce94b1dc20ea8c462f19483a73f3ca62f13b925d011a4ba9" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d" - -DEPENDS = "groff-native nss libqb" - -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)} \ - 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" -EXTRA_OEMAKE = "tmpfilesdir_DATA=" - -do_configure_prepend() { - ( cd ${S} - ${S}/autogen.sh ) -} - -do_install_append() { - install -d ${D}${sysconfdir}/sysconfig/ - install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync - 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('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" -- cgit 1.2.3-korg