From 77398e424e45d9e98c1cef3c43bdadb9d56e81ef Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 10 Nov 2019 13:21:36 +0000 Subject: gentoo resync : 10.11.2019 --- sys-cluster/ceph/Manifest | 4 +- sys-cluster/ceph/ceph-14.2.4-r1.ebuild | 360 +++++++++++++++++++++ sys-cluster/ceph/ceph-14.2.4.ebuild | 356 -------------------- .../ceph/files/ceph-14.2.4-python-executable.patch | 29 ++ .../files/ceph-14.2.4-undefined-behaviour.patch | 76 +++++ 5 files changed, 468 insertions(+), 357 deletions(-) create mode 100644 sys-cluster/ceph/ceph-14.2.4-r1.ebuild delete mode 100644 sys-cluster/ceph/ceph-14.2.4.ebuild create mode 100644 sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch create mode 100644 sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch (limited to 'sys-cluster/ceph') diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index 3755787e282f..877c3a806de9 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -31,6 +31,8 @@ AUX ceph-14.2.3-boost-1.6-python-sonames.patch 987 BLAKE2B c70ee9689cbe2f7b3ad43 AUX ceph-14.2.3-boost-1.70.patch 3591 BLAKE2B 12a947de968155cc9b73299757acb04f1588e988658f40b5bb6ef781d273a280543fd78a37cd5565599fe1bc7c187f7beaaa63a103d4b9ba1e7f3981e1027c87 SHA512 1bff4165c44a26950de22b01221e791b6cffe32653eceab0e9f03d3ae893b0b1fdab5659d5742335aa1fb519e34d2d841984ed8c844e8b8f1db8bc78bbed2472 AUX ceph-14.2.3-boost-sonames.patch 13701 BLAKE2B 7d8fa01f56922770190d7cada4cd5404e1584cf8afc2a84aae9d0031e66d778af6e9b2072e405982ca652229b86169f5cdefcd7fe321a1626f9bec5ca014c54e SHA512 c6e7497a427c0ca10b4aa006020467e9ae6c2fb167f500d72d92adc953490a1f7062bbc2dcdeee61a6ab251fa3a27ddd6c64b190bb88e7993df1fd4084d39882 AUX ceph-14.2.3-dpdk-compile-fix-1.patch 4729 BLAKE2B 96e709b592a7ea9324f54acf75ac3f78334a0d2b155f6d4b5360df8b13e2c9c8e5f6d6b19da5ddb7760c56d9307e056db9aeecec1926dddec88b6b685eb55374 SHA512 d0849fa120b3d7c26106e75bd830874854ee4214ac867b577f4486e4a033b2f555fa6745910f90d26f7fa5280bff01f5880eda9a2bc6edc856400a5756a8346b +AUX ceph-14.2.4-python-executable.patch 922 BLAKE2B a5c9e8c70de62a974ea0bea4159874447d725a566d75a026ca125a7db0f24a8d92212d067c8dd91b75ec1e2aab12e46da464f320c7e696cc916e29a4e0d28f93 SHA512 b263de28897f05fc3a201622b90a222bb2c6605d4e6d8921d3c8101247a41a44e1f9da4242f208e1ef4d10ae028917510f4390cc69595b77b723545f0f72eeb2 +AUX ceph-14.2.4-undefined-behaviour.patch 1990 BLAKE2B 4f9839bc05c95d40c870f346ebb1856f2846adb26fcbbed67e260f47def9b7167bac4a15917262e8c9dbb99cb83892da2aa315b6d9ee8cd60eb222876dc56482 SHA512 15e4df7cadb02e65144dffea3c287e853e27a04c18281c13282409f1bc28184f31b80d505123a3a29e5394fa0b5e3e3f1246bb70353f142e52e19939149a341e AUX ceph-mds_at.service 282 BLAKE2B 3a51e5d5e0490c021282a37961824d650891c2d84c077c6479a9ee733f8a16fbe65cf204aa74e30ddd24dc01f32740037a6bd137a40464d57e1afeba5a49f893 SHA512 3a37e187f925e1a5fb672ac90937f544f3b98ed5a30b6a6b931a600f9d6a245373085ed61b40e0c64b30dbfac51dd99cbeaeb7538b5f23953bc0dde1df94742d AUX ceph-mds_at.service.conf 115 BLAKE2B aaaa28074bf47ee98272337b536e6ca89dbbbb0443d7774c38f62da4b210a5b2ffbb53fa2b7f20dffbee08206a0868e33d381a89b613a25b88f897dd32753fd5 SHA512 e0b51882ec864271a6468141fdd185e24cafcd677f312a7658880a30c00fd58d9043b2651548ab23bd01e54be248a1e8c03545a8fda0b699ca051de7ceb925d8 AUX ceph-osd_at.service 362 BLAKE2B 7ccbf3428d687d1dfc3a8e10d56083802bba621d7cc9b965b55677e7ae8ce19bd178d31be687e47ed4ae21eef017c8913339cb465822ceadecd2e90cf84d692d SHA512 99c932fa99679a26b288ad57ca725a50847199915368a07ae1bb589ca777cd6e6a68e84f4d506a1097a06ace06eede176ea573e694bcbe43b434381116d63300 @@ -57,5 +59,5 @@ EBUILD ceph-12.2.12-r2.ebuild 8390 BLAKE2B dbbf53017559230bfc03f4cf267e325e5c2c1 EBUILD ceph-12.2.8-r1.ebuild 7886 BLAKE2B e99590739ce73d96895c282108d3b945bb0e13bdb73e34b06d2da5c9e7d74dc4fdceddfb6330a106b775c612c7cca6b67325b83389f1c6d5af712e59a6f1fd55 SHA512 ab8d2a1ee7c4a7d7179f81e18dc601a18da365663351d88cf6dfee32e2aaaf40412bc2fde98d7c07012f79f8b6c19bac773ef97b872a32b663748ce41a5954c1 EBUILD ceph-13.2.5-r4.ebuild 9007 BLAKE2B fc84d7fee8572582743979cd3da76cdd337667843410f8efb167ec80442d006b6d4c1c947ffeeb9c6265c47116a6cf15a012f4277c619cb55ad942b0e95f6cdb SHA512 eec2780a80d98b3a535a33c86efaae4112605b8c6e220b61beb9956ece895a8807024fe71f86b626c89b3ca8af3b94a4c0e990c47e9951cc31490a90c1841ff3 EBUILD ceph-13.2.6.ebuild 9133 BLAKE2B d5990d637edaa460b90eadc0b97c8952b2e7688c4916f0978bb15e9c2b99c206f3be5c2f57ded889393e5ba32fa63bf08a89138ea96a7045b6a47a3cd59d0381 SHA512 7a510c208b8b15fe124aafba24d25c0f181bc2ff61710d274e59c383f5d0a27ef83fbbd6b19e1020953887a0a4221769d88e8f75e720d0af3fa93ba5d9c50792 -EBUILD ceph-14.2.4.ebuild 9817 BLAKE2B 43d45c7c519878a324b601d380f15be54b82fdde061011b60f7279270b69eb7e174dc16e443f9e71af859e190b65bb7cce1a5fc36dd83d592e7c8e7f4d00243f SHA512 506a2ac4ebbba662c82f6f542c5234ab904694c7ed5cbbc8b3667d3dc5dedee29d84ad541aba4ba1f56302a3bdb2b633cac2d098d48ba77e53b516276571d716 +EBUILD ceph-14.2.4-r1.ebuild 9945 BLAKE2B f5aa6e5f8341fd59eb697bf876e86515b48c9ede34286c0c3b0241f1f5ca26178f29d6c0080de56306fd522dfd49722472d444116db5af929fc220a7623edff0 SHA512 de6c0549824599cd43984794a2ccff68cf3526cadb53a87f743eda5ac9be759664eff0b478dfdda2a7645da4b24c3a3b39757d707bc981c9a6103bf07270990a MISC metadata.xml 1588 BLAKE2B c3a1f7afa0e61fc589e60ec00bc1702a6f953bbbbc1ab6a8582fe08bad9f6af9217350641399bc7de4dfb69a79ee0e41b46d971eef53348f3b568c6dcd439273 SHA512 ac2196349f897b7dfafaa924cda3f4eb094233bd04e7949b9f8fafd135775202c3c1bdc11cc4a931e752fb40b9d1c86524cdd849a23d364e4f2aa240bbdf1250 diff --git a/sys-cluster/ceph/ceph-14.2.4-r1.ebuild b/sys-cluster/ceph/ceph-14.2.4-r1.ebuild new file mode 100644 index 000000000000..b5c3ff61473f --- /dev/null +++ b/sys-cluster/ceph/ceph-14.2.4-r1.ebuild @@ -0,0 +1,360 @@ +# 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,7}} ) +DISTUTILS_OPTIONAL=1 + +inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \ + multiprocessing python-r1 udev user readme.gentoo-r1 toolchain-funcs \ + systemd + +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 ~arm64" +fi + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ BSD Boost-1.0 MIT public-domain" +SLOT="0" + +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) + +IUSE="babeltrace cephfs dpdk fuse grafana jemalloc kerberos ldap libressl" +IUSE+=" lttng +mgr numa rabbitmq +radosgw +ssl static-libs system-boost" +IUSE+=" systemd +tcmalloc test xfs zfs" +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" + +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/ncurses:0=[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?] ) + kerberos? ( virtual/krb5 ) + rabbitmq? ( net-libs/rabbitmq-c:=[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.70.0[threads,context,python,static-libs?,${PYTHON_USEDEP}] + ~dev-libs/boost-1.67.0[threads,context,python,static-libs?,${PYTHON_USEDEP}] + ) + dev-libs/boost:=[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 ) + dev-python/cython[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/cunit + test? ( + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + sys-apps/grep[pcre] + sys-fs/btrfs-progs + ) + " +BDEPEND=" app-arch/cpio + >=dev-util/cmake-3.5.0 + dev-util/gperf + dev-util/valgrind + sys-apps/which + sys-devel/bc + virtual/pkgconfig + " +RDEPEND="${COMMON_DEPEND} + net-misc/socat + sys-apps/gptfdisk + sys-block/parted + sys-fs/cryptsetup + sys-fs/lvm2[-device-mapper-only(-)] + !=dev-libs/boost-1.70.0' || \ + eapply "${FILESDIR}/ceph-14.2.3-boost-1.6-python-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 +} + +ceph_src_configure() { + local flag + local mycmakeargs=( + -DWITH_BABELTRACE=$(usex babeltrace) + -DWITH_CEPHFS=$(usex cephfs) + -DWITH_CEPHFS_SHELL=$(if python_is_python3; then usex cephfs; else echo OFF; fi) + -DWITH_DPDK=$(usex dpdk) + -DWITH_FUSE=$(usex fuse) + -DWITH_LTTNG=$(usex lttng) + -DWITH_GSSAPI=$(usex kerberos) + -DWITH_GRAFANA=$(usex grafana) + -DWITH_MGR=$(usex mgr) + -DWITH_MGR_DASHBOARD_FRONTEND=NO + -DWITH_NUMA=$(usex numa) + -DWITH_OPENLDAP=$(usex ldap) + -DMGR_PYTHON_VERSION=$(if python_is_python3; then echo 3; else echo 2; fi) + -DWITH_PYTHON3=$(if python_is_python3; then echo "ON"; else echo "OFF"; fi) + -DWITH_PYTHON2=$(if python_is_python3; then echo "OFF"; else echo "ON"; fi) + -DWITH_RADOSGW=$(usex radosgw) + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq) + -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 '' 'ON' 'OFF') + -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/${PN}-${PVR}" + -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" \ + || die "failed to remove cmake cache" + + 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 + + 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 + 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 VERBOSE=1 install + popd >/dev/null || die + + python_optimize +} + +src_install() { + cmake-utils_src_install + python_foreach_impl python_install + + find "${ED}" -name '*.la' -type f -delete || die + + exeinto /usr/$(get_libdir)/ceph + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph + + 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{,-crash} \ + || 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/{mount.*,ceph-volume{,-systemd}} || die "sed failed" + + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* ) + dostrip -x "${rados_classes[@]#${ED}}" +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-cluster/ceph/ceph-14.2.4.ebuild b/sys-cluster/ceph/ceph-14.2.4.ebuild deleted file mode 100644 index 82af9e6a844e..000000000000 --- a/sys-cluster/ceph/ceph-14.2.4.ebuild +++ /dev/null @@ -1,356 +0,0 @@ -# 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,7}} ) -DISTUTILS_OPTIONAL=1 - -inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \ - multiprocessing python-r1 udev user readme.gentoo-r1 toolchain-funcs \ - systemd - -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 ~arm64" -fi - -DESCRIPTION="Ceph distributed filesystem" -HOMEPAGE="https://ceph.com/" - -LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ BSD Boost-1.0 MIT public-domain" -SLOT="0" - -CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) - -IUSE="babeltrace cephfs dpdk fuse grafana jemalloc kerberos ldap libressl" -IUSE+=" lttng +mgr numa rabbitmq +radosgw +ssl static-libs system-boost" -IUSE+=" systemd +tcmalloc test xfs zfs" -IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" - -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/ncurses:0=[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?] ) - kerberos? ( virtual/krb5 ) - rabbitmq? ( net-libs/rabbitmq-c:=[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.70.0[threads,context,python,static-libs?,${PYTHON_USEDEP}] - ~dev-libs/boost-1.67.0[threads,context,python,static-libs?,${PYTHON_USEDEP}] - ) - dev-libs/boost:=[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 ) - dev-python/cython[${PYTHON_USEDEP}] - dev-python/sphinx - dev-util/cunit - test? ( - dev-python/coverage[${PYTHON_USEDEP}] - dev-python/virtualenv[${PYTHON_USEDEP}] - sys-apps/grep[pcre] - sys-fs/btrfs-progs - ) - " -BDEPEND=" app-arch/cpio - >=dev-util/cmake-3.5.0 - dev-util/gperf - dev-util/valgrind - sys-apps/which - sys-devel/bc - virtual/pkgconfig - " -RDEPEND="${COMMON_DEPEND} - net-misc/socat - sys-apps/gptfdisk - sys-block/parted - sys-fs/cryptsetup - sys-fs/lvm2[-device-mapper-only(-)] - !=dev-libs/boost-1.70.0' || \ - eapply "${FILESDIR}/ceph-14.2.3-boost-1.6-python-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 -} - -ceph_src_configure() { - local flag - local mycmakeargs=( - -DWITH_BABELTRACE=$(usex babeltrace) - -DWITH_CEPHFS=$(usex cephfs) - -DWITH_CEPHFS_SHELL=$(if python_is_python3; then usex cephfs; else echo OFF; fi) - -DWITH_DPDK=$(usex dpdk) - -DWITH_FUSE=$(usex fuse) - -DWITH_LTTNG=$(usex lttng) - -DWITH_GSSAPI=$(usex kerberos) - -DWITH_GRAFANA=$(usex grafana) - -DWITH_MGR=$(usex mgr) - -DWITH_MGR_DASHBOARD_FRONTEND=NO - -DWITH_NUMA=$(usex numa) - -DWITH_OPENLDAP=$(usex ldap) - -DMGR_PYTHON_VERSION=$(if python_is_python3; then echo 3; else echo 2; fi) - -DWITH_PYTHON3=$(if python_is_python3; then echo "ON"; else echo "OFF"; fi) - -DWITH_PYTHON2=$(if python_is_python3; then echo "OFF"; else echo "ON"; fi) - -DWITH_RADOSGW=$(usex radosgw) - -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq) - -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 '' 'ON' 'OFF') - -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/${PN}-${PVR}" - -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" \ - || die "failed to remove cmake cache" - - 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 - - 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 - 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 VERBOSE=1 install - popd >/dev/null || die -} - -src_install() { - cmake-utils_src_install - python_foreach_impl python_install - - find "${ED}" -name '*.la' -type f -delete || die - - exeinto /usr/$(get_libdir)/ceph - newexe "${BUILD_DIR}/bin/init-ceph" init-ceph - - 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{,-crash} \ - || 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/{mount.*,ceph-volume{,-systemd}} || die "sed failed" - - local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* ) - dostrip -x "${rados_classes[@]#${ED}}" -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch b/sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch new file mode 100644 index 000000000000..40feaf11ad39 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch @@ -0,0 +1,29 @@ +diff --git a/src/ceph-crash.in b/src/ceph-crash.in +index 5bfb50c474..d53c4eeb6a 100755 +--- a/src/ceph-crash.in ++++ b/src/ceph-crash.in +@@ -1,4 +1,4 @@ +-#!@PYTHON_EXECUTABLE@ ++#!@PYTHON3_EXECUTABLE@ + # -*- mode:python -*- + # vim: ts=4 sw=4 smarttab expandtab + +diff --git a/src/ceph.in b/src/ceph.in +index f060023f57..3a84263ccc 100755 +--- a/src/ceph.in ++++ b/src/ceph.in +@@ -1,4 +1,4 @@ +-#!@PYTHON_EXECUTABLE@ ++#!@PYTHON3_EXECUTABLE@ + # -*- mode:python -*- + # vim: ts=4 sw=4 smarttab expandtab + # +@@ -66,7 +66,7 @@ DEVMODEMSG = '*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH * + def respawn_in_path(lib_path, pybind_path, pythonlib_path, asan_lib_path): + execv_cmd = [] + if 'CEPH_DBG' in os.environ: +- execv_cmd += ['@PYTHON_EXECUTABLE@', '-mpdb'] ++ execv_cmd += ['@PYTHON3_EXECUTABLE@', '-mpdb'] + + if platform.system() == "Darwin": + lib_path_var = "DYLD_LIBRARY_PATH" diff --git a/sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch b/sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch new file mode 100644 index 000000000000..99249fb01a0c --- /dev/null +++ b/sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch @@ -0,0 +1,76 @@ +diff --git a/src/include/blobhash.h b/src/include/blobhash.h +index 597884e4c9..97f2065ce3 100644 +--- a/src/include/blobhash.h ++++ b/src/include/blobhash.h +@@ -14,33 +14,40 @@ + #ifndef CEPH_BLOBHASH_H + #define CEPH_BLOBHASH_H + ++#include + #include "hash.h" + +-/* +-- this is to make some of the STL types work with 64 bit values, string hash keys, etc. +-- added when i was using an old STL.. maybe try taking these out and see if things +- compile now? +-*/ +- + class blobhash { + public: +- uint32_t operator()(const char *p, unsigned len) { +- static rjhash H; +- uint32_t acc = 0; ++ uint32_t operator()(const void* p, size_t len) { ++ static rjhash H; ++ std::uint32_t acc = 0; ++ auto buf = static_cast(p); + while (len >= sizeof(acc)) { +- acc ^= *(uint32_t*)p; +- p += sizeof(uint32_t); +- len -= sizeof(uint32_t); ++ acc ^= unaligned_load(buf); ++ buf += sizeof(std::uint32_t); ++ len -= sizeof(std::uint32_t); + } +- int sh = 0; +- while (len) { +- acc ^= (uint32_t)*p << sh; +- sh += 8; +- len--; +- p++; ++ // handle the last few bytes of p[-(len % 4):] ++ switch (len) { ++ case 3: ++ acc ^= buf[2] << 16; ++ [[fallthrough]]; ++ case 2: ++ acc ^= buf[1] << 8; ++ [[fallthrough]]; ++ case 1: ++ acc ^= buf[0]; ++ [[fallthrough]]; + } + return H(acc); + } ++private: ++ static inline std::uint32_t unaligned_load(const unsigned char* p) { ++ std::uint32_t result; ++ __builtin_memcpy(&result, p, sizeof(result)); ++ return result; ++ } + }; + + +diff --git a/src/msg/msg_types.h b/src/msg/msg_types.h +index b6952ca498..576b7d6b8a 100644 +--- a/src/msg/msg_types.h ++++ b/src/msg/msg_types.h +@@ -566,7 +566,7 @@ namespace std { + size_t operator()( const entity_addr_t& x ) const + { + static blobhash H; +- return H((const char*)&x, sizeof(x)); ++ return H(&x, sizeof(x)); + } + }; + } // namespace std -- cgit v1.2.3