summaryrefslogtreecommitdiff
path: root/sys-cluster/moosefs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/moosefs
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/moosefs')
-rw-r--r--sys-cluster/moosefs/Manifest11
-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.xml16
-rw-r--r--sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild65
-rw-r--r--sys-cluster/moosefs/moosefs-1.6.27.ebuild65
8 files changed, 302 insertions, 0 deletions
diff --git a/sys-cluster/moosefs/Manifest b/sys-cluster/moosefs/Manifest
new file mode 100644
index 000000000000..62517a61c216
--- /dev/null
+++ b/sys-cluster/moosefs/Manifest
@@ -0,0 +1,11 @@
+AUX mfs.confd 368 SHA256 be22c70e7a40a5373d18bfe17ec5a692f50b914c5c044a121a83cfb90a680c43 SHA512 508b1d99befd1340d3685df3d548399789321edf7f73f11b32baa88291b65dfcba98436b6f85b1975924ae596b962c501391fd783562b12f7cc3862183646e56 WHIRLPOOL 9d566699211cb1acc4c59743bf42571755d472ddca54f06219205aa2a3a167e1f4760a16abf699659e23a941b720c3c6d1ede3bf7f25875a2d55acd16813568e
+AUX mfs.initd-r1 1526 SHA256 4c4428861838df08a02a259a1360442ba05ae8cef8db06f028f972743513d61e SHA512 01341b6c67adf7bb2503cbcfd9b039f704763ef5326c132e864ba7265b887a37bb3475b704878c5fb3a238ec46f69498adb5e6840e09ef695716369834131583 WHIRLPOOL e7e0296f3aed81086f2d2ce1896301b578059f5143153e31e17ac4a6d2044c999f85d5b40f513025d291b32ef51fe29bc5a3a6b884b0604a6ff4ff4fa80f7e41
+AUX mfscgiserver.confd 180 SHA256 23ccc3ee023543a162d6b4cfb1406922597b4cd744d35b6db1f4f7ea8bc138f6 SHA512 d0389a3200f3ccad16578970d7c0e4c649df8d35eb25b586ac23ad828d06ce9280a5b977174e7a1d03d67af28817fc35df5544e0190a159b3e7ad1aebb92cc7c WHIRLPOOL a36adaa149eb2314c315831d94998f5c1844510267e25c1e7f124c3a70dc9561d71c6f31d5ae316929fe561966d450c21c86737433ca3b8b314d00e0f6bdeaa3
+AUX mfscgiserver.initd-r1 543 SHA256 81d78d4a4127df523dee9151fe5bff6946267da00783bd7e29eb17bb4bcc901d SHA512 48697c15938f4781d0b2240daa3dfa5680af1d78c5dc8dc2f8a3dc7f4410dd9c251cfe0923b371bd1286508e624e52a4c9e466db41d7e8b06220f368cdc63d51 WHIRLPOOL 31fe0df97c5be31b4d59643639cf7a09d5605298fd797380e7d593264d737771063b0de803c2b51e1d72f359c2644e11021ac68ce0367b2e6bfb20d1a3a3e8e0
+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
+EBUILD moosefs-1.6.26-r1.ebuild 1533 SHA256 f27fcf3ac70b9f73e047f3bbd9761e3bde0f5b2dd1c87f4fe0f60f68a48d7e8d SHA512 04a26d39a9ecaec7639129aabb1f6d0d1fabf70a6d9fd30a7291f8e9756de5e61c115c32498e89aee1e4a302c0f6eea8cac2249480bf5e6548ebf09b47a3a791 WHIRLPOOL 5d08f7167f0718526f8791b0fc508983d7223a7fc2cac7bc178854a05624de4d56776af8ad45af4bac72a2b9331c3287518cc6e6fbde3524af73457ea54aaa1b
+EBUILD moosefs-1.6.27.ebuild 1535 SHA256 e328453d583976d83605d997903914df7399da95f730ae2bf48a81cbcdf51567 SHA512 7b3c51b9b649f03f15c0f85b2ecd6f78a384259d967512d3e29e0a1e2ae1ad7adb5abf4142bde1e5c75dbca81b39a68cef0fec2e506eff00cd3699c8acf39085 WHIRLPOOL 001bcc0d4ffecae5163368533a06c5211f1cd69ff25b39aadaa7fd7f588c4d8b64644d4c08eb89c7b190baa52e3b495c6999daaa15ce66094696571f466c3296
+MISC ChangeLog 2752 SHA256 d01ce80510d2e5618748403f57f828a25284fef1b38bf37e34a87680aec2d935 SHA512 c157916c700558df532941b36044368675d885bd1e54ebe391506c6268836aea86feb521ac0a8469172f5e364082d8a5fd1142951dea55ada7f055595bbe0c00 WHIRLPOOL bc1b140e02017b0b482b36462fdbf1680ed594612df535bf9a716595a23172b7cb02480c076ce3d17ff159eb6af7b4fbc81899f259c69bf3804a1745c2de26fd
+MISC ChangeLog-2015 1646 SHA256 acfa1cef55f5ab8f0dc6dd2c59469eae3ffbb235b73bf7df6165e7be7c8bc518 SHA512 e5cb884abd8c2f3bffebc211e5b49cedbcd6a82c08459ba76bb5b3c47d5a6a99cf3445504eae7acd3375488a44fd8972268bc73ae283842bfdf13cc86e54c1a2 WHIRLPOOL 90f52bdfe0f9f218de6f806433ef894b26b0b281f870f4986db58faf5cb8a85f5d0676070454561cbd7b3149a7cd8b4efa63d6f272f33cd011965ad00ec9b956
+MISC metadata.xml 657 SHA256 4b9ae0e6378993c64bb14a98c96b507b274ac5ad3a7f40579021e9ff55c67d26 SHA512 0557bc8c5bd3a63fdd08cd8da09e813cc3dff52b6d51292da5c797324cee2b393c2eae5aaedf5f82b0dafc614376f72be2a7e5ba75836189bb0302ab9924d3a4 WHIRLPOOL 41209ae4db6b56259f7f4a8e67c8f59b6599e10488ed64a4d0d3551a0d5abd30fe402483d700cd2c29a75eb2ed6511e71abd667b0af69b5361ea56f286f93e3d
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..89715bf310c9
--- /dev/null
+++ b/sys-cluster/moosefs/files/mfs.initd-r1
@@ -0,0 +1,96 @@
+#!/sbin/openrc-run
+
+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..d60cf8034cd5
--- /dev/null
+++ b/sys-cluster/moosefs/files/mfscgiserver.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+
+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..d42432463d97
--- /dev/null
+++ b/sys-cluster/moosefs/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cluster@gentoo.org</email>
+ <name>Gentoo Cluster Project</name>
+ </maintainer>
+ <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..cdcf22ba0780
--- /dev/null
+++ b/sys-cluster/moosefs/moosefs-1.6.26-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="
+ ${PYTHON_DEPS}
+ 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..87cbdf9bdb5b
--- /dev/null
+++ b/sys-cluster/moosefs/moosefs-1.6.27.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="
+ ${PYTHON_DEPS}
+ 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
+}