diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 17:30:29 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 17:30:29 +0000 |
commit | 9690684e86b56906aad271df7ea0b3940a5ce41c (patch) | |
tree | 4bf939ef7c69dbb950891b45326060ce62226fdd /sys-fs | |
parent | Version bump. 1.0x.00 is scheduled to be removed soon. (diff) | |
download | gentoo-2-9690684e86b56906aad271df7ea0b3940a5ce41c.tar.gz gentoo-2-9690684e86b56906aad271df7ea0b3940a5ce41c.tar.bz2 gentoo-2-9690684e86b56906aad271df7ea0b3940a5ce41c.zip |
Version bump. 1.0x.00 is scheduled to be removed soon.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/gfs/ChangeLog | 11 | ||||
-rwxr-xr-x | sys-fs/gfs/files/gfs-1.0x.rc (renamed from sys-fs/gfs/files/gfs.rc) | 2 | ||||
-rwxr-xr-x | sys-fs/gfs/files/gfs-2.0x.rc | 177 | ||||
-rw-r--r-- | sys-fs/gfs/gfs-1.02.00-r1.ebuild | 12 | ||||
-rw-r--r-- | sys-fs/gfs/gfs-1.03.00.ebuild | 8 | ||||
-rw-r--r-- | sys-fs/gfs/gfs-1.04.00.ebuild | 8 | ||||
-rw-r--r-- | sys-fs/gfs/gfs-2.02.00.ebuild | 79 |
7 files changed, 280 insertions, 17 deletions
diff --git a/sys-fs/gfs/ChangeLog b/sys-fs/gfs/ChangeLog index 4660e676d730..bf3e6c15439b 100644 --- a/sys-fs/gfs/ChangeLog +++ b/sys-fs/gfs/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-fs/gfs -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/ChangeLog,v 1.29 2007/05/12 13:36:42 xmerlin Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/ChangeLog,v 1.30 2008/03/17 17:30:28 xmerlin Exp $ + +*gfs-2.02.00 (17 Mar 2008) + + 17 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org> +files/gfs-1.0x.rc, + +files/gfs-2.0x.rc, -files/gfs.rc, gfs-1.02.00-r1.ebuild, + gfs-1.03.00.ebuild, gfs-1.04.00.ebuild, +gfs-2.02.00.ebuild: + Version bump. 1.0x.00 is scheduled to be removed soon. 12 May 2007; Christian Zoffoli <xmerlin@gentoo.org> gfs-1.03.00.ebuild: Stable on x86. diff --git a/sys-fs/gfs/files/gfs.rc b/sys-fs/gfs/files/gfs-1.0x.rc index 601ee540b574..cf7dbccf6d3e 100755 --- a/sys-fs/gfs/files/gfs.rc +++ b/sys-fs/gfs/files/gfs-1.0x.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/files/gfs.rc,v 1.7 2005/06/14 09:46:46 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/files/gfs-1.0x.rc,v 1.1 2008/03/17 17:30:29 xmerlin Exp $ opts="${opts} mountall" diff --git a/sys-fs/gfs/files/gfs-2.0x.rc b/sys-fs/gfs/files/gfs-2.0x.rc new file mode 100755 index 000000000000..330e288778c6 --- /dev/null +++ b/sys-fs/gfs/files/gfs-2.0x.rc @@ -0,0 +1,177 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/files/gfs-2.0x.rc,v 1.1 2008/03/17 17:30:29 xmerlin Exp $ + +opts="${opts} mountall" + +depend() { + local myneed="cman" + local devices="$(awk '!/^#/ && $3 == "gfs" && $4 !~ /noauto/ {print $1 }' /etc/fstab)" + + if [ -n "${devices}" ]; then + local device="" + for device in ${devices}; do + if [ -n "$(echo "${device}" | awk '$1 ~ /\/dev\/gnbd/')" ]; then + myneed="${myneed} gnbd-client" + else + if [ -n "$(echo "${device}" | awk '$1 ~ /\/dev\/vg/')" ]; then + myneed="${myneed} clvmd" + fi + fi + done + fi + + use dns logger net + need ${myneed} +} + +mount_gfs_filesystems() { + local remaining="" + remaining="$(awk '!/^#/ && $3 == "gfs" { if ($4 !~ "noauto") print $1 }' /etc/fstab)" + + if [ -n "${remaining}" ]; then + + local device="" + local remaining_verified="" + + for device in ${remaining}; do + if [ -b ${device} ]; then + remaining_verified="${remaining_verified} ${device}" + else + ewarn "Block device ${device} not found!!" + fi + done + + if [ -n "${remaining_verified}" ]; then + einfo "Mounting GFS filesystems" + device="" + for device in ${remaining_verified}; do + local target="$(awk '!/^#/ && $3 == "gfs" && $1 == device { print $2 }' device=${device} /etc/fstab)" + local mounted="$(awk '$3 == "gfs" && $1 == device { print $2 }' device=${device} /proc/mounts)" + + # mount only filesystems not already mounted + if [ -z "${mounted}" ]; then + ebegin "--> mounting ${device} on ${target}" + mount -t gfs ${device} ${target} >/dev/null + eend $? + else + einfo "--> ${device} already mounted on ${target}" + eend 0 + fi + done + else + einfo "No GFS filesystems to automount" + fi + fi +} + + +umount_gfs_filesystems() { + local sig retry + local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)" + + if [ -n "${remaining}" ] + then + sig= + retry=3 + while [ -n "${remaining}" -a "${retry}" -gt 0 ] + do + if [ "${retry}" -lt 3 ] + then + ebegin "Unmounting GFS filesystems (retry)" + umount ${remaining} &>/dev/null + eend $? "Failed to unmount GFS filesystems this retry" + else + ebegin "Unmounting GFS filesystems" + umount ${remaining} &>/dev/null + eend $? "Failed to unmount GFS filesystems" + fi + remaining="$(awk '$3 == "gfs" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)" + [ -z "${remaining}" ] && break + /bin/fuser -k -m ${sig} ${remaining} &>/dev/null + sleep 5 + retry=$((${retry} -1)) + sig=-9 + done + fi +} + +load_modules() { + local module modules + modules=$1 + + for module in ${modules}; do + ebegin "Loading ${module} kernel module" + modprobe ${module} + eend $? "Failed to load ${module} kernel module" + done +} + +unload_modules() { + local module modules + modules=$1 + + for module in ${modules}; do + ebegin "Unloading ${module} kernel module" + modprobe -r ${module} + eend $? "Failed to unload ${module} kernel module" + done +} + +load_gfs_modules() { + local modules + + # detect cluster/locking manager cman+dlm or gulm ? + if [ -d /proc/cluster/config/cman ]; then + if [ ! -d /proc/cluster/lock_dlm ]; then + modules="${modules} lock_dlm" + fi + else + if [ ! -d /proc/cluster/lock_gulm ]; then + modules="${modules} lock_gulm" + fi + fi + if [ ! -f /proc/fs/gfs ]; then + modules="${modules} gfs" + fi + load_modules ${modules} +} + +unload_gfs_modules() { + if [ -f /proc/fs/gfs ]; then + modules="gfs lock_harness" + fi + if [ -d /proc/cluster/lock_dlm ]; then + modules="${modules} lock_dlm" + fi + if [ -d /proc/cluster/lock_gulm ]; then + modules="${modules} lock_gulm" + fi + unload_modules ${modules} +} + +mountall() { + mount_gfs_filesystems +} + +start() { + einfo "Starting gfs cluster:" + + if [ ! -f /etc/ntp.conf ] ; then + eerror "Please create /etc/ntp.conf" + eerror "Sample conf: /usr/share/ntp/ntp.conf" + eend 1 + fi + + load_gfs_modules + mount_gfs_filesystems +} + +stop() { + einfo "Stopping gfs cluster:" + + umount_gfs_filesystems + unload_gfs_modules +} + diff --git a/sys-fs/gfs/gfs-1.02.00-r1.ebuild b/sys-fs/gfs/gfs-1.02.00-r1.ebuild index 39ebe2464cf3..cbc1d5847ab9 100644 --- a/sys-fs/gfs/gfs-1.02.00-r1.ebuild +++ b/sys-fs/gfs/gfs-1.02.00-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-1.02.00-r1.ebuild,v 1.7 2007/07/13 05:15:33 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-1.02.00-r1.ebuild,v 1.8 2008/03/17 17:30:28 xmerlin Exp $ inherit eutils @@ -36,8 +36,8 @@ S="${WORKDIR}/${MY_P}/${PN}" src_unpack() { unpack ${A} - cd ${S} - epatch ${WORKDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die + cd "${S}" + epatch "${WORKDIR}"/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die } src_compile() { @@ -46,8 +46,8 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" keepdir /etc/cluster || die - newinitd ${FILESDIR}/${PN}.rc ${PN} || die + newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die } diff --git a/sys-fs/gfs/gfs-1.03.00.ebuild b/sys-fs/gfs/gfs-1.03.00.ebuild index d499e5568506..86dcf1e16987 100644 --- a/sys-fs/gfs/gfs-1.03.00.ebuild +++ b/sys-fs/gfs/gfs-1.03.00.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-1.03.00.ebuild,v 1.6 2007/07/13 05:15:33 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-1.03.00.ebuild,v 1.7 2008/03/17 17:30:28 xmerlin Exp $ CLUSTER_RELEASE="1.03.00" MY_P="cluster-${CLUSTER_RELEASE}" @@ -35,8 +35,8 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" keepdir /etc/cluster || die - newinitd ${FILESDIR}/${PN}.rc ${PN} || die + newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die } diff --git a/sys-fs/gfs/gfs-1.04.00.ebuild b/sys-fs/gfs/gfs-1.04.00.ebuild index 7c753b6a795b..79da46b4c70b 100644 --- a/sys-fs/gfs/gfs-1.04.00.ebuild +++ b/sys-fs/gfs/gfs-1.04.00.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-1.04.00.ebuild,v 1.2 2007/07/13 05:15:33 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-1.04.00.ebuild,v 1.3 2008/03/17 17:30:28 xmerlin Exp $ CLUSTER_RELEASE="1.04.00" MY_P="cluster-${CLUSTER_RELEASE}" @@ -35,8 +35,8 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" keepdir /etc/cluster || die - newinitd ${FILESDIR}/${PN}.rc ${PN} || die + newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die } diff --git a/sys-fs/gfs/gfs-2.02.00.ebuild b/sys-fs/gfs/gfs-2.02.00.ebuild new file mode 100644 index 000000000000..0c08b7fd2984 --- /dev/null +++ b/sys-fs/gfs/gfs-2.02.00.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-2.02.00.ebuild,v 1.1 2008/03/17 17:30:28 xmerlin Exp $ + +inherit eutils versionator + +CLUSTER_RELEASE="${PV}" +MY_P="cluster-${CLUSTER_RELEASE}" + +MAJ_PV="$(get_major_version)" +MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)" + +DESCRIPTION="Shared-disk cluster file system" +HOMEPAGE="http://sources.redhat.com/cluster/" +SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +#RDEPEND="=sys-cluster/gfs2-${CLUSTER_RELEASE}*" +RDEPEND="=sys-cluster/ccs-${CLUSTER_RELEASE}* + =sys-cluster/cman-${CLUSTER_RELEASE}* + =sys-cluster/fence-${CLUSTER_RELEASE}* + sys-fs/e2fsprogs" + +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}/${PN}" + +src_compile() { + (cd "${WORKDIR}"/${MY_P}; + ./configure \ + --cc=$(tc-getCC) \ + --cflags="-Wall" \ + --disable_kernel_check \ + --release_major="$MAJ_PV" \ + --release_minor="$MIN_PV" \ + ) || die "configure problem" + + # gfs now depeneds on gfs2, due to common mount command. + # to avoid a dependency on gfs2, we simply build its mount command twice + # and rename it + sed -i \ + -e '/ln -sf [u]\?mount.gfs2 [u]\?mount.gfs/d' \ + Makefile + + (cd "${WORKDIR}"/${MY_P}/gfs2/mount; + emake -j1 \ + ) || die "compile problem" + + # fix -ggdb CFLAGS + #sed -i \ + # -e '/-ggdb/d' \ + # libgfs/Makefile + + # fix the manual pages have executable bit + sed -i -e ' + /\tinstall -d/s/install/& -m 0755/; t + /\tinstall/s/install/& -m 0644/' \ + man/Makefile + + emake -j1 clean all || die "compile problem" +} + +src_install() { + emake DESTDIR="${D}" install || die "install problem" + + mv "${WORKDIR}"/${MY_P}/gfs2/mount/mount.gfs2 "${D}"/sbin/mount.gfs + mv "${WORKDIR}"/${MY_P}/gfs2/mount/umount.gfs2 "${D}"/sbin/umount.gfs + + keepdir /etc/cluster || die + newinitd "${FILESDIR}"/${PN}-2.0x.rc ${PN} || die + + if use doc ; then + dodoc "${WORKDIR}"/${MY_P}/doc/*.txt || die + fi +} |