public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sys-fs/ocfs2-tools/files/, sys-fs/ocfs2-tools/
@ 2011-06-22 13:49 Alexey Shvetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2011-06-22 13:49 UTC (permalink / raw
  To: gentoo-commits

commit:     0101b95d7ee0505406ac511a2389725cd8771a42
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 22 13:48:57 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Wed Jun 22 13:48:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0101b95d

Update ocfs2

---
 sys-fs/ocfs2-tools/ChangeLog                       |   11 --
 sys-fs/ocfs2-tools/files/1.4.4-cpg.patch           |   31 +++++
 .../files/{gcc45-ftbfs.patch => 1.4.4-gcc45.patch} |    0
 sys-fs/ocfs2-tools/files/INSTALL.GENTOO            |  103 ----------------
 sys-fs/ocfs2-tools/files/ocfs2.conf                |   20 ---
 sys-fs/ocfs2-tools/files/ocfs2.init                |  126 --------------------
 sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild        |   87 ++++++--------
 7 files changed, 67 insertions(+), 311 deletions(-)

diff --git a/sys-fs/ocfs2-tools/ChangeLog b/sys-fs/ocfs2-tools/ChangeLog
deleted file mode 100644
index 98dbc50..0000000
--- a/sys-fs/ocfs2-tools/ChangeLog
+++ /dev/null
@@ -1,11 +0,0 @@
-# ChangeLog for sys-fs/ocfs2-tools
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: $
-
-  07 Mar 2011; Justin Lecher <jlec@gentoo.org> ocfs2-tools-1.4.4.ebuild,
-  +metadata.xml:
-  QA things
-
-  07 Mar 2011; Justin Lecher <jlec@gentoo.org> ocfs2-tools-1.4.4.ebuild:
-  Correct Slots for gtk 3 introduction to tree
-

diff --git a/sys-fs/ocfs2-tools/files/1.4.4-cpg.patch b/sys-fs/ocfs2-tools/files/1.4.4-cpg.patch
new file mode 100644
index 0000000..4832bf7
--- /dev/null
+++ b/sys-fs/ocfs2-tools/files/1.4.4-cpg.patch
@@ -0,0 +1,31 @@
+--- ocfs2-tools-1.4.4-buggy/configure	2010-10-04 18:10:31.327238001 +0200
++++ ocfs2-tools-1.4.4/configure	2010-10-05 10:27:52.607238001 +0200
+@@ -5534,7 +5534,12 @@
+ echo $ECHO_N "checking for cpg_initialize in -lcpg... $ECHO_C" >&6
+     while test "x$TRY_PATH" != "x"; do
+         TRY="`echo $TRY_PATH | cut -f1 -d:`"
+-        TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
++        NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
++        if test "x$NEW_TRY_PATH" != "x$TRY_PATH"; then
++            TRY_PATH="$NEW_TRY_PATH"
++        else
++            TRY_PATH=""
++        fi
+ 
+         if test "x$TRY" != "x"; then
+             TRY="-L${TRY}/${cpg_package}"
+@@ -5680,7 +5685,13 @@
+ echo $ECHO_N "checking for saCkptInitialize in -lSaCkpt... $ECHO_C" >&6
+     while test "x$TRY_PATH" != "x"; do
+         TRY="`echo $TRY_PATH | cut -f1 -d:`"
+-        TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
++        NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
++        if test "x$NEW_TRY_PATH" != "x$TRY_PATH"; then
++            TRY_PATH="$NEW_TRY_PATH"
++        else
++            TRY_PATH=""
++        fi
++	
+ 
+         if test "x$TRY" != "x"; then
+             TRY="-L${TRY}/openais"

diff --git a/sys-fs/ocfs2-tools/files/gcc45-ftbfs.patch b/sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch
similarity index 100%
rename from sys-fs/ocfs2-tools/files/gcc45-ftbfs.patch
rename to sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch

diff --git a/sys-fs/ocfs2-tools/files/INSTALL.GENTOO b/sys-fs/ocfs2-tools/files/INSTALL.GENTOO
deleted file mode 100644
index e05485c..0000000
--- a/sys-fs/ocfs2-tools/files/INSTALL.GENTOO
+++ /dev/null
@@ -1,103 +0,0 @@
-Installing, configuring and running OCFS2 on Gentoo Linux
-
-
-INSTALLING
-==========
-Step 1 - Inserting modules
---------------------------
-Add 'ocfs2', 'configfs' to your /etc/modules.autoload.d/kernel-2.6 file:
-# echo "ocfs2" >> /etc/modules.autoload.d/kernel-2.6
-# echo "configfs" >> /etc/modules.d/autoload.d/kernel-2.6
-# update-modules
-
-Step 2 - Mounting the pseudo-filesystems 
-----------------------------------------
-add mountpoints for configfs and dlmfs to /etc/fstab
-# echo "none /sys/kernel/config configfs defaults 0 0" >> /etc/fstab
-# echo "none /dlm ocfs2_dlmfs defaults 0 0" >> /etc/fstab
-
-Step 3 - Addding ocfs2 to default runlevel 
-------------------------------------------
-# rc-update add ocfs2 default 
-
-
-CONFIGURING 
-===========
-Step 1 - Edit your cluster.conf
--------------------------------
-Edit /etc/ocfs2/cluster.conf and add your nodes. One node can be a member 
-of many cluster, so repeat the config for each node/cluster pair. In the case of
-a multicluster node, "ip_port" must be different for every cluster.
-You can also use ocfs2console for this task, if you compiled with USE=X.
-
-Step 2 - Copy config to other nodes
------------------------------------
-Make sure that every node in cluster(s) has an identical config file.
-
-Step 3 - Update /etc/conf.d/ocfs2
----------------------------------
-Add names of cluster(s) in which this node belongs to the OCFS2_CLUSTERS list.
-
-Also, if you're running firewall on your nodes, make sure you've read
-"Firewall restrictions" below.
-
-RUNNING 
-=======
-
-Notes about adding nodes while online
--------------------------
-*DON'T* add nodes to /etc/ocfs2/cluster.conf while the cluster is online.
-Use /sbin/o2cb_ctl instead, e.g.:
-
-# /sbin/o2cb_ctl -C -n <node_name> -t node -a number=<node_number> \ 
-  -a ip_address=<ip_address> -a ip_port=<port> -a cluster=<clustername>
-
-If the complete cluster is down, you may add nodes to /etc/ocfs2/cluster.conf,
-but make sure you end up with *SAME* cluster.conf on every node.
-
-For a complete reference, check files in this directory
-as well as http://oss.oracle.com/projects/ocfs2
-You have been warned.
-
-Also, if you're running a firewall on your nodes, make sure you've read the
-following section.
-
-Firewall restrictions
----------------------
-Logically, allow all nodes to connect to each other via specified port(s). 
-If you used 7777 as a port for communication, issue: 
-
-# iptables -I INPUT 1 -m state --state ESTABLISHED,RELATED -j ACCEPT
-# iptables -N OCFS2_NODES
-# iptables -A OCFS2_NODES -s <node_ip_address> -j ACCEPT
-(repeat former command for every node)
-# iptables -A OCFS2_NODES -j DROP
-# iptables -A INPUT -p tcp --dport 7777 -m state --state NEW -j OCFS2_NODES
-# /etc/init.d/iptables save 
-
-You should do this on every node.
-
-KNOWN BUGS
-==========
-1. Init script does not have all the funtionality of the o2cb script
-----------------------------------------------------------------
-I know that, but o2cb script doesn't use "depend" and therefore its start 
-can't be controlled inside runlevels. I had to rewrite major portions of it 
-to make it Gentoo-friendly. o2cb is still available, and if you need 
-additional functionality from /etc/init.d/ocfs2, file a bug report (see 
-"Reporting Bugs" below).
-
-2. Booting off the ocfs2 cluster doesn't work
----------------------------------------------
-... or at least, isn't tested. If someone wants to play with it, I'd be 
-happy to incorporate any ideas or experiences.
-
-REPORTING BUGS
-==============
-Open a bug at http://bugs.gentoo.org and add laza@yu.net into the CC list.
-If the problem is within my powers, I'll fix it, if not, I'll 
-escalate it to ocfs2 developers.
-
----
-05. Aug 2005. 
-Lazar Obradovic

diff --git a/sys-fs/ocfs2-tools/files/ocfs2.conf b/sys-fs/ocfs2-tools/files/ocfs2.conf
deleted file mode 100644
index 5217769..0000000
--- a/sys-fs/ocfs2-tools/files/ocfs2.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/files/ocfs2.conf,v 1.1 2006/07/20 05:13:14 dberkholz Exp $
-
-# Put your cluster names here, separated by space, ie.
-# OCFS2_CLUSTER="cluster1 admincluster cluster2" 
-OCFS2_CLUSTER="ocfs2"
-
-# Some heartbeat tweaks to prevent self-fencing quite so much during heavy load.
-# http://oss.oracle.com/projects/ocfs2/dist/documentation/ocfs2_faq.html
-
-# How long to wait before a node is considered dead from lack of network activity.
-OCFS2_IDLE_TIMEOUT_MS="30000"
-# How often we should attempt to send heartbeats.
-OCFS2_KEEPALIVE_DELAY_MS="2000"
-OCFS2_RECONNECT_DELAY_MS="2000"
-# How often we should attempt to send heartbeats.
-# How many interations before a node is considered dead from lack of IO activity.
-# (dead_threshold - 1) * 2s
-OCFS2_DEAD_THRESHOLD="31"

diff --git a/sys-fs/ocfs2-tools/files/ocfs2.init b/sys-fs/ocfs2-tools/files/ocfs2.init
deleted file mode 100644
index f454d44..0000000
--- a/sys-fs/ocfs2-tools/files/ocfs2.init
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/files/ocfs2.init,v 1.1 2006/07/20 05:13:14 dberkholz Exp $
-
-depend() {
-	need net localmount
-	before netmount 
-}
-
-check_modules_config() {
-	local MODULES=$1
-	local CONFIGS=$2
-	local MODULE
-	local retval=0
-	
-	for MODULE in ${MODULES}; do
-		if ! ls -1 /sys/module | egrep -q "^${MODULE}$"; then
-			retval=1
-		fi
-	done
-	if [ ${retval} -eq 1 ] && [ -e /proc/config.gz ]; then
-		retval=0
-		for MODULE in ${CONFIGS}; do
-			if ! gzip -dc /proc/config.gz | egrep -q "^CONFIG_${MODULE}=y$"; then
-				retval=1
-			fi
-		done
-	fi
-	return ${retval}
-}
-
-check_modules() {
-	check_modules_config "ocfs2_dlmfs ocfs2 ocfs2_dlm ocfs2_nodemanager" "OCFS2_FS OCFS2_FS_O2CB" && check_modules_config configfs CONFIGFS_FS && return 0
-	if ! egrep -q '\s*ocfs2\s*$' /proc/filesystems || ! egrep -q '\s*ocfs2_dlmfs\s*$' /proc/filesystems; then 
-		ewarn "One or more required modules are not loaded."
-                ewarn "Make sure you have "
-                ewarn " - placed ocfs, dlmfs and configfs into /etc/modules.autoload.d/kernel-2.6 or built directly into the kernel."
-                ewarn "For a (in)complete documentation, read /usr/share/doc/ocfs-<version>/INSTALL.GENTOO.bz2"
-	fi
-	return 1
-}
-
-check_pseudofs() { 
-	local retval=0
-	local HASMOUNT="mount -l -t"
-	if [ -z "`${HASMOUNT} configfs`" ] ; then
-		retval=1
-	fi
-	if [ -z "`${HASMOUNT} ocfs2_dlmfs`" ] ; then
-		retval=1
-	fi
-
-	if [ ${retval} -eq 1 ]; then
-		ewarn "One or more pseudo-filesystes are not mounted."
-		ewarn "Make sure you have following lines in your /etc/fstab:"
-		ewarn "none         /sys/kernel/config         configfs        defaults                0 0"
-		ewarn "none         /dlm                       ocfs2_dlmfs     defaults                0 0"
-		ewarn "For a (in)complete documentation, read /usr/share/doc/ocfs-<version>/INSTALL.GENTOO.bz2"
-	fi
-	return ${retval}
-}
-
-
-
-start() {
-	check_modules || return $? 
-	check_pseudofs || return $?
-	
-	einfo "Starting OCFS2 cluster"
-	for cluster in ${OCFS2_CLUSTER}; do
-		ebegin " - ${cluster}"
-		/sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=yes >/dev/null 2>&1
-		eend $?
-
-		# Some heartbeat tweaks to prevent self-fencing quite so much during heavy load.
-		# http://oss.oracle.com/projects/ocfs2/dist/documentation/ocfs2_faq.html
-
-		# How long to wait before a node is considered dead from lack of network activity.
-		echo $OCFS2_IDLE_TIMEOUT_MS > /sys/kernel/config/cluster/${cluster}/idle_timeout_ms
-		# How often we should attempt to send heartbeats.
-		echo $OCFS2_KEEPALIVE_DELAY_MS > /sys/kernel/config/cluster/${cluster}/keepalive_delay_ms
-		echo $OCFS2_RECONNECT_DELAY_MS > /sys/kernel/config/cluster/${cluster}/reconnect_delay_ms
-		# How many interations before a node is considered dead from lack of IO activity.
-		# (dead_threshold - 1) * 2s
-		echo $OCFS2_DEAD_THRESHOLD > /sys/kernel/config/cluster/${cluster}/heartbeat/dead_threshold
-	done
-	sleep 2
-}
-
-stop() {
-	# Shamelesly stolen from netmount
-        local ret
-        ebegin "Unmounting OCFS2 filesystems"
-        [ -z "$(umount -art ocfs2 2>&1)" ]
-        ret=$?
-        eend ${ret} "Failed to simply unmount filesystems"
-        [ ${ret} -eq 0 ] && return 0
-
-        declare -a siglist=( "TERM" "KILL" "KILL" )
-        local retry=0
-        local remaining="go"
-
-        while [ -n "${remaining}" -a ${retry} -lt 3 ]
-        do
-                remaining="$(awk '$3 ~ /'ocfs2'/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
-                IFS=$'\n'
-                set -- ${remaining//\\040/ }
-                unset IFS
-                [ -z "${remaining}" ] && break
-
-                ebegin $'\t'"Unmounting ocfs2 filesystems (retry #$((retry+1)))"
-                /bin/fuser -k -${siglist[$((retry++))]} -m "$@" &>/dev/null
-                sleep 5
-                umount "$@" &>/dev/null
-                eend $? $'\t'"Failed to unmount filesystems"
-        done
-
-	
-	einfo "Stopping OCFS2 cluster" 
-	for cluster in ${OCFS_CLUSTERS}; do
-		ebegin " - ${cluster}"
-		/sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=no >/dev/null 2>&1
-		eend $?
-	done
-}

diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild b/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild
index 150093f..26aaeaf 100644
--- a/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild
+++ b/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild
@@ -1,73 +1,58 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI="3"
-
-PYTHON_DEPEND="2"
-
-inherit eutils python
-
-PV_MAJOR="${PV%%.*}"
-PV_MINOR="${PV#*.}"
-PV_MINOR="${PV_MINOR%%.*}"
+EAPI=3
+PYTHON_DEPEND="gtk? 2"
+inherit python base versionator
 
 DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2"
 HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/"
-SRC_URI="http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v${PV_MAJOR}.${PV_MINOR}/${P}.tar.gz"
+SRC_URI="http://oss.oracle.com/projects/${PN}/dist/files/source/v$(get_version_component_range 1-2)/${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~x86 ~amd64"
-IUSE="X"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug gtk"
 
-# (#142216) build system's broke, always requires glib for debugfs utility
 RDEPEND="
-	dev-libs/glib:2
-	sys-cluster/openais
-	sys-cluster/dlm-lib
+	sys-apps/util-linux
 	sys-cluster/cman-lib
+	|| ( sys-cluster/corosync sys-cluster/openais )
 	sys-fs/e2fsprogs
-	X? (
-		x11-libs/gtk+:2
-		dev-python/pygtk:2
-		)"
+	sys-libs/ncurses
+	sys-libs/readline
+	sys-process/psmisc
+	gtk? (
+		dev-python/pygtk
+	)
+"
+# 99% of deps this thing has is automagic
+# specialy cluster things corosync/pacemaker
 DEPEND="${RDEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${PV}-gcc45.patch"
+	"${FILESDIR}/${PV}-cpg.patch"
+)
+
+DOCS=(
+	"${S}/documentation/samples/cluster.conf"
+	"${S}/documentation/users_guide.txt"
+)
+
+MAKEOPTS+=" -j1"
+
 pkg_setup() {
 	python_set_active_version 2
-}
-
-src_prepare() {
-	epatch "${FILESDIR}/gcc45-ftbfs.patch"
+	python_pkg_setup
 }
 
 src_configure() {
-	#local myconf="--enable-dynamic-fsck --enable-dynamic-ctl"
-
 	econf \
-		$(use_enable X ocfs2console) \
-		${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D}" install || die "Failed to install"
-
-	dodoc \
-		COPYING CREDITS MAINTAINERS README README.O2CB debugfs.ocfs2/README \
-		documentation/users_guide.txt documentation/samples/cluster.conf \
-		documentation/ocfs2_faq.txt "${FILESDIR}"/INSTALL.GENTOO \
-		vendor/common/o2cb.init vendor/common/o2cb.sysconfig
-
-	# Move programs not needed before /usr is mounted to /usr/sbin/
-	newinitd "${FILESDIR}"/ocfs2.init ocfs2
-	newconfd "${FILESDIR}"/ocfs2.conf ocfs2
-
-	insinto /etc/ocfs2
-	newins "${S}"/documentation/samples/cluster.conf cluster.conf
-}
-
-pkg_postinst() {
-	elog "Read ${ROOT}usr/share/doc/${P}/INSTALL.GENTOO* for instructions"
-	elog "about how to install, configure and run ocfs2."
+		$(use_enable debug debug) \
+		$(use_enable debug debugexe) \
+		$(use_enable gtk ocfs2console) \
+		--enable-dynamic-fsck \
+		--enable-dynamic-ctl
 }



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sys-fs/ocfs2-tools/files/, sys-fs/ocfs2-tools/
@ 2011-06-22 15:17 Alexey Shvetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2011-06-22 15:17 UTC (permalink / raw
  To: gentoo-commits

commit:     6548fa4ba584a16b1202ad1a938c6d8e7d0fa2d6
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 22 15:16:32 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Wed Jun 22 15:16:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6548fa4b

Update init.d

---
 sys-fs/ocfs2-tools/files/1.4.4-cpg.patch    |   31 -------
 sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch  |   21 -----
 sys-fs/ocfs2-tools/files/ocfs2.init         |  125 +++++++++++++++++++++++++++
 sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild |   58 ------------
 sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild |    5 +
 5 files changed, 130 insertions(+), 110 deletions(-)

diff --git a/sys-fs/ocfs2-tools/files/1.4.4-cpg.patch b/sys-fs/ocfs2-tools/files/1.4.4-cpg.patch
deleted file mode 100644
index 4832bf7..0000000
--- a/sys-fs/ocfs2-tools/files/1.4.4-cpg.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- ocfs2-tools-1.4.4-buggy/configure	2010-10-04 18:10:31.327238001 +0200
-+++ ocfs2-tools-1.4.4/configure	2010-10-05 10:27:52.607238001 +0200
-@@ -5534,7 +5534,12 @@
- echo $ECHO_N "checking for cpg_initialize in -lcpg... $ECHO_C" >&6
-     while test "x$TRY_PATH" != "x"; do
-         TRY="`echo $TRY_PATH | cut -f1 -d:`"
--        TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
-+        NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
-+        if test "x$NEW_TRY_PATH" != "x$TRY_PATH"; then
-+            TRY_PATH="$NEW_TRY_PATH"
-+        else
-+            TRY_PATH=""
-+        fi
- 
-         if test "x$TRY" != "x"; then
-             TRY="-L${TRY}/${cpg_package}"
-@@ -5680,7 +5685,13 @@
- echo $ECHO_N "checking for saCkptInitialize in -lSaCkpt... $ECHO_C" >&6
-     while test "x$TRY_PATH" != "x"; do
-         TRY="`echo $TRY_PATH | cut -f1 -d:`"
--        TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
-+        NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
-+        if test "x$NEW_TRY_PATH" != "x$TRY_PATH"; then
-+            TRY_PATH="$NEW_TRY_PATH"
-+        else
-+            TRY_PATH=""
-+        fi
-+	
- 
-         if test "x$TRY" != "x"; then
-             TRY="-L${TRY}/openais"

diff --git a/sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch b/sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch
deleted file mode 100644
index 0db24f4..0000000
--- a/sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN ocfs2-tools-1.4.3.orig//mount.ocfs2/mount.ocfs2.c ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c
---- ocfs2-tools-1.4.3.orig//mount.ocfs2/mount.ocfs2.c	2009-04-14 00:10:40.000000000 +0200
-+++ ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c	2010-03-24 07:23:45.000000000 +0100
-@@ -261,7 +261,7 @@
- 	char *extra = NULL;
- 	int dev_ro = 0;
- 	char *hbstr = NULL;
--	char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1] = "";
-+	char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1];
- 	ocfs2_filesys *fs = NULL;
- 	struct o2cb_cluster_desc cluster;
- 	struct o2cb_region_desc desc;
-@@ -269,6 +269,8 @@
- 	int hb_started = 0;
- 	struct stat statbuf;
- 
-+	stackstr[0] = '\0';
-+
- 	initialize_ocfs_error_table();
- 	initialize_o2dl_error_table();
- 	initialize_o2cb_error_table();

