Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/swift/
Date: Tue, 20 Feb 2018 04:37:27
Message-Id: 1519101433.378647adbd763e807fdc08c00790d4e779779df2.prometheanfire@gentoo
1 commit: 378647adbd763e807fdc08c00790d4e779779df2
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 20 04:31:02 2018 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 20 04:37:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=378647ad
7
8 sys-cluster/swift: QUEENS
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 sys-cluster/swift/swift-2018.1.9999.ebuild | 120 +++++++++++++++++++++++++++++
13 1 file changed, 120 insertions(+)
14
15 diff --git a/sys-cluster/swift/swift-2018.1.9999.ebuild b/sys-cluster/swift/swift-2018.1.9999.ebuild
16 new file mode 100644
17 index 00000000000..2cf086833fe
18 --- /dev/null
19 +++ b/sys-cluster/swift/swift-2018.1.9999.ebuild
20 @@ -0,0 +1,120 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +PYTHON_COMPAT=( python2_7 )
26 +
27 +inherit distutils-r1 eutils linux-info user
28 +
29 +DESCRIPTION="A highly available, distributed, and eventually consistent object/blob store"
30 +HOMEPAGE="https://launchpad.net/swift"
31 +if [[ ${PV} == *9999 ]];then
32 + inherit git-r3
33 + EGIT_REPO_URI="https://github.com/openstack/swift.git"
34 + EGIT_BRANCH="stable/pike"
35 +else
36 + SRC_URI="https://tarballs.openstack.org/${PN}/${P}.tar.gz"
37 + KEYWORDS="~amd64 ~arm64 ~x86"
38 +fi
39 +
40 +LICENSE="Apache-2.0"
41 +SLOT="0"
42 +IUSE="proxy account container object +memcached"
43 +REQUIRED_USE="|| ( proxy account container object )"
44 +
45 +CDEPEND=">=dev-python/pbr-1.8.0[${PYTHON_USEDEP}]"
46 +DEPEND="
47 + dev-python/setuptools[${PYTHON_USEDEP}]
48 + ${CDEPEND}"
49 +
50 +RDEPEND="
51 + ${CDEPEND}
52 + >=dev-python/dnspython-1.14.0:0[${PYTHON_USEDEP}]
53 + >=dev-python/eventlet-0.17.4[${PYTHON_USEDEP}]
54 + >=dev-python/greenlet-0.3.1[${PYTHON_USEDEP}]
55 + >=dev-python/netifaces-0.5[${PYTHON_USEDEP}]
56 + !~dev-python/netifaces-0.10.0[${PYTHON_USEDEP}]
57 + !~dev-python/netifaces-0.10.1[${PYTHON_USEDEP}]
58 + >=dev-python/pastedeploy-1.3.3[${PYTHON_USEDEP}]
59 + >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
60 + dev-python/pyxattr[${PYTHON_USEDEP}]
61 + >=dev-python/PyECLib-1.3.1[${PYTHON_USEDEP}]
62 + >=dev-python/cryptography-1.6.0[${PYTHON_USEDEP}]
63 + !~dev-python/cryptography-2.0[${PYTHON_USEDEP}]
64 + memcached? ( net-misc/memcached )
65 + net-misc/rsync[xattr]"
66 +
67 +pkg_pretend() {
68 + linux-info_pkg_setup
69 + CONFIG_CHECK="~EXT3_FS_XATTR ~SQUASHFS_XATTR ~CIFS_XATTR ~JFFS2_FS_XATTR
70 + ~TMPFS_XATTR ~UBIFS_FS_XATTR ~EXT2_FS_XATTR ~REISERFS_FS_XATTR ~EXT4_FS_XATTR
71 + ~ZFS"
72 + if linux_config_exists; then
73 + for module in ${CONFIG_CHECK}; do
74 + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled"
75 + done
76 + fi
77 +}
78 +
79 +pkg_setup() {
80 + enewuser swift
81 + enewgroup swift
82 +}
83 +
84 +src_prepare() {
85 + sed -i 's/xattr/pyxattr/g' requirements.txt || die
86 + sed -i '/^hacking/d' test-requirements.txt || die
87 + distutils-r1_python_prepare_all
88 +}
89 +
90 +src_test () {
91 + # https://bugs.launchpad.net/swift/+bug/1249727
92 + find . \( -name test_wsgi.py -o -name test_locale.py -o -name test_utils.py \) -delete || die
93 + SKIP_PIP_INSTALL=1 PBR_VERSION=0.6.0 sh .unittests || die
94 +}
95 +
96 +python_install_all() {
97 + distutils-r1_python_install_all
98 + keepdir /etc/swift
99 + insinto /etc/swift
100 +
101 + newins "etc/swift.conf-sample" "swift.conf"
102 + newins "etc/rsyncd.conf-sample" "rsyncd.conf"
103 + newins "etc/mime.types-sample" "mime.types-sample"
104 + newins "etc/memcache.conf-sample" "memcache.conf-sample"
105 + newins "etc/drive-audit.conf-sample" "drive-audit.conf-sample"
106 + newins "etc/dispersion.conf-sample" "dispersion.conf-sample"
107 +
108 + if use proxy; then
109 + newinitd "${FILESDIR}/swift-proxy.initd" "swift-proxy"
110 + newins "etc/proxy-server.conf-sample" "proxy-server.conf"
111 + if use memcached; then
112 + sed -i '/depend/a\
113 + need memcached' "${D}/etc/init.d/swift-proxy"
114 + fi
115 + fi
116 + if use account; then
117 + newinitd "${FILESDIR}/swift-account.initd" "swift-account"
118 + newins "etc/account-server.conf-sample" "account-server.conf"
119 + fi
120 + if use container; then
121 + newinitd "${FILESDIR}/swift-container.initd" "swift-container"
122 + newins "etc/container-server.conf-sample" "container-server.conf"
123 + fi
124 + if use object; then
125 + newinitd "${FILESDIR}/swift-object.initd" "swift-object"
126 + newins "etc/object-server.conf-sample" "object-server.conf"
127 + newins "etc/object-expirer.conf-sample" "object-expirer.conf"
128 + fi
129 +
130 + fowners root:swift "/etc/swift" || die "fowners failed"
131 + fperms 0750 /etc/swift
132 +}
133 +
134 +pkg_postinst() {
135 + elog "Openstack swift will default to using insecure http unless a"
136 + elog "certificate is created in /etc/swift/cert.crt and the associated key"
137 + elog "in /etc/swift/cert.key. These can be created with the following:"
138 + elog " * cd /etc/swift"
139 + elog " * openssl req -new -x509 -nodes -out cert.crt -keyout cert.key"
140 +}