Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/
Date: Tue, 11 Oct 2016 21:57:29
Message-Id: 1476223036.37385b5e56b341e9cea2bd536104e3daff3a83c0.chutzpah@gentoo
1 commit: 37385b5e56b341e9cea2bd536104e3daff3a83c0
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 11 21:56:31 2016 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 11 21:57:16 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37385b5e
7
8 sys-cluster/ceph: Version bump to 10.2.3
9
10 Package-Manager: portage-2.3.1
11
12 sys-cluster/ceph/Manifest | 1 +
13 sys-cluster/ceph/ceph-10.2.3.ebuild | 262 +++++++++++++++++++++
14 .../files/ceph-10.2.3-build-without-openldap.patch | 32 +++
15 3 files changed, 295 insertions(+)
16
17 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
18 index 1a120d4..c21cf2a 100644
19 --- a/sys-cluster/ceph/Manifest
20 +++ b/sys-cluster/ceph/Manifest
21 @@ -1,3 +1,4 @@
22 DIST ceph-0.94.7.tar.gz 9164375 SHA256 aafe6cbab2f5db11376e5696a58d0711a90e93094a04eafe8d4d0910c8694d66 SHA512 e27631dceb01d59fab5fab22eaf7a8d0cbb474b44834a3b62bff4562e32723711431ee3ae66e2de26368b3b0e8f3619282a91c6934b88e722fcdfe6215bf8e68 WHIRLPOOL b2c0f5d26a1ffdfede29ec35cba6bf3c630cfcf0ea8d42542bcfc8ee36294d611c5316ff85e4ade9c8e1e66ad020cf5402bddcfa9557b29969ae6bb9a3870b60
23 DIST ceph-10.2.2.tar.gz 11541035 SHA256 7adaaeffb5a787108b5e1494df9165b6420069c0ab710e6e4aad185f423b0f6d SHA512 b47138528af3078646b52e9ea9a561eca4120473e7584c9076e949f0e9bbbdd15aa88e2287a90bd1ddb09d06c29c40181c18da58f5126a442101169ef3419b8a WHIRLPOOL f744444f2064832cba46065bd0fe64996c92bf8ed7888c075dffa9efe1d84393bd2204b38cefe11d0804ea862d0f2ff2d114ea205ff163d60e061e2e4a01db15
24 +DIST ceph-10.2.3.tar.gz 11596171 SHA256 dca933aa14db67b404d836ef510bd418091978edc2f0c74dfc530ba0aa5e8994 SHA512 9de1e6851fc343d2c52c72cec3f7887d998d5b588f1251ee3a1fda14427badfa10408e6691fb03a374a10f4ec9844868423fee70fbbe2c0d962af98481412f19 WHIRLPOOL 981ebca66113a07a5cc6e5934272a72b29a2c19e03398f7b622c11df6ea0a05339558dfc2f11504403cbbd0efe0b090ad59f4b86206b46db57587744091aa26a
25 DIST ceph-9.2.1.tar.gz 9933444 SHA256 1918dfc3df80df5986c5b7ff6bc6c78064eef0f6c5e8269dba30e08c703a7c2f SHA512 1e84c1e2d64f4156a523658ed11552b045f75986922b7b7dbaf4719e73a0a6aadc71eb2b94ae363526f729534a592921a437468a41a3cea88c1b84e09de8505a WHIRLPOOL 3a0eb6712e5b0235707e86129e1d66f1184f50cd4980c30f6d8cc0e7dfd96d30b91177ed16dd7abf2ad4983c6a543eb91915f74f661f7d3e3c810b5b1d656aca
26
27 diff --git a/sys-cluster/ceph/ceph-10.2.3.ebuild b/sys-cluster/ceph/ceph-10.2.3.ebuild
28 new file mode 100644
29 index 00000000..0d4c758
30 --- /dev/null
31 +++ b/sys-cluster/ceph/ceph-10.2.3.ebuild
32 @@ -0,0 +1,262 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=6
38 +PYTHON_COMPAT=( python{2_7,3_{4,5}} )
39 +
40 +inherit check-reqs autotools eutils python-r1 udev user \
41 + readme.gentoo-r1 systemd versionator flag-o-matic
42 +
43 +if [[ ${PV} == *9999* ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="
46 + git://github.com/ceph/ceph.git
47 + https://github.com/ceph/ceph.git"
48 + SRC_URI=""
49 +else
50 + SRC_URI="http://ceph.com/download/${P}.tar.gz"
51 + KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
52 +fi
53 +
54 +DESCRIPTION="Ceph distributed filesystem"
55 +HOMEPAGE="http://ceph.com/"
56 +
57 +LICENSE="LGPL-2.1"
58 +SLOT="0"
59 +
60 +IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
61 +IUSE+=" libatomic lttng +nss +radosgw static-libs tcmalloc test xfs zfs"
62 +
63 +# unbundling code commented out pending bugs 584056 and 584058
64 +#>=dev-libs/jerasure-2.0.0-r1
65 +#>=dev-libs/gf-complete-2.0.0
66 +COMMON_DEPEND="
67 + app-arch/snappy
68 + app-arch/lz4:=
69 + app-arch/bzip2
70 + dev-libs/boost:=[threads]
71 + dev-libs/libaio
72 + dev-libs/leveldb[snappy]
73 + nss? ( dev-libs/nss )
74 + libatomic? ( dev-libs/libatomic_ops )
75 + cryptopp? ( dev-libs/crypto++:= )
76 + sys-apps/keyutils
77 + sys-apps/util-linux
78 + dev-libs/libxml2
79 + radosgw? ( dev-libs/fcgi )
80 + ldap? ( net-nds/openldap )
81 + babeltrace? ( dev-util/babeltrace )
82 + fuse? ( sys-fs/fuse )
83 + xfs? ( sys-fs/xfsprogs )
84 + zfs? ( sys-fs/zfs )
85 + gtk? (
86 + x11-libs/gtk+:2
87 + dev-cpp/gtkmm:2.4
88 + gnome-base/librsvg
89 + )
90 + radosgw? (
91 + dev-libs/fcgi
92 + dev-libs/expat
93 + net-misc/curl
94 + )
95 + jemalloc? ( dev-libs/jemalloc )
96 + !jemalloc? ( dev-util/google-perftools )
97 + lttng? ( dev-util/lttng-ust )
98 + ${PYTHON_DEPS}
99 + "
100 +DEPEND="${COMMON_DEPEND}
101 + dev-python/cython[${PYTHON_USEDEP}]
102 + app-arch/cpio
103 + sys-apps/lsb-release
104 + virtual/pkgconfig
105 + dev-python/sphinx
106 + test? (
107 + sys-fs/btrfs-progs
108 + sys-apps/grep[pcre]
109 + dev-python/tox[${PYTHON_USEDEP}]
110 + dev-python/virtualenv[${PYTHON_USEDEP}]
111 + )"
112 +RDEPEND="${COMMON_DEPEND}
113 + sys-apps/hdparm
114 + sys-block/parted
115 + sys-fs/cryptsetup
116 + sys-apps/gptfdisk
117 + dev-python/flask[${PYTHON_USEDEP}]
118 + dev-python/requests[${PYTHON_USEDEP}]
119 + "
120 +REQUIRED_USE="
121 + $(python_gen_useflags 'python2*')
122 + ${PYTHON_REQUIRED_USE}
123 + ^^ ( nss cryptopp )
124 + ?? ( jemalloc tcmalloc )
125 + "
126 +
127 +# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
128 +REQUIRED_USE+=" radosgw"
129 +
130 +RESTRICT="test? ( userpriv )"
131 +
132 +# distribution tarball does not include everything needed for tests
133 +RESTRICT+=" test"
134 +
135 +STRIP_MASK="/usr/lib*/rados-classes/*"
136 +
137 +UNBUNDLE_LIBS=(
138 + src/erasure-code/jerasure/jerasure
139 + src/erasure-code/jerasure/gf-complete
140 +)
141 +
142 +PATCHES=(
143 + "${FILESDIR}/ceph-10.2.0-dont-use-virtualenvs.patch"
144 + #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
145 + "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
146 + "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
147 +)
148 +
149 +check-reqs_export_vars() {
150 + if use debug; then
151 + CHECKREQS_DISK_BUILD="23G"
152 + CHECKREQS_DISK_USR="7G"
153 + elif use amd64; then
154 + CHECKREQS_DISK_BUILD="12G"
155 + CHECKREQS_DISK_USR="450M"
156 + else
157 + CHECKREQS_DISK_BUILD="1400M"
158 + CHECKREQS_DISK_USR="450M"
159 + fi
160 +
161 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
162 +}
163 +
164 +user_setup() {
165 + enewgroup ceph
166 + enewuser ceph -1 -1 /var/lib/ceph ceph
167 +}
168 +
169 +emake_python_bindings() {
170 + local action="${1}" params binding
171 + shift
172 + params=("${@}")
173 +
174 + __emake_python_bindings_do_impl() {
175 + emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
176 +
177 + # these don't work and aren't needed on python3
178 + if [[ ${EBUILD_PHASE} == install ]] && python_is_python3; then
179 + rm -f "${ED}/$(python_get_sitedir)"/ceph_{argparse,volume_client}.py
180 + fi
181 + }
182 +
183 + pushd "${S}/src"
184 + for binding in rados rbd $(use cephfs && echo cephfs); do
185 + python_foreach_impl __emake_python_bindings_do_impl
186 + done
187 + popd
188 +
189 + unset __emake_python_bindings_do_impl
190 +}
191 +
192 +pkg_pretend() {
193 + check-reqs_export_vars
194 + check-reqs_pkg_pretend
195 +}
196 +
197 +pkg_setup() {
198 + python_setup
199 + check-reqs_export_vars
200 + check-reqs_pkg_setup
201 + user_setup
202 +}
203 +
204 +src_prepare() {
205 + default
206 +
207 + # remove tests that need root access
208 + rm src/test/cli/ceph-authtool/cap*.t
209 +
210 + #rm -rf "${UNBUNDLE_LIBS[@]}"
211 +
212 + append-flags -fPIC
213 + eautoreconf
214 +}
215 +
216 +src_configure() {
217 + local myeconfargs=(
218 + --without-hadoop
219 + --includedir=/usr/include
220 + $(use_with cephfs)
221 + $(use_with debug)
222 + $(use_with fuse)
223 + $(use_with libaio)
224 + $(use_with libatomic libatomic-ops)
225 + $(use_with nss)
226 + $(use_with cryptopp)
227 + $(use_with radosgw)
228 + $(use_with gtk gtk2)
229 + $(use_enable static-libs static)
230 + $(use_with jemalloc)
231 + $(use_with xfs libxfs)
232 + $(use_with zfs libzfs)
233 + $(use_with lttng )
234 + $(use_with babeltrace)
235 + $(use_with ldap openldap)
236 + $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
237 + --with-mon
238 + --with-eventfd
239 + --with-cython
240 + --without-kinetic
241 + --without-librocksdb
242 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
243 + )
244 +
245 + # we can only use python2.7 for building at the moment
246 + python_export python2.7 PYTHON EPYTHON
247 + econf "${myeconfargs[@]}"
248 +}
249 +
250 +src_compile() {
251 + emake
252 + emake_python_bindings all
253 +
254 + use test && emake check-local
255 +}
256 +
257 +src_test() {
258 + make check || die "make check failed"
259 +}
260 +
261 +src_install() {
262 + default
263 + emake_python_bindings install-exec "DESTDIR=\"${D}\""
264 +
265 + prune_libtool_files --all
266 +
267 + exeinto /usr/$(get_libdir)/ceph
268 + newexe src/init-ceph ceph_init.sh
269 +
270 + insinto /etc/logrotate.d/
271 + newins "${FILESDIR}"/ceph.logrotate ${PN}
272 +
273 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
274 +
275 + fowners ceph:ceph /var/lib/ceph
276 +
277 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
278 + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
279 + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
280 +
281 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
282 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
283 + systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
284 +
285 + python_fix_shebang "${ED}"/usr/{,s}bin/
286 +
287 + udev_dorules udev/*.rules
288 +
289 + readme.gentoo_create_doc
290 +}
291 +
292 +pkg_postinst() {
293 + readme.gentoo_print_elog
294 +}
295
296 diff --git a/sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch b/sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch
297 new file mode 100644
298 index 00000000..ffc1645
299 --- /dev/null
300 +++ b/sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch
301 @@ -0,0 +1,32 @@
302 +diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc
303 +index c476129..cad54b8 100644
304 +--- a/src/rgw/librgw.cc
305 ++++ b/src/rgw/librgw.cc
306 +@@ -470,7 +470,11 @@ namespace rgw {
307 + const string& ldap_searchdn = store->ctx()->_conf->rgw_ldap_searchdn;
308 + const string& ldap_dnattr =
309 + store->ctx()->_conf->rgw_ldap_dnattr;
310 ++#ifdef HAVE_OPENLDAP
311 + std::string ldap_bindpw = parse_rgw_ldap_bindpw(store->ctx());
312 ++#else
313 ++ std::string ldap_bindpw;
314 ++#endif /* HAVE_OPENLDAP */
315 +
316 + ldh = new rgw::LDAPHelper(ldap_uri, ldap_binddn, ldap_bindpw.c_str(),
317 + ldap_searchdn, ldap_dnattr);
318 +diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
319 +index e9f24f3..7291e69 100644
320 +--- a/src/rgw/rgw_rest_s3.cc
321 ++++ b/src/rgw/rgw_rest_s3.cc
322 +@@ -3091,7 +3091,11 @@ void RGW_Auth_S3::init_impl(RGWRados* store)
323 + const string& ldap_searchdn = store->ctx()->_conf->rgw_ldap_searchdn;
324 + const string& ldap_dnattr =
325 + store->ctx()->_conf->rgw_ldap_dnattr;
326 ++#ifdef HAVE_OPENLDAP
327 + std::string ldap_bindpw = parse_rgw_ldap_bindpw(store->ctx());
328 ++#else
329 ++ std::string ldap_bindpw;
330 ++#endif /* HAVE_OPENLDAP */
331 +
332 + ldh = new rgw::LDAPHelper(ldap_uri, ldap_binddn, ldap_bindpw,
333 + ldap_searchdn, ldap_dnattr);