diff options
author | Kacper Kowalik <xarthisius@gentoo.org> | 2010-06-20 21:29:19 +0000 |
---|---|---|
committer | Kacper Kowalik <xarthisius@gentoo.org> | 2010-06-20 21:29:19 +0000 |
commit | 1df3c5829f53df6bc733ea1a4ccb1138125fc65d (patch) | |
tree | 4cb0934541ff0058243732be3fa523b6a4133d9b /sys-cluster/cluster-glue | |
parent | Initial commit wrt #172739 by Anatoly. (diff) | |
download | gentoo-2-1df3c5829f53df6bc733ea1a4ccb1138125fc65d.tar.gz gentoo-2-1df3c5829f53df6bc733ea1a4ccb1138125fc65d.tar.bz2 gentoo-2-1df3c5829f53df6bc733ea1a4ccb1138125fc65d.zip |
Initial import. Ebuild written by Tomáš Chvátal <scarabeus@gentoo.org>
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'sys-cluster/cluster-glue')
-rw-r--r-- | sys-cluster/cluster-glue/ChangeLog | 12 | ||||
-rw-r--r-- | sys-cluster/cluster-glue/cluster-glue-1.0.5.ebuild | 88 | ||||
-rw-r--r-- | sys-cluster/cluster-glue/files/1.0.5-docs.patch | 40 | ||||
-rw-r--r-- | sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch | 11 | ||||
-rw-r--r-- | sys-cluster/cluster-glue/files/heartbeat-logd.init | 47 | ||||
-rw-r--r-- | sys-cluster/cluster-glue/metadata.xml | 6 |
6 files changed, 204 insertions, 0 deletions
diff --git a/sys-cluster/cluster-glue/ChangeLog b/sys-cluster/cluster-glue/ChangeLog new file mode 100644 index 000000000000..ae4ce10615bc --- /dev/null +++ b/sys-cluster/cluster-glue/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for sys-cluster/cluster-glue +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cluster-glue/ChangeLog,v 1.1 2010/06/20 21:29:19 xarthisius Exp $ + +*cluster-glue-1.0.5 (20 Jun 2010) + + 20 Jun 2010; Kacper Kowalik <xarthisius@gentoo.org> + +files/1.0.5-docs.patch, +cluster-glue-1.0.5.ebuild, + +files/1.0.5-respect_cflags.patch, +files/heartbeat-logd.init, + +metadata.xml: + Initial import. Ebuild written by Tomáš Chvátal <scarabeus@gentoo.org> + diff --git a/sys-cluster/cluster-glue/cluster-glue-1.0.5.ebuild b/sys-cluster/cluster-glue/cluster-glue-1.0.5.ebuild new file mode 100644 index 000000000000..cc0c44d08564 --- /dev/null +++ b/sys-cluster/cluster-glue/cluster-glue-1.0.5.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cluster-glue/cluster-glue-1.0.5.ebuild,v 1.1 2010/06/20 21:29:18 xarthisius Exp $ + +EAPI="2" + +MY_P="${P/cluster-}" +inherit autotools multilib eutils base + +DESCRIPTION="Library pack for Heartbeat / Pacemaker" +HOMEPAGE="http://www.linux-ha.org/wiki/Cluster_Glue" +SRC_URI="http://hg.linux-ha.org/glue/archive/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RDEPEND="app-arch/bzip2 + net-libs/libnet:1.1 + net-misc/curl + net-misc/iputils + || ( net-misc/netkit-telnetd net-misc/telnet-bsd ) + dev-libs/libxml2" +DEPEND="${RDEPEND} + doc? ( + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + )" + +S="${WORKDIR}/Reusable-Cluster-Components-${MY_P}" + +PATCHES=( + "${FILESDIR}/${PV}-docs.patch" + "${FILESDIR}/${PV}-respect_cflags.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + local myopts + + use doc && myopts=" --enable-doc" + econf \ + --disable-static \ + --disable-fatal-warnings \ + --disable-dependency-tracking \ + --docdir=/usr/share/doc/${PF} \ + --enable-libnet \ + --localstatedir=/var \ + --sysconfdir=/var \ + ${myopts} \ + --with-group-id=65 --with-ccmuser-id=65 \ + --with-daemon-user=hacluster --with-daemon-group=haclient +} + +src_install() { + base_src_install + + dodir /var/lib/heartbeat/cores + dodir /var/lib/heartbeat/lrm + + keepdir /var/lib/heartbeat/cores + keepdir /var/lib/heartbeat/lrm + + # init.d file + cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die + sed -i \ + -e "s:%libdir%:$(get_libdir):" \ + "${T}/heartbeat-logd.init" || die + newinitd "${T}/heartbeat-logd.init" heartbeat-logd || die + rm "${D}"/etc/init.d/logd +} + +pkg_preinst() { + # check for cluster group, if it doesn't exist make it + groupadd -g 65 haclient + # check for cluster user, if it doesn't exist make it + useradd -u 65 -g haclient -s /dev/null -d /var/lib/heartbeat hacluster +} + +pkg_postinst() { + chown -R hacluster:haclient /var/lib/heartbeat/cores + chown -R hacluster:haclient /var/lib/heartbeat/lrm +} diff --git a/sys-cluster/cluster-glue/files/1.0.5-docs.patch b/sys-cluster/cluster-glue/files/1.0.5-docs.patch new file mode 100644 index 000000000000..424c529623f0 --- /dev/null +++ b/sys-cluster/cluster-glue/files/1.0.5-docs.patch @@ -0,0 +1,40 @@ +--- doc/Makefile.am ++++ doc/Makefile.am +@@ -29,11 +29,10 @@ + + if BUILD_DOC + man_MANS += hb_report.8 ha_logd.8 ha_logger.1 stonith.8 meatclient.8 +-endif + + EXTRA_DIST = $(man_MANS) + +-STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current ++STYLESHEET_PREFIX ?= /usr/share/sgml/docbook/xsl-stylesheets/ + MANPAGES_STYLESHEET ?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl + HTML_STYLESHEET ?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl + FO_STYLESHEET ?= $(STYLESHEET_PREFIX)/fo/docbook.xsl +@@ -47,3 +46,4 @@ + $(XSLTPROC) \ + $(XSLTPROC_MANPAGES_OPTIONS) \ + $(MANPAGES_STYLESHEET) $< ++endif +--- configure.ac ++++ configure.ac +@@ -492,11 +492,13 @@ + AC_PATH_PROGS(PKGCONFIG, pkg-config) + AC_PATH_PROGS(XML2CONFIG, xml2-config) + +-AC_PATH_PROGS(XSLTPROC, xsltproc) +-AM_CONDITIONAL(BUILD_DOC, test "x$XSLTPROC" != "x" ) +-if test "x$XSLTPROC" = "x"; then +- AC_MSG_WARN([xsltproc not installed, unable to (re-)build manual pages]) ++AC_ARG_ENABLE([doc], ++ [ --enable-doc build documentation, [default=no]], ++ [enable_doc=$withval], [enable_doc=no]) ++if test "x$enable_doc" != "xno"; then ++ AC_PATH_PROGS(XSLTPROC, xsltproc) + fi ++AM_CONDITIONAL(BUILD_DOC, test "x$enable_doc" != "xno" ) + + AC_PATH_PROGS(VALGRIND_BIN, valgrind, /usr/bin/valgrind) + AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command) diff --git a/sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch b/sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch new file mode 100644 index 000000000000..f89432fc7eed --- /dev/null +++ b/sys-cluster/cluster-glue/files/1.0.5-respect_cflags.patch @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -1149,8 +1149,6 @@ + CFLAGS="$CFLAGS -g" + enable_fatal_warnings=no + else +- CFLAGS="$CFLAGS -ggdb3 -O0" +- + # We had to eliminate -Wnested-externs because of libtool changes + EXTRA_FLAGS="-fgnu89-inline + -fstack-protector-all diff --git a/sys-cluster/cluster-glue/files/heartbeat-logd.init b/sys-cluster/cluster-glue/files/heartbeat-logd.init new file mode 100644 index 000000000000..f6cb4f5cfb0b --- /dev/null +++ b/sys-cluster/cluster-glue/files/heartbeat-logd.init @@ -0,0 +1,47 @@ +#!/sbin/runscript + +PIDFILE=/var/run/heartbeat-logd.pid + +depend() { + need net +} + +BINARY="/usr/%libdir%/heartbeat/ha_logd" +USER="cluster" +GROUP="cluster" +CONFIG="/etc/logd.cf" +LOGFILE="/var/log/ha_logger.log" + +start() { + ebegin "Starting heartbeat non-blocking log service" + + COMMAND_ARGS="-d" + [[ -f "${CONFIG}" ]] && COMMAND_ARGS+=" -c ${CONFIG}" + + if [ -n "${RC_UNAME}" ]; then + PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}" + else + PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &" + fi + eval ${CHRT} start-stop-daemon \ + --quiet --start --chdir "${RUNTIMEDIR}" \ + --pidfile "${PIDFILE}" \ + --make-pidfile \ + --exec ${BINARY} ${COMMAND_ARGS} --chuid "${USER}:${GROUP}" \ + --nicelevel "${NICELEVEL}" \ + ${PARAMS} + eend $? +} + +stop() { + ebegin "Stopping heartbeat non-blocking log service" + start-stop-daemon --stop --retry 3 --quiet --exec "${BINARY}" + rm -f "${PIDFILE}" + eend $? +} + +restart() { + stop + sleep 3 + start +} diff --git a/sys-cluster/cluster-glue/metadata.xml b/sys-cluster/cluster-glue/metadata.xml new file mode 100644 index 000000000000..204982f9a91c --- /dev/null +++ b/sys-cluster/cluster-glue/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ha-cluster</herd> + <longdescription>Cluster Glue is a set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack.</longdescription> +</pkgmetadata> |