1 |
commit: 1d88a437d8c5a388645478afc125de80bf3e36a2 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 18:11:10 2017 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 18:11:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d88a437 |
7 |
|
8 |
sys-cluster/ceph: Restore 10.2.5-r1 for some testing |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
sys-cluster/ceph/ceph-10.2.5-r1.ebuild | 267 +++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 267 insertions(+) |
14 |
|
15 |
diff --git a/sys-cluster/ceph/ceph-10.2.5-r1.ebuild b/sys-cluster/ceph/ceph-10.2.5-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000000..1f381009dd |
18 |
--- /dev/null |
19 |
+++ b/sys-cluster/ceph/ceph-10.2.5-r1.ebuild |
20 |
@@ -0,0 +1,267 @@ |
21 |
+# Copyright 1999-2017 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=6 |
26 |
+PYTHON_COMPAT=( python{2_7,3_{4,5}} ) |
27 |
+ |
28 |
+inherit check-reqs autotools eutils python-r1 udev user \ |
29 |
+ readme.gentoo-r1 systemd versionator flag-o-matic |
30 |
+ |
31 |
+if [[ ${PV} == *9999* ]]; then |
32 |
+ inherit git-r3 |
33 |
+ EGIT_REPO_URI=" |
34 |
+ git://github.com/ceph/ceph.git |
35 |
+ https://github.com/ceph/ceph.git" |
36 |
+ SRC_URI="" |
37 |
+else |
38 |
+ SRC_URI="http://ceph.com/download/${P}.tar.gz" |
39 |
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" |
40 |
+fi |
41 |
+ |
42 |
+DESCRIPTION="Ceph distributed filesystem" |
43 |
+HOMEPAGE="http://ceph.com/" |
44 |
+ |
45 |
+LICENSE="LGPL-2.1" |
46 |
+SLOT="0" |
47 |
+ |
48 |
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio" |
49 |
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs" |
50 |
+ |
51 |
+# unbundling code commented out pending bugs 584056 and 584058 |
52 |
+#>=dev-libs/jerasure-2.0.0-r1 |
53 |
+#>=dev-libs/gf-complete-2.0.0 |
54 |
+COMMON_DEPEND=" |
55 |
+ app-arch/snappy |
56 |
+ app-arch/lz4:= |
57 |
+ app-arch/bzip2 |
58 |
+ dev-libs/boost:=[threads] |
59 |
+ dev-libs/libaio |
60 |
+ dev-libs/leveldb[snappy] |
61 |
+ nss? ( dev-libs/nss ) |
62 |
+ libatomic? ( dev-libs/libatomic_ops ) |
63 |
+ cryptopp? ( dev-libs/crypto++:= ) |
64 |
+ sys-apps/keyutils |
65 |
+ sys-apps/util-linux |
66 |
+ dev-libs/libxml2 |
67 |
+ radosgw? ( dev-libs/fcgi ) |
68 |
+ ldap? ( net-nds/openldap ) |
69 |
+ babeltrace? ( dev-util/babeltrace ) |
70 |
+ fuse? ( sys-fs/fuse ) |
71 |
+ xfs? ( sys-fs/xfsprogs ) |
72 |
+ zfs? ( sys-fs/zfs ) |
73 |
+ gtk? ( |
74 |
+ x11-libs/gtk+:2 |
75 |
+ dev-cpp/gtkmm:2.4 |
76 |
+ gnome-base/librsvg |
77 |
+ ) |
78 |
+ radosgw? ( |
79 |
+ dev-libs/fcgi |
80 |
+ dev-libs/expat |
81 |
+ net-misc/curl |
82 |
+ ) |
83 |
+ jemalloc? ( dev-libs/jemalloc ) |
84 |
+ !jemalloc? ( dev-util/google-perftools ) |
85 |
+ lttng? ( dev-util/lttng-ust ) |
86 |
+ ${PYTHON_DEPS} |
87 |
+ " |
88 |
+DEPEND="${COMMON_DEPEND} |
89 |
+ dev-python/cython[${PYTHON_USEDEP}] |
90 |
+ app-arch/cpio |
91 |
+ sys-apps/lsb-release |
92 |
+ virtual/pkgconfig |
93 |
+ dev-python/sphinx |
94 |
+ test? ( |
95 |
+ sys-fs/btrfs-progs |
96 |
+ sys-apps/grep[pcre] |
97 |
+ dev-python/tox[${PYTHON_USEDEP}] |
98 |
+ dev-python/virtualenv[${PYTHON_USEDEP}] |
99 |
+ )" |
100 |
+RDEPEND="${COMMON_DEPEND} |
101 |
+ sys-apps/hdparm |
102 |
+ sys-block/parted |
103 |
+ sys-fs/cryptsetup |
104 |
+ sys-apps/gptfdisk |
105 |
+ dev-python/flask[${PYTHON_USEDEP}] |
106 |
+ dev-python/requests[${PYTHON_USEDEP}] |
107 |
+ " |
108 |
+REQUIRED_USE=" |
109 |
+ $(python_gen_useflags 'python2*') |
110 |
+ ${PYTHON_REQUIRED_USE} |
111 |
+ ^^ ( nss cryptopp ) |
112 |
+ ?? ( jemalloc tcmalloc ) |
113 |
+ " |
114 |
+ |
115 |
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup') |
116 |
+REQUIRED_USE+=" radosgw" |
117 |
+ |
118 |
+RESTRICT="test? ( userpriv )" |
119 |
+ |
120 |
+# distribution tarball does not include everything needed for tests |
121 |
+RESTRICT+=" test" |
122 |
+ |
123 |
+STRIP_MASK="/usr/lib*/rados-classes/*" |
124 |
+ |
125 |
+UNBUNDLE_LIBS=( |
126 |
+ src/erasure-code/jerasure/jerasure |
127 |
+ src/erasure-code/jerasure/gf-complete |
128 |
+) |
129 |
+ |
130 |
+PATCHES=( |
131 |
+ "${FILESDIR}/ceph-10.2.0-dont-use-virtualenvs.patch" |
132 |
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch" |
133 |
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch" |
134 |
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch" |
135 |
+) |
136 |
+ |
137 |
+check-reqs_export_vars() { |
138 |
+ if use debug; then |
139 |
+ CHECKREQS_DISK_BUILD="23G" |
140 |
+ CHECKREQS_DISK_USR="7G" |
141 |
+ elif use amd64; then |
142 |
+ CHECKREQS_DISK_BUILD="12G" |
143 |
+ CHECKREQS_DISK_USR="450M" |
144 |
+ else |
145 |
+ CHECKREQS_DISK_BUILD="1400M" |
146 |
+ CHECKREQS_DISK_USR="450M" |
147 |
+ fi |
148 |
+ |
149 |
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR |
150 |
+} |
151 |
+ |
152 |
+user_setup() { |
153 |
+ enewgroup ceph ${CEPH_GID} |
154 |
+ enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph |
155 |
+} |
156 |
+ |
157 |
+emake_python_bindings() { |
158 |
+ local action="${1}" params binding |
159 |
+ shift |
160 |
+ params=("${@}") |
161 |
+ |
162 |
+ __emake_python_bindings_do_impl() { |
163 |
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}" |
164 |
+ |
165 |
+ # these don't work and aren't needed on python3 |
166 |
+ if [[ ${EBUILD_PHASE} == install ]] && python_is_python3; then |
167 |
+ rm -f "${ED}/$(python_get_sitedir)"/ceph_{argparse,volume_client}.py |
168 |
+ fi |
169 |
+ } |
170 |
+ |
171 |
+ pushd "${S}/src" |
172 |
+ for binding in rados rbd $(use cephfs && echo cephfs); do |
173 |
+ python_foreach_impl __emake_python_bindings_do_impl |
174 |
+ done |
175 |
+ popd |
176 |
+ |
177 |
+ unset __emake_python_bindings_do_impl |
178 |
+} |
179 |
+ |
180 |
+pkg_pretend() { |
181 |
+ check-reqs_export_vars |
182 |
+ check-reqs_pkg_pretend |
183 |
+} |
184 |
+ |
185 |
+pkg_setup() { |
186 |
+ python_setup |
187 |
+ check-reqs_export_vars |
188 |
+ check-reqs_pkg_setup |
189 |
+ user_setup |
190 |
+} |
191 |
+ |
192 |
+src_prepare() { |
193 |
+ default |
194 |
+ |
195 |
+ # remove tests that need root access |
196 |
+ rm src/test/cli/ceph-authtool/cap*.t |
197 |
+ |
198 |
+ #rm -rf "${UNBUNDLE_LIBS[@]}" |
199 |
+ |
200 |
+ append-flags -fPIC |
201 |
+ eautoreconf |
202 |
+} |
203 |
+ |
204 |
+src_configure() { |
205 |
+ local myeconfargs=( |
206 |
+ --without-hadoop |
207 |
+ --includedir=/usr/include |
208 |
+ $(use_with cephfs) |
209 |
+ $(use_with debug) |
210 |
+ $(use_with fuse) |
211 |
+ $(use_with libaio) |
212 |
+ $(use_with libatomic libatomic-ops) |
213 |
+ $(use_with nss) |
214 |
+ $(use_with cryptopp) |
215 |
+ $(use_with radosgw) |
216 |
+ $(use_with gtk gtk2) |
217 |
+ $(use_enable static-libs static) |
218 |
+ $(use_with jemalloc) |
219 |
+ $(use_with xfs libxfs) |
220 |
+ $(use_with zfs libzfs) |
221 |
+ $(use_with lttng ) |
222 |
+ $(use_with babeltrace) |
223 |
+ $(use_with ldap openldap) |
224 |
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal") |
225 |
+ --with-mon |
226 |
+ --with-eventfd |
227 |
+ --with-cython |
228 |
+ --without-kinetic |
229 |
+ --without-librocksdb |
230 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
231 |
+ ) |
232 |
+ |
233 |
+ # we can only use python2.7 for building at the moment |
234 |
+ python_setup 'python2*' |
235 |
+ econf "${myeconfargs[@]}" |
236 |
+} |
237 |
+ |
238 |
+src_compile() { |
239 |
+ emake |
240 |
+ emake_python_bindings all |
241 |
+ |
242 |
+ use test && emake check-local |
243 |
+} |
244 |
+ |
245 |
+src_test() { |
246 |
+ make check || die "make check failed" |
247 |
+} |
248 |
+ |
249 |
+src_install() { |
250 |
+ default |
251 |
+ emake_python_bindings install-exec "DESTDIR=\"${D}\"" |
252 |
+ |
253 |
+ prune_libtool_files --all |
254 |
+ |
255 |
+ exeinto /usr/$(get_libdir)/ceph |
256 |
+ newexe src/init-ceph ceph_init.sh |
257 |
+ |
258 |
+ insinto /etc/logrotate.d/ |
259 |
+ newins "${FILESDIR}"/ceph.logrotate ${PN} |
260 |
+ |
261 |
+ keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat |
262 |
+ |
263 |
+ fowners -R ceph:ceph /var/lib/ceph /var/log/ceph |
264 |
+ |
265 |
+ newinitd "${FILESDIR}/rbdmap.initd" rbdmap |
266 |
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN} |
267 |
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} |
268 |
+ |
269 |
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service" |
270 |
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service" |
271 |
+ systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service" |
272 |
+ |
273 |
+ udev_dorules udev/*.rules |
274 |
+ |
275 |
+ readme.gentoo_create_doc |
276 |
+ |
277 |
+ python_setup 'python2*' |
278 |
+ python_fix_shebang "${ED}"/usr/{,s}bin/ |
279 |
+ |
280 |
+ # python_fix_shebang apparently is not idempotent |
281 |
+ sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \ |
282 |
+ "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed" |
283 |
+} |
284 |
+ |
285 |
+pkg_postinst() { |
286 |
+ readme.gentoo_print_elog |
287 |
+} |