diff options
Diffstat (limited to 'dev-db/ctdb/files')
-rw-r--r-- | dev-db/ctdb/files/autoconf-2.62-fix.patch | 15 | ||||
-rw-r--r-- | dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch | 77 | ||||
-rw-r--r-- | dev-db/ctdb/files/ctdb-1.13-ldflags.patch | 21 | ||||
-rw-r--r-- | dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch | 13 | ||||
-rw-r--r-- | dev-db/ctdb/files/ctdb-50.samba_gentoo.patch | 14 | ||||
-rw-r--r-- | dev-db/ctdb/files/ctdb-functions.patch | 76 | ||||
-rw-r--r-- | dev-db/ctdb/files/ctdb.initd | 81 |
7 files changed, 297 insertions, 0 deletions
diff --git a/dev-db/ctdb/files/autoconf-2.62-fix.patch b/dev-db/ctdb/files/autoconf-2.62-fix.patch new file mode 100644 index 000000000000..2f5bc2b77f37 --- /dev/null +++ b/dev-db/ctdb/files/autoconf-2.62-fix.patch @@ -0,0 +1,15 @@ +--- lib/replace/autoconf-2.60.m4.orig 2008-04-19 00:26:33.000000000 -0400 ++++ lib/replace/autoconf-2.60.m4 2008-04-19 00:22:25.000000000 -0400 +@@ -179,6 +179,7 @@ + # ------------------------ + # Enable extensions on systems that normally disable them, + # typically due to standards-conformance issues. ++m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[ + AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], + [ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +@@ -208,3 +209,4 @@ + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + ]) ++]) diff --git a/dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch b/dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch new file mode 100644 index 000000000000..c70350c110ab --- /dev/null +++ b/dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch @@ -0,0 +1,77 @@ +diff -Naur ctdb-1.0.114.orig/config/functions ctdb-1.0.114/config/functions +--- ctdb-1.0.114.orig/config/functions 2010-04-04 18:01:18.278707515 +0200 ++++ ctdb-1.0.114/config/functions 2010-04-04 18:08:05.792447032 +0200 +@@ -22,6 +22,8 @@ + . /etc/default/$1 + elif [ -f $CTDB_BASE/sysconfig/$1 ]; then + . $CTDB_BASE/sysconfig/$1 ++ elif [ -f /etc/config.d/$1 ]; then ++ . /etc/config.d/$name + fi + } + +@@ -33,6 +35,8 @@ + + if [ -x /sbin/startproc ]; then + CTDB_INIT_STYLE="suse" ++ elif [ -x /bin/rc-status ] ; then ++ CTDB_INIT_STYLE="gentoo" + elif [ -x /sbin/start-stop-daemon ]; then + CTDB_INIT_STYLE="debian" + else +@@ -356,6 +360,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -380,6 +387,16 @@ + ;; + esac + ;; ++ gentoo) ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS is not supported with ctdb" + exit 1 +@@ -398,6 +415,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -422,6 +442,18 @@ + ;; + esac + ;; ++ gentoo) ++ # for gentoo there is no service for lockmanager ++ # so we instead just shutdown/restart nfs ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS locking is not supported with ctdb" + exit 1 diff --git a/dev-db/ctdb/files/ctdb-1.13-ldflags.patch b/dev-db/ctdb/files/ctdb-1.13-ldflags.patch new file mode 100644 index 000000000000..d5662cadf0c0 --- /dev/null +++ b/dev-db/ctdb/files/ctdb-1.13-ldflags.patch @@ -0,0 +1,21 @@ +diff -urN ctdb-1.13.old/Makefile.in ctdb-1.13/Makefile.in +--- ctdb-1.13.old/Makefile.in 2012-03-23 11:30:03.321735210 +0100 ++++ ctdb-1.13/Makefile.in 2012-03-23 11:37:03.131704144 +0100 +@@ -151,7 +151,7 @@ + + bin/ltdbtool: tools/ltdbtool.o @TDB_OBJ@ + @echo Linking $@ +- @$(CC) $(CFLAGS) -o $@ $+ ++ @$(CC) $(CFLAGS) -o $@ $+ $(LIB_FLAGS) + + bin/smnotify: utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o utils/smnotify/smnotify.o $(POPT_OBJ) + @echo Linking $@ +@@ -173,7 +173,7 @@ + + bin/ping_pong: utils/ping_pong/ping_pong.o + @echo Linking $@ +- @$(CC) $(CFLAGS) -o $@ utils/ping_pong/ping_pong.o ++ @$(CC) $(CFLAGS) -o $@ utils/ping_pong/ping_pong.o $(LIB_FLAGS) + + bin/pmdactdb: $(CTDB_CLIENT_OBJ) utils/pmda/pmda_ctdb.o + @echo Linking $@ diff --git a/dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch b/dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch new file mode 100644 index 000000000000..6865d899a12d --- /dev/null +++ b/dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch @@ -0,0 +1,13 @@ +--- ./config/events.d/41.httpd 2009-05-29 14:19:30.741662868 +0100 ++++ ./config/events.d/41.httpd 2009-07-28 18:31:48.016042964 +0100 +@@ -19,6 +19,10 @@ + CTDB_SERVICE_HTTP="apache2" + CTDB_CONFIG_HTTP="apache2" + ;; ++ gentoo) ++ CTDB_SERVICE_HTTP="apache2" ++ CTDB_CONFIG_HTTP="apache2" ++ ;; + *) + # should not happen. + # for now use red hat style as default diff --git a/dev-db/ctdb/files/ctdb-50.samba_gentoo.patch b/dev-db/ctdb/files/ctdb-50.samba_gentoo.patch new file mode 100644 index 000000000000..fdd68ffc8d92 --- /dev/null +++ b/dev-db/ctdb/files/ctdb-50.samba_gentoo.patch @@ -0,0 +1,14 @@ +--- ./config/events.d/50.samba 2009-05-29 14:19:30.741662868 +0100 ++++ ./config/events.d/50.samba 2009-07-28 18:27:21.896042994 +0100 +@@ -25,6 +25,11 @@ + CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""} + CTDB_SERVICE_WINBIND=${CTDB_SERVICE_WINBIND:-winbind} + ;; ++ gentoo) ++ CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-samba} ++ CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""} ++ CTDB_SERVICE_WINBIND=${CTDB_SERVICE_WINBIND:-""} ++ ;; + *) + # should not happen, but for now use redhat style as default: + CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb} diff --git a/dev-db/ctdb/files/ctdb-functions.patch b/dev-db/ctdb/files/ctdb-functions.patch new file mode 100644 index 000000000000..61eda720d6ae --- /dev/null +++ b/dev-db/ctdb/files/ctdb-functions.patch @@ -0,0 +1,76 @@ +--- ./config/functions 2009-05-29 14:19:30.741662868 +0100 ++++ ./config/functions 2009-07-29 14:15:19.436043164 +0100 +@@ -10,6 +10,8 @@ + . /etc/default/$name + elif [ -f $CTDB_BASE/sysconfig/$name ]; then + . $CTDB_BASE/sysconfig/$name ++ elif [ -f /etc/config.d/$name ]; then ++ . /etc/config.d/$name + fi + } + +@@ -21,6 +23,8 @@ + + if [ -x /sbin/startproc ]; then + CTDB_INIT_STYLE="suse" ++ elif [ -x /bin/rc-status ]; then ++ CTDB_INIT_STYLE="gentoo" + elif [ -x /sbin/start-stop-daemon ]; then + CTDB_INIT_STYLE="ubuntu" + else +@@ -400,6 +404,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -424,6 +431,16 @@ + ;; + esac + ;; ++ gentoo) ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS is not supported with ctdb" + exit 1 +@@ -442,6 +459,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -466,6 +486,18 @@ + ;; + esac + ;; ++ gentoo) ++ # for gentoo there is no service for lockmanager ++ # so we instead just shutdown/restart nfs ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS locking is not supported with ctdb" + exit 1 diff --git a/dev-db/ctdb/files/ctdb.initd b/dev-db/ctdb/files/ctdb.initd new file mode 100644 index 000000000000..ca96019e22b1 --- /dev/null +++ b/dev-db/ctdb/files/ctdb.initd @@ -0,0 +1,81 @@ +#!/sbin/runscript + +depend() { + need localmount + need net + before samba + after bootmisc +} + +start() { + ebegin "Starting ctdb" + + [ -z "$CTDB_RECOVERY_LOCK" ] && { + eerror "You must configure the location of the CTDB_RECOVERY_LOCK in /etc/conf.d/ctdb" + return 1 + } + + [ -z "$CTDB_PUBLIC_ADDRESSES" ] && { + eerror "You must configure the location of the CTDB_PUBLIC_ADDRESSES in /etc/conf.d/ctdb" + return 1 + } + + [ -z "$CTDB_PUBLIC_INTERFACE" ] && { + eerror "You must configure the location of the CTDB_PUBLIC_INTERFACE in /etc/conf.d/ctdb" + return 1 + } + + CTDB_OPTIONS="$CTDB_OPTIONS --reclock=$CTDB_RECOVERY_LOCK" + + # build up CTDB_OPTIONS variable from optional parameters + [ -z "$CTDB_LOGFILE" ] || CTDB_OPTIONS="$CTDB_OPTIONS --logfile=$CTDB_LOGFILE" + [ -z "$CTDB_NODES" ] || CTDB_OPTIONS="$CTDB_OPTIONS --nlist=$CTDB_NODES" + [ -z "$CTDB_SOCKET" ] || CTDB_OPTIONS="$CTDB_OPTIONS --socket=$CTDB_SOCKET" + [ -z "$CTDB_PUBLIC_ADDRESSES" ] || CTDB_OPTIONS="$CTDB_OPTIONS --public-addresses=$CTDB_PUBLIC_ADDRESSES" + [ -z "$CTDB_PUBLIC_INTERFACE" ] || CTDB_OPTIONS="$CTDB_OPTIONS --public-interface=$CTDB_PUBLIC_INTERFACE" + [ -z "$CTDB_SINGLE_PUBLIC_IP" ] || CTDB_OPTIONS="$CTDB_OPTIONS --single-public-ip=$CTDB_SINGLE_PUBLIC_IP" + [ -z "$CTDB_DBDIR" ] || CTDB_OPTIONS="$CTDB_OPTIONS --dbdir=$CTDB_DBDIR" + [ -z "$CTDB_DBDIR_PERSISTENT" ] || CTDB_OPTIONS="$CTDB_OPTIONS --dbdir-persistent=$CTDB_DBDIR_PERSISTENT" + [ -z "$CTDB_EVENT_SCRIPT_DIR" ] || CTDB_OPTIONS="$CTDB_OPTIONS --event-script-dir $CTDB_EVENT_SCRIPT_DIR" + [ -z "$CTDB_TRANSPORT" ] || CTDB_OPTIONS="$CTDB_OPTIONS --transport $CTDB_TRANSPORT" + [ -z "$CTDB_DEBUGLEVEL" ] || CTDB_OPTIONS="$CTDB_OPTIONS -d $CTDB_DEBUGLEVEL" + [ -z "$CTDB_START_AS_DISABLED" ] || [ "$CTDB_START_AS_DISABLED" != "yes" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --start-as-disabled" + } + [ -z "$CTDB_CAPABILITY_RECMASTER" ] || [ "$CTDB_CAPABILITY_RECMASTER" != "no" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --no-recmaster" + } + [ -z "$CTDB_CAPABILITY_LMASTER" ] || [ "$CTDB_CAPABILITY_LMASTER" != "no" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --no-lmaster" + } + [ -z "$CTDB_LVS_PUBLIC_IP" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --lvs" + } + [ -z "$CTDB_SCRIPT_LOG_LEVEL" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --script-log-level=$CTDB_SCRIPT_LOG_LEVEL" + } + + # check all persistent databases that they look ok + PERSISTENT_DB_DIR="/var/ctdb/persistent" + [ -z "$CTDB_DBDIR" ] || { + PERSISTENT_DB_DIR="$CTDB_DBDIR/persistent" + } + mkdir -p $PERSISTENT_DB_DIR 2>/dev/null + for PDBASE in `ls $PERSISTENT_DB_DIR/*.tdb.[0-9] 2>/dev/null`; do + /usr/bin/tdbdump $PDBASE >/dev/null 2>/dev/null || { + eerror "Persistent database $PDBASE is corrupted! CTDB will not start." + return 1 + } + done + + start-stop-daemon --start --background --exec /usr/sbin/ctdbd \ + --pidfile /var/run/ctdbd.pid -- $CTDB_OPTIONS + eend $? + +} + +stop() { + start-stop-daemon --stop --exec /usr/sbin/ctdbd \ + --pidfile /var/run/ctdbd.pid +} + |