blob: 08fcbc9bfcbe425c6b1b71ff4d2c423c21839c15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
# Contributor: John Coyle <dx9err@gmail.com>
# Maintainer: John Coyle <dx9err@gmail.com>
pkgname=ceph
pkgver=14.2.1
pkgrel=0
pkgdesc="Ceph is a distributed object store and file system"
pkgusers="ceph"
pkggroups="ceph"
url="http://ceph.com"
arch="x86_64"
# https://github.com/ceph/ceph/blob/master/COPYING
license="LGPL-2.1-only AND LGPL-2.0-or-later AND GPL-2.0-only AND GPL-3.0-only AND CC-BY-SA-1.0 AND BSL-1.0 AND GPL-2.0 WITH Autoconf-exception-2.0 AND BSD-3-Clause AND MIT AND custom"
depends="ceph-osd ceph-mds ceph-mon"
options="!checkroot"
_base_deps="
cryptsetup
e2fsprogs
logrotate
parted
py2-requests py2-setuptools
util-linux
xfsprogs
"
_osd_deps="lvm2 sudo lz4-libs"
_ceph_test_deps="xmlstarlet"
makedepends="
acl-dev
argp-standalone
bc
boost-dev
btrfs-progs
bzip2-dev
cmake
coreutils
cunit-dev
curl-dev
cython
diffutils
eudev-dev
expat-dev
fcgi-dev
flex
fuse
fuse-dev
git
grep
gperf
jq
keyutils-dev
leveldb-dev
libaio-dev
libatomic_ops-dev
libedit-dev
openssl-dev
libtirpc-dev
libtool
libxml2-dev
linux-headers
lvm2-dev
lz4-dev
nodejs
nss-dev
oath-toolkit-dev
openldap-dev
procps
python2-dev
py2-pip
py2-nose
py-sphinx
py2-virtualenv
rabbitmq-c-dev
readline-dev
rpcgen
snappy-dev
userspace-rcu-dev
xfsprogs-dev
xmlstarlet
yasm
$_base_deps
$_osd_deps
$_ceph_test_deps
"
source="http://download.ceph.com/tarballs/ceph_$pkgver.orig.tar.gz
allperms.patch
musl-fixes.patch
"
subpackages="
$pkgname-doc
$pkgname-base
$pkgname-common
$pkgname-mds
$pkgname-mgr
$pkgname-mon
$pkgname-fuse:ceph_fuse
$pkgname-osd
$pkgname-radosgw
$pkgname-bash-completion:bash_completion
$pkgname-dev
rbd-fuse:rbd_fuse
rbd-mirror:rbd_mirror
rbd-nbd:rbd_nbd
librbd
libcephfs
librados
py2-rados:_py2_rados
libradosstriper
py2-rbd:_py2_rbd
py2-cephfs:_py2_cephfs
"
_ceph_uid=167
_ceph_gid=167
_prefix=/usr
_bindir=$_prefix/bin
_datadir=$_prefix/share
_docdir=$_datadir/doc
_includedir=$_prefix/include
_libdir=$_prefix/lib
_libexecdir=$_prefix/libexec
_localstatedir=/var
_mandir=$_datadir/man
_sbindir=/usr/sbin
_sysconfdir=/etc
_udevrulesdir=/etc/udev/rules.d
_py2_sitelib() {
python2 -c "import site; print(site.getsitepackages()[0])"
}
build() {
export CEPH_BUILD_VIRTUALENV="$builddir"
mkdir -p "$builddir"/build
cd "$builddir"/build
cmake .. \
-DALLOCATOR=libc \
-DCMAKE_INSTALL_PREFIX=$_prefix \
-DCMAKE_INSTALL_LIBDIR=$_libdir \
-DCMAKE_INSTALL_LIBEXECDIR=$_libexecdir \
-DCMAKE_INSTALL_LOCALSTATEDIR=$_localstatedir \
-DCMAKE_INSTALL_SYSCONFDIR=$_sysconfdir \
-DCMAKE_INSTALL_DOCDIR=$_docdir/ceph \
-DCMAKE_INSTALL_MANDIR=$_mandir \
-DWITH_REENTRANT_STRSIGNAL=ON \
-DWITH_THREAD_SAFE_RES_QUERY=ON \
-DWITH_MANPAGE=ON \
-DWITH_SYSTEM_BOOST=ON \
-DWITH_PYTHON2=ON \
-DWITH_PYTHON3=OFF \
-DMGR_PYTHON_VERSION=2 \
-DWITH_LTTNG=OFF \
-DWITH_RDMA=OFF \
-DWITH_BABELTRACE=OFF \
-DWITH_SYSTEMD=OFF \
-DWITH_SPDK=OFF \
-DWITH_BABELTRACE=OFF \
-DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
-DWITH_TESTS=OFF
make
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
cd ..
rm -f "$pkgdir"$_sysconfdir/init.d/ceph
install -m 0644 -D src/etc-rbdmap "$pkgdir"$_sysconfdir/ceph/rbdmap
install -m 0644 -D src/logrotate.conf "$pkgdir"$_sysconfdir/logrotate.d/ceph
install -m 0644 -D etc/sysctl/90-ceph-osd.conf "$pkgdir"/$_sysconfdir/sysctl.d/90-ceph-osd.conf
chmod 0644 "$pkgdir"$_docdir/ceph/sample.ceph.conf
# udev rules
install -m 0644 -D udev/50-rbd.rules "$pkgdir"$_udevrulesdir/50-rbd.rules
# sudoers.d
install -m 0600 -D sudoers.d/ceph-osd-smartctl "$pkgdir"/$_sysconfdir/sudoers.d/ceph-osd-smartctl
}
check() {
cd "$builddir"/build
ctest
}
base() {
pkgdesc="Base is the package that includes all the files shared amongst ceph servers"
depends="$_base_deps
ceph-common=$pkgver-r$pkgrel
librbd=$pkgver-r$pkgrel
librados=$pkgver-r$pkgrel
libcephfs=$pkgver-r$pkgrel
"
_pkg $_bindir \
ceph-crash \
crushtool \
monmaptool \
osdmaptool \
ceph-kvstore-tool \
ceph-run
_pkg $_sbindir ceph-create-keys
_pkg $_libexecdir/ceph ceph_common.sh
_pkg $_libdir/rados-classes '*.so*'
_pkg $_libdir/ceph/erasure-code 'libec_*.so*'
_pkg $_libdir/ceph/compressor 'libceph_*.so*'
_pkg $_libdir/ceph/crypto 'libceph_*.so*'
_pkg $_sysconfdir/logrotate.d ceph
_pkg "$(_py2_sitelib)" ceph_volume 'ceph_volume-*'
for dir in crash crash/posted tmp bootstrap-osd bootstrap-mds \
bootstrap-rgw bootstrap-mgr bootstrap-rbd \
bootstrap-rbd-mirror; do
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/lib/ceph/$dir
done
}
common() {
pkgdesc="Common utilities to mount and interact with a ceph storage cluster."
depends="py2-rados py2-rbd py2-cephfs"
install="$pkgname-common.pre-install"
_pkg $_bindir ceph \
ceph-authtool \
ceph-conf \
ceph-dencoder \
ceph-rbdnamer \
ceph-syn \
cephfs-data-scan \
cephfs-journal-tool \
cephfs-table-tool \
rados \
rbd \
rbd-replay \
rbd-replay-many \
rbdmap \
ceph-post-file
_pkg $_sbindir mount.ceph
_pkg $_datadir/ceph known_hosts_drop.ceph.com \
id_rsa_drop.ceph.com \
id_rsa_drop.ceph.com.pub
_pkg $_sysconfdir/ceph rbdmap
_pkg "$(_py2_sitelib)" ceph_argparse.py* ceph_daemon.py*
_pkg $_udevrulesdir 50-rbd.rules
install -m 3770 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/log/ceph
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/lib/ceph
}
mds() {
pkgdesc="Metadata server daemon for the Ceph distributed file system."
depends="ceph-base"
_pkg $_bindir ceph-mds
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/lib/ceph/mds
}
mon() {
pkgdesc="Cluster monitor daemon for the Ceph distributed file system."
depends="ceph-base"
_pkg $_bindir ceph-mon \
ceph-monstore-tool
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/lib/ceph/mon
}
ceph_fuse() {
pkgdesc="FUSE based client for Ceph distributed network file system."
depends=
_pkg $_bindir ceph-fuse
_pkg $_sbindir mount.fuse.ceph
}
rbd_fuse() {
pkgdesc="FUSE based client to map Ceph rbd images to files."
depends=
_pkg $_bindir rbd-fuse
}
rbd_mirror() {
pkgdesc="Daemon for mirroring RBD images between Ceph clusters."
depends="ceph-common=$pkgver-r$pkgrel"
_pkg $_bindir rbd-mirror
}
rbd_nbd() {
pkgdesc="NBD based client to map Ceph rbd images to local device."
depends=
_pkg $_bindir rbd-nbd
}
radosgw() {
pkgdesc="Rados REST gateway which implements Amazon's S3 and OpenStack's Swift APIs."
depends="ceph-common oath-toolkit-liboath"
_pkg $_bindir radosgw \
radosgw-admin \
radosgw-es \
radosgw-object-expirer \
radosgw-token
mkdir -p "$subpkgdir"$_localstatedir/lib/ceph/radosgw
}
osd() {
pkgdesc="Object storage daemon for the Ceph distributed file system."
depends="$pkgname-base=$pkgver-r$pkgrel $_osd_deps"
_pkg $_bindir ceph-clsinfo \
ceph-bluestore-tool \
ceph-objectstore-tool \
ceph-osdomap-tool \
ceph-osd
_pkg $_sbindir ceph-volume
_pkg $_libexecdir/ceph ceph-osd-prestart.sh
_pkg $_sysconfdir/sudoers.d ceph-osd-smartctl
_pkg $_sysconfdir/sysctl.d 90-ceph-osd.conf
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/lib/ceph/osd
}
librados() {
pkgdesc="RADOS distributed object store client library"
depends=
_pkg $_libdir librados.so.*
_pkg $_libdir/ceph libceph-common.so.*
}
_py2_rados() {
pkgdesc="Python libraries for the RADOS object store"
depends=
_pkg "$(_py2_sitelib)" rados.so rados-*.egg-info
}
libradosstriper() {
pkgdesc="RADOS striping library"
depends=
_pkg $_libdir libradosstriper.so.*
}
librbd() {
pkgdesc="RADOS block device client library"
depends=
_pkg $_libdir librbd.so.*
}
_py2_rbd() {
pkgdesc="Python libraries for the RADOS block device"
depends="py2-rados"
_pkg "$(_py2_sitelib)" rbd.so rbd-*.egg-info
}
libcephfs() {
pkgdesc="Ceph distributed file system client library"
depends=
_pkg $_libdir libcephfs.so.*
}
_py2_cephfs() {
pkgdesc="Python libraries for Ceph distributed file system"
depends="py2-rados"
_pkg "$(_py2_sitelib)" cephfs.so cephfs-*.egg-info ceph_volume_client.py*
}
ceph_test() {
pkgdesc="Ceph benchmarks and test tools"
depends="ceph-common=$pkgver-r$pkgrel $_ceph_test_deps"
_pkg $_bindir ceph-client-debug \
ceph_bench_log \
ceph_kvstorebench \
ceph_multi_stress_watch \
ceph_erasure_code \
ceph_erasure_code_benchmark \
ceph_omapbench \
ceph_objectstore_bench \
ceph_perf_objectstore \
ceph_perf_local \
ceph_perf_msgr_client \
ceph_perf_msgr_server \
ceph_psim \
ceph_radosacl \
ceph_rgw_jsonparser \
ceph_rgw_multiparser \
ceph_scratchtool \
ceph_scratchtoolpp \
ceph_smalliobench \
ceph_smalliobenchdumb \
ceph_smalliobenchfs \
ceph_smalliobenchrbd \
ceph_test_* \
ceph_tpbench \
ceph_xattr_bench \
ceph-coverage \
ceph-monstore-tool \
ceph-osdomap-tool \
ceph-kvstore-tool \
ceph-debugpack
_pkg $_libdir ceph/ceph-monstore-update-crush.sh
}
bash_completion() {
pkgdesc="Bash completions for Ceph"
depends=
install_if="ceph=$pkgver-r$pkgrel bash-completion"
_pkg $_sysconfdir/bash_completion.d '*'
}
mgr() {
pkgdesc="Ceph Manager Daemon"
depends="ceph-base=$pkgver-r$pkgrel"
_pkg $_bindir ceph-mgr
_pkg $_datadir/ceph mgr
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
"$subpkgdir"$_localstatedir/lib/ceph/mgr
}
_pkg() {
local path=$1
shift
if ! [ -d "$pkgdir"/$path ]; then
error "$pkgdir/$path is not a directory"
return 1
fi
mkdir -p "$subpkgdir"$path
for _file in "$@"; do
mv "$pkgdir"$path/$_file "$subpkgdir"$path
done
}
sha512sums="fccde341344c721fbfc7f7cb73db4f65933d7fcacc9495398b55b37d1e208f0bad0cd78a4da08a3b5e26cca3175e7707f7dfb76fae5aa094f58afaed8603c866 ceph_14.2.1.orig.tar.gz
e1becd813ed3f28e2e4a6bef78b3b5117c1c0bb9cabe0ba9c912e0a20b551b6b2667495cddb94acd64192e287144911ff1c11e0d636fe04cc458146cfb0daca8 allperms.patch
35722b11ad52a3145153635b6a96abda2a23ae9c7e63e2eac006c1e5b8014452c4a1a11bbe0292fd731e4c43aa38e27dd75d2ff9d25bcf52290278f71e868570 musl-fixes.patch"
|