1 # Contributor: John Coyle <dx9err@gmail.com>
2 # Maintainer: John Coyle <dx9err@gmail.com>
6 pkgdesc="Ceph is a distributed object store and file system"
11 license="LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and \
12 GPL-2.0-with-autoconf-exception and BSD-3-Clause and MIT"
13 depends="ceph-osd ceph-mds ceph-mgr ceph-mon"
14 # grep --quiet option required
15 # diffutils -y option required by osd-scrub-snaps.sh
16 # util-linux uuidgen required
66 source="ceph-12.2.11.tar.bz2"
73 $pkgname-fuse:ceph_fuse
77 $pkgname-bash-completion:bash_completion
84 libcephfs-dev:libcephfs_dev
86 librados-dev:librados_dev
92 libradosstriper-dev:libradosstriper_dev
97 if [ -n "$CEPH_TEST_PKG" ]; then
98 subpackages="$subpackages $pkgname-test:ceph_test"
106 _datadir=$_prefix/share
107 _docdir=$_datadir/doc
108 _includedir=$_prefix/include
110 _libexecdir=$_prefix/libexec
112 _mandir=$_datadir/man
116 _udevrulesdir=/etc/udev/rules.d
117 _python_sitelib=/usr/lib/python2.7/site-packages
119 builddir=$srcdir/ceph-12.2.11
122 export CEPH_BUILD_VIRTUALENV=$builddir
124 mkdir -p $builddir/build
127 if [ -n "$MAKE_CHECK" ] || [ -n "$CEPH_TEST_PKG" ]; then
132 -DCMAKE_INSTALL_PREFIX=$_prefix \
133 -DCMAKE_INSTALL_LIBDIR=$_libdir \
134 -DCMAKE_INSTALL_LIBEXECDIR=$_libexecdir \
135 -DCMAKE_INSTALL_LOCALSTATEDIR=$_localstatedir \
136 -DCMAKE_INSTALL_SYSCONFDIR=$_sysconfdir \
137 -DCMAKE_INSTALL_DOCDIR=$_docdir/ceph \
138 -DCMAKE_INSTALL_MANDIR=$_mandir \
139 -DWITH_REENTRANT_STRSIGNAL=ON \
140 -DWITH_THREAD_SAFE_RES_QUERY=ON \
144 -DWITH_SYSTEM_BOOST=ON \
145 -DWITH_TESTS=${_with_tests:-OFF} \
147 make -j${JOBS:-2} || return 1
149 if [ -n "$MAKE_CHECK" ]; then
156 make DESTDIR=$pkgdir install || return 1
159 rm -f $pkgdir$_sysconfdir/init.d/ceph
161 install -m 0644 -D src/etc-rbdmap $pkgdir$_sysconfdir/ceph/rbdmap \
164 install -m 0644 -D src/logrotate.conf $pkgdir$_sysconfdir/logrotate.d/ceph \
167 chmod 0644 $pkgdir$_docdir/ceph/sample.ceph.conf || return 1
170 install -m 0644 -D udev/50-rbd.rules $pkgdir$_udevrulesdir/50-rbd.rules || return 1
171 install -m 0644 -D udev/60-ceph-by-parttypeuuid.rules \
172 $pkgdir$_udevrulesdir/60-ceph-by-parttypeuuid.rules || return 1
173 install -m 0644 -D udev/95-ceph-osd.rules \
174 $pkgdir$_udevrulesdir/95-ceph-osd.rules
178 pkgdesc="Base is the package that includes all the files shared amongst ceph servers"
193 _pkg $_bindir crushtool monmaptool osdmaptool ceph-run ceph-detect-init
194 _pkg $_sbindir ceph-create-keys mount.ceph
195 _pkg $_libexecdir/ceph ceph_common.sh
196 _pkg $_libdir/rados-classes *.so*
197 _pkg $_libdir/ceph/erasure-code libec_*.so*
198 _pkg $_libdir/ceph/compressor libceph_*.so*
199 _pkg $_sysconfdir/logrotate.d ceph
200 _pkg $_python_sitelib ceph_detect_init* ceph_disk*
201 for dir in tmp bootstrap-osd bootstrap-mds bootstrap-rgw; do
202 install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
203 $subpkgdir$_localstatedir/lib/ceph/$dir || return 1
208 pkgdesc="Common utilities to mount and interact with a ceph storage cluster."
209 depends="py-rados py-rbd py-cephfs"
210 install="$pkgname-common.pre-install"
218 ceph-crush-location \
220 cephfs-journal-tool \
229 _pkg $_datadir/ceph known_hosts_drop.ceph.com id_rsa_drop.ceph.com \
230 id_rsa_drop.ceph.com.pub
231 _pkg $_sysconfdir/ceph rbdmap
232 _pkg $_python_sitelib ceph_argparse.py* ceph_daemon.py*
233 _pkg $_udevrulesdir 50-rbd.rules
234 install -m 3770 -o $_ceph_uid -g $_ceph_gid -d \
235 $subpkgdir$_localstatedir/log/ceph || return 1
236 install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
237 $subpkgdir$_localstatedir/lib/ceph
241 pkgdesc="Metadata server daemon for the Ceph distributed file system."
244 _pkg $_bindir ceph-mds
245 install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
246 $subpkgdir$_localstatedir/lib/ceph/mds
250 pkgdesc="Cluster monitor daemon for the Ceph distributed file system."
253 _pkg $_bindir ceph-mon ceph-rest-api
254 _pkg $_python_sitelib ceph_rest_api.py*
255 install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
256 $subpkgdir$_localstatedir/lib/ceph/mon
260 pkgdesc="FUSE based client for Ceph distributed network file system."
262 _pkg $_bindir ceph-fuse
263 _pkg $_sbindir mount.fuse.ceph
267 pkgdesc="FUSE based client to map Ceph rbd images to files."
268 depends="librados librbd"
270 _pkg $_bindir rbd-fuse
274 pkgdesc="Daemon for mirroring RBD images between Ceph clusters."
275 depends="ceph-common librados"
277 _pkg $_bindir rbd-mirror
281 pkgdesc="NBD based client to map Ceph rbd images to local device."
282 depends="librbd librados"
284 _pkg $_bindir rbd-nbd
288 pkgdesc="Rados REST gateway which implements Amazon's S3 and OpenStack's Swift APIs."
289 depends="ceph-common"
291 _pkg $_bindir radosgw radosgw-admin radosgw-token radosgw-es radosgw-object-expirer
292 mkdir -p $subpkgdir$_localstatedir/lib/ceph/radosgw
296 pkgdesc="Object storage daemon for the Ceph distributed file system."
297 depends="ceph-base parted gptfdisk"
299 _pkg $_bindir ceph-clsinfo ceph-bluefs-tool ceph-objectstore-tool ceph-osd
300 _pkg $_sbindir ceph-disk
301 _pkg $_libexecdir/ceph ceph-osd-prestart.sh
302 _pkg $_udevrulesdir 60-ceph-by-parttypeuuid.rules 95-ceph-osd.rules
303 install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
304 $subpkgdir$_localstatedir/lib/ceph/osd
308 pkgdesc="RADOS distributed object store client library"
310 _pkg $_libdir librados.so.*
314 pkgdesc="RADOS distributed object store client library headers"
317 _pkg $_includedir/rados librados.h \
327 _pkg $_libdir librados.so
328 _pkg $_bindir librados-config
332 pkgdesc="RADOS gateway client library"
335 _pkg $_libdir librgw.so.*
339 pkgdesc="RADOS gateway client library headers"
342 _pkg $_includedir/rados librgw.h rgw_file.h
343 _pkg $_libdir librgw.so
347 pkgdesc="Python 2 libraries for the RADOS gateway"
348 depends="librgw py-rados"
350 _pkg $_python_sitelib rgw.so rgw-*.egg-info
354 pkgdesc="Python libraries for the RADOS object store"
357 _pkg $_python_sitelib rados.so rados-*.egg-info
361 pkgdesc="RADOS striping library"
364 _pkg $_libdir libradosstriper.so.*
367 libradosstriper_dev() {
368 pkgdesc="RADOS striping library headers"
369 depends="libradosstriper librados-dev"
371 _pkg $_includedir/radosstriper libradosstriper.h libradosstriper.hpp
372 _pkg $_libdir libradosstriper.so
376 pkgdesc="RADOS block device client library"
379 _pkg $_libdir librbd.so.*
383 pkgdesc="RADOS block device client library headers"
384 depends="librbd librados-dev"
386 _pkg $_includedir/rbd features.h librbd.h librbd.hpp
387 _pkg $_libdir librbd.so
391 pkgdesc="Python libraries for the RADOS block device"
392 depends="librbd py-rados"
394 _pkg $_python_sitelib rbd.so rbd-*.egg-info
398 pkgdesc="Ceph distributed file system client library"
400 _pkg $_libdir libcephfs.so.*
404 pkgdesc="Ceph distributed file system client library headers"
405 depends="libcephfs librados-devel"
407 _pkg $_includedir/cephfs ceph_statx.h libcephfs.h
408 _pkg $_libdir libcephfs.so
412 pkgdesc="Python libraries for Ceph distributed file system"
413 depends="libcephfs py-rados"
415 _pkg $_python_sitelib cephfs.so cephfs-*.egg-info ceph_volume_client.py*
419 pkgdesc="Ceph benchmarks and test tools"
420 depends="ceph-common xmlstarlet"
422 _pkg $_bindir ceph-client-debug \
425 ceph_multi_stress_watch \
427 ceph_erasure_code_benchmark \
429 ceph_objectstore_bench \
430 ceph_perf_objectstore \
432 ceph_perf_msgr_client \
433 ceph_perf_msgr_server \
436 ceph_rgw_jsonparser \
437 ceph_rgw_multiparser \
441 ceph_smalliobenchdumb \
442 ceph_smalliobenchfs \
443 ceph_smalliobenchrbd \
453 _pkg $_libdir ceph/ceph-monstore-update-crush.sh
457 depends="bash-completion"
458 pkgdesc="Bash completions for Ceph"
459 _pkg $_sysconfdir/bash_completion.d ceph rados radosgw-admin rbd
463 pkgdesc="Ceph Manager Daemon"
466 _pkg $_bindir ceph-mgr
467 _pkg $_libdir/ceph mgr
469 install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
470 $subpkgdir$_localstatedir/lib/ceph/mgr
477 mkdir -p $subpkgdir$path || exit 1
478 for _file in $files; do
479 mv $pkgdir$path/$_file $subpkgdir$path || exit 1