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: Thu, 27 Jul 2017 21:27:23
Message-Id: 1501190781.e0fb92b870e098a3fe39c2ce2cf54fd56bdfe5d1.chutzpah@gentoo
1 commit: e0fb92b870e098a3fe39c2ce2cf54fd56bdfe5d1
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 27 21:20:09 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 27 21:26:21 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0fb92b8
7
8 sys-cluster/ceph: Version bump to 10.2.9
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 sys-cluster/ceph/Manifest | 1 +
13 sys-cluster/ceph/ceph-10.2.9.ebuild | 294 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 295 insertions(+)
15
16 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
17 index 797645c3fe5..c24494e69f6 100644
18 --- a/sys-cluster/ceph/Manifest
19 +++ b/sys-cluster/ceph/Manifest
20 @@ -4,4 +4,5 @@ DIST ceph-10.2.5.tar.gz 14020700 SHA256 82dd4271f18eb7b84ff16f273a5250a4a9e809bf
21 DIST ceph-10.2.6.tar.gz 14500365 SHA256 ad32c549d0ce6de581b5e1c6c7eba38e0f6658aaf8a91990e602f7c64c5e48c7 SHA512 c4321e27a6f8983f69435316c35858ab2b8b620cd80663a5471447c7489d867aef30b22541ca9648a7dcf9d931d04055e29d87dea3a6e94963fb360d06713dee WHIRLPOOL bd886105b47b6cfaeeff882f1d21d710442880c31a1943298db0904a453d67da71519c8fe5e1dd0377480b5413c90bf8ae4bed6bd99bfc53e4696f8b8031c23a
22 DIST ceph-10.2.7.tar.gz 14518491 SHA256 2cdfeaa9a08e94c2d35f540b450bbf64b2a694bd537679834185e98fc59d8ba2 SHA512 7e0686e9efa4ddd9d548f4145b448f8232f1ca29b08428daa5cd60a74ce26f1176a1f2ebbf2ac1761d9e6c1d364a5ffa194d2b3a18a8111f59b7c27f7a1d7734 WHIRLPOOL b6b6902230401b5f4c6f27801f315678bdc7b99aab4e50b54d941fc3a425b4f0fa9390484f2e12d6b4f962253fb8772fb706dad35d490b4542b06db166fab59b
23 DIST ceph-10.2.8.tar.gz 14548472 SHA256 f284743b007cbb61fc9849dc2249942886116c2cb2abcd346d2304d52b16eaaa SHA512 1f3bf81bf6745033e034c3c4e4f05db5c39b2e8435da20fc130971559e8fde0d640bf00bfaafb374d24c45f873e7d768ae9d7d8cd3388347f5804c4bfc303f09 WHIRLPOOL a8bf29ff913c08d423beb0fefa792c06a653d8ac00bd698b7f77bbaf4657f0530ad5a43043dabb24308ed5a4e569fec53130a78d78d8eddf16026a942de8cc40
24 +DIST ceph-10.2.9.tar.gz 14550219 SHA256 3d93f4fc4a66b1d9f9ce43f65868dc18287cea32fbb2c7421faca6aed2b52a80 SHA512 1d59146614aa87ca551b05b795a684071a3cfb4ce6013e978ba650403c6732b2aa13f3c3cc191e6a1ea34b4631c82e97700593c24e200c41ec2f2b43b3ef5547 WHIRLPOOL 42215d33c4f617087e1b0ef81cd41b42330c3605acf625b0668d44eba9e982239683b466a1cc1a6f926fc1d439dfd6be4ce220f783da7d2214d36a2a6cc9181f
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.9.ebuild b/sys-cluster/ceph/ceph-10.2.9.ebuild
28 new file mode 100644
29 index 00000000000..1dff5e6b0d1
30 --- /dev/null
31 +++ b/sys-cluster/ceph/ceph-10.2.9.ebuild
32 @@ -0,0 +1,294 @@
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 ~arm64 ~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 + sys-libs/zlib:=
68 + app-arch/lz4:=
69 + app-arch/bzip2:=
70 + app-arch/zstd:=
71 + dev-libs/boost:=[threads]
72 + dev-libs/libaio:=
73 + dev-libs/leveldb:=[snappy]
74 + nss? ( dev-libs/nss:= )
75 + libatomic? ( dev-libs/libatomic_ops:= )
76 + cryptopp? ( dev-libs/crypto++:= )
77 + sys-apps/keyutils
78 + sys-apps/util-linux
79 + dev-libs/libxml2:=
80 + radosgw? ( dev-libs/fcgi:= )
81 + ldap? ( net-nds/openldap:= )
82 + babeltrace? ( dev-util/babeltrace )
83 + fuse? ( sys-fs/fuse:0= )
84 + xfs? ( sys-fs/xfsprogs:= )
85 + zfs? ( sys-fs/zfs:= )
86 + gtk? (
87 + x11-libs/gtk+:2=
88 + dev-cpp/gtkmm:2.4
89 + gnome-base/librsvg:=
90 + )
91 + radosgw? (
92 + dev-libs/fcgi:=
93 + dev-libs/expat:=
94 + net-misc/curl:=
95 + )
96 + jemalloc? ( dev-libs/jemalloc:= )
97 + !jemalloc? ( dev-util/google-perftools )
98 + lttng? ( dev-util/lttng-ust:= )
99 + ${PYTHON_DEPS}
100 + "
101 +DEPEND="${COMMON_DEPEND}
102 + dev-python/cython[${PYTHON_USEDEP}]
103 + app-arch/cpio
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 + "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
148 + "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
149 + "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
150 +)
151 +
152 +check-reqs_export_vars() {
153 + if use debug; then
154 + CHECKREQS_DISK_BUILD="23G"
155 + CHECKREQS_DISK_USR="7G"
156 + elif use amd64; then
157 + CHECKREQS_DISK_BUILD="12G"
158 + CHECKREQS_DISK_USR="450M"
159 + else
160 + CHECKREQS_DISK_BUILD="1400M"
161 + CHECKREQS_DISK_USR="450M"
162 + fi
163 +
164 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
165 +}
166 +
167 +user_setup() {
168 + enewgroup ceph ${CEPH_GID}
169 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
170 +}
171 +
172 +emake_python_bindings() {
173 + local action="${1}" params binding module
174 + shift
175 + params=("${@}")
176 +
177 + __emake_python_bindings_do_impl() {
178 + ceph_run_econf "${EPYTHON}"
179 + emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
180 +
181 + # these don't work and aren't needed on python3
182 + if [[ ${EBUILD_PHASE} == install ]]; then
183 + for module in "${S}"/src/pybind/*.py; do
184 + module_basename="$(basename "${module}")"
185 + if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
186 + continue
187 + elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
188 + python_domodule ${module}
189 + fi
190 + done
191 + fi
192 + }
193 +
194 + pushd "${S}/src"
195 + for binding in rados rbd $(use cephfs && echo cephfs); do
196 + python_foreach_impl __emake_python_bindings_do_impl
197 + done
198 + popd
199 +
200 + unset __emake_python_bindings_do_impl
201 +}
202 +
203 +pkg_pretend() {
204 + check-reqs_export_vars
205 + check-reqs_pkg_pretend
206 +}
207 +
208 +pkg_setup() {
209 + python_setup
210 + check-reqs_export_vars
211 + check-reqs_pkg_setup
212 + user_setup
213 +}
214 +
215 +src_prepare() {
216 + default
217 +
218 + # remove tests that need root access
219 + rm src/test/cli/ceph-authtool/cap*.t
220 +
221 + #rm -rf "${UNBUNDLE_LIBS[@]}"
222 +
223 + append-flags -fPIC
224 + eautoreconf
225 +}
226 +
227 +src_configure() {
228 + ECONFARGS=(
229 + --without-hadoop
230 + --includedir=/usr/include
231 + $(use_with cephfs)
232 + $(use_with debug)
233 + $(use_with fuse)
234 + $(use_with libaio)
235 + $(use_with libatomic libatomic-ops)
236 + $(use_with nss)
237 + $(use_with cryptopp)
238 + $(use_with radosgw)
239 + $(use_with gtk gtk2)
240 + $(use_enable static-libs static)
241 + $(use_with jemalloc)
242 + $(use_with xfs libxfs)
243 + $(use_with zfs libzfs)
244 + $(use_with lttng )
245 + $(use_with babeltrace)
246 + $(use_with ldap openldap)
247 + $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
248 + --with-mon
249 + --with-eventfd
250 + --with-cython
251 + --without-kinetic
252 + --without-librocksdb
253 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
254 + )
255 +
256 + # we can only use python2.7 for building at the moment
257 + ceph_run_econf "python2*"
258 +}
259 +
260 +ceph_run_econf() {
261 + [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
262 + [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
263 +
264 + pushd "${S}" >/dev/null || die
265 + #
266 + # This generates a QA warning about running econf in src_compile
267 + # and src_install. Unfortunately the only other way to do this would
268 + # involve building all of for each python implementation times, which
269 + # wastes a _lot_ of CPU time and disk space. This hack will no longer
270 + # be needed with >=ceph-11.2.
271 + #
272 + python_setup "${1}"
273 + econf "${ECONFARGS[@]}"
274 +
275 + popd >/dev/null || die
276 +}
277 +
278 +src_compile() {
279 + emake
280 + emake_python_bindings all
281 +
282 + use test && emake check-local
283 +}
284 +
285 +src_test() {
286 + make check || die "make check failed"
287 +}
288 +
289 +src_install() {
290 + default
291 + emake_python_bindings install-exec "DESTDIR=\"${D}\""
292 +
293 + prune_libtool_files --all
294 +
295 + exeinto /usr/$(get_libdir)/ceph
296 + newexe src/init-ceph ceph_init.sh
297 +
298 + insinto /etc/logrotate.d/
299 + newins "${FILESDIR}"/ceph.logrotate ${PN}
300 +
301 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
302 +
303 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
304 +
305 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
306 + newinitd "${FILESDIR}/${PN}.initd-r5" ${PN}
307 + newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
308 +
309 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
310 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.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 +}