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: Fri, 01 Feb 2019 02:38:56
Message-Id: 1548988721.0afc615336e2d750f096f687b56bf47a887136a8.chutzpah@gentoo
1 commit: 0afc615336e2d750f096f687b56bf47a887136a8
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Fri Feb 1 02:38:20 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 1 02:38:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0afc6153
7
8 sys-cluster/ceph: Version bump to 12.2.11
9
10 Also pick up new init script (bug #673554)
11
12 Closes: https://bugs.gentoo.org/673554
13 Copyright: Sony Interactive Entertainment Inc.
14 Package-Manager: Portage-2.3.59, Repoman-2.3.12
15 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
16
17 sys-cluster/ceph/Manifest | 1 +
18 sys-cluster/ceph/ceph-12.2.11.ebuild | 310 +++++++++++++++++++++++++++++++++++
19 2 files changed, 311 insertions(+)
20
21 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
22 index 2e581c4d696..fd8e0ccbd0a 100644
23 --- a/sys-cluster/ceph/Manifest
24 +++ b/sys-cluster/ceph/Manifest
25 @@ -1,6 +1,7 @@
26 DIST ceph-10.2.10.tar.gz 14573701 BLAKE2B 78c68deb8537cae8394b4d35569983431e938eff42b01f448dea68016b33ca5770c83d1e1d382bfd6c8164d5259e821779c6515f8c8fb4d5d52ee90b7df43180 SHA512 883d1b8340aaefc7a1eee4bbfb5b1d1cc15bffed8f35fb1e8fb86b1208a4d0d16753eb6c688ea0e661c4877d3d148b2b6c2b41620c4e8a61e47c69f46f98e537
27 DIST ceph-10.2.3.tar.gz 11596171 BLAKE2B c24c879649f0d42f58cfb1d03701797bc685d83c157031156d13308c731412a4a0149b658193722b358ebf0c4f9760d9664668cd797b69d207e81dc572f49700 SHA512 9de1e6851fc343d2c52c72cec3f7887d998d5b588f1251ee3a1fda14427badfa10408e6691fb03a374a10f4ec9844868423fee70fbbe2c0d962af98481412f19
28 DIST ceph-12.2.10.tar.gz 78884870 BLAKE2B 321d8256fc6659be3da2ce348e022e79ded63783925c02d3140ffa7fed5528a2b03388f0dfcdf536c81eec7b2484c6db9def8aefb1d5d335c86bad525977977b SHA512 2195a04bf937dba6af61389132240661126ef32e9fd86ca75af27a33c712053b15aa89b52c91ced04f06dc880d7c018afa3f26fff78bf313603f4fb73331b80c
29 +DIST ceph-12.2.11.tar.gz 79009034 BLAKE2B d8b1c188fe39603e90511eb436100ba14c0a9c4d9531f1a4ca52e78449462aacd274b80f8d0549918979fcb1ca4632ae0eaade1ae311a730fbe6657be044fc35 SHA512 14f46cc6f38d7d894cc657a040b428309632e5c163109a8a4a79a346ba2901a37d79966a0bc09148810c22b89375d9a4cb3b23f16364685b094c518bfafe9bef
30 DIST ceph-12.2.7.tar.gz 78783279 BLAKE2B 9058a5e408b3431cf0e8c28b44f95f6eb12f029697348eb6879efa9db4ad6a3b52b1040f484919a3f1781ac3a4aa72af3b8905760480fd3f3724dbceeab4eb07 SHA512 dde75a41c31cca54d4a680b0b93e28680a23f912a348cccca65e55e600c315bbfe3ced008d758fe8ba1e801a9d6e5f8079cc157ec5eef8916b86f487f42064ea
31 DIST ceph-12.2.8.tar.gz 77243685 BLAKE2B 37c34396a0c276b8d79735e14934ac70da024822c2a060061531c234e03e5d41aad6c41dc64b05c2ce47f03287d0cae9ef9bed67e4a0861b6380c8ce1de4ea69 SHA512 91c5c11aaeef701b3e31c9f8a1192b6b79fd34f3b96c61595c65173c98bfce0009c5b7c9b29764f5e4d4b1f5ac2ca7109fed5ae598c176aba717a34a132fabac
32 DIST ceph-12.2.9.tar.gz 77300470 BLAKE2B 3d3fe24986b890e7dcfc790441a80ad56b9c26f500811d524d0889773d425c88f278135d85cd84036973deb5aa58c4cd1cc9cead60db3f0f825349d73140be73 SHA512 93da6f9012fdb65e74dc1917f54839cb19a25672d53e7ee253553e93abb1a2afb51cd18b27bc82559108e2085e463a3b46003b03627e06a6e2e2312b54d86e92
33
34 diff --git a/sys-cluster/ceph/ceph-12.2.11.ebuild b/sys-cluster/ceph/ceph-12.2.11.ebuild
35 new file mode 100644
36 index 00000000000..4fe896d4cc1
37 --- /dev/null
38 +++ b/sys-cluster/ceph/ceph-12.2.11.ebuild
39 @@ -0,0 +1,310 @@
40 +# Copyright 1999-2019 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=6
44 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
45 +DISTUTILS_OPTIONAL=1
46 +
47 +inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \
48 + python-r1 udev user readme.gentoo-r1 systemd
49 +
50 +if [[ ${PV} == *9999* ]]; then
51 + inherit git-r3
52 + EGIT_REPO_URI="https://github.com/ceph/ceph.git"
53 + SRC_URI=""
54 +else
55 + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
56 + KEYWORDS="~amd64 ~x86"
57 +fi
58 +
59 +DESCRIPTION="Ceph distributed filesystem"
60 +HOMEPAGE="https://ceph.com/"
61 +
62 +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT"
63 +SLOT="0"
64 +
65 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
66 +
67 +IUSE="babeltrace cephfs fuse jemalloc ldap lttng +mgr nss +radosgw +ssl"
68 +IUSE+=" static-libs +system-boost systemd +tcmalloc test xfs zfs"
69 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
70 +
71 +# unbundling code commented out pending bugs 584056 and 584058
72 +#>=dev-libs/jerasure-2.0.0-r1
73 +#>=dev-libs/gf-complete-2.0.0
74 +COMMON_DEPEND="
75 + virtual/libudev:=
76 + app-arch/bzip2:=[static-libs?]
77 + app-arch/lz4:=[static-libs?]
78 + app-arch/snappy:=[static-libs?]
79 + app-arch/zstd:=[static-libs?]
80 + app-misc/jq:=[static-libs?]
81 + <dev-libs/crypto++-7.0:=[static-libs?]
82 + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?]
83 + dev-libs/libaio:=[static-libs?]
84 + dev-libs/libxml2:=[static-libs?]
85 + sys-apps/keyutils:=[static-libs?]
86 + sys-apps/util-linux:=[static-libs?]
87 + sys-libs/zlib:=[static-libs?]
88 + babeltrace? ( dev-util/babeltrace )
89 + ldap? ( net-nds/openldap:=[static-libs?] )
90 + lttng? ( dev-util/lttng-ust:= )
91 + nss? ( dev-libs/nss:= )
92 + fuse? ( sys-fs/fuse:0=[static-libs?] )
93 + xfs? ( sys-fs/xfsprogs:=[static-libs?] )
94 + zfs? ( sys-fs/zfs:=[static-libs?] )
95 + ssl? (
96 + <dev-libs/openssl-1.1:=[static-libs?]
97 + !dev-libs/openssl:1.0.0
98 + )
99 + radosgw? (
100 + dev-libs/expat:=[static-libs?]
101 + <dev-libs/openssl-1.1:=[static-libs?]
102 + net-misc/curl:=[curl_ssl_openssl,static-libs?]
103 + )
104 + system-boost? (
105 + =dev-libs/boost-1.66*:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
106 + )
107 + jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
108 + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
109 + ${PYTHON_DEPS}
110 + "
111 +DEPEND="${COMMON_DEPEND}
112 + app-arch/cpio
113 + amd64? ( dev-lang/yasm )
114 + x86? ( dev-lang/yasm )
115 + dev-python/cython[${PYTHON_USEDEP}]
116 + dev-python/sphinx
117 + dev-util/gperf
118 + dev-util/valgrind
119 + sys-apps/which
120 + sys-devel/bc
121 + virtual/pkgconfig
122 + test? (
123 + dev-python/tox[${PYTHON_USEDEP}]
124 + dev-python/virtualenv[${PYTHON_USEDEP}]
125 + sys-apps/grep[pcre]
126 + sys-fs/btrfs-progs
127 + )"
128 +RDEPEND="${COMMON_DEPEND}
129 + net-misc/socat
130 + sys-apps/gptfdisk
131 + sys-block/parted
132 + sys-fs/e2fsprogs
133 + sys-fs/cryptsetup
134 + sys-fs/lvm2
135 + !<sys-apps/openrc-0.26.3
136 + dev-python/cherrypy[${PYTHON_USEDEP}]
137 + dev-python/flask[${PYTHON_USEDEP}]
138 + dev-python/jinja[${PYTHON_USEDEP}]
139 + dev-python/pecan[${PYTHON_USEDEP}]
140 + dev-python/prettytable[${PYTHON_USEDEP}]
141 + dev-python/pyopenssl[${PYTHON_USEDEP}]
142 + dev-python/requests[${PYTHON_USEDEP}]
143 + dev-python/werkzeug[${PYTHON_USEDEP}]
144 + "
145 +REQUIRED_USE="
146 + $(python_gen_useflags 'python2*')
147 + ${PYTHON_REQUIRED_USE}
148 + ?? ( ssl nss )
149 + ?? ( jemalloc tcmalloc )
150 + "
151 +
152 +RESTRICT="test? ( userpriv )"
153 +
154 +# distribution tarball does not include everything needed for tests
155 +RESTRICT+=" test"
156 +
157 +# false positives unless all USE flags are on
158 +CMAKE_WARN_UNUSED_CLI="no"
159 +
160 +STRIP_MASK="/usr/lib*/rados-classes/*"
161 +
162 +UNBUNDLE_LIBS=(
163 + src/erasure-code/jerasure/jerasure
164 + src/erasure-code/jerasure/gf-complete
165 +)
166 +
167 +PATCHES=(
168 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
169 + "${FILESDIR}/ceph-12.2.0-cflags.patch"
170 + "${FILESDIR}/ceph-12.2.1-systemd-unitdir.patch"
171 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
172 + "${FILESDIR}/ceph-12.2.4-cflags.patch"
173 + "${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
174 + "${FILESDIR}/ceph-12.2.5-no-werror.patch"
175 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
176 +)
177 +
178 +check-reqs_export_vars() {
179 + if use amd64; then
180 + CHECKREQS_DISK_BUILD="12G"
181 + CHECKREQS_DISK_USR="460M"
182 + else
183 + CHECKREQS_DISK_BUILD="1400M"
184 + CHECKREQS_DISK_USR="450M"
185 + fi
186 +
187 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
188 +}
189 +
190 +user_setup() {
191 + enewgroup ceph ${CEPH_GID}
192 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
193 +}
194 +
195 +pkg_pretend() {
196 + check-reqs_export_vars
197 + check-reqs_pkg_pretend
198 +}
199 +
200 +pkg_setup() {
201 + python_setup 'python2*'
202 + check-reqs_export_vars
203 + check-reqs_pkg_setup
204 + user_setup
205 +}
206 +
207 +src_prepare() {
208 + cmake-utils_src_prepare
209 +
210 + if use system-boost; then
211 + eapply "${FILESDIR}/ceph-12.2.5-boost-sonames.patch"
212 + fi
213 +
214 + # remove tests that need root access
215 + rm src/test/cli/ceph-authtool/cap*.t
216 +
217 + #rm -rf "${UNBUNDLE_LIBS[@]}"
218 +}
219 +
220 +ceph_src_configure() {
221 + local flag
222 + local mycmakeargs=(
223 + -DWITH_BABELTRACE=$(usex babeltrace)
224 + -DWITH_CEPHFS=$(usex cephfs)
225 + -DWITH_FUSE=$(usex fuse)
226 + -DWITH_LTTNG=$(usex lttng)
227 + -DWITH_MGR=$(usex mgr)
228 + -DWITH_NSS=$(usex nss)
229 + -DWITH_OPENLDAP=$(usex ldap)
230 + -DWITH_RADOSGW=$(usex radosgw)
231 + -DWITH_SSL=$(usex ssl)
232 + -DWITH_SYSTEMD=$(usex systemd)
233 + -DWITH_TESTS=$(usex test)
234 + -DWITH_XFS=$(usex xfs)
235 + -DWITH_ZFS=$(usex zfs)
236 + -DENABLE_SHARED=$(usex static-libs '' 'yes' 'no')
237 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' '' "$(usex jemalloc 'jemalloc' '' 'libc' '')" '')
238 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
239 + -DBOOST_J=$(makeopts_jobs)
240 + -DWITH_RDMA=no
241 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
242 + -DEPYTHON_VERSION="${EPYTHON#python}"
243 + )
244 + if use amd64 || use x86; then
245 + for flag in ${CPU_FLAGS_X86[@]}; do
246 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
247 + done
248 + fi
249 +
250 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt"
251 + cmake-utils_src_configure
252 +
253 + # bug #630232
254 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
255 + "${BUILD_DIR:-${CMAKE_BUILD_DIR:-${S}}}"/include/acconfig.h \
256 + || die "sed failed"
257 +}
258 +
259 +src_configure() {
260 + ceph_src_configure
261 +}
262 +
263 +python_compile() {
264 + local CMAKE_USE_DIR="${S}"
265 +
266 + ceph_src_configure
267 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
268 + emake VERBOSE=1 all
269 +
270 + # python modules are only compiled with "make install" so we need to do this to
271 + # prevent doing a bunch of compilation in src_install
272 + DESTDIR="${T}" emake VERBOSE=1 install
273 + popd >/dev/null || die
274 +}
275 +
276 +src_compile() {
277 + cmake-utils_src_make all
278 +
279 + # we have to do this here to prevent from building everything multiple times
280 + BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources
281 + python_foreach_impl python_compile
282 +}
283 +
284 +src_test() {
285 + make check || die "make check failed"
286 +}
287 +
288 +python_install() {
289 + local CMAKE_USE_DIR="${S}"
290 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
291 + DESTDIR="${D}" emake install
292 + popd >/dev/null || die
293 +}
294 +
295 +src_install() {
296 + cmake-utils_src_install
297 + python_foreach_impl python_install
298 +
299 + prune_libtool_files --all
300 +
301 + exeinto /usr/$(get_libdir)/ceph
302 + newexe "${CMAKE_BUILD_DIR}/bin/init-ceph" ceph_init.sh
303 +
304 + insinto /etc/logrotate.d/
305 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
306 +
307 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
308 +
309 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
310 +
311 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
312 + newinitd "${FILESDIR}/${PN}.initd-r11" ${PN}
313 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
314 +
315 + insinto /etc/sysctl.d
316 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
317 +
318 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
319 +
320 + # units aren't installed by the build system unless systemd is enabled
321 + # so no point installing these with the USE flag disabled
322 + if use systemd; then
323 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
324 + "ceph-mds@.service"
325 +
326 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
327 + "ceph-osd@.service"
328 + fi
329 +
330 + udev_dorules udev/*.rules
331 +
332 + readme.gentoo_create_doc
333 +
334 + python_setup 'python2*'
335 +
336 + # bug #630232
337 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \
338 + || die "sed failed"
339 +
340 + python_fix_shebang "${ED}"/usr/{,s}bin/
341 +
342 + # python_fix_shebang apparently is not idempotent
343 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
344 + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
345 +}
346 +
347 +pkg_postinst() {
348 + readme.gentoo_print_elog
349 +}