diff --git a/sys-fs/ocfs2-tools/files/ocfs2.init b/sys-fs/ocfs2-tools/files/ocfs2.init
new file mode 100644
index 0000000..631c9bf
--- /dev/null
+++ b/sys-fs/ocfs2-tools/files/ocfs2.init
@@ -0,0 +1,125 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+	need net localmount
+	before netmount 
+}
+
+check_modules_config() {
+	local MODULES=$1
+	local CONFIGS=$2
+	local MODULE
+	local retval=0
+	
+	for MODULE in ${MODULES}; do
+		if ! ls -1 /sys/module | egrep -q "^${MODULE}$"; then
+			retval=1
+		fi
+	done
+	if [ ${retval} -eq 1 ] && [ -e /proc/config.gz ]; then
+		retval=0
+		for MODULE in ${CONFIGS}; do
+			if ! gzip -dc /proc/config.gz | egrep -q "^CONFIG_${MODULE}=y$"; then
+				retval=1
+			fi
+		done
+	fi
+	return ${retval}
+}
+
+check_modules() {
+	check_modules_config "ocfs2_dlmfs ocfs2 ocfs2_dlm ocfs2_nodemanager" "OCFS2_FS OCFS2_FS_O2CB" && check_modules_config configfs CONFIGFS_FS && return 0
+	if ! egrep -q '\s*ocfs2\s*$' /proc/filesystems || ! egrep -q '\s*ocfs2_dlmfs\s*$' /proc/filesystems; then 
+		ewarn "One or more required modules are not loaded."
+                ewarn "Make sure you have "
+                ewarn " - placed ocfs, dlmfs and configfs into /etc/modules.autoload.d/kernel-2.6 or built directly into the kernel."
+                ewarn "For a (in)complete documentation, read /usr/share/doc/ocfs-<version>/INSTALL.GENTOO.bz2"
+	fi
+	return 1
+}
+
+check_pseudofs() { 
+	local retval=0
+	local HASMOUNT="mount -l -t"
+	if [ -z "`${HASMOUNT} configfs`" ] ; then
+		retval=1
+	fi
+	if [ -z "`${HASMOUNT} ocfs2_dlmfs`" ] ; then
+		retval=1
+	fi
+
+	if [ ${retval} -eq 1 ]; then
+		ewarn "One or more pseudo-filesystes are not mounted."
+		ewarn "Make sure you have following lines in your /etc/fstab:"
+		ewarn "none         /sys/kernel/config         configfs        defaults                0 0"
+		ewarn "none         /sys/kernel/dlm            ocfs2_dlmfs     defaults                0 0"
+	fi
+	return ${retval}
+}
+
+
+
+start() {
+	check_modules || return $? 
+	check_pseudofs || return $?
+	
+	einfo "Starting OCFS2 cluster"
+	for cluster in ${OCFS2_CLUSTER}; do
+		ebegin " - ${cluster}"
+		/sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=yes >/dev/null 2>&1
+		eend $?
+
+		# Some heartbeat tweaks to prevent self-fencing quite so much during heavy load.
+		# http://oss.oracle.com/projects/ocfs2/dist/documentation/ocfs2_faq.html
+
+		# How long to wait before a node is considered dead from lack of network activity.
+		echo $OCFS2_IDLE_TIMEOUT_MS > /sys/kernel/config/cluster/${cluster}/idle_timeout_ms
+		# How often we should attempt to send heartbeats.
+		echo $OCFS2_KEEPALIVE_DELAY_MS > /sys/kernel/config/cluster/${cluster}/keepalive_delay_ms
+		echo $OCFS2_RECONNECT_DELAY_MS > /sys/kernel/config/cluster/${cluster}/reconnect_delay_ms
+		# How many interations before a node is considered dead from lack of IO activity.
+		# (dead_threshold - 1) * 2s
+		echo $OCFS2_DEAD_THRESHOLD > /sys/kernel/config/cluster/${cluster}/heartbeat/dead_threshold
+	done
+	sleep 2
+}
+
+stop() {
+	# Shamelesly stolen from netmount
+        local ret
+        ebegin "Unmounting OCFS2 filesystems"
+        [ -z "$(umount -art ocfs2 2>&1)" ]
+        ret=$?
+        eend ${ret} "Failed to simply unmount filesystems"
+        [ ${ret} -eq 0 ] && return 0
+
+        declare -a siglist=( "TERM" "KILL" "KILL" )
+        local retry=0
+        local remaining="go"
+
+        while [ -n "${remaining}" -a ${retry} -lt 3 ]
+        do
+                remaining="$(awk '$3 ~ /'ocfs2'/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+                IFS=$'\n'
+                set -- ${remaining//\\040/ }
+                unset IFS
+                [ -z "${remaining}" ] && break
+
+                ebegin $'\t'"Unmounting ocfs2 filesystems (retry #$((retry+1)))"
+                /bin/fuser -k -${siglist[$((retry++))]} -m "$@" &>/dev/null
+                sleep 5
+                umount "$@" &>/dev/null
+                eend $? $'\t'"Failed to unmount filesystems"
+        done
+
+	
+	einfo "Stopping OCFS2 cluster" 
+	for cluster in ${OCFS_CLUSTERS}; do
+		ebegin " - ${cluster}"
+		/sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=no >/dev/null 2>&1
+		eend $?
+	done
+}

diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild b/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild
deleted file mode 100644
index 26aaeaf..0000000
--- a/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=3
-PYTHON_DEPEND="gtk? 2"
-inherit python base versionator
-
-DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2"
-HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/"
-SRC_URI="http://oss.oracle.com/projects/${PN}/dist/files/source/v$(get_version_component_range 1-2)/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug gtk"
-
-RDEPEND="
-	sys-apps/util-linux
-	sys-cluster/cman-lib
-	|| ( sys-cluster/corosync sys-cluster/openais )
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/readline
-	sys-process/psmisc
-	gtk? (
-		dev-python/pygtk
-	)
-"
-# 99% of deps this thing has is automagic
-# specialy cluster things corosync/pacemaker
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${PV}-gcc45.patch"
-	"${FILESDIR}/${PV}-cpg.patch"
-)
-
-DOCS=(
-	"${S}/documentation/samples/cluster.conf"
-	"${S}/documentation/users_guide.txt"
-)
-
-MAKEOPTS+=" -j1"
-
-pkg_setup() {
-	python_set_active_version 2
-	python_pkg_setup
-}
-
-src_configure() {
-	econf \
-		$(use_enable debug debug) \
-		$(use_enable debug debugexe) \
-		$(use_enable gtk ocfs2console) \
-		--enable-dynamic-fsck \
-		--enable-dynamic-ctl
-}

diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild b/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild
index bb85668..68e27a5 100644
--- a/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild
+++ b/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild
@@ -53,3 +53,8 @@ src_configure() {
 		--enable-dynamic-fsck \
 		--enable-dynamic-ctl
 }
+
+src_install() {
+	base-src_install
+	newinitd "${FILESDIR}/ocfs2.init"
+}



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sys-fs/ocfs2-tools/files/, sys-fs/ocfs2-tools/
@ 2011-07-14 15:51 Alexey Shvetsov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2011-07-14 15:51 UTC (permalink / raw
  To: gentoo-commits

commit:     39ec0f2e370a5fad70f1499f8350e4957f193303
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 15:51:44 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 15:51:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=39ec0f2e

Update ocfs2

(Portage version: 2.2.0_alpha45/git/Linux x86_64, signed Manifest commit with key F82F92E6)

---
 sys-fs/ocfs2-tools/files/ocfs2.confd               |   38 ++++++++++++++++++++
 .../ocfs2-tools/files/{ocfs2.init => ocfs2.initd}  |    0
 sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild        |    3 +-
 3 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/sys-fs/ocfs2-tools/files/ocfs2.confd b/sys-fs/ocfs2-tools/files/ocfs2.confd
new file mode 100644
index 0000000..5076bce
--- /dev/null
+++ b/sys-fs/ocfs2-tools/files/ocfs2.confd
@@ -0,0 +1,38 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/files/ocfs2.conf,v 1.1 2006/07/20 05:13:14 dberkholz Exp $
+
+# Put your cluster names here, separated by space, ie.
+# OCFS2_CLUSTER="cluster1 admincluster cluster2" 
+OCFS2_CLUSTER="home"
+
+# Some heartbeat tweaks to prevent self-fencing quite so much during heavy load.
+# http://oss.oracle.com/projects/ocfs2/dist/documentation/ocfs2_faq.html
+
+# How long to wait before a node is considered dead from lack of network activity.
+OCFS2_IDLE_TIMEOUT_MS="30000"
+# How often we should attempt to send heartbeats.
+OCFS2_KEEPALIVE_DELAY_MS="2000"
+OCFS2_RECONNECT_DELAY_MS="2000"
+# How often we should attempt to send heartbeats.
+# How many interations before a node is considered dead from lack of IO activity.
+# (dead_threshold - 1) * 2s
+OCFS2_DEAD_THRESHOLD="61"
+
+# Default: "-fy" (force check on double-unmounted boot). I beleave this is best.
+# Native way is "-y", but once I have twice reboot/powerOFF with bad result...
+# Affected only fstab.
+OCFS2_FSCK="-fy"
+
+# http://oss.oracle.com/projects/ocfs2-tools/news/article_8.html
+# starting from 1.4.3, fsck.ocfs2 "aggressively cache the metadata blocks"
+# this is useful on lots of free memory, but I have heavy slowdown on x86_64
+# with 1G of RAM.
+# "yes" will "swapoff -a" & "swapon -a" around fsck to avoid caching over swap
+OCFS2_FSCK_SWAPOFF="yes"
+
+# Signal to kill processes on stop/umount on busy device (empty to not kill)
+#OCFS2_UMOUNT_KILL="KILL"
+
+# "yes" to force stop
+#OCFS2_FORCE_STOP="no"

diff --git a/sys-fs/ocfs2-tools/files/ocfs2.init b/sys-fs/ocfs2-tools/files/ocfs2.initd
similarity index 100%
rename from sys-fs/ocfs2-tools/files/ocfs2.init
rename to sys-fs/ocfs2-tools/files/ocfs2.initd

diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild b/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild
index bd2d152..e84c4d3 100644
--- a/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild
+++ b/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild
@@ -63,5 +63,6 @@ src_configure() {
 
 src_install() {
 	emake DESTDIR="${D}" install || die
-	newinitd "${FILESDIR}/ocfs2.init" ocfs2  || die
+	newinitd "${FILESDIR}/ocfs2.initd" ocfs2  || die
+	newconfd "${FILESDIR}/ocfs2.confd" ocfs2  || die
 }



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-14 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-14 15:51 [gentoo-commits] proj/sci:master commit in: sys-fs/ocfs2-tools/files/, sys-fs/ocfs2-tools/ Alexey Shvetsov
  -- strict thread matches above, loose matches on Subject: below --
2011-06-22 15:17 Alexey Shvetsov
2011-06-22 13:49 Alexey Shvetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox