diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-04-22 14:25:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-04-22 14:25:03 +0100 |
commit | 5e8702bcbbed438e6c6cce023e7ef0cc9baa3e02 (patch) | |
tree | b041acef19bb9ae66c228d5c9d34d1e00aeb2b95 /sys-cluster/heartbeat/files | |
parent | 5cfef3c94cd7e82136c69a0322f5ba21f7e64632 (diff) |
gentoo resync : 22.04.2018
Diffstat (limited to 'sys-cluster/heartbeat/files')
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.6-r1-configure.patch | 102 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.6-r1-heartbeat-init | 95 |
2 files changed, 197 insertions, 0 deletions
diff --git a/sys-cluster/heartbeat/files/3.0.6-r1-configure.patch b/sys-cluster/heartbeat/files/3.0.6-r1-configure.patch new file mode 100644 index 000000000000..ab24282e4208 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.6-r1-configure.patch @@ -0,0 +1,102 @@ +diff -ru a/configure.ac b/configure.ac +--- a/configure.ac 2015-02-04 15:57:04.000000000 +0100 ++++ b/configure.ac 2017-04-25 13:33:58.668521006 +0200 +@@ -243,9 +243,9 @@ + mandir=`var "$mandir" "$exec_prefix/man"` + dnl docdir is available in autoconf 2.60+, for older versions preseed + dnl with the same value that 2.60+ uses +-docdir=`var "$docdir" "${datadir}/doc/${HB_PKG}"` +-libdir=`var "$libdir" "$exec_prefix/lib"` ++dnl docdir=`var "$docdir" "${datadir}/doc/${PACKAGE_NAME}"` ++dnl libdir=`var "$libdir" "$exec_prefix/lib"` + libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` + noarchlibdir=`var "$noarchlibdir" "$prefix/lib"` + + +@@ -284,53 +284,12 @@ + LIBC=`${LDD} ${tmpOutfile} | grep libc | sed -e 's%.*=> *%%' -e 's% .*$%%'` + LibCdir=`dirname $LIBC` + dirlist=`echo $LibCdir | tr '/' ' '` +- LibDirSuffix=unknown +- for dir in $dirlist +- do +- case $dir in +- *lib*) LibDirSuffix=$dir; break;; +- *);; +- esac +- done +- case $LibDirSuffix in +- unknown) LibDirSuffix=`basename $LibCdir`;; +- esac + OutFileType=`file $tmpOutfile` + rm -f $tmpCfile $tmpOutfile + else + AC_MSG_ERROR([Cannot Compile trivial C program]) + fi +-# +-# The code above doesn't work right everywhere +-# (like Fedora and OpenBSD) +-# +-case ${LibDirSuffix} in +- *lib*) : Cool;; +- *) : Sigh... +- case $OutFileType in +- *64-bit*) +- case $host_os in +- openbsd*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib64;; +- esac;; +- *32-bit*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib;; +- esac;; +-esac +-# +-# This may not yet be quite right for PPC where the default +-# is to produce 32-bit binaries, even though the OS is 64-bit +-# or for that matter for system Z, But, it's a lot better than +-# it used to be. +-# +-AC_MSG_RESULT($LibDirSuffix) + +-case $libdir in +- */*${LibDirSuffix}) : Cool ;; +- *) : Uh Oh... +- libdir=`dirname $libdir`/$LibDirSuffix +- AC_MSG_WARN([Overriding libdir to: $libdir]);; +-esac + for j in exec_prefix bindir sbindir datadir sysconfdir localstatedir \ + includedir oldincludedir mandir docdir stdocdir libdir noarchlibdir + do +@@ -379,7 +338,6 @@ + fi + + AC_CHECK_HEADERS(heartbeat/glue_config.h) +-GLUE_HEADER=none + if test "$ac_cv_header_heartbeat_glue_config_h" = "yes"; then + GLUE_HEADER=heartbeat/glue_config.h + else +@@ -463,15 +421,6 @@ + + dnl We use this in the RPM specfile... + AC_SUBST(ac_configure_args) +-cleaned_configure_args="" +-for j in ${ac_configure_args} +-do +- case $j in +- *--libdir=*|*--libexecdir=*) ;; +- *) cleaned_configure_args="$cleaned_configure_args $j";; +- esac +-done +-AC_SUBST(cleaned_configure_args) + + dnl ************************************************************************* + PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin" +@@ -2087,7 +2036,7 @@ + fi + + if test "$GCC" = yes; then +- CFLAGS="$CFLAGS -ggdb3" ++ CFLAGS="$CFLAGS" + if + cc_supports_flag -funsigned-char + then diff --git a/sys-cluster/heartbeat/files/3.0.6-r1-heartbeat-init b/sys-cluster/heartbeat/files/3.0.6-r1-heartbeat-init new file mode 100644 index 000000000000..5e15b322f503 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.6-r1-heartbeat-init @@ -0,0 +1,95 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +HA_DIR=/etc/ha.d +. $HA_DIR/shellfuncs +HA_DAEMON_DIR=/usr/libexec/heartbeat +HA_LIB_DIR=/usr/lib/heartbeat +HA_SHARE_DIR=/usr/share/heartbeat + +depend() { + use logger + need net +} + +opts="start stop status reload restart" + +CheckBool() { + case `echo "$1" | tr A-Z a-z` in + y|yes|enable|on|true|1) true;; + *) false;; + esac +} + +# Run pre-startup script if it exists +RunStartStop() { + [ -f $HA_DIR/resource.d/startstop ] && $HA_DIR/resource.d/startstop "$@" +} + +start() { + checkpath -q -d -m 0755 -o root:root /var/run/heartbeat + + ebegin "Starting heartbeat" + + . $HA_DIR/shellfuncs + + # start the log subsystem + CheckBool "`ha_parameter use_logd`" && \ + ( ${HA_LIB_DIR}/ha_logd -s &>/dev/null || \ + ${HA_LIB_DIR}/ha_logd -d -c /etc/ha.d/ha_logd.cf) + + RunStartStop pre-start + + CheckBool "`ha_parameter crm`" || \ + ${HA_SHARE_DIR}/ResourceManager verifyallidle + + ${HA_DAEMON_DIR}/heartbeat &>/dev/null + ret=$? + + RunStartStop post-start + + eend ${ret} +} + +stop() { + ebegin "Stopping heartbeat" + + RunStartStop pre-stop + + ${HA_DAEMON_DIR}/heartbeat -k &>/dev/null + ret=$? + + RunStartStop post-stop ${ret} + + # stop log subsystem + CheckBool "`ha_parameter use_logd`" && \ + ( ${HA_LIB_DIR}/ha_logd -s &>/dev/null && \ + ${HA_LIB_DIR}/ha_logd -k &>/dev/null ) + + eend ${ret} +} + +status() { + ${HA_DAEMON_DIR}/heartbeat -s +} + +reload() { + ebegin "Reloading heartbeat" + ${HA_DAEMON_DIR}/heartbeat -r &>/dev/null + eend $? +} + +restart() { + . $HA_DIR/shellfuncs + + sleeptime=$(( `ha_parameter deadtime` + 10 )) + + svc_stop + + ebegin " waiting ${sleeptime}s to allow resource takeover to complete" + sleep ${sleeptime} + eend 0 + + svc_start +} |