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/
Date: Tue, 11 Apr 2017 22:17:07
Message-Id: 1491948955.975e2664505ca843dd77aa957ef94618075ed897.chutzpah@gentoo
1 commit: 975e2664505ca843dd77aa957ef94618075ed897
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 11 22:15:30 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 11 22:15:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=975e2664
7
8 sys-cluster/ceph: Version bump to 10.2.7
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 sys-cluster/ceph/Manifest | 1 +
13 sys-cluster/ceph/ceph-10.2.7.ebuild | 292 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 293 insertions(+)
15
16 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
17 index 767fa7e7bb5..181c3c79f9a 100644
18 --- a/sys-cluster/ceph/Manifest
19 +++ b/sys-cluster/ceph/Manifest
20 @@ -2,4 +2,5 @@ DIST ceph-0.94.9.tar.gz 9044702 SHA256 d5bc07e7aef75f74d75f0356e5dd2a17956cbad6b
21 DIST ceph-10.2.3.tar.gz 11596171 SHA256 dca933aa14db67b404d836ef510bd418091978edc2f0c74dfc530ba0aa5e8994 SHA512 9de1e6851fc343d2c52c72cec3f7887d998d5b588f1251ee3a1fda14427badfa10408e6691fb03a374a10f4ec9844868423fee70fbbe2c0d962af98481412f19 WHIRLPOOL 981ebca66113a07a5cc6e5934272a72b29a2c19e03398f7b622c11df6ea0a05339558dfc2f11504403cbbd0efe0b090ad59f4b86206b46db57587744091aa26a
22 DIST ceph-10.2.5.tar.gz 14020700 SHA256 82dd4271f18eb7b84ff16f273a5250a4a9e809bfaccce5a1cca493416332d5f4 SHA512 4889aff38c8af781c2e3dce8f4ee51864db0a27c6294774345d2c1b047588ec31354ad41f799e2f0d0a966dc372d76c9bdbfb93f30a0718ea9d7c2b7a645d0f8 WHIRLPOOL 986a6ac35612a732d2a9a73277525679f9da729601c7e3f82b83e7e8ee2eb4245c98cdf5c4462ae1c789cb3d120a2c4a7eb9a3958b072db5e743b2c015269dfc
23 DIST ceph-10.2.6.tar.gz 14500365 SHA256 ad32c549d0ce6de581b5e1c6c7eba38e0f6658aaf8a91990e602f7c64c5e48c7 SHA512 c4321e27a6f8983f69435316c35858ab2b8b620cd80663a5471447c7489d867aef30b22541ca9648a7dcf9d931d04055e29d87dea3a6e94963fb360d06713dee WHIRLPOOL bd886105b47b6cfaeeff882f1d21d710442880c31a1943298db0904a453d67da71519c8fe5e1dd0377480b5413c90bf8ae4bed6bd99bfc53e4696f8b8031c23a
24 +DIST ceph-10.2.7.tar.gz 14518491 SHA256 2cdfeaa9a08e94c2d35f540b450bbf64b2a694bd537679834185e98fc59d8ba2 SHA512 7e0686e9efa4ddd9d548f4145b448f8232f1ca29b08428daa5cd60a74ce26f1176a1f2ebbf2ac1761d9e6c1d364a5ffa194d2b3a18a8111f59b7c27f7a1d7734 WHIRLPOOL b6b6902230401b5f4c6f27801f315678bdc7b99aab4e50b54d941fc3a425b4f0fa9390484f2e12d6b4f962253fb8772fb706dad35d490b4542b06db166fab59b
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.7.ebuild b/sys-cluster/ceph/ceph-10.2.7.ebuild
28 new file mode 100644
29 index 00000000000..35d1dad1bc9
30 --- /dev/null
31 +++ b/sys-cluster/ceph/ceph-10.2.7.ebuild
32 @@ -0,0 +1,292 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
38 +
39 +inherit check-reqs autotools eutils python-r1 udev user \
40 + readme.gentoo-r1 systemd versionator flag-o-matic
41 +
42 +if [[ ${PV} == *9999* ]]; then
43 + inherit git-r3
44 + EGIT_REPO_URI="
45 + git://github.com/ceph/ceph.git
46 + https://github.com/ceph/ceph.git"
47 + SRC_URI=""
48 +else
49 + SRC_URI="http://download.ceph.com/tarballs/${P}.tar.gz"
50 + KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
51 +fi
52 +
53 +DESCRIPTION="Ceph distributed filesystem"
54 +HOMEPAGE="http://ceph.com/"
55 +
56 +LICENSE="LGPL-2.1"
57 +SLOT="0"
58 +
59 +IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
60 +IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
61 +
62 +# unbundling code commented out pending bugs 584056 and 584058
63 +#>=dev-libs/jerasure-2.0.0-r1
64 +#>=dev-libs/gf-complete-2.0.0
65 +COMMON_DEPEND="
66 + app-arch/snappy
67 + app-arch/lz4:=
68 + app-arch/bzip2
69 + dev-libs/boost:=[threads]
70 + dev-libs/libaio
71 + dev-libs/leveldb[snappy]
72 + nss? ( dev-libs/nss )
73 + libatomic? ( dev-libs/libatomic_ops )
74 + cryptopp? ( dev-libs/crypto++:= )
75 + sys-apps/keyutils
76 + sys-apps/util-linux
77 + dev-libs/libxml2
78 + radosgw? ( dev-libs/fcgi )
79 + ldap? ( net-nds/openldap )
80 + babeltrace? ( dev-util/babeltrace )
81 + fuse? ( sys-fs/fuse )
82 + xfs? ( sys-fs/xfsprogs )
83 + zfs? ( sys-fs/zfs )
84 + gtk? (
85 + x11-libs/gtk+:2
86 + dev-cpp/gtkmm:2.4
87 + gnome-base/librsvg
88 + )
89 + radosgw? (
90 + dev-libs/fcgi
91 + dev-libs/expat
92 + net-misc/curl
93 + )
94 + jemalloc? ( dev-libs/jemalloc )
95 + !jemalloc? ( dev-util/google-perftools )
96 + lttng? ( dev-util/lttng-ust )
97 + ${PYTHON_DEPS}
98 + "
99 +DEPEND="${COMMON_DEPEND}
100 + dev-python/cython[${PYTHON_USEDEP}]
101 + app-arch/cpio
102 + virtual/pkgconfig
103 + dev-python/sphinx
104 + test? (
105 + sys-fs/btrfs-progs
106 + sys-apps/grep[pcre]
107 + dev-python/tox[${PYTHON_USEDEP}]
108 + dev-python/virtualenv[${PYTHON_USEDEP}]
109 + )"
110 +RDEPEND="${COMMON_DEPEND}
111 + sys-apps/hdparm
112 + sys-block/parted
113 + sys-fs/cryptsetup
114 + sys-apps/gptfdisk
115 + dev-python/flask[${PYTHON_USEDEP}]
116 + dev-python/requests[${PYTHON_USEDEP}]
117 + "
118 +REQUIRED_USE="
119 + $(python_gen_useflags 'python2*')
120 + ${PYTHON_REQUIRED_USE}
121 + ^^ ( nss cryptopp )
122 + ?? ( jemalloc tcmalloc )
123 + "
124 +
125 +# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
126 +REQUIRED_USE+=" radosgw"
127 +
128 +#RESTRICT="test? ( userpriv )"
129 +
130 +# distribution tarball does not include everything needed for tests
131 +RESTRICT+=" test"
132 +
133 +STRIP_MASK="/usr/lib*/rados-classes/*"
134 +
135 +UNBUNDLE_LIBS=(
136 + src/erasure-code/jerasure/jerasure
137 + src/erasure-code/jerasure/gf-complete
138 +)
139 +
140 +PATCHES=(
141 + "${FILESDIR}/ceph-10.2.0-dont-use-virtualenvs.patch"
142 + #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
143 + "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
144 + "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
145 + "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
146 + "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.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 ${CEPH_GID}
166 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
167 +}
168 +
169 +emake_python_bindings() {
170 + local action="${1}" params binding module
171 + shift
172 + params=("${@}")
173 +
174 + __emake_python_bindings_do_impl() {
175 + ceph_run_econf "${EPYTHON}"
176 + emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
177 +
178 + # these don't work and aren't needed on python3
179 + if [[ ${EBUILD_PHASE} == install ]]; then
180 + for module in "${S}"/src/pybind/*.py; do
181 + module_basename="$(basename "${module}")"
182 + if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
183 + continue
184 + elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
185 + python_domodule ${module}
186 + fi
187 + done
188 + fi
189 + }
190 +
191 + pushd "${S}/src"
192 + for binding in rados rbd $(use cephfs && echo cephfs); do
193 + python_foreach_impl __emake_python_bindings_do_impl
194 + done
195 + popd
196 +
197 + unset __emake_python_bindings_do_impl
198 +}
199 +
200 +pkg_pretend() {
201 + check-reqs_export_vars
202 + check-reqs_pkg_pretend
203 +}
204 +
205 +pkg_setup() {
206 + python_setup
207 + check-reqs_export_vars
208 + check-reqs_pkg_setup
209 + user_setup
210 +}
211 +
212 +src_prepare() {
213 + default
214 +
215 + # remove tests that need root access
216 + rm src/test/cli/ceph-authtool/cap*.t
217 +
218 + #rm -rf "${UNBUNDLE_LIBS[@]}"
219 +
220 + append-flags -fPIC
221 + eautoreconf
222 +}
223 +
224 +src_configure() {
225 + ECONFARGS=(
226 + --without-hadoop
227 + --includedir=/usr/include
228 + $(use_with cephfs)
229 + $(use_with debug)
230 + $(use_with fuse)
231 + $(use_with libaio)
232 + $(use_with libatomic libatomic-ops)
233 + $(use_with nss)
234 + $(use_with cryptopp)
235 + $(use_with radosgw)
236 + $(use_with gtk gtk2)
237 + $(use_enable static-libs static)
238 + $(use_with jemalloc)
239 + $(use_with xfs libxfs)
240 + $(use_with zfs libzfs)
241 + $(use_with lttng )
242 + $(use_with babeltrace)
243 + $(use_with ldap openldap)
244 + $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
245 + --with-mon
246 + --with-eventfd
247 + --with-cython
248 + --without-kinetic
249 + --without-librocksdb
250 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
251 + )
252 +
253 + # we can only use python2.7 for building at the moment
254 + ceph_run_econf "python2*"
255 +}
256 +
257 +ceph_run_econf() {
258 + [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
259 + [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
260 +
261 + pushd "${S}" >/dev/null || die
262 + #
263 + # This generates a QA warning about running econf in src_compile
264 + # and src_install. Unfortunately the only other way to do this would
265 + # involve building all of for each python implementation times, which
266 + # wastes a _lot_ of CPU time and disk space. This hack will no longer
267 + # be needed with >=ceph-11.2.
268 + #
269 + python_setup "${1}"
270 + econf "${ECONFARGS[@]}"
271 +
272 + popd >/dev/null || die
273 +}
274 +
275 +src_compile() {
276 + emake
277 + emake_python_bindings all
278 +
279 + use test && emake check-local
280 +}
281 +
282 +src_test() {
283 + make check || die "make check failed"
284 +}
285 +
286 +src_install() {
287 + default
288 + emake_python_bindings install-exec "DESTDIR=\"${D}\""
289 +
290 + prune_libtool_files --all
291 +
292 + exeinto /usr/$(get_libdir)/ceph
293 + newexe src/init-ceph ceph_init.sh
294 +
295 + insinto /etc/logrotate.d/
296 + newins "${FILESDIR}"/ceph.logrotate ${PN}
297 +
298 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
299 +
300 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
301 +
302 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
303 + newinitd "${FILESDIR}/${PN}.initd-r4" ${PN}
304 + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
305 +
306 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
307 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
308 + systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
309 +
310 + udev_dorules udev/*.rules
311 +
312 + readme.gentoo_create_doc
313 +
314 + python_setup 'python2*'
315 + python_fix_shebang "${ED}"/usr/{,s}bin/
316 +
317 + # python_fix_shebang apparently is not idempotent
318 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
319 + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
320 +}
321 +
322 +pkg_postinst() {
323 + readme.gentoo_print_elog
324 +}