Add PKGBUILD for ceph nautilus
This commit is contained in:
@@ -3,36 +3,30 @@
|
||||
|
||||
pkgbase='ceph'
|
||||
pkgname=('ceph' 'ceph-libs')
|
||||
pkgver=13.2.4
|
||||
pkgver=14.2.0
|
||||
pkgrel=1
|
||||
pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system'
|
||||
arch=('x86_64')
|
||||
url='https://ceph.com/'
|
||||
license=('GPL')
|
||||
makedepends=('bc' 'boost' 'boost-libs' 'cmake' 'cpio' 'crypto++' 'curl' 'cython'
|
||||
makedepends=('bc' 'boost' 'boost-libs' 'cmake' 'cpio' 'crypto++' 'curl' 'cython<0.29'
|
||||
'cython2' 'expat' 'fcgi' 'fuse2' 'gcc-libs' 'git' 'glibc' 'gperf' 'gperftools'
|
||||
'gptfdisk' 'inetutils' 'jq' 'junit' 'keyutils' 'leveldb' 'libaio'
|
||||
'libatomic_ops' 'libedit' 'libsystemd' 'libutil-linux' 'libxml2' 'lsb-release'
|
||||
'lz4' 'ncurses' 'nss' 'parted' 'pcre' 'procps-ng' 'python2-cherrypy'
|
||||
'python2-jinja' 'python2-nose' 'python2-pecan' 'python2-pip' 'python2-bcrypt'
|
||||
'python2-prettytable' 'python2-pyopenssl' 'python2-setuptools' 'python2-routes'
|
||||
'python2-sphinx' 'python2-tox' 'python2-virtualenv' 'python2-werkzeug' 'sed'
|
||||
'lz4' 'ncurses' 'nss' 'parted' 'pcre' 'procps-ng' 'python-cherrypy'
|
||||
'python-jinja' 'python-nose' 'python-pecan' 'python-pip' 'python-bcrypt'
|
||||
'python-prettytable' 'python-pyopenssl' 'python-setuptools' 'python-routes'
|
||||
'python-sphinx' 'python-tox' 'python-virtualenv' 'python-werkzeug' 'sed'
|
||||
'snappy' 'socat' 'systemd' 'valgrind' 'xfsprogs' 'xmlstarlet' 'yasm'
|
||||
'zlib' 'zstd' 'cunit' 'oath-toolkit' 'fontconfig')
|
||||
options=('emptydirs')
|
||||
source=("https://download.ceph.com/tarballs/${pkgbase}-${pkgver}.tar.gz"
|
||||
'ceph.sysusers'
|
||||
'boost-1.67.patch'
|
||||
'fix-ceph_disk-python-interpreter.patch'
|
||||
'fix-or-disable-broken-tests.patch'
|
||||
'fix-python2-paths.patch'
|
||||
'remove-distro-version-detection.patch')
|
||||
sha512sums=('5055979067234ad7fd2774007d524ef4643d968bf7ce42fc8c3f8e469fd84cbd7afc163cd6ddda53584bd5677fdea2fecf8194a378d49724504f639b9f688ff7'
|
||||
sha512sums=('c86a335714fd5678988133ec0e60cb10cd948250a133c073d1ed055c5bba232fa6f1e102dd7fcb0c70b37a07c9c2d1220d4a1713720e4dcab9659152ee577480'
|
||||
'4354001c1abd9a0c385ba7bd529e3638fb6660b6a88d4e49706d4ac21c81b8e829303a20fb5445730bdac18c4865efb10bc809c1cd56d743c12aa9a52e160049'
|
||||
'b886c3f2b2a2b32d4033225b5f28cef98ca96e3f4fe2d04cfdbdb3141bbefd81895284abe9c9b75dcad156d54a93dc938bd8d9a45056b4de12855bbbdf0870ca'
|
||||
'7abd94a333fb0d6c9f7156d69ed6d4bf123f0f3030407f4347209d677b282e5023664d43e74a21a27b7856d3493ae469a17ea8a810331c7266018cc34eee4841'
|
||||
'915bb02b91a2e7c6e21243e5d4d80847aedaf6f899e3bac55f4ccae4bb8386c434aad7f052dd449fd510c103f7796bd0a25c0cfac72ee8d1e94d230cf2f0550a'
|
||||
'b8ce48ab190b2408f38a7e78d755d762994d271f7bbf88f51392572d1976c4f81e8fad78eb38051df8ef287d70554214624c7b45359d4bef2c11d9ae7d61151c'
|
||||
'02c9e8fd3c23fb4c9c4c576ee6d06e8525ca31decfd964fb7231e73c98fe2987a483dda680969752186f0918f47d9af4fb09a4901e5319077f45d870906716da')
|
||||
|
||||
prepare() {
|
||||
@@ -54,23 +48,31 @@ prepare() {
|
||||
rm -rf qa/btrfs
|
||||
rm src/btrfs_ioc_test.c
|
||||
|
||||
# patch version script
|
||||
perl -0777 -i -pe 's/(LIBRADOS_[0-9.]+) .*\}/$1 \{\}/gs' src/librados/librados.map
|
||||
sed -i 's/local/global/g' src/librados/librados.map
|
||||
|
||||
# this test will try to perform btrfs operations when a btrfs mount
|
||||
# is active on the build host, which will fail
|
||||
if mount | grep 'type btrfs' &>/dev/null; then
|
||||
sed -i '/run-tox-ceph-disk/d' src/test/CMakeLists.txt
|
||||
fi
|
||||
|
||||
# fix python interpreter -> python2
|
||||
for file in \
|
||||
src/ceph-create-keys \
|
||||
src/mount.fuse.ceph \
|
||||
src/ceph-detect-init/ceph_detect_init/main.py
|
||||
do
|
||||
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "${file}"
|
||||
done
|
||||
# fix python interpreter -> python
|
||||
#for file in \
|
||||
# src/ceph-create-keys \
|
||||
# src/mount.fuse.ceph
|
||||
#do
|
||||
# sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python|' "${file}"
|
||||
#done
|
||||
}
|
||||
|
||||
build() {
|
||||
git rev-parse --is-inside-work-tree >/dev/null 2>&1
|
||||
if [[ "$?" -eq "0" ]]; then
|
||||
echo "build directory inside git repo, please build this in a clean environment!"
|
||||
exit 1
|
||||
fi
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
||||
mkdir -p build
|
||||
@@ -86,6 +88,10 @@ build() {
|
||||
-DCMAKE_INSTALL_SBINDIR=/usr/bin \
|
||||
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib \
|
||||
-DMGR_PYTHON_VERSION=3.7 \
|
||||
-DENABLE_GIT_VERSION=ON \
|
||||
-DWITH_PYTHON3=ON \
|
||||
-DWITH_PYTHON2=OFF \
|
||||
-DWITH_BABELTRACE=OFF \
|
||||
-DWITH_CEPHFS=ON \
|
||||
-DWITH_FUSE=ON \
|
||||
@@ -93,17 +99,17 @@ build() {
|
||||
-DWITH_LZ4=ON \
|
||||
-DWITH_MGR=ON \
|
||||
-DWITH_NSS=ON \
|
||||
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
|
||||
-DPYTHON_INCLUDE_DIR=/usr/include/python3.7m \
|
||||
-DWITH_RADOSGW=ON \
|
||||
-DWITH_RADOSGW_BEAST_FRONTEND=OFF \
|
||||
-DWITH_RADOSGW_BEAST_FRONTEND=ON \
|
||||
-DWITH_RDMA=OFF \
|
||||
-DWITH_SSL=ON \
|
||||
-DWITH_SYSTEM_BOOST=ON \
|
||||
-DWITH_SYSTEMD=ON \
|
||||
-DWITH_TESTS=ON \
|
||||
-DWITH_TESTS=OFF \
|
||||
-DWITH_XFS=ON \
|
||||
-DENABLE_SHARED=ON \
|
||||
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
|
||||
-DWITH_MGR_DASHBOARD_FRONTEND=ON \
|
||||
..
|
||||
|
||||
make all
|
||||
@@ -123,7 +129,7 @@ check() {
|
||||
|
||||
package_ceph-libs() {
|
||||
depends=('boost-libs' 'curl' 'glibc' 'keyutils' 'leveldb' 'libaio'
|
||||
'libutil-linux' 'lz4' 'nss' 'python2' 'xfsprogs' 'oath-toolkit')
|
||||
'libutil-linux' 'lz4' 'nss' 'python' 'xfsprogs' 'oath-toolkit')
|
||||
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}/build"
|
||||
|
||||
@@ -141,11 +147,11 @@ package_ceph-libs() {
|
||||
|
||||
package_ceph() {
|
||||
depends=('ceph-libs' 'boost-libs' 'curl' 'fuse2' 'glibc' 'gperftools'
|
||||
'keyutils' 'leveldb' 'libaio' 'libsystemd' 'libutil-linux' 'python2-routes'
|
||||
'lsb-release' 'ncurses' 'nss' 'python2' 'python2-cherrypy' 'python2-bcrypt'
|
||||
'python2-jinja' 'python2-mako' 'python2-pecan' 'python2-prettytable'
|
||||
'python2-pyopenssl' 'python2-setuptools' 'python2-singledispatch'
|
||||
'python2-webob' 'python2-werkzeug' 'snappy' 'xfsprogs' 'python2-requests')
|
||||
'keyutils' 'leveldb' 'libaio' 'libsystemd' 'libutil-linux' 'python-routes'
|
||||
'lsb-release' 'ncurses' 'nss' 'python' 'python-cherrypy' 'python-bcrypt'
|
||||
'python-jinja' 'python-mako' 'python-pecan' 'python-prettytable'
|
||||
'python-pyopenssl' 'python-setuptools' 'python-pyjwt'
|
||||
'python-webob' 'python-werkzeug' 'snappy' 'xfsprogs' 'python-requests')
|
||||
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}/build"
|
||||
|
||||
@@ -157,7 +163,7 @@ package_ceph() {
|
||||
find "${pkgdir}/usr/lib" -maxdepth 1 -type l -delete
|
||||
find "${pkgdir}/usr/lib/ceph" -maxdepth 1 -type f -delete
|
||||
find "${pkgdir}/usr/lib/ceph" -maxdepth 1 -type l -delete
|
||||
rm -rf "${pkgdir}"/usr/lib/{ceph/{compressor,crypto,erasure-code},python2.7,rados-classes}
|
||||
rm -rf "${pkgdir}"/usr/lib/{ceph/{compressor,crypto,erasure-code},python.7,rados-classes}
|
||||
rm -rf "${pkgdir}/usr/include"
|
||||
|
||||
# install tmpfiles.d and sysusers.d stuff
|
||||
|
@@ -1,8 +0,0 @@
|
||||
--- a/src/ceph-disk/ceph_disk/main.py 2017-08-28 18:30:20.000000000 +0200
|
||||
+++ b/src/ceph-disk/ceph_disk/main.py 2017-09-21 13:50:39.373573382 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python2
|
||||
#
|
||||
# Copyright (C) 2015, 2016, 2017 Red Hat <contact@redhat.com>
|
||||
# Copyright (C) 2014 Inktank <info@inktank.com>
|
@@ -1,52 +0,0 @@
|
||||
--- a/CMakeLists.txt 2018-05-29 14:04:02.000000000 +0200
|
||||
+++ b/CMakeLists.txt 2018-06-04 13:41:55.684455580 +0200
|
||||
@@ -49,7 +49,7 @@ endif(WITH_CCACHE)
|
||||
option(WITH_MANPAGE "Build man pages." ON)
|
||||
if(WITH_MANPAGE)
|
||||
find_program(SPHINX_BUILD
|
||||
- sphinx-build)
|
||||
+ sphinx-build2)
|
||||
if(NOT SPHINX_BUILD)
|
||||
message(FATAL_ERROR "Can't find sphinx-build.")
|
||||
endif(NOT SPHINX_BUILD)
|
||||
--- a/src/tools/setup-virtualenv.sh 2018-05-29 14:04:02.000000000 +0200
|
||||
+++ b/src/tools/setup-virtualenv.sh 2018-06-04 13:43:24.767175961 +0200
|
||||
@@ -58,10 +58,10 @@ if [ -z "$DIR" ] ; then
|
||||
fi
|
||||
rm -fr $DIR
|
||||
mkdir -p $DIR
|
||||
-virtualenv --python $PYTHON_BINARY $DIR
|
||||
+virtualenv2 --python $PYTHON_BINARY $DIR
|
||||
. $DIR/bin/activate
|
||||
|
||||
-if pip --help | grep -q disable-pip-version-check; then
|
||||
+if pip2 --help | grep -q disable-pip-version-check; then
|
||||
DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
|
||||
else
|
||||
DISABLE_PIP_VERSION_CHECK=
|
||||
@@ -69,12 +69,12 @@ fi
|
||||
|
||||
# older versions of pip will not install wrap_console scripts
|
||||
# when using wheel packages
|
||||
-pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade 'pip >= 6.1'
|
||||
+pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade 'pip >= 6.1'
|
||||
|
||||
# workaround of https://github.com/pypa/setuptools/issues/1042
|
||||
-pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade "setuptools < 36"
|
||||
+pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade "setuptools < 36"
|
||||
|
||||
-if pip --help | grep -q disable-pip-version-check; then
|
||||
+if pip2 --help | grep -q disable-pip-version-check; then
|
||||
DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
|
||||
else
|
||||
DISABLE_PIP_VERSION_CHECK=
|
||||
@@ -84,7 +84,7 @@ if test -d wheelhouse ; then
|
||||
export NO_INDEX=--no-index
|
||||
fi
|
||||
|
||||
-pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse 'tox >=2.9.1'
|
||||
+pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse 'tox >=2.9.1'
|
||||
if test -f requirements.txt ; then
|
||||
- pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse -r requirements.txt
|
||||
+ pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse -r requirements.txt
|
||||
fi
|
Reference in New Issue
Block a user