diff options
-rw-r--r-- | sys-cluster/ceph/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/ceph/ceph-13.2.6.ebuild | 341 | ||||
-rw-r--r-- | sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch | 14 | ||||
-rw-r--r-- | sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch | 74 |
4 files changed, 430 insertions, 0 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index 9b0137e27149..88518c8a7277 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -2,4 +2,5 @@ DIST ceph-12.2.11.tar.gz 79009034 BLAKE2B d8b1c188fe39603e90511eb436100ba14c0a9c DIST ceph-12.2.12.tar.gz 77467762 BLAKE2B a5224432121db9ef49c1e22771d847399df2f7881cd9c2e185eca12096efb79d21578659d248eb5bae678924983d57452d370e23ab7e78663764d7bea834a461 SHA512 e694c9a8c1f9836c08fb74b54423bdc16d4900252e34643c56cf1a615d4dacddfb13df06a6a9f68bb9d438f5f07069ed358f9fa4b5a362640a3046f9c7722dcc DIST ceph-12.2.8.tar.gz 77243685 BLAKE2B 37c34396a0c276b8d79735e14934ac70da024822c2a060061531c234e03e5d41aad6c41dc64b05c2ce47f03287d0cae9ef9bed67e4a0861b6380c8ce1de4ea69 SHA512 91c5c11aaeef701b3e31c9f8a1192b6b79fd34f3b96c61595c65173c98bfce0009c5b7c9b29764f5e4d4b1f5ac2ca7109fed5ae598c176aba717a34a132fabac DIST ceph-13.2.5.tar.gz 91006057 BLAKE2B 68551e2f54d78aff7b0e9ec3c62e6a3394dd7c23e80924a5b400cd9666a05a42e5f22445deee4040f1b78201c6a6660b283109878d4c92d845821bff831c8a5e SHA512 6daea524523f829e725609328ea71f416b2c3a9530fa8956720a7bc69dc08e55a169654f500704579dc9ba693f04eedd7e04614c0850e9ab1169cd45f19039f8 +DIST ceph-13.2.6.tar.gz 90808224 BLAKE2B cd7b4f4838eafc9dd580102cbb5247b86a153f90127f81355b556f32dbbacd2d7fb0144d15f99869a318a7148d2f50a9f995eb05aee056d7a5843830ede5702c SHA512 1e9c08d16b14447bf6b8bb72144e053aa9d5cf390bb4a6e878869e38895d3698073502fe9c4f8b775a3da872b920444bd01260105d3a839e53cf90cd27c6ab9c DIST ceph-14.2.1.tar.gz 117111511 BLAKE2B c00181223c6e02e7fe696ed4226f1751eca48e799f8b5377a06621eb3300f81b58dc20f325b455df04fcbd0c28b981fae1cfc778a8d69414247ddd206d0c6175 SHA512 fccde341344c721fbfc7f7cb73db4f65933d7fcacc9495398b55b37d1e208f0bad0cd78a4da08a3b5e26cca3175e7707f7dfb76fae5aa094f58afaed8603c866 diff --git a/sys-cluster/ceph/ceph-13.2.6.ebuild b/sys-cluster/ceph/ceph-13.2.6.ebuild new file mode 100644 index 000000000000..18241357036d --- /dev/null +++ b/sys-cluster/ceph/ceph-13.2.6.ebuild @@ -0,0 +1,341 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_{5,6}} ) +DISTUTILS_OPTIONAL=1 + +inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \ + python-r1 udev user readme.gentoo-r1 systemd bash-completion-r1 + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ceph/ceph.git" + SRC_URI="" +else + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT" +SLOT="0" + +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) + +IUSE="babeltrace cephfs dpdk fuse jemalloc ldap libressl lttng +mgr" +IUSE+=" numa +radosgw +ssl static-libs +system-boost systemd +tcmalloc" +IUSE+=" test xfs zfs" +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" + +# unbundling code commented out pending bugs 584056 and 584058 +#>=dev-libs/jerasure-2.0.0-r1 +#>=dev-libs/gf-complete-2.0.0 +COMMON_DEPEND=" + virtual/libudev:= + app-arch/bzip2:=[static-libs?] + app-arch/lz4:=[static-libs?] + app-arch/snappy:=[static-libs?] + app-arch/zstd:=[static-libs?] + app-misc/jq:=[static-libs?] + dev-libs/crypto++:=[static-libs?] + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?] + dev-libs/libaio:=[static-libs?] + dev-libs/libxml2:=[static-libs?] + dev-libs/nss:= + sys-auth/oath-toolkit:= + sys-apps/keyutils:=[static-libs?] + sys-apps/util-linux:=[static-libs?] + sys-libs/zlib:=[static-libs?] + babeltrace? ( dev-util/babeltrace ) + ldap? ( net-nds/openldap:=[static-libs?] ) + lttng? ( dev-util/lttng-ust:= ) + fuse? ( sys-fs/fuse:0=[static-libs?] ) + numa? ( sys-process/numactl:=[static-libs?] ) + ssl? ( + !libressl? ( dev-libs/openssl:=[static-libs?] ) + libressl? ( dev-libs/libressl:=[static-libs?] ) + ) + xfs? ( sys-fs/xfsprogs:=[static-libs?] ) + zfs? ( sys-fs/zfs:=[static-libs?] ) + radosgw? ( + dev-libs/expat:=[static-libs?] + !libressl? ( + dev-libs/openssl:=[static-libs?] + net-misc/curl:=[curl_ssl_openssl,static-libs?] + ) + libressl? ( + dev-libs/libressl:=[static-libs?] + net-misc/curl:=[curl_ssl_libressl,static-libs?] + ) + ) + system-boost? ( + >=dev-libs/boost-1.67:=[threads,context,python,static-libs?,${PYTHON_USEDEP}] + ) + jemalloc? ( dev-libs/jemalloc:=[static-libs?] ) + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] ) + ${PYTHON_DEPS} + " +DEPEND="${COMMON_DEPEND} + amd64? ( dev-lang/yasm ) + x86? ( dev-lang/yasm ) + app-arch/cpio + dev-python/cython[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/cunit + dev-util/gperf + dev-util/valgrind + sys-apps/which + sys-devel/bc + virtual/pkgconfig + test? ( + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + sys-apps/grep[pcre] + sys-fs/btrfs-progs + )" +RDEPEND="${COMMON_DEPEND} + net-misc/socat + sys-apps/gptfdisk + sys-block/parted + sys-fs/cryptsetup + sys-fs/lvm2[-device-mapper-only(-)] + !<sys-apps/openrc-0.26.3 + dev-python/bcrypt[${PYTHON_USEDEP}] + dev-python/cherrypy[${PYTHON_USEDEP}] + dev-python/flask[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/pecan[${PYTHON_USEDEP}] + dev-python/prettytable[${PYTHON_USEDEP}] + dev-python/pyopenssl[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/werkzeug[${PYTHON_USEDEP}] + " +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + || ( $(python_gen_useflags 'python3*') ) + ?? ( jemalloc tcmalloc ) + " + +# the tests need root access +RESTRICT="test? ( userpriv )" + +# distribution tarball does not include everything needed for tests +RESTRICT+=" test" + +# false positives unless all USE flags are on +CMAKE_WARN_UNUSED_CLI="no" + +# ninja does not work at all +CMAKE_MAKEFILE_GENERATOR="emake" + +UNBUNDLE_LIBS=( + src/erasure-code/jerasure/jerasure + src/erasure-code/jerasure/gf-complete +) + +PATCHES=( + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch" + "${FILESDIR}/ceph-12.2.0-cflags.patch" + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch" + "${FILESDIR}/ceph-13.2.0-cflags.patch" + "${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch" + "${FILESDIR}/ceph-13.2.0-mgr-python-version.patch" + "${FILESDIR}/ceph-13.2.6-no-virtualenvs.patch" + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch" + "${FILESDIR}/ceph-13.2.5-no-automagic-deps.patch" + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch" + "${FILESDIR}/ceph-12.2.12-ncurses-tinfo.patch" + "${FILESDIR}/ceph-13.2.6-dpdk-alignment.patch" +) + +check-reqs_export_vars() { + if use amd64; then + CHECKREQS_DISK_BUILD="12G" + CHECKREQS_DISK_USR="460M" + else + CHECKREQS_DISK_BUILD="1400M" + CHECKREQS_DISK_USR="450M" + fi + + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR +} + +user_setup() { + enewgroup ceph ${CEPH_GID} + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph +} + +pkg_pretend() { + check-reqs_export_vars + check-reqs_pkg_pretend +} + +pkg_setup() { + python_setup 'python3*' + check-reqs_export_vars + check-reqs_pkg_setup + user_setup +} + +src_prepare() { + cmake-utils_src_prepare + + if use system-boost; then + eapply "${FILESDIR}/ceph-13.2.0-boost-sonames.patch" + fi + + sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \ + src/bash_completion/CMakeLists.txt || die + + # remove tests that need root access + rm src/test/cli/ceph-authtool/cap*.t || die + + #rm -rf "${UNBUNDLE_LIBS[@]}" +} + +ceph_src_configure() { + local flag + local mycmakeargs=( + -DWITH_BABELTRACE=$(usex babeltrace) + -DWITH_CEPHFS=$(usex cephfs) + -DWITH_DPDK=$(usex dpdk) + -DWITH_FUSE=$(usex fuse) + -DWITH_LTTNG=$(usex lttng) + -DWITH_MGR=$(usex mgr) + -DWITH_MGR_DASHBOARD_FRONTEND=NO + -DMGR_PYTHON_VERSION=$(if python_is_python3; then echo 3; else echo 2; fi) + -DWITH_NUMA=$(usex numa) + -DWITH_OPENLDAP=$(usex ldap) + -DWITH_RADOSGW=$(usex radosgw) + -DWITH_SSL=$(usex ssl) + -DWITH_SYSTEMD=$(usex systemd) + -DWITH_TESTS=$(usex test) + -DWITH_XFS=$(usex xfs) + -DWITH_ZFS=$(usex zfs) + -DENABLE_SHARED=$(usex static-libs '' 'yes' 'no') + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')") + -DWITH_SYSTEM_BOOST=$(usex system-boost) + -DBOOST_J=$(makeopts_jobs) + -DWITH_RDMA=no + -DWITH_TBB=no + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir) + -DEPYTHON_VERSION="${EPYTHON#python}" + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${P}" + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" + -Wno-dev + ) + if use amd64 || use x86; then + for flag in ${CPU_FLAGS_X86[@]}; do + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")") + done + fi + + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" + cmake-utils_src_configure + + # bug #630232 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \ + "${BUILD_DIR:--${S}}"/include/acconfig.h \ + || die "sed failed" +} + +src_configure() { + ceph_src_configure +} + +python_compile() { + local CMAKE_USE_DIR="${S}" + ceph_src_configure + + rm -rf "${BUILD_DIR}/lib/cython_modules" || die + + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die + emake VERBOSE=1 clean + emake VERBOSE=1 all + + # python modules are only compiled with "make install" so we need to do this to + # prevent doing a bunch of compilation in src_install + DESTDIR="${T}" emake VERBOSE=1 install + popd >/dev/null || die +} + +src_compile() { + cmake-utils_src_make VERBOSE=1 all + + # we have to do this here to prevent from building everything multiple times + BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources + python_foreach_impl python_compile +} + +src_test() { + make check || die "make check failed" +} + +python_install() { + local CMAKE_USE_DIR="${S}" + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die + DESTDIR="${ED}" emake install + popd >/dev/null || die +} + +src_install() { + cmake-utils_src_install + python_foreach_impl python_install + + find "${D}" -name '*.la' -delete || die + + exeinto /usr/$(get_libdir)/ceph + newexe "${BUILD_DIR}/bin/init-ceph" ceph_init.sh + + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} + + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat + + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph + + newinitd "${FILESDIR}/rbdmap.initd" rbdmap + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} + + insinto /etc/sysctl.d + newins "${FILESDIR}"/sysctld 90-${PN}.conf + + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc + + # units aren't installed by the build system unless systemd is enabled + # so no point installing these with the USE flag disabled + if use systemd; then + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \ + "ceph-mds@.service" + + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \ + "ceph-osd@.service" + fi + + udev_dorules udev/*.rules + + readme.gentoo_create_doc + + python_setup 'python3*' + + # bug #630232 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \ + || die "sed failed" + + python_fix_shebang "${ED}"/usr/{,s}bin/ + + # python_fix_shebang apparently is not idempotent + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \ + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed" + + local -a rados_classes=( "${D}/usr/$(get_libdir)/rados-classes"/* ) + dostrip -x "${rados_classes[@]#${D}}" +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch b/sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch new file mode 100644 index 000000000000..c5d048eb7a2e --- /dev/null +++ b/sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch @@ -0,0 +1,14 @@ +diff --git a/src/spdk/dpdk/lib/librte_net/rte_ether.h b/src/spdk/dpdk/lib/librte_net/rte_ether.h +index 3a87ff184..8090b7c01 100644 +--- a/src/spdk/dpdk/lib/librte_net/rte_ether.h ++++ b/src/spdk/dpdk/lib/librte_net/rte_ether.h +@@ -55,7 +55,8 @@ extern "C" { + * See http://standards.ieee.org/regauth/groupmac/tutorial.html + */ + struct ether_addr { +- uint8_t addr_bytes[ETHER_ADDR_LEN]; /**< Addr bytes in tx order */ ++ /** Addr bytes in tx order */ ++ uint8_t addr_bytes[ETHER_ADDR_LEN] __rte_aligned(2); + } __attribute__((__packed__)); + + #define ETHER_LOCAL_ADMIN_ADDR 0x02 /**< Locally assigned Eth. address. */ diff --git a/sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch b/sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch new file mode 100644 index 000000000000..ad38799b6901 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch @@ -0,0 +1,74 @@ +diff --git a/src/ceph-detect-init/CMakeLists.txt b/src/ceph-detect-init/CMakeLists.txt +index 6e5946b784..233cccfc9b 100644 +--- a/src/ceph-detect-init/CMakeLists.txt ++++ b/src/ceph-detect-init/CMakeLists.txt +@@ -2,8 +2,8 @@ set(CEPH_DETECT_INIT_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtua + + add_custom_target(ceph-detect-init + COMMAND +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} && +- ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e . ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} && ++ #${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e . + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-detect-init + COMMENT "ceph-detect-init is being created") + add_dependencies(tests ceph-detect-init) +diff --git a/src/ceph-disk/CMakeLists.txt b/src/ceph-disk/CMakeLists.txt +index 00aaec4a80..b0700c488f 100644 +--- a/src/ceph-disk/CMakeLists.txt ++++ b/src/ceph-disk/CMakeLists.txt +@@ -2,8 +2,8 @@ set(CEPH_DISK_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv) + + add_custom_target(ceph-disk + COMMAND +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} && +- ${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e . ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} && ++ #${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e . + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-disk + COMMENT "ceph-disk is being created") + add_dependencies(tests ceph-disk) +diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt +index 88ca8a60bb..77c716cdb1 100644 +--- a/src/pybind/mgr/dashboard/CMakeLists.txt ++++ b/src/pybind/mgr/dashboard/CMakeLists.txt +@@ -2,7 +2,7 @@ set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv) + + add_custom_target(mgr-dashboard-test-venv + COMMAND +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV} ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard + COMMENT "dashboard tests virtualenv is being created") + add_dependencies(tests mgr-dashboard-test-venv) +@@ -13,9 +13,6 @@ set(mgr-dashboard-nodeenv ${CMAKE_CURRENT_BINARY_DIR}/node-env) + + add_custom_command( + OUTPUT "${mgr-dashboard-nodeenv}/bin/npm" +- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv} +- COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv +- COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 10.13.0 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "dashboard nodeenv is being installed" + ) +@@ -27,7 +24,6 @@ add_custom_target(mgr-dashboard-nodeenv + + add_custom_command( + OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules" +- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && npm ci && deactivate + DEPENDS frontend/package.json + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend + COMMENT "dashboard frontend dependencies are being installed" +@@ -62,9 +58,11 @@ else() + set(npm_command npm run build) + endif() + ++LIST(APPEND CMAKE_PROGRAM_PATH ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules/.bin) ++ + add_custom_command( + OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/dist" +- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && ${npm_command} && deactivate ++ COMMAND PREFIX="${CMAKE_SOURCE_DIR}" ${npm_command} + DEPENDS ${frontend_src} frontend/node_modules + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend + COMMENT "dashboard frontend is being created" |