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