diff options
Diffstat (limited to 'sys-cluster/glusterfs')
-rw-r--r-- | sys-cluster/glusterfs/ChangeLog | 13 | ||||
-rw-r--r-- | sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el | 5 | ||||
-rw-r--r-- | sys-cluster/glusterfs/files/glusterfs-2.0.6-docdir.patch | 51 | ||||
-rw-r--r-- | sys-cluster/glusterfs/files/glusterfs-2.0.6-parallel-make.patch | 11 | ||||
-rw-r--r-- | sys-cluster/glusterfs/files/glusterfs.confd | 6 | ||||
-rw-r--r-- | sys-cluster/glusterfs/files/glusterfs.initd | 119 | ||||
-rw-r--r-- | sys-cluster/glusterfs/files/glusterfs.vim | 8 | ||||
-rw-r--r-- | sys-cluster/glusterfs/glusterfs-2.0.6.ebuild | 97 | ||||
-rw-r--r-- | sys-cluster/glusterfs/metadata.xml | 15 |
9 files changed, 325 insertions, 0 deletions
diff --git a/sys-cluster/glusterfs/ChangeLog b/sys-cluster/glusterfs/ChangeLog new file mode 100644 index 000000000000..ed3536c26e14 --- /dev/null +++ b/sys-cluster/glusterfs/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for sys-cluster/glusterfs +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/glusterfs/ChangeLog,v 1.1 2009/09/22 19:47:30 alexxy Exp $ + +*glusterfs-2.0.6 (22 Sep 2009) + + 22 Sep 2009; Alexey Shvetsov <alexxy@gentoo.org> + +files/50glusterfs-mode-gentoo.el, +glusterfs-2.0.6.ebuild, + +files/glusterfs-2.0.6-docdir.patch, + +files/glusterfs-2.0.6-parallel-make.patch, +files/glusterfs.confd, + +files/glusterfs.initd, +files/glusterfs.vim, +metadata.xml: + Version bump per bug #167955 + diff --git a/sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el b/sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el new file mode 100644 index 000000000000..c14b0d8de33b --- /dev/null +++ b/sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el @@ -0,0 +1,5 @@ + +;;; puppet-mode site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") +(autoload 'glusterfs-mode "glusterfs-mode" "Major mode for editing glusterfs manifests") diff --git a/sys-cluster/glusterfs/files/glusterfs-2.0.6-docdir.patch b/sys-cluster/glusterfs/files/glusterfs-2.0.6-docdir.patch new file mode 100644 index 000000000000..5e26f637b22a --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs-2.0.6-docdir.patch @@ -0,0 +1,51 @@ +From 6a17bb8523c4c7810bf7797371df22cfb259f7a7 Mon Sep 17 00:00:00 2001 +From: MATSUU Takuto <matsuu@gentoo.org> +Date: Sat, 16 May 2009 07:01:53 +0900 +Subject: [PATCH] Use the standard autoconf $docdir variable. + +--- + doc/examples/Makefile.am | 1 - + extras/Makefile.am | 3 +-- + extras/benchmarking/Makefile.am | 4 +--- + 3 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am +index b4c93f4..5296d83 100644 +--- a/doc/examples/Makefile.am ++++ b/doc/examples/Makefile.am +@@ -1,7 +1,6 @@ + EXTRA = README unify.vol replicate.vol stripe.vol protocol-client.vol protocol-server.vol posix-locks.vol trash.vol write-behind.vol io-threads.vol io-cache.vol read-ahead.vol filter.vol trace.vol + EXTRA_DIST = $(EXTRA) + +-docdir = $(datadir)/doc/$(PACKAGE_NAME) + Examplesdir = $(docdir)/examples + Examples_DATA = $(EXTRA) + +diff --git a/extras/Makefile.am b/extras/Makefile.am +index 9be3973..ea0b33d 100644 +--- a/extras/Makefile.am ++++ b/extras/Makefile.am +@@ -1,6 +1,5 @@ + +-docdir = $(datadir)/doc/glusterfs/ +-EditorModedir = $(docdir)/ ++EditorModedir = $(docdir) + EditorMode_DATA = glusterfs-mode.el glusterfs.vim + + SUBDIRS = init.d benchmarking +diff --git a/extras/benchmarking/Makefile.am b/extras/benchmarking/Makefile.am +index 04cc061..bfcc592 100644 +--- a/extras/benchmarking/Makefile.am ++++ b/extras/benchmarking/Makefile.am +@@ -1,7 +1,5 @@ + +-docdir = $(datadir)/doc/$(PACKAGE_NAME)/benchmarking +- +-benchmarkingdir = $(docdir) ++benchmarkingdir = $(docdir)/benchmarking + + benchmarking_DATA = rdd.c glfs-bm.c README launch-script.sh local-script.sh + +-- +1.6.3 + diff --git a/sys-cluster/glusterfs/files/glusterfs-2.0.6-parallel-make.patch b/sys-cluster/glusterfs/files/glusterfs-2.0.6-parallel-make.patch new file mode 100644 index 000000000000..fbe63330f03f --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs-2.0.6-parallel-make.patch @@ -0,0 +1,11 @@ +diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am +index 0609179..548ed3a 100644 +--- a/glusterfsd/src/Makefile.am ++++ b/glusterfsd/src/Makefile.am +@@ -20,5 +20,6 @@ uninstall-local: + install-data-local: + $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run + $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs ++ $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) + rm -f $(DESTDIR)$(sbindir)/glusterfs + ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs diff --git a/sys-cluster/glusterfs/files/glusterfs.confd b/sys-cluster/glusterfs/files/glusterfs.confd new file mode 100644 index 000000000000..257d0a887cff --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.confd @@ -0,0 +1,6 @@ +#glusterfsd_mountpoint="" +#glusterfsd_log="" +#glusterfsd_vol="" +#glusterfsd_port="" +#glusterfsd_transport="" +#glusterfsd_opts="" diff --git a/sys-cluster/glusterfs/files/glusterfs.initd b/sys-cluster/glusterfs/files/glusterfs.initd new file mode 100644 index 000000000000..6f0b61282d76 --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.initd @@ -0,0 +1,119 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/glusterfs/files/glusterfs.initd,v 1.1 2009/09/22 19:47:25 alexxy Exp $ + +if [[ "${SVCNAME}" != "glusterfs" ]] +then + GLUSTERFS_NAME="${SVCNAME#glusterfs.}" +else + GLUSTERFS_NAME="glusterfs" +fi + +GLUSTERFS_PIDFILE="/var/run/${SVCNAME}.pid" + +eval 'GLUSTERFS_LOGFILE="${'${GLUSTERFS_NAME}'_log:-/var/log/glusterfs/'${GLUSTERFS_NAME}'.log}"' +eval 'GLUSTERFS_VOLFILE="${'${GLUSTERFS_NAME}'_vol:-/etc/glusterfs/'${GLUSTERFS_NAME}'.vol}"' +eval 'GLUSTERFS_SERVER="${'${GLUSTERFS_NAME}'_server}"' +eval 'GLUSTERFS_PORT="${'${GLUSTERFS_NAME}'_port:-6996}"' +eval 'GLUSTERFS_TRANSPORT="${'${GLUSTERFS_NAME}'_transport:-socket}"' +eval 'GLUSTERFS_OPTS="${'${GLUSTERFS_NAME}'_opts}"' +eval 'GLUSTERFS_MOUNTPOINT="${'${GLUSTERFS_NAME}'_mountpoint}"' + +depend() { + need net openib net.ib0 + [[ -n "${GLUSTERFS_MOUNTPOINT}" ]] && need fuse + use dns + after firewall ntp-client ntpd +} + +checkconfig() { + if [[ -z "${GLUSTERFS_NAME}" ]] + then + eerror "The service name is not properly formatted." + return 1 + fi + + if [[ -z "${GLUSTERFS_SERVER}" ]] + then + if [[ -z "${GLUSTERFS_VOLFILE}" ]] + then + eerror "No GlusterFS volume file source has been defined. Edit /etc/conf.d/glusterfs" + eerror "and configure a volume file source for ${SVCNAME}." + return 1 + else + if [[ ! -f "${GLUSTERFS_VOLFILE}" ]] + then + eerror "Cannot find volume file: ${GLUSTERFS_VOLFILE}" + return 1 + fi + fi + fi + + if [[ -n "${GLUSTERFS_MOUNTPOINT}" && ! -d "${GLUSTERFS_MOUNTPOINT}" ]] + then + eerror "The mountpoint ${GLUSTERFS_MOUNTPOINT} does not exist." + return 1 + fi +} + +start() { + local status + + checkconfig || return 1 + + ebegin "Starting GlusterFS (${SVCNAME})" + eindent + + if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]] + then + einfo "Starting in server mode ..." + else + einfo "Starting in client mode. Mounting filesystem ..." + fi + + if [[ -n "${GLUSTERFS_SERVER}" ]] + then + einfo "Using server supplied volume file" + start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \ + --exec /usr/sbin/glusterfsd -- \ + --pid-file=${GLUSTERFS_PIDFILE} \ + --log-file=${GLUSTERFS_LOGFILE} \ + --volfile-server=${GLUSTERFS_SERVER} \ + --volfile-server-port=${GLUSTERFS_PORT} \ + --volfile-server-transport=${GLUSTERFS_TRANSPORT} \ + ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT} + status="$?" + else + einfo "Using local volume file" + start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \ + --exec /usr/sbin/glusterfsd -- \ + --pid-file=${GLUSTERFS_PIDFILE} \ + --log-file=${GLUSTERFS_LOGFILE} \ + --volfile=${GLUSTERFS_VOLFILE} \ + ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT} + status="$?" + fi + + eoutdent + eend ${status} +} + +stop() { + local status + + ebegin "Stopping GlusterFS (${SVCNAME})" + eindent + if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]] + then + einfo "Stopping server process ..." + start-stop-daemon --stop --pidfile ${GLUSTERFS_PIDFILE} + status="$?" + else + einfo "Unmounting ${GLUSTERFS_MOUNTPOINT} ..." + umount "${GLUSTERFS_MOUNTPOINT}" + status="$?" + fi + eoutdent + eend ${status} +} diff --git a/sys-cluster/glusterfs/files/glusterfs.vim b/sys-cluster/glusterfs/files/glusterfs.vim new file mode 100644 index 000000000000..bbb9cb1efa97 --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs.vim @@ -0,0 +1,8 @@ +if &compatible || v:version < 603 + finish +endif + + +" GlusterFS Volume files +au BufNewFile,BufRead *.vol + \ set filetype=glusterfs diff --git a/sys-cluster/glusterfs/glusterfs-2.0.6.ebuild b/sys-cluster/glusterfs/glusterfs-2.0.6.ebuild new file mode 100644 index 000000000000..bd60c1de3610 --- /dev/null +++ b/sys-cluster/glusterfs/glusterfs-2.0.6.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/glusterfs/glusterfs-2.0.6.ebuild,v 1.1 2009/09/22 19:47:30 alexxy Exp $ + +EAPI="2" + +inherit autotools elisp-common eutils multilib versionator + +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" +HOMEPAGE="http://www.gluster.org/" +SRC_URI="http://ftp.gluster.com/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="berkdb emacs +fuse static vim-syntax" +#IUSE="berkdb emacs +fuse infiniband static vim-syntax" + +DEPEND="berkdb? ( >=sys-libs/db-4.6.21 ) + emacs? ( virtual/emacs ) + fuse? ( >=sys-fs/fuse-2.7.0 )" +# infiniband? ( sys-cluster/libibverbs ) +RDEPEND="${DEPEND} + !net-fs/glusterfs" + +SITEFILE="50${PN}-mode-gentoo.el" + +src_prepare() { + epatch "${FILESDIR}/${P}-parallel-make.patch" + epatch "${FILESDIR}/${P}-docdir.patch" + eautoreconf || die "eautoreconf failed" +} + +src_configure() { + econf \ + $(use_enable berkdb bdb) \ + $(use_enable fuse fuse-client) \ + $(use_enable apache2 mod_glusterfs) \ + $(use_enable static) \ + --docdir=/usr/share/doc/${PF} \ + --localstatedir=/var || die +# $(use_enable infiniband ibverbs) \ +} + +src_compile() { + emake || die "Emake failed" + if use emacs ; then + elisp-compile extras/glusterfs-mode.el || die "elisp-compile failed" + fi +} + +src_install() { + emake DESTDIR="${D}" install || die + + if use emacs ; then + elisp-install ${PN} extras/glusterfs-mode.el* || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}/glusterfs.vim" || die + insinto /usr/share/vim/vimfiles/syntax; doins extras/glusterfs.vim || die + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS || die "dodoc failed" + + newinitd "${FILESDIR}/${PN}.initd" glusterfsd || die "newinitd failed" + newconfd "${FILESDIR}/${PN}.confd" glusterfsd || die "newconfd failed" + + keepdir /var/log/${PN} || die "keepdir failed" +} + +pkg_postinst() { + elog "The glusterfs startup script can be multiplexed." + elog "The default startup script uses /etc/conf.d/glusterfs to configure the" + elog "separate service. To create additional instances of the glusterfs service" + elog "simply create a symlink to the glusterfs startup script." + elog + elog "Example:" + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" + elog "You can now treat glusterfsd2 like any other service" + echo + elog "You can mount exported GlusterFS filesystems through /etc/fstab instead of" + elog "through a startup script instance. For more information visit:" + elog "http://www.gluster.org/docs/index.php/Mounting_a_GlusterFS_Volume" + echo + ewarn "You need to use a ntp client to keep the clocks synchronized across all" + ewarn "of your servers. Setup a NTP synchronizing service before attempting to" + ewarn "run GlusterFS." + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-cluster/glusterfs/metadata.xml b/sys-cluster/glusterfs/metadata.xml new file mode 100644 index 000000000000..b914459f7473 --- /dev/null +++ b/sys-cluster/glusterfs/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cluster</herd> + <maintainer> + <email>alexxy@gentoo.org</email> + <name>Alexey Shvetsov</name> + </maintainer> + <longdescription lang='en'> + GlusterFS is a cluster file-system capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. GlusterFS is based on a stackable user space design without compromising performance. + </longdescription> + <use> + <flag name='fuse'>Add FUSE mount helper</flag> + </use> +</pkgmetadata> |