aboutsummaryrefslogtreecommitdiffstats
path: root/meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb')
-rw-r--r--meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb123
1 files changed, 123 insertions, 0 deletions
diff --git a/meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb b/meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb
new file mode 100644
index 0000000..a866f0f
--- /dev/null
+++ b/meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb
@@ -0,0 +1,123 @@
+SUMMARY = "Messaging and membership subsystem for High-Availability Linux"
+DESCRIPTION = "heartbeat is a basic high-availability subsystem for Linux-HA. \
+It will run scripts at initialization, and when machines go up or down. \
+This version will also perform IP address takeover using gratuitous ARPs. \
+ \
+Heartbeat contains a cluster membership layer, fencing, and local and \
+clusterwide resource management functionality. \
+ \
+When used with Pacemaker, it supports n-node clusters with significant \
+capabilities for managing resources and dependencies. \
+ \
+In addition it continues to support the older release 1 style of \
+2-node clustering. \
+ \
+It implements the following kinds of heartbeats: \
+- Serial ports \
+- UDP/IP multicast (ethernet, etc) \
+- UDP/IP broadcast (ethernet, etc) \
+- UDP/IP heartbeats \
+- ping heartbeats (for routers, switches, etc.) \
+(to be used for breaking ties in 2-node systems) \
+"
+HOMEPAGE = "http://linux-ha.org/"
+SECTION = "System Environment/Daemons"
+LICENSE = "GPLv2 LGPLv2+"
+LIC_FILES_CHKSUM = " \
+ file://doc/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
+ file://doc/COPYING.LGPL;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+"
+SRC_URI = " \
+ http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/7e3a82377fa8.tar.bz2 \
+ file://membership-ccm-Makefile.am-fix-warning.patch \
+ file://Makefile.am-not-chgrp-in-cross-compile.patch \
+ file://ucast.c-fix-compile-errors.patch \
+ file://configure.in-Error-and-warning-fix.patch \
+ file://heartbeat-init.d-heartbeat.in-modify-parameter.patch \
+ file://heartbeat.service \
+"
+SRC_URI[md5sum] = "396510e3c143a9c2288bc52cfc9caa3c"
+SRC_URI[sha256sum] = "085013154511f3c270b5e9a3281732dbbb9812924ae24d9c3c6db1af4dd260d0"
+S = "${WORKDIR}/Heartbeat-3-0-7e3a82377fa8/"
+DEPENDS = "cluster-glue corosync"
+inherit autotools-brokensep pkgconfig useradd
+EXTRA_OECONF = " \
+ STAGING_DIR_TARGET=${STAGING_DIR_TARGET} \
+ --disable-fatal-warnings \
+ --disable-static \
+"
+SOURCE1 = "heartbeat/init.d/heartbeat"
+CFLAGS_append += "-DGLIB_COMPILATION"
+
+do_configure() {
+ ./bootstrap
+ isbigendian=`echo ${TUNE_FEATURES} | grep bigendian` || true
+ if [ $isbigendian"x" = "x" ] ; then
+ CPU_ENDIAN="little"
+ else
+ CPU_ENDIAN="big"
+ fi
+ cp -a ./configure ./configure.orig
+ if [ ${CPU_ENDIAN} == "little" ]; then
+ sed -e "s@CROSS_ENDIAN_INFO@\$as_echo \"#define CONFIG_LITTLE_ENDIAN 1\" >>confdefs.h@g" \
+ -e "s@CROSS_LIBDIR@${_LIBDIR}@g" \
+ ./configure.orig > ./configure
+ else
+ sed -e "s@CROSS_ENDIAN_INFO@\$as_echo \"#define CONFIG_BIG_ENDIAN 1\" >>confdefs.h@g" \
+ -e "s@CROSS_LIBDIR@${_LIBDIR}@g" \
+ ./configure.orig > ./configure
+ fi
+ oe_runconf ${EXTRA_OECONF}
+}
+do_compile_prepend() {
+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_PREFIX}libtool
+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_PREFIX}libtool
+ make clean
+}
+do_install_append () {
+ sed -i -e 's,/usr/lib/,${libdir}/,' ${WORKDIR}/heartbeat.service
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${libexecdir}
+ install -m 0755 ${S}/${SOURCE1} ${D}${libexecdir}/heartbeat.init
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/heartbeat.service ${D}${systemd_unitdir}/system/
+ fi
+}
+
+do_install() {
+ sed -i -e 's:/etc/rc.d/init.d/functions:/etc/init.d/functions:g' \
+ ${S}/${SOURCE1}
+ oe_runmake DESTDIR=${D} install
+ # cleanup
+ [ -d ${D}/usr/man ] && rm -rf ${D}/usr/man
+ [ -d ${D}/usr/share/libtool ] && rm -rf ${D}/usr/share/libtool
+ find ${D} -type f -name *.la -exec rm -f {} ';'
+ rm -rf ${D}/usr/share/heartbeat/cts
+ rm -rf ${D}/usr/share/doc/packages
+ rm -rf ${D}/usr/share/heartbeat/ha_propagate
+ install -m 0755 ${S}/doc/ha.cf ${D}/etc/ha.d/ha.cf
+ install -m 0600 ${S}/doc/authkeys ${D}/etc/ha.d/authkeys
+}
+
+inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','',d)}
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "heartbeat.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r haclient"
+USERADD_PARAM_${PN} = " \
+ -r -g haclient -d /var/lib/heartbeat/cores/hacluster -M \
+ -s /sbin/nologin -c \"heartbeat user\" hacluster \
+"
+FILES_${PN}-dbg += " \
+ ${libdir}/heartbeat/plugins/quorum/.debug \
+ ${libdir}/heartbeat/plugins/HBauth/.debug \
+ ${libdir}/heartbeat/plugins/tiebreaker/.debug \
+ ${libdir}/heartbeat/plugins/HBcomm/.debug \
+ ${libdir}/heartbeat/plugins/HBcompress/.debug \
+"
+FILES_${PN} += " \
+ run/heartbeat/ccm \
+ run/heartbeat/dopd \
+"