aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authoriggy <iggy@theiggy.com>2019-10-08 18:46:37 -0700
committerNatanael Copa <ncopa@alpinelinux.org>2019-10-09 15:51:26 +0000
commit286830029a1b232dcfdbfd7db48f1a0a8377fe7b (patch)
tree8301724cb1025d54e9a861c527aae6c9948b0d94 /main
parent4baa78b267965664b1804d062d29a71a30520455 (diff)
downloadaports-286830029a1b232dcfdbfd7db48f1a0a8377fe7b.tar.bz2
aports-286830029a1b232dcfdbfd7db48f1a0a8377fe7b.tar.xz
main/ceph: Move ceph from community
Move ceph from community to main This move should allow us to enable ceph support in Qemu
Diffstat (limited to 'main')
-rw-r--r--main/ceph/APKBUILD524
-rw-r--r--main/ceph/allperms.patch13
-rw-r--r--main/ceph/boost-1.70.patch105
-rw-r--r--main/ceph/ceph-user.pre-install5
-rw-r--r--main/ceph/musl-fixes.patch229
5 files changed, 876 insertions, 0 deletions
diff --git a/main/ceph/APKBUILD b/main/ceph/APKBUILD
new file mode 100644
index 0000000000..d15cbd9da6
--- /dev/null
+++ b/main/ceph/APKBUILD
@@ -0,0 +1,524 @@
+# Contributor: John Coyle <dx9err@gmail.com>
+# Maintainer: Iggy Jackson <iggy@kws1.com>
+pkgname=ceph
+pkgver=14.2.3
+pkgrel=0
+pkgdesc="Ceph is a distributed object store and file system"
+pkgusers="ceph"
+pkggroups="ceph"
+url="https://ceph.com/"
+arch="x86_64 aarch64"
+# 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
+ util-linux
+ xfsprogs
+ "
+_osd_daemon_deps="fuse snappy lz4-libs"
+_osd_tools_deps="lz4-libs"
+_ceph_volume_deps="lvm2"
+_ceph_test_deps="xmlstarlet"
+makedepends="
+ acl-dev
+ argp-standalone
+ bc
+ boost-dev
+ btrfs-progs
+ bzip2-dev
+ cmake
+ coreutils
+ cunit-dev
+ curl-dev
+ cython3
+ 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
+ python3-dev
+ py3-pip
+ py3-nose
+ py3-setuptools
+ py3-sphinx
+ py3-virtualenv
+ rabbitmq-c-dev
+ readline-dev
+ rpcgen
+ snappy-dev
+ userspace-rcu-dev
+ xfsprogs-dev
+ xmlstarlet
+ yasm
+ $_base_deps
+ $_osd_daemon_deps
+ $_osd_tools_deps
+ $_ceph_volume_deps
+ $_ceph_test_deps
+"
+
+source="https://download.ceph.com/tarballs/ceph_$pkgver.orig.tar.gz
+ allperms.patch
+ musl-fixes.patch
+ boost-1.70.patch
+ "
+subpackages="
+ $pkgname-doc
+ $pkgname-base
+ $pkgname-common
+ $pkgname-mds
+ $pkgname-mgr
+ $pkgname-mon
+ $pkgname-mon-daemon:mon_daemon
+ $pkgname-mon-tools:mon_tools
+ $pkgname-fuse:ceph_fuse
+ $pkgname-openrc
+ $pkgname-osd
+ $pkgname-osd-daemon:osd_daemon
+ $pkgname-osd-tools:osd_tools
+ $pkgname-volume:ceph_volume:noarch
+ $pkgname-radosgw
+ $pkgname-bash-completion:bash_completion:noarch
+ $pkgname-dev
+ $pkgname-user
+ rbd-fuse:rbd_fuse
+ rbd-mirror:rbd_mirror
+ rbd-nbd:rbd_nbd
+ librbd
+ libcephfs
+ librados
+ py3-rados:_py3_rados
+ libradosstriper
+ py3-rbd:_py3_rbd
+ py3-cephfs:_py3_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
+_syssbindir=/sbin
+_sysconfdir=/etc
+
+_udevrulesdir=/etc/udev/rules.d
+
+_py3_sitelib() {
+ python3 -c "import site; print(site.getsitepackages()[0])"
+}
+
+build() {
+ export CEPH_BUILD_VIRTUALENV="$builddir"
+
+ PY_INC_PATH="$(python3-config --includes | cut -f2 -d' ' | sed 's:^-I::')"
+ PY_LIB_PATH="/usr/lib/lib$(python3-config --libs | cut -f1 -d' ' | sed 's:^-l::').so"
+ 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 \
+ -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
+ -DPYTHON_INCLUDE_DIR:PATH=$PY_INC_PATH \
+ -DPYTHON_LIBRARY:FILEPATH=$PY_LIB_PATH \
+ -DWITH_PYTHON2=OFF \
+ -DWITH_PYTHON3=ON \
+ -DMGR_PYTHON_VERSION=3 \
+ -DWITH_LTTNG=OFF \
+ -DWITH_RDMA=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
+
+ # Move mount.* binaries to /sbin
+ mkdir -p "$pkgdir"$_syssbindir
+ mv "$pkgdir"$_sbindir/mount.* "$pkgdir"$_syssbindir
+
+ # We need to clean this out before packaging as it's freaking huge
+ rm -rf "$pkgdir"$_datadir/ceph/mgr/dashboard/frontend/node_modules
+
+ 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
+}
+
+# This subpackage is a little weird and a side effect of trying to keep
+# the daemon packages as small as possible. We might be able to roll this into
+# the base/common package later if we can slim those down or break them up in a
+# different way
+user() {
+ pkgdesc="Minimal package to create a user for other ceph packages."
+ depends=""
+ install="$pkgname-user.pre-install"
+ mkdir -p "$subpkgdir"
+}
+
+base() {
+ pkgdesc="Base is the package that includes all the files shared amongst ceph servers"
+ depends="$_base_deps
+ $pkgname-user=$pkgver-r$pkgrel
+ $pkgname-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
+ 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="py3-rados py3-rbd py3-cephfs"
+
+ _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 $_syssbindir 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 "$(_py3_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 virtual package for the Ceph distributed file system."
+ depends="$pkgname-base
+ $pkgname-mon-daemon=$pkgver-r$pkgrel
+ $pkgname-mon-tools=$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"
+}
+
+mon_daemon() {
+ pkgdesc="Cluster monitor daemon for the Ceph distributed file system."
+ depends="$pkgname-user=$pkgver-r$pkgrel"
+
+ _pkg $_bindir ceph-mon
+ install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
+ "$subpkgdir"$_localstatedir/lib/ceph/mon
+}
+
+mon_tools() {
+ pkgdesc="Cluster monitor tools for the Ceph distributed file system."
+
+ _pkg $_bindir 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 $_syssbindir 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 virtual package for the Ceph distributed file system."
+ depends="$pkgname-osd-daemon=$pkgver-r$pkgrel
+ $pkgname-osd-tools=$pkgver-r$pkgrel
+ $pkgname-volume=$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"
+}
+
+osd_daemon() {
+ pkgdesc="Object storage daemon for the Ceph distributed file system."
+ depends="$_osd_daemon_deps $pkgname-user=$pkgver-r$pkgrel"
+
+ _pkg $_bindir ceph-osd
+ _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
+}
+
+osd_tools() {
+ pkgdesc="Object storage daemon tools for the Ceph distributed file system."
+ depends="$pkgname-base=$pkgver-r$pkgrel $_osd_tools_deps"
+
+ _pkg $_bindir ceph-clsinfo \
+ ceph-bluestore-tool \
+ ceph-objectstore-tool \
+ ceph-osdomap-tool
+ install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
+ "$subpkgdir"$_localstatedir/lib/ceph/osd
+}
+
+ceph_volume() {
+ pkgdesc="ceph-volume tool for the Ceph distributed file system."
+ depends="$_ceph_volume_deps"
+
+ _pkg $_sbindir ceph-volume
+ _pkg "$(_py3_sitelib)" ceph_volume 'ceph_volume-*'
+}
+
+librados() {
+ pkgdesc="RADOS distributed object store client library"
+ depends=
+ _pkg $_libdir librados.so.*
+ _pkg $_libdir/ceph libceph-common.so.*
+}
+
+_py3_rados() {
+ pkgdesc="Python libraries for the RADOS object store"
+ depends=
+
+ _pkg "$(_py3_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.*
+}
+
+_py3_rbd() {
+ pkgdesc="Python libraries for the RADOS block device"
+ depends="py3-rados"
+
+ _pkg "$(_py3_sitelib)" rbd*.so rbd-*.egg-info
+}
+
+libcephfs() {
+ pkgdesc="Ceph distributed file system client library"
+ depends=
+ _pkg $_libdir libcephfs.so.*
+}
+
+_py3_cephfs() {
+ pkgdesc="Python libraries for Ceph distributed file system"
+ depends="py3-rados"
+
+ _pkg "$(_py3_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="3d02e766a1d53d39355ee88738dd0233dc02f8a3cb44935194cb538b888507de8f8acdd99bf7890895f68795a310f53e2a8652305d5f2be5212efbd9046bd3a9 ceph_14.2.3.orig.tar.gz
+e1becd813ed3f28e2e4a6bef78b3b5117c1c0bb9cabe0ba9c912e0a20b551b6b2667495cddb94acd64192e287144911ff1c11e0d636fe04cc458146cfb0daca8 allperms.patch
+35722b11ad52a3145153635b6a96abda2a23ae9c7e63e2eac006c1e5b8014452c4a1a11bbe0292fd731e4c43aa38e27dd75d2ff9d25bcf52290278f71e868570 musl-fixes.patch
+0211c84da189f71af7914350ebbfa6fc588c854bad501453344a8d13a18a56ea895118d576bed65b592ea2925efe92b86c769ebc85156a559b2acd0ee884157b boost-1.70.patch"
diff --git a/main/ceph/allperms.patch b/main/ceph/allperms.patch
new file mode 100644
index 0000000000..a5ce1c031d
--- /dev/null
+++ b/main/ceph/allperms.patch
@@ -0,0 +1,13 @@
+--- ceph-11.1.1/src/test/libcephfs/test.cc.orig 2017-01-16 00:17:44.154815630 +0000
++++ ceph-11.1.1/src/test/libcephfs/test.cc 2017-01-16 00:18:09.642520993 +0000
+@@ -31,6 +31,10 @@
+ #include <map>
+ #include <vector>
+
++#ifndef ALLPERMS
++#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++
+ TEST(LibCephFS, OpenEmptyComponent) {
+
+ pid_t mypid = getpid();
diff --git a/main/ceph/boost-1.70.patch b/main/ceph/boost-1.70.patch
new file mode 100644
index 0000000000..149c65bc10
--- /dev/null
+++ b/main/ceph/boost-1.70.patch
@@ -0,0 +1,105 @@
+From 064f142746ae97f54865069cdacf5aae2b1b14f6 Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley@redhat.com>
+Date: Tue, 23 Apr 2019 15:40:01 -0400
+Subject: [PATCH] rgw: beast handle_connection() takes io_context
+
+as of boost 1.70, the socket no longer has a get_io_context(), so we
+have to pass it in as an argument
+
+Signed-off-by: Casey Bodley <cbodley@redhat.com>
+---
+ src/rgw/rgw_asio_frontend.cc | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
+index e4be074ec74f..4af3695dc1ce 100644
+--- a/src/rgw/rgw_asio_frontend.cc
++++ b/src/rgw/rgw_asio_frontend.cc
+@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
+ using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
+
+ template <typename Stream>
+-void handle_connection(RGWProcessEnv& env, Stream& stream,
++void handle_connection(boost::asio::io_context& context,
++ RGWProcessEnv& env, Stream& stream,
+ boost::beast::flat_buffer& buffer, bool is_ssl,
+ SharedMutex& pause_mutex,
+ rgw::dmclock::Scheduler *scheduler,
+@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
+ rgw::io::add_conlen_controlling(
+ &real_client))));
+ RGWRestfulIO client(cct, &real_client_io);
+- auto y = optional_yield{socket.get_io_context(), yield};
++ auto y = optional_yield{context, yield};
+ process_request(env.store, env.rest, &req, env.uri_prefix,
+ *env.auth_registry, &client, env.olog, y, scheduler);
+ }
+@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
+ return;
+ }
+ buffer.consume(bytes);
+- handle_connection(env, stream, buffer, true, pause_mutex,
++ handle_connection(context, env, stream, buffer, true, pause_mutex,
+ scheduler.get(), ec, yield);
+ if (!ec) {
+ // ssl shutdown (ignoring errors)
+@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
+ auto c = connections.add(conn);
+ boost::beast::flat_buffer buffer;
+ boost::system::error_code ec;
+- handle_connection(env, s, buffer, false, pause_mutex,
++ handle_connection(context, env, s, buffer, false, pause_mutex,
+ scheduler.get(), ec, yield);
+ s.shutdown(tcp::socket::shutdown_both, ec);
+ });
+From f1651b8c509d60787d10c4115e29fecfd2da237c Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley@redhat.com>
+Date: Tue, 23 Apr 2019 15:41:45 -0400
+Subject: [PATCH] rgw: add executor type for basic_waitable_timers
+
+as of boost 1.70, the timer no longer depends on io_context directly,
+so we have to specify its executor as a template parameter
+
+Signed-off-by: Casey Bodley <cbodley@redhat.com>
+---
+ src/rgw/rgw_dmclock_async_scheduler.h | 5 +++++
+ src/rgw/rgw_reshard.h | 9 ++++++++-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
+index 70487a525373..1d454acd2ea6 100644
+--- a/src/rgw/rgw_dmclock_async_scheduler.h
++++ b/src/rgw/rgw_dmclock_async_scheduler.h
+@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
+ using Completion = async::Completion<Signature, async::AsBase<Request>>;
+
+ using Clock = ceph::coarse_real_clock;
++#if BOOST_VERSION < 107000
+ using Timer = boost::asio::basic_waitable_timer<Clock>;
++#else
++ using Timer = boost::asio::basic_waitable_timer<Clock,
++ boost::asio::wait_traits<Clock>, executor_type>;
++#endif
+ Timer timer; //< timer for the next scheduled request
+
+ CephContext *const cct;
+diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
+index d99a6ff68d5f..213fc238d2ee 100644
+--- a/src/rgw/rgw_reshard.h
++++ b/src/rgw/rgw_reshard.h
+@@ -183,7 +183,14 @@ class RGWReshardWait {
+ ceph::condition_variable cond;
+
+ struct Waiter : boost::intrusive::list_base_hook<> {
+- boost::asio::basic_waitable_timer<Clock> timer;
++#if BOOST_VERSION < 107000
++ using Timer = boost::asio::basic_waitable_timer<Clock>;
++#else
++ using Executor = boost::asio::io_context::executor_type;
++ using Timer = boost::asio::basic_waitable_timer<Clock,
++ boost::asio::wait_traits<Clock>, Executor>;
++#endif
++ Timer timer;
+ explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
+ };
+ boost::intrusive::list<Waiter> waiters;
diff --git a/main/ceph/ceph-user.pre-install b/main/ceph/ceph-user.pre-install
new file mode 100644
index 0000000000..bae4f09dc7
--- /dev/null
+++ b/main/ceph/ceph-user.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup ceph -g 167 -S 2>/dev/null
+adduser ceph -u 167 -S -G ceph -s /sbin/nologin -h /var/lib/ceph -g "Ceph Daemons" 2> /dev/null
+exit 0
diff --git a/main/ceph/musl-fixes.patch b/main/ceph/musl-fixes.patch
new file mode 100644
index 0000000000..6e50e6ba5b
--- /dev/null
+++ b/main/ceph/musl-fixes.patch
@@ -0,0 +1,229 @@
+diff --git a/src/common/secret.c b/src/common/secret.c
+index b6f26ec3..1b4531f8 100644
+--- a/src/common/secret.c
++++ b/src/common/secret.c
+@@ -63,9 +63,18 @@ int set_kernel_secret(const char *secret, const char *key_name)
+
+ ret = ceph_unarmor(payload, payload+sizeof(payload), secret, secret+secret_len);
+ if (ret < 0) {
+- char error_buf[80];
+- fprintf(stderr, "secret is not valid base64: %s.\n",
+- strerror_r(-ret, error_buf, sizeof(error_buf)));
++ char error_buf[80] = "unkown error";
++ char *p;
++#if defined(__GLIBC__)
++ p = strerror_r(-ret, error_buf, sizeof(error_buf));
++#else
++ if (strerror_r(-ret, error_buf, sizeof(error_buf)) < 0) {
++ p = "unkown error";
++ } else {
++ p = error_buf;
++ }
++#endif
++ fprintf(stderr, "secret is not valid base64: %s.\n", p);
+ return ret;
+ }
+
+diff --git a/src/dmclock/src/dmclock_util.cc b/src/dmclock/src/dmclock_util.cc
+index e8046cdc..aa9000bc 100644
+--- a/src/dmclock/src/dmclock_util.cc
++++ b/src/dmclock/src/dmclock_util.cc
+@@ -21,7 +21,7 @@
+ #include "dmclock_util.h"
+
+
+-std::string crimson::dmclock::format_time(const Time& time, uint modulo) {
++std::string crimson::dmclock::format_time(const Time& time, unsigned int modulo) {
+ long subtract = long(time / modulo) * modulo;
+ std::stringstream ss;
+ ss << std::fixed << std::setprecision(4) << (time - subtract);
+diff --git a/src/dmclock/src/dmclock_util.h b/src/dmclock/src/dmclock_util.h
+index d3fd3f19..ee8b6c3a 100644
+--- a/src/dmclock/src/dmclock_util.h
++++ b/src/dmclock/src/dmclock_util.h
+@@ -52,7 +52,7 @@ namespace crimson {
+ #endif
+ }
+
+- std::string format_time(const Time& time, uint modulo = 1000);
++ std::string format_time(const Time& time, unsigned int modulo = 1000);
+
+ void debugger();
+
+diff --git a/src/seastar/dpdk/config/common_base b/src/seastar/dpdk/config/common_base
+index 8907bea3..6d3f7577 100644
+--- a/src/seastar/dpdk/config/common_base
++++ b/src/seastar/dpdk/config/common_base
+@@ -96,7 +96,7 @@ CONFIG_RTE_MAX_TAILQ=32
+ CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO
+ CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO
+ CONFIG_RTE_LOG_HISTORY=256
+-CONFIG_RTE_BACKTRACE=y
++CONFIG_RTE_BACKTRACE=n
+ CONFIG_RTE_LIBEAL_USE_HPET=n
+ CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
+ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
+diff --git a/src/spdk/dpdk/config/common_base b/src/spdk/dpdk/config/common_base
+index d5fbb3a4..d9561545 100644
+--- a/src/spdk/dpdk/config/common_base
++++ b/src/spdk/dpdk/config/common_base
+@@ -80,7 +80,7 @@ CONFIG_RTE_MAX_TAILQ=32
+ CONFIG_RTE_ENABLE_ASSERT=n
+ CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO
+ CONFIG_RTE_LOG_HISTORY=256
+-CONFIG_RTE_BACKTRACE=y
++CONFIG_RTE_BACKTRACE=n
+ CONFIG_RTE_LIBEAL_USE_HPET=n
+ CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
+ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
+diff --git a/src/spdk/dpdk/config/rte_config.h b/src/spdk/dpdk/config/rte_config.h
+index a8e47977..7599bd39 100644
+--- a/src/spdk/dpdk/config/rte_config.h
++++ b/src/spdk/dpdk/config/rte_config.h
+@@ -30,7 +30,7 @@
+ #define RTE_MAX_MEMZONE 2560
+ #define RTE_MAX_TAILQ 32
+ #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
+-#define RTE_BACKTRACE 1
++//#define RTE_BACKTRACE 1
+ #define RTE_EAL_VFIO 1
+ #define RTE_MAX_VFIO_CONTAINERS 64
+
+diff --git a/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c b/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c
+index a7c14421..aff241e8 100644
+--- a/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c
++++ b/src/spdk/dpdk/drivers/bus/pci/linux/pci_uio.c
+@@ -14,6 +14,32 @@
+
+ #if defined(RTE_ARCH_X86)
+ #include <sys/io.h>
++#if defined(__GLIBC__)
++#define pci_uio_outl_p outl_p
++#define pci_uio_outw_p outw_p
++#define pci_uio_outb_p outb_p
++#else
++static inline void
++pci_uio_outl_p(unsigned int value, unsigned short int port)
++{
++ __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80" : : "a" (value),
++ "Nd" (port));
++}
++
++static inline void
++pci_uio_outw_p(unsigned short int value, unsigned short int port)
++{
++ __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80" : : "a" (value),
++ "Nd" (port));
++}
++
++static inline void
++pci_uio_outb_p(unsigned char value, unsigned short int port)
++{
++ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80" : : "a" (value),
++ "Nd" (port));
++}
++#endif
+ #endif
+
+ #include <rte_log.h>
+@@ -527,21 +553,21 @@ pci_uio_ioport_write(struct rte_pci_ioport *p,
+ if (len >= 4) {
+ size = 4;
+ #if defined(RTE_ARCH_X86)
+- outl_p(*(const uint32_t *)s, reg);
++ pci_uio_outl_p(*(const uint32_t *)s, reg);
+ #else
+ *(volatile uint32_t *)reg = *(const uint32_t *)s;
+ #endif
+ } else if (len >= 2) {
+ size = 2;
+ #if defined(RTE_ARCH_X86)
+- outw_p(*(const uint16_t *)s, reg);
++ pci_uio_outw_p(*(const uint16_t *)s, reg);
+ #else
+ *(volatile uint16_t *)reg = *(const uint16_t *)s;
+ #endif
+ } else {
+ size = 1;
+ #if defined(RTE_ARCH_X86)
+- outb_p(*s, reg);
++ pci_uio_outb_p(*s, reg);
+ #else
+ *(volatile uint8_t *)reg = *s;
+ #endif
+diff --git a/src/spdk/dpdk/lib/librte_eal/common/eal_common_fbarray.c b/src/spdk/dpdk/lib/librte_eal/common/eal_common_fbarray.c
+index ba6c4ae3..b9b7d70d 100644
+--- a/src/spdk/dpdk/lib/librte_eal/common/eal_common_fbarray.c
++++ b/src/spdk/dpdk/lib/librte_eal/common/eal_common_fbarray.c
+@@ -9,6 +9,7 @@
+ #include <errno.h>
+ #include <sys/file.h>
+ #include <string.h>
++#include <fcntl.h>
+
+ #include <rte_common.h>
+ #include <rte_log.h>
+diff --git a/src/spdk/dpdk/lib/librte_eal/common/malloc_heap.c b/src/spdk/dpdk/lib/librte_eal/common/malloc_heap.c
+index 02a5385d..cf063d5f 100644
+--- a/src/spdk/dpdk/lib/librte_eal/common/malloc_heap.c
++++ b/src/spdk/dpdk/lib/librte_eal/common/malloc_heap.c
+@@ -1,6 +1,7 @@
+ /* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2010-2014 Intel Corporation
+ */
++ #include<string.h>
+ #include <stdint.h>
+ #include <stddef.h>
+ #include <stdlib.h>
+diff --git a/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
+index 3a7d4b22..99b25d3c 100644
+--- a/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
++++ b/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
+@@ -17,6 +17,7 @@
+ #include <sys/mman.h>
+ #include <sys/queue.h>
+ #include <sys/stat.h>
++#include <fcntl.h>
+
+ #include <linux/mman.h> /* for hugetlb-related flags */
+
+diff --git a/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c b/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c
+index 0bf2aef3..0c98c74c 100644
+--- a/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c
++++ b/src/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c
+@@ -15,6 +15,7 @@
+ #include <sys/mman.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <fcntl.h>
+ #include <sys/queue.h>
+ #include <sys/file.h>
+ #include <unistd.h>
+diff --git a/src/spdk/dpdk/mk/target/generic/rte.vars.mk b/src/spdk/dpdk/mk/target/generic/rte.vars.mk
+index 98085cd3..dd149acc 100644
+--- a/src/spdk/dpdk/mk/target/generic/rte.vars.mk
++++ b/src/spdk/dpdk/mk/target/generic/rte.vars.mk
+@@ -108,6 +108,9 @@ CFLAGS += -include $(RTE_SDK_BIN)/include/rte_config.h
+ LDFLAGS += -L$(RTE_SDK_BIN)/lib
+ endif
+
++# always define _GNU_SOURCE
++CFLAGS += -D_GNU_SOURCE
++
+ export CFLAGS
+ export LDFLAGS
+
+diff --git a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc
+index cce44e4f..b0988e64 100644
+--- a/src/tools/rbd_nbd/rbd-nbd.cc
++++ b/src/tools/rbd_nbd/rbd-nbd.cc
+@@ -552,7 +552,8 @@ private:
+ for (unsigned i = 0; i < cmdline.size(); i++) {
+ const char *arg = &cmdline[i];
+ if (i == 0) {
+- if (strcmp(basename(arg) , "rbd-nbd") != 0) {
++ const char *fname = strrchr(arg, '/');
++ if (strcmp(fname ? fname+1 : arg, "rbd-nbd") != 0) {
+ return -EINVAL;
+ }
+ } else {