diff options
author | 2013-01-02 20:03:40 +0000 | |
---|---|---|
committer | 2013-01-02 20:03:40 +0000 | |
commit | c72d11dd17f1270f866a26ad221259032fe8f9e6 (patch) | |
tree | d548e79ba586095c49a867d674141fe18d749b3f /sys-cluster | |
parent | adding x86 to dev-python/nosexcover-1.0.7 as I tested it :D (diff) | |
download | gentoo-2-c72d11dd17f1270f866a26ad221259032fe8f9e6.tar.gz gentoo-2-c72d11dd17f1270f866a26ad221259032fe8f9e6.tar.bz2 gentoo-2-c72d11dd17f1270f866a26ad221259032fe8f9e6.zip |
initial add of sys-cluster/swift
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/swift/ChangeLog | 11 | ||||
-rw-r--r-- | sys-cluster/swift/files/swift-account.initd | 36 | ||||
-rw-r--r-- | sys-cluster/swift/files/swift-container.initd | 36 | ||||
-rw-r--r-- | sys-cluster/swift/files/swift-object.initd | 36 | ||||
-rw-r--r-- | sys-cluster/swift/files/swift-proxy.initd | 57 | ||||
-rw-r--r-- | sys-cluster/swift/metadata.xml | 20 | ||||
-rw-r--r-- | sys-cluster/swift/swift-1.7.4.ebuild | 117 |
7 files changed, 313 insertions, 0 deletions
diff --git a/sys-cluster/swift/ChangeLog b/sys-cluster/swift/ChangeLog new file mode 100644 index 000000000000..c61801683028 --- /dev/null +++ b/sys-cluster/swift/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sys-cluster/swift +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/ChangeLog,v 1.1 2013/01/02 20:03:40 prometheanfire Exp $ + +*swift-1.7.4 (31 Dec 2012) + + 31 Dec 2012; Matthew Thode <prometheanfire@gentoo.org> +swift-1.7.4.ebuild, + +files/swift-proxy-server.initd, +files/swift-storage-server.confd, + +files/swift-storage-server.initd, +metadata.xml: + initial add of openstack-swift + diff --git a/sys-cluster/swift/files/swift-account.initd b/sys-cluster/swift/files/swift-account.initd new file mode 100644 index 000000000000..8c49e5cd0c15 --- /dev/null +++ b/sys-cluster/swift/files/swift-account.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/files/swift-account.initd,v 1.1 2013/01/02 20:03:40 prometheanfire Exp $ + +COMMAND=/usr/bin/swift-init +PIDFILE=/var/run/swift/swift-account.pid + +depend() { + after net +} + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/account-server.conf ]; then + eerror "Missing required config file: /etc/swift/account-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- account start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- account stop + eend $? +} diff --git a/sys-cluster/swift/files/swift-container.initd b/sys-cluster/swift/files/swift-container.initd new file mode 100644 index 000000000000..2e2bbf9c90fd --- /dev/null +++ b/sys-cluster/swift/files/swift-container.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/files/swift-container.initd,v 1.1 2013/01/02 20:03:40 prometheanfire Exp $ + +COMMAND=/usr/bin/swift-init +PIDFILE=/var/run/swift/swift-container.pid + +depend() { + after net +} + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/container-server.conf ]; then + eerror "Missing required config file: /etc/swift/container-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- container start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- container stop + eend $? +} diff --git a/sys-cluster/swift/files/swift-object.initd b/sys-cluster/swift/files/swift-object.initd new file mode 100644 index 000000000000..2ec64f305586 --- /dev/null +++ b/sys-cluster/swift/files/swift-object.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/files/swift-object.initd,v 1.1 2013/01/02 20:03:40 prometheanfire Exp $ + +COMMAND=/usr/bin/swift-init +PIDFILE=/var/run/swift/swift-object.pid + +depend() { + after net +} + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/object-server.conf ]; then + eerror "Missing required config file: /etc/swift/object-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- object start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- object stop + eend $? +} diff --git a/sys-cluster/swift/files/swift-proxy.initd b/sys-cluster/swift/files/swift-proxy.initd new file mode 100644 index 000000000000..ca6e2f33e330 --- /dev/null +++ b/sys-cluster/swift/files/swift-proxy.initd @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/files/swift-proxy.initd,v 1.1 2013/01/02 20:03:40 prometheanfire Exp $ + +COMMAND=/usr/bin/swift-init +PIDFILE=/var/run/swift/swift-proxy.pid + +depend() { + after net +} + +opts="reload" + +checkconfig() { + if [ ! -r /etc/swift/swift.conf ]; then + eerror "Missing required config file: /etc/swift/swift.conf" + return 1 + fi + if [ ! -r /etc/swift/proxy-server.conf ]; then + eerror "Missing required config file: /etc/swift/proxy-server.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- proxy start + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- proxy stop + eend $? +} + +reload() { + checkconfig || return $? + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --quiet -i ${COMMAND} -- proxy reload + eend $? "Failed to reload ${SVCNAME}" +} + +restart() { + checkconfig || return $? + ebegin "Restarting ${SVCNAME}" + start-stop-daemon --quiet -i --pidfile ${PIDFILE} ${COMMAND} -- proxy restart + eend $? "Failed to restart ${SVCNAME}" +} + +status() { + start-stop-daemon --quiet -i ${COMMAND} -- proxy status + eend $? "Failed to get status for ${SVCNAME}" +} diff --git a/sys-cluster/swift/metadata.xml b/sys-cluster/swift/metadata.xml new file mode 100644 index 000000000000..8c0103c4f141 --- /dev/null +++ b/sys-cluster/swift/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="account">adds swift account support</flag> + <flag name="container">adds swift container suppport</flag> + <flag name="memcache">adds memcached support</flag> + <flag name="object">adds swift object support</flag> + <flag name="proxy">adds swift proxy support</flag> + </use> + <maintainer> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> + </maintainer> + <longdescription lang="en"> + Swift is a highly available, distributed, eventually consistent object/blob + store. + </longdescription> +</pkgmetadata> + diff --git a/sys-cluster/swift/swift-1.7.4.ebuild b/sys-cluster/swift/swift-1.7.4.ebuild new file mode 100644 index 000000000000..c226a8619d46 --- /dev/null +++ b/sys-cluster/swift/swift-1.7.4.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/swift/swift-1.7.4.ebuild,v 1.1 2013/01/02 20:03:40 prometheanfire Exp $ + +EAPI=5 +PYTHON_COMPAT=( python2_5 python2_6 python2_7 ) + +inherit distutils-r1 eutils linux-info + +DESCRIPTION="Swift is a highly available, distributed, eventually consistent +object/blob store" +HOMEPAGE="https://launchpad.net/swift" +SRC_URI="http://launchpad.net/${PN}/folsom/${PV}/+download/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="proxy account container object test +memcache" + +DEPEND="dev-python/setuptools + test? ( dev-python/nose + dev-python/coverage + dev-python/nosexcover + dev-python/pep8 + dev-python/mock + >=dev-python/sphinx-1.1.2 )" + +RDEPEND="dev-python/eventlet + dev-python/greenlet + dev-python/netifaces + dev-python/pastedeploy + dev-python/simplejson + dev-python/pyxattr + dev-python/configobj + dev-python/webob + >=dev-python/webob-1.0.8 + <dev-python/webob-1.3 + >=dev-python/python-swiftclient-1.2.0 + memcache? ( net-misc/memcached ) + net-misc/rsync" + +REQUIRED_USE="|| ( proxy account container object )" + +CONFIG_CHECK="~EXT3_FS_XATTR ~SQUASHFS_XATTR ~CIFS_XATTR ~JFFS2_FS_XATTR +~TMPFS_XATTR ~UBIFS_FS_XATTR ~EXT2_FS_XATTR ~REISERFS_FS_XATTR ~EXT4_FS_XATTR +~ZFS" + +src_test () { + sh .unittests || die +} + +pkg_setup() { + enewuser swift + enewgroup swift +} + +python_install() { + distutils-r1_python_install + keepdir /etc/swift + insinto /etc/swift + + newins "etc/swift.conf-sample" "swift.conf" + newins "etc/swift-bench.conf-sample" "swift-bench.conf-sample" + newins "etc/rsyncd.conf-sample" "rsyncd.conf" + newins "etc/mime.types-sample" "mime.types-sample" + newins "etc/memcache.conf-sample" "memcache.conf-sample" + newins "etc/drive-audit.conf-sample" "drive-audit.conf-sample" + newins "etc/dispersion.conf-sample" "dispersion.conf-sample" + + if use proxy; then + newinitd "${FILESDIR}/swift-proxy.initd" "swift-proxy" + newins "etc/proxy-server.conf-sample" "proxy-server.conf" + if use memcache; then + sed -i '/depend/a\ + need memcached' "${D}/etc/init.d/swift-proxy" + fi + fi + if use account; then + newinitd "${FILESDIR}/swift-account.initd" "swift-account" + newins "etc/account-server.conf-sample" "account-server.conf" + fi + if use container; then + newinitd "${FILESDIR}/swift-container.initd" "swift-container" + newins "etc/container-server.conf-sample" "container-server.conf" + fi + if use object; then + newinitd "${FILESDIR}/swift-object.initd" "swift-obect" + newins "etc/object-server.conf-sample" "object-server.conf" + newins "etc/object-expirer.conf-sample" "object-expirer.conf" + fi + + fowners swift:swift "/etc/swift" || die "fowners failed" +} + +pkg_postinst() { + elog "Openstack swift will default to using insecure http unless a" + elog "certificate is created in /etc/swift/cert.crt and the associated key" + elog "in /etc/swift/cert.key. These can be created with the following:" + elog " * cd /etc/swift" + elog " * openssl req -new -x509 -nodes -out cert.crt -keyout cert.key" +} + +#src_install() +#{ +# distutils_src_install +# +# dodir "/var/run/swift" +# +# if use proxy-server; then +# newinitd "${FILESDIR}/swift-proxy-server.initd" swift-proxy-server +# fi +# +# if use storage-server; then +# newinitd "${FILESDIR}/swift-storage-server.initd" swift-storage-server +# newconfd "${FILESDIR}/swift-storage-server.confd" swift-storage-server +# fi +#} |