From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QZPB1-00028d-2g for garchives@archives.gentoo.org; Wed, 22 Jun 2011 15:17:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ACBAD1C05D; Wed, 22 Jun 2011 15:17:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5B6321C05D for ; Wed, 22 Jun 2011 15:17:02 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BBB801B4014 for ; Wed, 22 Jun 2011 15:17:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 25B378003C for ; Wed, 22 Jun 2011 15:17:01 +0000 (UTC) From: "Alexey Shvetsov" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexey Shvetsov" Message-ID: <6548fa4ba584a16b1202ad1a938c6d8e7d0fa2d6.alexxy@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sys-fs/ocfs2-tools/files/, sys-fs/ocfs2-tools/ X-VCS-Repository: proj/sci X-VCS-Files: sys-fs/ocfs2-tools/files/1.4.4-cpg.patch sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch sys-fs/ocfs2-tools/files/ocfs2.init sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild X-VCS-Directories: sys-fs/ocfs2-tools/files/ sys-fs/ocfs2-tools/ X-VCS-Committer: alexxy X-VCS-Committer-Name: Alexey Shvetsov X-VCS-Revision: 6548fa4ba584a16b1202ad1a938c6d8e7d0fa2d6 Date: Wed, 22 Jun 2011 15:17:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 56d96cffb791c50f95298cdd95749068 commit: 6548fa4ba584a16b1202ad1a938c6d8e7d0fa2d6 Author: Alexey Shvetsov gentoo org> AuthorDate: Wed Jun 22 15:16:32 2011 +0000 Commit: Alexey Shvetsov gentoo org> CommitDate: Wed Jun 22 15:16:32 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3D6548fa4b 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-tool= s/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 +020= 0 -+++ 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" !=3D "x"; do - TRY=3D"`echo $TRY_PATH | cut -f1 -d:`" -- TRY_PATH=3D"`echo $TRY_PATH | cut -f2- -d:`" -+ NEW_TRY_PATH=3D"`echo $TRY_PATH | cut -f2- -d:`" -+ if test "x$NEW_TRY_PATH" !=3D "x$TRY_PATH"; then -+ TRY_PATH=3D"$NEW_TRY_PATH" -+ else -+ TRY_PATH=3D"" -+ fi -=20 - if test "x$TRY" !=3D "x"; then - TRY=3D"-L${TRY}/${cpg_package}" -@@ -5680,7 +5685,13 @@ - echo $ECHO_N "checking for saCkptInitialize in -lSaCkpt... $ECHO_C" >&6 - while test "x$TRY_PATH" !=3D "x"; do - TRY=3D"`echo $TRY_PATH | cut -f1 -d:`" -- TRY_PATH=3D"`echo $TRY_PATH | cut -f2- -d:`" -+ NEW_TRY_PATH=3D"`echo $TRY_PATH | cut -f2- -d:`" -+ if test "x$NEW_TRY_PATH" !=3D "x$TRY_PATH"; then -+ TRY_PATH=3D"$NEW_TRY_PATH" -+ else -+ TRY_PATH=3D"" -+ fi -+=09 -=20 - if test "x$TRY" !=3D "x"; then - TRY=3D"-L${TRY}/openais" diff --git a/sys-fs/ocfs2-tools/files/1.4.4-gcc45.patch b/sys-fs/ocfs2-to= ols/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:4= 0.000000000 +0200 -+++ ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c 2010-03-24 07:23:45.0000= 00000 +0100 -@@ -261,7 +261,7 @@ - char *extra =3D NULL; - int dev_ro =3D 0; - char *hbstr =3D NULL; -- char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN = + 1] =3D ""; -+ char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN = + 1]; - ocfs2_filesys *fs =3D NULL; - struct o2cb_cluster_desc cluster; - struct o2cb_region_desc desc; -@@ -269,6 +269,8 @@ - int hb_started =3D 0; - struct stat statbuf; -=20 -+ stackstr[0] =3D '\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/fil= es/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=20 +} + +check_modules_config() { + local MODULES=3D$1 + local CONFIGS=3D$2 + local MODULE + local retval=3D0 +=09 + for MODULE in ${MODULES}; do + if ! ls -1 /sys/module | egrep -q "^${MODULE}$"; then + retval=3D1 + fi + done + if [ ${retval} -eq 1 ] && [ -e /proc/config.gz ]; then + retval=3D0 + for MODULE in ${CONFIGS}; do + if ! gzip -dc /proc/config.gz | egrep -q "^CONFIG_${MODULE}=3Dy$"; th= en + retval=3D1 + fi + done + fi + return ${retval} +} + +check_modules() { + check_modules_config "ocfs2_dlmfs ocfs2 ocfs2_dlm ocfs2_nodemanager" "O= CFS2_FS OCFS2_FS_O2CB" && check_modules_config configfs CONFIGFS_FS && re= turn 0 + if ! egrep -q '\s*ocfs2\s*$' /proc/filesystems || ! egrep -q '\s*ocfs2_= dlmfs\s*$' /proc/filesystems; then=20 + ewarn "One or more required modules are not loaded." + ewarn "Make sure you have " + ewarn " - placed ocfs, dlmfs and configfs into /etc/modu= les.autoload.d/kernel-2.6 or built directly into the kernel." + ewarn "For a (in)complete documentation, read /usr/share= /doc/ocfs-/INSTALL.GENTOO.bz2" + fi + return 1 +} + +check_pseudofs() {=20 + local retval=3D0 + local HASMOUNT=3D"mount -l -t" + if [ -z "`${HASMOUNT} configfs`" ] ; then + retval=3D1 + fi + if [ -z "`${HASMOUNT} ocfs2_dlmfs`" ] ; then + retval=3D1 + 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 default= s 0 0" + ewarn "none /sys/kernel/dlm ocfs2_dlmfs default= s 0 0" + fi + return ${retval} +} + + + +start() { + check_modules || return $?=20 + check_pseudofs || return $? +=09 + einfo "Starting OCFS2 cluster" + for cluster in ${OCFS2_CLUSTER}; do + ebegin " - ${cluster}" + /sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=3Dyes >/dev/null = 2>&1 + eend $? + + # Some heartbeat tweaks to prevent self-fencing quite so much during h= eavy load. + # http://oss.oracle.com/projects/ocfs2/dist/documentation/ocfs2_faq.ht= ml + + # How long to wait before a node is considered dead from lack of netwo= rk activity. + echo $OCFS2_IDLE_TIMEOUT_MS > /sys/kernel/config/cluster/${cluster}/id= le_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 I= O activity. + # (dead_threshold - 1) * 2s + echo $OCFS2_DEAD_THRESHOLD > /sys/kernel/config/cluster/${cluster}/hea= rtbeat/dead_threshold + done + sleep 2 +} + +stop() { + # Shamelesly stolen from netmount + local ret + ebegin "Unmounting OCFS2 filesystems" + [ -z "$(umount -art ocfs2 2>&1)" ] + ret=3D$? + eend ${ret} "Failed to simply unmount filesystems" + [ ${ret} -eq 0 ] && return 0 + + declare -a siglist=3D( "TERM" "KILL" "KILL" ) + local retry=3D0 + local remaining=3D"go" + + while [ -n "${remaining}" -a ${retry} -lt 3 ] + do + remaining=3D"$(awk '$3 ~ /'ocfs2'/ { if ($2 !=3D "/") pr= int $2 }' /proc/mounts | sort -r)" + IFS=3D$'\n' + set -- ${remaining//\\040/ } + unset IFS + [ -z "${remaining}" ] && break + + ebegin $'\t'"Unmounting ocfs2 filesystems (retry #$((ret= ry+1)))" + /bin/fuser -k -${siglist[$((retry++))]} -m "$@" &>/dev/n= ull + sleep 5 + umount "$@" &>/dev/null + eend $? $'\t'"Failed to unmount filesystems" + done + +=09 + einfo "Stopping OCFS2 cluster"=20 + for cluster in ${OCFS_CLUSTERS}; do + ebegin " - ${cluster}" + /sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=3Dno >/dev/null 2= >&1 + eend $? + done +} diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.4.4.ebuild b/sys-fs/ocfs2-t= ools/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=3D3 -PYTHON_DEPEND=3D"gtk? 2" -inherit python base versionator - -DESCRIPTION=3D"Support programs for the Oracle Cluster Filesystem 2" -HOMEPAGE=3D"http://oss.oracle.com/projects/ocfs2-tools/" -SRC_URI=3D"http://oss.oracle.com/projects/${PN}/dist/files/source/v$(get= _version_component_range 1-2)/${P}.tar.gz" - -LICENSE=3D"GPL-2" -SLOT=3D"0" -KEYWORDS=3D"~amd64 ~x86" -IUSE=3D"debug gtk" - -RDEPEND=3D" - 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=3D"${RDEPEND}" - -PATCHES=3D( - "${FILESDIR}/${PV}-gcc45.patch" - "${FILESDIR}/${PV}-cpg.patch" -) - -DOCS=3D( - "${S}/documentation/samples/cluster.conf" - "${S}/documentation/users_guide.txt" -) - -MAKEOPTS+=3D" -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-t= ools/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" +}