summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/moosefs
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/moosefs')
-rw-r--r--sys-cluster/moosefs/Manifest2
-rw-r--r--sys-cluster/moosefs/files/mfs.confd11
-rw-r--r--sys-cluster/moosefs/files/mfs.initd-r196
-rw-r--r--sys-cluster/moosefs/files/mfscgiserver.confd9
-rw-r--r--sys-cluster/moosefs/files/mfscgiserver.initd-r129
-rw-r--r--sys-cluster/moosefs/metadata.xml13
-rw-r--r--sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild67
-rw-r--r--sys-cluster/moosefs/moosefs-1.6.27.ebuild67
8 files changed, 294 insertions, 0 deletions
diff --git a/sys-cluster/moosefs/Manifest b/sys-cluster/moosefs/Manifest
new file mode 100644
index 000000000000..70391b477fee
--- /dev/null
+++ b/sys-cluster/moosefs/Manifest
@@ -0,0 +1,2 @@
+DIST mfs-1.6.26.tar.gz 754573 SHA256 f250f97c6f2a229277fdbf9fe96036873fd6c95a38f484f06e6b87a404c01885 SHA512 42fdf2b43f3d4a81068ecad48da5519adbc9fb753931198f48741e6d7235b80864ee7d8e3c04b5de2e9536be9459b72e3a5b12037adfdb97bf2a7695595e9ec5 WHIRLPOOL 234ea32360db89076d1c1da5875d28277c27a5989195c4fb638b44c86fca0df183c2bb62a73dd3e3e2a5118e04223f8e14b66da5b5a090fed1c1d3f3dae3888a
+DIST mfs-1.6.27-1.tar.gz 771983 SHA256 dfe682f0b184ed13e602274825148cd9a7ddfe4f0894e1ab9c1823f66208cb28 SHA512 8e222c0741b09206e7fb6c792d679d2defa4d7f4de4c20551c236453604153fdb6e5ec049c14c675a80afa2d9df283bb4eb2e407f70cd55dbe204c325a473d59 WHIRLPOOL fb0823daf4947157936f2a59b3c7848ab91f480b02f6c49ac88f14abc877fa6a8f7de97724e675a326c4acb634b9701bdb5f0f39db2db35375500f941ea7ee56
diff --git a/sys-cluster/moosefs/files/mfs.confd b/sys-cluster/moosefs/files/mfs.confd
new file mode 100644
index 000000000000..423795e33355
--- /dev/null
+++ b/sys-cluster/moosefs/files/mfs.confd
@@ -0,0 +1,11 @@
+# Which mooseFS roles should we start ?
+#
+# NOTE: The roles are stopped in *reverse* order of the given list
+# so make sure to list mfsmaster *before* the other roles.
+#
+# Possible values: mfsmaster mfsmetalogger mfschunkserver
+#ROLES=""
+
+# If the role mfsmaster fails to start, should we try to run mfsmetarestore -a ?
+# Possible values: 0 (no), 1 (yes)
+AUTORESTORE=0 \ No newline at end of file
diff --git a/sys-cluster/moosefs/files/mfs.initd-r1 b/sys-cluster/moosefs/files/mfs.initd-r1
new file mode 100644
index 000000000000..9c9e7a39b7ba
--- /dev/null
+++ b/sys-cluster/moosefs/files/mfs.initd-r1
@@ -0,0 +1,96 @@
+#!/sbin/runscript
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+chkconfig() {
+ [ -z "${ROLES}" ] && { eerror "No role defined !"; return 1;}
+ for ROLE in ${ROLES}; do
+ if [ ! -f /etc/mfs/${ROLE}.cfg ]; then
+ eerror "Missing configuration file for role ${ROLE} !"
+ return 1
+ fi
+ done
+ return 0
+}
+
+autorestore() {
+ einfo "AUTORESTORE set, trying to restore metadata files"
+ mfsmetarestore -a &>/dev/null
+ return $?
+}
+
+start_role() {
+ local ROLE=$1
+ local RETURN=0
+
+ ebegin "${ROLE}"
+ start-stop-daemon -q --start --exec "${ROLE}" -- start >/dev/null
+ RETURN=$?
+ eend ${RETURN}
+
+ return ${RETURN}
+}
+
+start_roles() {
+ local RETURN=0
+
+ eindent
+ for ROLE in ${ROLES}; do
+
+ start_role ${ROLE} || RETURN=$?
+ eend ${RETURN}
+
+ if [ "${RETURN}" != "0" ] && [ "${ROLE}" == "mfsmaster" ] && [ ${AUTORESTORE} -eq 1 ]; then
+ eindent
+ autorestore && start_role ${ROLE}
+ RETURN=$?
+ eoutdent
+ fi
+
+ [ "${RETURN}" != "0" ] && break
+ done
+ eoutdent
+
+ return ${RETURN}
+}
+
+start() {
+ ebegin "Starting mfs node"
+ chkconfig && start_roles
+ eend $?
+}
+
+stop() {
+ local RETURN=0
+
+ ebegin "Stopping mfs node"
+ eindent
+ local REVERSE=$(echo ${ROLES} | tac -s' ')
+ for ROLE in ${REVERSE}; do
+ ebegin "${ROLE}"
+ start-stop-daemon -q --stop -n ${ROLE} || RETURN=$?
+ eend ${RETURN}
+ done
+ eoutdent
+
+ eend ${RETURN}
+}
+
+reload() {
+ local RETURN=0
+
+ ebegin "Reloading mfs node"
+ eindent
+ for ROLE in ${ROLES}; do
+ ebegin "${ROLE}"
+ start-stop-daemon --signal HUP -n ${ROLE}
+ eend ${RETURN}
+ done
+ eoutdent
+
+ eend ${RETURN}
+}
diff --git a/sys-cluster/moosefs/files/mfscgiserver.confd b/sys-cluster/moosefs/files/mfscgiserver.confd
new file mode 100644
index 000000000000..ae93c54f4f94
--- /dev/null
+++ b/sys-cluster/moosefs/files/mfscgiserver.confd
@@ -0,0 +1,9 @@
+# MooseFS HTTP/CGI server configuration.
+
+# BIND_HOST: local address to listen on
+# default: any
+BIND_HOST="0.0.0.0"
+
+# BIND_PORT: port to listen on
+# default: 9425
+BIND_PORT=9425
diff --git a/sys-cluster/moosefs/files/mfscgiserver.initd-r1 b/sys-cluster/moosefs/files/mfscgiserver.initd-r1
new file mode 100644
index 000000000000..b4ebd1f9d1c2
--- /dev/null
+++ b/sys-cluster/moosefs/files/mfscgiserver.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/mfscgiserv.pid
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting mfs CGI server"
+ start-stop-daemon --start --quiet --exec /usr/sbin/mfscgiserv \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ -- -H ${BIND_HOST} -P ${BIND_PORT} -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mfs CGI server"
+ start-stop-daemon --stop -q --pidfile "${PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading mfs CGI server"
+ start-stop-daemon --signal HUP --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/sys-cluster/moosefs/metadata.xml b/sys-cluster/moosefs/metadata.xml
new file mode 100644
index 000000000000..a30ead46985e
--- /dev/null
+++ b/sys-cluster/moosefs/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <longdescription>MooseFS is a fault tolerant, network distributed file system.
+ It spreads data over several physical servers which are visible to the user as one resource.
+ For standard file operations MooseFS acts as other Unix-alike file systems
+ </longdescription>
+ <use>
+ <flag name="cgi">Install CGI server and scripts.</flag>
+ <flag name="fuse">Install the mfsmount utility.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild b/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild
new file mode 100644
index 000000000000..485bc8020c98
--- /dev/null
+++ b/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 user
+
+MY_P="mfs-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="A filesystem for highly reliable petabyte storage"
+HOMEPAGE="http://www.moosefs.org/"
+SRC_URI="http://pro.hit.gemius.pl/hitredir/id=p4CVHPOzkVa0JJIK.m0Ee6dyHZEgoQb1KaiPmVK29EX.M7/url=moosefs.org/tl_files/mfscode/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cgi +fuse static-libs"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ cgi? ( dev-lang/python )
+ fuse? ( >=sys-fs/fuse-2.6 )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup mfs
+ enewuser mfs -1 -1 -1 mfs
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # rename dist config files
+ sed -i 's@\.cfg\.dist@\.cfg@g' mfsdata/Makefile.in || die
+}
+
+src_configure() {
+ local myopts=""
+ use fuse || myopts="--disable-mfsmount"
+ econf \
+ --sysconfdir=/etc/mfs \
+ --with-default-user=mfs \
+ --with-default-group=mfs \
+ $(use_enable cgi mfscgi) \
+ $(use_enable cgi mfscgiserv) \
+ $(use_enable static-libs static) \
+ ${myopts}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}/mfs.initd-r1" mfs
+ newconfd "${FILESDIR}/mfs.confd" mfs
+ if use cgi; then
+ python_fix_shebang "${D}"/usr/sbin/mfscgiserv
+ newinitd "${FILESDIR}/mfscgiserver.initd-r1" mfscgiserver
+ newconfd "${FILESDIR}/mfscgiserver.confd" mfscgiserver
+ fi
+
+ chown -R mfs:mfs "${D}/var/lib/mfs" || die
+ chmod 750 "${D}/var/lib/mfs" || die
+}
diff --git a/sys-cluster/moosefs/moosefs-1.6.27.ebuild b/sys-cluster/moosefs/moosefs-1.6.27.ebuild
new file mode 100644
index 000000000000..0e6cc344292c
--- /dev/null
+++ b/sys-cluster/moosefs/moosefs-1.6.27.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 user
+
+MY_P="mfs-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="A filesystem for highly reliable petabyte storage"
+HOMEPAGE="http://www.moosefs.org/"
+SRC_URI="http://pro.hit.gemius.pl/hitredir/id=.WCbG2t.7Ln5k1s3Q9xPg8cPfX.wVMc5kyXfrKcJTDH.c7/url=moosefs.org/tl_files/mfscode/${MY_P}-1.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cgi +fuse static-libs"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ cgi? ( dev-lang/python )
+ fuse? ( >=sys-fs/fuse-2.6 )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup mfs
+ enewuser mfs -1 -1 -1 mfs
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # rename dist config files
+ sed -i 's@\.cfg\.dist@\.cfg@g' mfsdata/Makefile.in || die
+}
+
+src_configure() {
+ local myopts=""
+ use fuse || myopts="--disable-mfsmount"
+ econf \
+ --sysconfdir=/etc/mfs \
+ --with-default-user=mfs \
+ --with-default-group=mfs \
+ $(use_enable cgi mfscgi) \
+ $(use_enable cgi mfscgiserv) \
+ $(use_enable static-libs static) \
+ ${myopts}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}/mfs.initd-r1" mfs
+ newconfd "${FILESDIR}/mfs.confd" mfs
+ if use cgi; then
+ python_fix_shebang "${D}"/usr/sbin/mfscgiserv
+ newinitd "${FILESDIR}/mfscgiserver.initd-r1" mfscgiserver
+ newconfd "${FILESDIR}/mfscgiserver.confd" mfscgiserver
+ fi
+
+ chown -R mfs:mfs "${D}/var/lib/mfs" || die
+ chmod 750 "${D}/var/lib/mfs" || die
+}