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/files/, sys-cluster/ceph/
Date: Wed, 08 Mar 2017 22:57:06
Message-Id: 1489013806.81e655fb8e2d3a68f5d71745833dee66ce017ae4.chutzpah@gentoo
1 commit: 81e655fb8e2d3a68f5d71745833dee66ce017ae4
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 8 22:56:46 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 8 22:56:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81e655fb
7
8 sys-cluster/ceph: Version bump to 10.2.6
9
10 Package-Manager: Portage-2.3.4, Repoman-2.3.2
11
12 sys-cluster/ceph/Manifest | 1 +
13 sys-cluster/ceph/ceph-10.2.6.ebuild | 293 +++++++++++++++++++++
14 ...sgw-swift-clean-up-flush-newline-behavior.patch | 92 +++++++
15 3 files changed, 386 insertions(+)
16
17 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
18 index 793888de568..767fa7e7bb5 100644
19 --- a/sys-cluster/ceph/Manifest
20 +++ b/sys-cluster/ceph/Manifest
21 @@ -1,4 +1,5 @@
22 DIST ceph-0.94.9.tar.gz 9044702 SHA256 d5bc07e7aef75f74d75f0356e5dd2a17956cbad6bb552a1e96a0fabd80924050 SHA512 ef4bbcc4429e22a2d924fd52dc42f522d5327f67ee8c1781d7cf602c2932a485cb48db21bdc33e7c7fbc968eec59c17882ebb18e6405599e11a3abc248f1d376 WHIRLPOOL f348159e8d7dd5e1ac3810a51846f50f6cefdbc5fa4cd15c3127b1136eb960baca8ad8db33c78a5d6435720cf1e2c277e068d09f9b9dbcf0f8ad56d7ddd914dc
23 DIST ceph-10.2.3.tar.gz 11596171 SHA256 dca933aa14db67b404d836ef510bd418091978edc2f0c74dfc530ba0aa5e8994 SHA512 9de1e6851fc343d2c52c72cec3f7887d998d5b588f1251ee3a1fda14427badfa10408e6691fb03a374a10f4ec9844868423fee70fbbe2c0d962af98481412f19 WHIRLPOOL 981ebca66113a07a5cc6e5934272a72b29a2c19e03398f7b622c11df6ea0a05339558dfc2f11504403cbbd0efe0b090ad59f4b86206b46db57587744091aa26a
24 DIST ceph-10.2.5.tar.gz 14020700 SHA256 82dd4271f18eb7b84ff16f273a5250a4a9e809bfaccce5a1cca493416332d5f4 SHA512 4889aff38c8af781c2e3dce8f4ee51864db0a27c6294774345d2c1b047588ec31354ad41f799e2f0d0a966dc372d76c9bdbfb93f30a0718ea9d7c2b7a645d0f8 WHIRLPOOL 986a6ac35612a732d2a9a73277525679f9da729601c7e3f82b83e7e8ee2eb4245c98cdf5c4462ae1c789cb3d120a2c4a7eb9a3958b072db5e743b2c015269dfc
25 +DIST ceph-10.2.6.tar.gz 14500365 SHA256 ad32c549d0ce6de581b5e1c6c7eba38e0f6658aaf8a91990e602f7c64c5e48c7 SHA512 c4321e27a6f8983f69435316c35858ab2b8b620cd80663a5471447c7489d867aef30b22541ca9648a7dcf9d931d04055e29d87dea3a6e94963fb360d06713dee WHIRLPOOL bd886105b47b6cfaeeff882f1d21d710442880c31a1943298db0904a453d67da71519c8fe5e1dd0377480b5413c90bf8ae4bed6bd99bfc53e4696f8b8031c23a
26 DIST ceph-9.2.1.tar.gz 9933444 SHA256 1918dfc3df80df5986c5b7ff6bc6c78064eef0f6c5e8269dba30e08c703a7c2f SHA512 1e84c1e2d64f4156a523658ed11552b045f75986922b7b7dbaf4719e73a0a6aadc71eb2b94ae363526f729534a592921a437468a41a3cea88c1b84e09de8505a WHIRLPOOL 3a0eb6712e5b0235707e86129e1d66f1184f50cd4980c30f6d8cc0e7dfd96d30b91177ed16dd7abf2ad4983c6a543eb91915f74f661f7d3e3c810b5b1d656aca
27
28 diff --git a/sys-cluster/ceph/ceph-10.2.6.ebuild b/sys-cluster/ceph/ceph-10.2.6.ebuild
29 new file mode 100644
30 index 00000000000..ac3fbe53c5a
31 --- /dev/null
32 +++ b/sys-cluster/ceph/ceph-10.2.6.ebuild
33 @@ -0,0 +1,293 @@
34 +# Copyright 1999-2017 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
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://download.ceph.com/tarballs/${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 + virtual/pkgconfig
104 + dev-python/sphinx
105 + test? (
106 + sys-fs/btrfs-progs
107 + sys-apps/grep[pcre]
108 + dev-python/tox[${PYTHON_USEDEP}]
109 + dev-python/virtualenv[${PYTHON_USEDEP}]
110 + )"
111 +RDEPEND="${COMMON_DEPEND}
112 + sys-apps/hdparm
113 + sys-block/parted
114 + sys-fs/cryptsetup
115 + sys-apps/gptfdisk
116 + dev-python/flask[${PYTHON_USEDEP}]
117 + dev-python/requests[${PYTHON_USEDEP}]
118 + "
119 +REQUIRED_USE="
120 + $(python_gen_useflags 'python2*')
121 + ${PYTHON_REQUIRED_USE}
122 + ^^ ( nss cryptopp )
123 + ?? ( jemalloc tcmalloc )
124 + "
125 +
126 +# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
127 +REQUIRED_USE+=" radosgw"
128 +
129 +RESTRICT="test? ( userpriv )"
130 +
131 +# distribution tarball does not include everything needed for tests
132 +RESTRICT+=" test"
133 +
134 +STRIP_MASK="/usr/lib*/rados-classes/*"
135 +
136 +UNBUNDLE_LIBS=(
137 + src/erasure-code/jerasure/jerasure
138 + src/erasure-code/jerasure/gf-complete
139 +)
140 +
141 +PATCHES=(
142 + "${FILESDIR}/ceph-10.2.0-dont-use-virtualenvs.patch"
143 + #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
144 + "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
145 + "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
146 + "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
147 + "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
148 + "${FILESDIR}/${PN}-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch"
149 +)
150 +
151 +check-reqs_export_vars() {
152 + if use debug; then
153 + CHECKREQS_DISK_BUILD="23G"
154 + CHECKREQS_DISK_USR="7G"
155 + elif use amd64; then
156 + CHECKREQS_DISK_BUILD="12G"
157 + CHECKREQS_DISK_USR="450M"
158 + else
159 + CHECKREQS_DISK_BUILD="1400M"
160 + CHECKREQS_DISK_USR="450M"
161 + fi
162 +
163 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
164 +}
165 +
166 +user_setup() {
167 + enewgroup ceph ${CEPH_GID}
168 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
169 +}
170 +
171 +emake_python_bindings() {
172 + local action="${1}" params binding module
173 + shift
174 + params=("${@}")
175 +
176 + __emake_python_bindings_do_impl() {
177 + ceph_run_econf "${EPYTHON}"
178 + emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
179 +
180 + # these don't work and aren't needed on python3
181 + if [[ ${EBUILD_PHASE} == install ]]; then
182 + for module in "${S}"/src/pybind/*.py; do
183 + module_basename="$(basename "${module}")"
184 + if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
185 + continue
186 + elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
187 + python_domodule ${module}
188 + fi
189 + done
190 + fi
191 + }
192 +
193 + pushd "${S}/src"
194 + for binding in rados rbd $(use cephfs && echo cephfs); do
195 + python_foreach_impl __emake_python_bindings_do_impl
196 + done
197 + popd
198 +
199 + unset __emake_python_bindings_do_impl
200 +}
201 +
202 +pkg_pretend() {
203 + check-reqs_export_vars
204 + check-reqs_pkg_pretend
205 +}
206 +
207 +pkg_setup() {
208 + python_setup
209 + check-reqs_export_vars
210 + check-reqs_pkg_setup
211 + user_setup
212 +}
213 +
214 +src_prepare() {
215 + default
216 +
217 + # remove tests that need root access
218 + rm src/test/cli/ceph-authtool/cap*.t
219 +
220 + #rm -rf "${UNBUNDLE_LIBS[@]}"
221 +
222 + append-flags -fPIC
223 + eautoreconf
224 +}
225 +
226 +src_configure() {
227 + ECONFARGS=(
228 + --without-hadoop
229 + --includedir=/usr/include
230 + $(use_with cephfs)
231 + $(use_with debug)
232 + $(use_with fuse)
233 + $(use_with libaio)
234 + $(use_with libatomic libatomic-ops)
235 + $(use_with nss)
236 + $(use_with cryptopp)
237 + $(use_with radosgw)
238 + $(use_with gtk gtk2)
239 + $(use_enable static-libs static)
240 + $(use_with jemalloc)
241 + $(use_with xfs libxfs)
242 + $(use_with zfs libzfs)
243 + $(use_with lttng )
244 + $(use_with babeltrace)
245 + $(use_with ldap openldap)
246 + $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
247 + --with-mon
248 + --with-eventfd
249 + --with-cython
250 + --without-kinetic
251 + --without-librocksdb
252 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
253 + )
254 +
255 + # we can only use python2.7 for building at the moment
256 + ceph_run_econf "python2*"
257 +}
258 +
259 +ceph_run_econf() {
260 + [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
261 + [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
262 +
263 + pushd "${S}" >/dev/null || die
264 + #
265 + # This generates a QA warning about running econf in src_compile
266 + # and src_install. Unfortunately the only other way to do this would
267 + # involve building all of for each python implementation times, which
268 + # wastes a _lot_ of CPU time and disk space. This hack will no longer
269 + # be needed with >=ceph-11.2.
270 + #
271 + python_setup "${1}"
272 + econf "${ECONFARGS[@]}"
273 +
274 + popd >/dev/null || die
275 +}
276 +
277 +src_compile() {
278 + emake
279 + emake_python_bindings all
280 +
281 + use test && emake check-local
282 +}
283 +
284 +src_test() {
285 + make check || die "make check failed"
286 +}
287 +
288 +src_install() {
289 + default
290 + emake_python_bindings install-exec "DESTDIR=\"${D}\""
291 +
292 + prune_libtool_files --all
293 +
294 + exeinto /usr/$(get_libdir)/ceph
295 + newexe src/init-ceph ceph_init.sh
296 +
297 + insinto /etc/logrotate.d/
298 + newins "${FILESDIR}"/ceph.logrotate ${PN}
299 +
300 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
301 +
302 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
303 +
304 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
305 + newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
306 + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
307 +
308 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
309 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
310 + systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
311 +
312 + udev_dorules udev/*.rules
313 +
314 + readme.gentoo_create_doc
315 +
316 + python_setup 'python2*'
317 + python_fix_shebang "${ED}"/usr/{,s}bin/
318 +
319 + # python_fix_shebang apparently is not idempotent
320 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
321 + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
322 +}
323 +
324 +pkg_postinst() {
325 + readme.gentoo_print_elog
326 +}
327
328 diff --git a/sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch b/sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch
329 new file mode 100644
330 index 00000000000..3202de3cbe9
331 --- /dev/null
332 +++ b/sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch
333 @@ -0,0 +1,92 @@
334 +From 39848e41b7c517cc5faab1ccf77c2804fd7d2628 Mon Sep 17 00:00:00 2001
335 +From: Marcus Watts <mwatts@××××××.com>
336 +Date: Wed, 11 Jan 2017 00:06:15 -0500
337 +Subject: [PATCH] radosgw/swift: clean up flush / newline behavior.
338 +
339 +The current code emits a newline after swift errors, but fails
340 +to account for it when it calculates 'content-length'. This results in
341 +some clients (go github.com/ncw/swift) producing complaints about the
342 +unsolicited newline such as this,
343 + Unsolicited response received on idle HTTP channel starting with "\n"; err=<nil>
344 +
345 +This logic eliminates the newline on flush. This makes the content length
346 +calculation correct and eliminates the stray newline.
347 +
348 +There was already existing separator logic in the rgw plain formatter
349 +that can emit a newline at the correct point. It had been checking
350 +"len" to decide if previous data had been emitted, but that's reset to 0
351 +by flush(). So, this logic adds a new per-instance variable to separately
352 +track state that it emitted a previous item (and should emit a newline).
353 +
354 +Fixes: http://tracker.ceph.com/issues/18473
355 +Signed-off-by: Marcus Watts <mwatts@××××××.com>
356 +Signed-off-by: Matt Benjamin <mbenjamin@××××××.com>
357 +(cherry picked from commit 5f229d6a33eae4906f22cdb90941835e47ee9f02)
358 +---
359 + src/rgw/rgw_formats.cc | 11 +++++++----
360 + src/rgw/rgw_formats.h | 1 +
361 + 2 files changed, 8 insertions(+), 4 deletions(-)
362 +
363 +diff --git a/src/rgw/rgw_formats.cc b/src/rgw/rgw_formats.cc
364 +index 698ec96..61e9b66 100644
365 +--- a/src/rgw/rgw_formats.cc
366 ++++ b/src/rgw/rgw_formats.cc
367 +@@ -25,6 +25,7 @@ RGWFormatter_Plain::RGWFormatter_Plain(const bool ukv)
368 + : buf(NULL),
369 + len(0),
370 + max_len(0),
371 ++ wrote_something(false),
372 + min_stack_level(0),
373 + use_kv(ukv)
374 + {
375 +@@ -41,7 +42,7 @@ void RGWFormatter_Plain::flush(ostream& os)
376 + return;
377 +
378 + if (len) {
379 +- os << buf << "\n";
380 ++ os << buf;
381 + os.flush();
382 + }
383 +
384 +@@ -156,13 +157,14 @@ void RGWFormatter_Plain::dump_format_va(const char *name, const char *ns, bool q
385 + vsnprintf(buf, LARGE_SIZE, fmt, ap);
386 +
387 + const char *eol;
388 +- if (len) {
389 ++ if (wrote_something) {
390 + if (use_kv && entry.is_array && entry.size > 1)
391 + eol = ", ";
392 + else
393 + eol = "\n";
394 + } else
395 + eol = "";
396 ++ wrote_something = true;
397 +
398 + if (use_kv && !entry.is_array)
399 + write_data("%s%s: %s", eol, name, buf);
400 +@@ -268,10 +270,11 @@ void RGWFormatter_Plain::dump_value_int(const char *name, const char *fmt, ...)
401 + va_end(ap);
402 +
403 + const char *eol;
404 +- if (len)
405 ++ if (wrote_something) {
406 + eol = "\n";
407 +- else
408 ++ } else
409 + eol = "";
410 ++ wrote_something = true;
411 +
412 + if (use_kv && !entry.is_array)
413 + write_data("%s%s: %s", eol, name, buf);
414 +diff --git a/src/rgw/rgw_formats.h b/src/rgw/rgw_formats.h
415 +index 9df5251..1c5afd1 100644
416 +--- a/src/rgw/rgw_formats.h
417 ++++ b/src/rgw/rgw_formats.h
418 +@@ -56,6 +56,7 @@ class RGWFormatter_Plain : public Formatter {
419 + std::list<struct plain_stack_entry> stack;
420 + size_t min_stack_level;
421 + bool use_kv;
422 ++ bool wrote_something;
423 + };
424 +
425 + class RGWFormatterFlusher {