103 lines
3.2 KiB
Plaintext
103 lines
3.2 KiB
Plaintext
# Description: Ceph is a distributed object store and file system
|
|
# URL: https://ceph.com/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: curl libdevmapper libgmp npm
|
|
|
|
name=ceph
|
|
version=16.2.5
|
|
release=1
|
|
source=(https://download.ceph.com/tarballs/ceph_$version.orig.tar.gz
|
|
ceph.confd
|
|
ceph.initd
|
|
|
|
0001-src-common-crc32c_intel_fast.patch
|
|
0002-src-common-CMakeLists.txt.patch
|
|
0003-src-common-bitstr.h.patch
|
|
0006-src-blk-CMakeLists.txt.patch
|
|
0007-src-test-neorados-CMakeLists.txt.patch
|
|
0008-cmake-modules-Finduring.cmake.patch
|
|
0009-librgw-notifications-initialize-kafka-and-amqp.patch
|
|
0011-src-test-rgw-amqp_mock.cc.patch
|
|
0012-src-compressor-snappy-SnappyCompressor.h.patch
|
|
0013-src-common-Formatter.cc.patch
|
|
0014-rgw-Replace-boost-string_ref-view-with-std-string_vi.patch
|
|
0015-src-kv-rocksdb_cache.patch)
|
|
|
|
build() {
|
|
export NPM_CONFIG_USERCONFIG=$SRC/.npm
|
|
export NPM_CONFIG_CACHE=$SRC/.npm/cache
|
|
export GATSBY_TELEMETRY_DISABLED="1"
|
|
|
|
export CEPH_BUILD_VIRTUALENV="$name-$version/build"
|
|
|
|
[ ! -d "$PKGMK_SOURCE_DIR/yarn_cache" ] && mkdir "$PKGMK_SOURCE_DIR/yarn_cache"
|
|
export YARN_CACHE_FOLDER="$PKGMK_SOURCE_DIR/yarn_cache"
|
|
[ ! -d "$PKGMK_SOURCE_DIR/npm_cache" ] && mkdir "$PKGMK_SOURCE_DIR/npm_cache"
|
|
export npm_config_cache="$PKGMK_SOURCE_DIR/npm_cache"
|
|
[ ! -d "$PKGMK_SOURCE_DIR/rust" ] && mkdir "$PKGMK_SOURCE_DIR/rust"
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
for p in *.patch; do
|
|
patch -d $name-$version -p1 -i $SRC/$p
|
|
done
|
|
|
|
# npm-fsevents-optional.patch
|
|
pushd $name-$version/src/pybind/mgr/dashboard/frontend
|
|
npm i fsevents@2.1.3 -f --save-optional
|
|
popd
|
|
|
|
# using system boost
|
|
rm -r $name-$version/src/boost
|
|
|
|
[[ -e $name-$version/usr/bin/ninja ]] && PKGMK_CEPH+=' -G Ninja'
|
|
|
|
cmake -S $name-$version -B build $PKGMK_CEPH \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=/usr/lib \
|
|
-D CMAKE_INSTALL_LIBEXECDIR=lib/$name \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-D WITH_SYSTEM_BOOST=ON \
|
|
-D WITH_MANPAGE=ON \
|
|
-D WITH_SYSTEM_NPM=ON \
|
|
-D WITH_LIBURING=ON \
|
|
-D WITH_SYSTEM_LIBURING=ON \
|
|
-D WITH_SYSTEM_ROCKSDB:BOOL=ON \
|
|
-D WITH_PYTHON3=3 \
|
|
-D WITH_LTTNG=OFF \
|
|
-D WITH_RDMA=OFF \
|
|
-D WITH_SYSTEMD=OFF \
|
|
-D WITH_SPDK=OFF \
|
|
-D WITH_BABELTRACE=OFF \
|
|
-D WITH_RADOSGW_AMQP_ENDPOINT=OFF \
|
|
-D WITH_TESTS=OFF \
|
|
-D WITH_REENTRANT_STRSIGNAL:BOOL=ON \
|
|
-Wno-dev
|
|
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
find $PKG -name README.md -exec rm '{}' \+
|
|
|
|
# remove the upstream init file
|
|
rm -f $PKG/etc/init.d/ceph
|
|
|
|
rm -r $PKG/usr/share/ceph/mgr/dashboard/frontend/node_modules/.cache
|
|
rm -r $PKG/usr/share/ceph/mgr/dashboard/frontend/node_modules/.cli-ngcc
|
|
|
|
# move mount.* binaries to /sbin
|
|
install -d $PKG/sbin
|
|
mv $PKG/usr/sbin/mount.* $PKG/sbin
|
|
|
|
install -m 644 -D $name-$version/src/etc-rbdmap $PKG/etc/ceph/rbdmap
|
|
install -m 644 -D $name-$version/src/logrotate.conf $PKG/etc/logrotate.d/ceph
|
|
install -m 644 -D $name-$version/etc/sysctl/90-ceph-osd.conf $PKG/etc/sysctl.d/90-ceph-osd.conf
|
|
|
|
# udev rules
|
|
install -m 644 -D $name-$version/udev/50-rbd.rules $PKG/etc/udev/rules.d/50-rbd.rules
|
|
|
|
# sudoers.d
|
|
install -m 600 -D $name-$version/sudoers.d/ceph-osd-smartctl $PKG/etc/sudoers.d/ceph-osd-smartctl
|
|
}
|