diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-09-30 17:27:54 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-09-30 17:27:54 +0100 |
commit | f70a1bfc721336d4fc7dfb711c2f518a6b18cf16 (patch) | |
tree | e907cb121b30e3c1df1710719c0ddf4029597a47 /sys-cluster/ceph | |
parent | db063b515939ab15261136b24e4bc44386335c0c (diff) |
gentoo resync : 30.09.2020
Diffstat (limited to 'sys-cluster/ceph')
-rw-r--r-- | sys-cluster/ceph/Manifest | 5 | ||||
-rw-r--r-- | sys-cluster/ceph/ceph-14.2.11-r1.ebuild | 401 | ||||
-rw-r--r-- | sys-cluster/ceph/ceph-15.2.5-r1.ebuild (renamed from sys-cluster/ceph/ceph-15.2.5.ebuild) | 2 | ||||
-rw-r--r-- | sys-cluster/ceph/files/ceph-14.2.11-systemd-unit-fix.patch | 27 | ||||
-rw-r--r-- | sys-cluster/ceph/files/ceph-15.2.5-systemd-unit-fix.patch | 27 |
5 files changed, 461 insertions, 1 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index c1d5b132b335..5adc78b99a38 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -22,6 +22,7 @@ AUX ceph-14.2.0-mgr-python-version.patch 685 BLAKE2B fbd36e0f5fe45be7cc58cf11b2b AUX ceph-14.2.10-build-without-mgr.patch 3248 BLAKE2B a0d435b1e5572d29f5d961bdb5e27da10060777d02c07616cd57abf0a734af0595093f3ead54be6ea74e450543917df55657b08d5f04681468d166c7dd0570ab SHA512 e03cd8dd9f08f348805d04e554e8a4c9bb2d83e931d1ba27c4265084b899031ddee12e3cc289aa927994c35b75a1bc383a0ee6648c7f8fee6864d775bb800fbf AUX ceph-14.2.10-missing-includes.patch 634 BLAKE2B 2c12c908e74a93de06a8d554057a2b45cbf3969c0eee51402e31f713ecae7394d195e0a85433d90be944b9df4aee93259fd8a50663cad1c3a7a798defb71f5de SHA512 4b5cf3201b03e9c92260bf01966aa4f6992fe9ba76f2b2f4c3211bcd2f978a76e9b7d4820d79dfbbf9e3f98ccda1929ae92343397db29724120047ce0bbd25d2 AUX ceph-14.2.10-python-warnings.patch 1536 BLAKE2B 49ce59204096e02f9e10037dcd365fdc6e95cabf69602592019470cc069835b139b6ac2664aff94ddf6226998fa63337db751b9daa7c9ec87eb4729063a34f4e SHA512 c9ebdfaa9d93ca8e287059f817df01294d0a523831e4212e534cfbcabfc70d4e11d154fce42931f8e65926cb7e5cff09dc9c8165268bf24010533e471e370aa1 +AUX ceph-14.2.11-systemd-unit-fix.patch 1110 BLAKE2B 6964fb2e9e09fef25020b8c0f3bdfc225864f3840c63349355111626260116a25c6eff9f3e34a1cdc7d5ddbf2517b8df768f4fb83a9f7d2088393c7dc6a91848 SHA512 c9d43af2d02e77c163b457603d0a519a0849eca4109b828a4e000b5e428679e81396f842f91a521d688f6c5867420a40fe893f529f9bbea9624bbcc4400377fb 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 @@ -32,6 +33,7 @@ AUX ceph-15.2.2-systemd-unit.patch 682 BLAKE2B 1ec8c0a23fc7d572c79ca24aaf82100e1 AUX ceph-15.2.3-spdk-compile.patch 376 BLAKE2B 073cee321c1a99f9a161fbec8f9e33bb13df14574e48300d1331dc2b31353f1ccac40f723de501c6e33bc6f065f4b4500048de9d9b0bae646c76ba715eab580a SHA512 c2890202820d022bf610d6317b0a6e3521da2060bb12e39ba1a5c347096d5688adcd98b1cbf25ad33ddfa78d3cae42669c21f4e1dbe6eceb150e4ee17bece582 AUX ceph-15.2.4-system-uring.patch 2170 BLAKE2B aabfb8c5085de8d69c9afedd20cb99161fd556148f1e6c88c35ed1bdb83dafe28ddbe75ac1e579e23d0728856bb2c650895ab4c0791b0f8e6acf2652822b14f1 SHA512 8258661e56b5360f4260fdd29b07bac4d415068a112b61ca8c55c529fb1593d8d61a0d59a4eec8f1567b97167c058082198d008f55f8ee701cb46489df5f7823 AUX ceph-15.2.5-missing-includes.patch 435 BLAKE2B 66c4b30629203694bd0d5c82f5977a0576c67b3cb14d678e6ab60bc7a933e65306b122e253856bae7862637564e14a93b9cd2c48c9b510e01cc316fc7be9f218 SHA512 84de66f64ea96cd59b40dfb5b8c5d093fe49df1139b45ad9d1bd6b9ebd2f1200b6e931adcf032639a4995af322cf05c1ef9050eb1cb6673e29e040d4e348b3d5 +AUX ceph-15.2.5-systemd-unit-fix.patch 1114 BLAKE2B 589874deeda1bd21fb0aa83980083448b03f2185be15e23bc1a550f96d46f613d55f5134244f8b36f9e08883acdc3b49731ea5f56726c9ab2c455a1cdb0f796a SHA512 91fc1b88cba37d329f6280c94ed246bdaf5eb6e602a2537b130a764bad4179090bbb79e8a3e50e464e57703233da85da7e1a795987d28dd3aab7ef544d9af78a 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 @@ -50,7 +52,8 @@ DIST ceph-14.2.11.tar.gz 129327263 BLAKE2B fb04f3fde6642905dd21836c7472cf3b6cb48 DIST ceph-15.2.4.tar.gz 148011928 BLAKE2B c0222725227cf922ed10bb19840b8cbfe0c0b8ae77a4f83f03a95c3fc198165740f7a1dee5e1983e9403634ce389c858e71ed3f2731202630e19961a5de0247a SHA512 94e9b4c87d9f27dbfc9961b853f2cf159d65b614bf50ac3dabad9d801a181c547550ab4bca1f48c7a6e11aa6188e5858b110a9023dc214a043ed5ba375b3dee2 DIST ceph-15.2.5.tar.gz 149219528 BLAKE2B 8f2cea9a258b7c530bff72a46d45fabf5364cf919f098c7d77857afa0dfdbcd7c290aa5a0d88cce1d99923588cc303d27c0b85179378ff1c394d9ce0f135a1b1 SHA512 55de068886c48293e92ef95cf8343ae44825fd2bf9c3fa7d47cda92907a47bae79e0af730cd34d0155b0777901d0fd6f9d1f30537c66c54c95098df7368fca2e EBUILD ceph-12.2.12-r3.ebuild 8084 BLAKE2B 10c1bb21651ca274643565a22794b4c6d8c61c9baa19fca9ffa396d6cbbf22b72b5601457b01ba62c1cdd6400ca965c6a8bdc638a959df315c57f0d272e36b5a SHA512 2cfdd77569da5c05354036e3d3864abab69e889e1cee142ed10782fb989353a8c9d7c491ef8e3fd6a872700b6a341413a591e0a341aa1a1ffca988be5b6a9af0 +EBUILD ceph-14.2.11-r1.ebuild 10619 BLAKE2B a3498c221b993d0ae37a8b00077bb1fdfebe6ff32cfc732d99866cf9c494f96bc107e00087d6397f0f66e21521744f4c86bb0e8ca94893273595aa08c6937452 SHA512 12cf71f3072f804eab749ca7d16892cfaed376dd8274719e8da9481b1a0bf63a3f07828d7f9b2444e7a1fb38a25776bdcbcd091cd988423e357e0ed82a29ea24 EBUILD ceph-14.2.11.ebuild 10416 BLAKE2B 0bb2b1c54d1eb8b63ec7a93a56fe2634232ac0aea31a1021a446c5d426921f6dc0e5f7d2f1017616a91830e67b7987fff477915b8a11386f360c6894b7c1e48d SHA512 b853708a69288d5628daa819cd40df9d5b3fe8da270df25767dc54f0a5b0ad08acf0a5d3d885ee5d2d5ce0359b8dcd492f8092cf9932eead89673c7ae9cab122 EBUILD ceph-15.2.4-r3.ebuild 10576 BLAKE2B 0baf88168d628883949a4f284e59e6d81e9e0d8e2a631ddb0b3bd2c696ec168151235fa0a95c98b9843d4d7b0f4c9058cbdb735ca0c9d3da86dcebf6d74df29e SHA512 a4b17fb21d86e2dce10927545f5d888d35fa1e0edc7d4e1025a65ad0a6e18c377434018d3b9242ec5d3ac59e702a4f02c17dae9ed7523b6cf39db1faa70a902f -EBUILD ceph-15.2.5.ebuild 10694 BLAKE2B 4087305c800b75a56633bcab24e6c6241c0d5f563c6838459e39c648d2750d559a281c1cdef3de33b69564cd74a589eb3f3c0bec8f9f4cad82716d093bb3682d SHA512 2781ef4a263ce1c6bcf26357e773c8a89e4cb54dfcc75176033817a332b661ef39154bd47039562f39047e1dda8cbfaab33c1807964626c0271cbaf411d82344 +EBUILD ceph-15.2.5-r1.ebuild 10777 BLAKE2B 7f072e92726d0ff2edcc953825e42ba1e81abdd83b741564b9b191e25ae0eb8e289e6243f134ac9c999273a226d62e414227e0a0c053045c23ff027cca34234f SHA512 e666f2d0fa297ce9061413afefb9a35822375c97785955301cbee401f9623c7ae2bc813a11e01a7fc6081da26c4e578b4fa30f438719d89fe9e3e5624dd36ea6 MISC metadata.xml 2117 BLAKE2B 5aacfd24e535c6941c3b53ac2ecea9a8837511f2656ac1447b004fc6949818826321c455c0d401e79dcc21d6f5686162f69da9b6994dd4427157db47eab7894e SHA512 126776f9836132f200496c1a5eccd2bf069b8e962b47defd1b01e65d4b58204565ab8a1736d40f49e0c7b733c43bf4507fe2fc19b62c5d3935061da7980f203c diff --git a/sys-cluster/ceph/ceph-14.2.11-r1.ebuild b/sys-cluster/ceph/ceph-14.2.11-r1.ebuild new file mode 100644 index 000000000000..35c24e6a41de --- /dev/null +++ b/sys-cluster/ceph/ceph-14.2.11-r1.ebuild @@ -0,0 +1,401 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +CMAKE_MAKEFILE_GENERATOR=emake + +DISTUTILS_OPTIONAL=1 + +inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \ + python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles + +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 ~ppc64" +fi + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +LICENSE="Apache-2.0 LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ LGPL-2.1 LGPL-3 GPL-3 BSD Boost-1.0 MIT public-domain" +SLOT="0" + +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) + +IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc + kafka kerberos ldap libressl lttng +mgr numa +openssl rabbitmq +radosgw +ssl + spdk system-boost systemd +tcmalloc test xfs zfs" +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" + +DEPEND=" + acct-group/ceph + acct-user/ceph + virtual/libudev:= + app-arch/bzip2:= + app-arch/lz4:= + app-arch/snappy:= + app-arch/zstd:= + app-shells/bash:0 + app-misc/jq:= + dev-libs/crypto++:= + dev-libs/leveldb:=[snappy,tcmalloc(-)?] + dev-libs/libaio:= + dev-libs/libnl:3= + dev-libs/libxml2:= + dev-libs/xmlsec:=[!openssl?,!libressl?] + dev-cpp/yaml-cpp:= + dev-libs/nss:= + dev-libs/protobuf:= + net-dns/c-ares:= + net-libs/gnutls:= + sys-auth/oath-toolkit:= + sys-apps/coreutils + sys-apps/grep + sys-apps/hwloc:= + sys-apps/keyutils:= + sys-apps/util-linux:= + sys-apps/sed + sys-apps/util-linux + sys-libs/libcap-ng:= + sys-libs/ncurses:0= + sys-libs/zlib:= + sys-process/numactl:= + x11-libs/libpciaccess:= + babeltrace? ( dev-util/babeltrace ) + fuse? ( sys-fs/fuse:0= ) + jemalloc? ( dev-libs/jemalloc:= ) + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) + kafka? ( dev-libs/librdkafka:= ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + lttng? ( dev-util/lttng-ust:= ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + radosgw? ( + dev-libs/expat:= + openssl? ( + dev-libs/openssl:= + net-misc/curl:=[curl_ssl_openssl] + ) + libressl? ( + dev-libs/libressl:= + net-misc/curl:=[curl_ssl_libressl] + ) + ) + ssl? ( + openssl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) + ) + system-boost? ( =dev-libs/boost-1.72*[threads,context,python,${PYTHON_USEDEP}] ) + xfs? ( sys-fs/xfsprogs:= ) + zfs? ( sys-fs/zfs:= ) + ${PYTHON_DEPS} +" +BDEPEND=" + amd64? ( dev-lang/yasm ) + x86? ( dev-lang/yasm ) + app-arch/cpio + >=dev-util/cmake-3.5.0 + dev-python/cython[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/cunit + dev-util/gperf + dev-util/ragel + dev-util/valgrind + sys-apps/coreutils + sys-apps/findutils + sys-apps/grep + sys-apps/sed + sys-apps/which + sys-devel/bc + sys-devel/patch + virtual/pkgconfig + test? ( + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + sys-apps/grep[pcre] + sys-fs/btrfs-progs + ) +" +RDEPEND="${DEPEND} + app-admin/sudo + net-misc/socat + sys-apps/gptfdisk + >=sys-apps/smartmontools-7.0 + sys-block/parted + sys-fs/cryptsetup + sys-fs/lsscsi + sys-fs/lvm2[-device-mapper-only(-)] + virtual/awk + 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}] + mgr? ( + dev-python/more-itertools[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pyjwt[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/routes[${PYTHON_USEDEP}] + diskprediction? ( + $(python_gen_cond_dep '<dev-python/scipy-1.4.0[${PYTHON_USEDEP}]' python3_{6,7}) + ) + sci-libs/scikits_learn[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ) +" +# diskprediction needs older scipy not compatible with py38 +# bug #724438 +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ?? ( jemalloc tcmalloc ) + ^^ ( openssl libressl ) + diskprediction? ( mgr !python_targets_python3_8 ) + kafka? ( radosgw ) + mgr? ( cephfs ) + rabbitmq? ( radosgw ) +" +RESTRICT="!test? ( test )" + +# the tests need root access +RESTRICT="test? ( userpriv )" + +# distribution tarball does not include everything needed for tests +RESTRICT+=" test" + +# create a non-debug release +CMAKE_BUILD_TYPE=RelWithDebInfo + +# false positives unless all USE flags are on +CMAKE_WARN_UNUSED_CLI=no + +PATCHES=( + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch" + "${FILESDIR}/ceph-14.2.0-cflags.patch" + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch" + "${FILESDIR}/ceph-13.2.0-cflags.patch" + "${FILESDIR}/ceph-14.2.0-mgr-python-version.patch" + "${FILESDIR}/ceph-14.2.5-no-virtualenvs.patch" + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch" + "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch" + "${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch" + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch" + "${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch" + "${FILESDIR}/ceph-14.2.4-python-executable.patch" + "${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch" + "${FILESDIR}/ceph-14.2.10-missing-includes.patch" + "${FILESDIR}/ceph-14.2.10-python-warnings.patch" + "${FILESDIR}/ceph-14.2.10-build-without-mgr.patch" + "${FILESDIR}/ceph-14.2.11-systemd-unit-fix.patch" +) + +check-reqs_export_vars() { + CHECKREQS_DISK_BUILD="5200M" + CHECKREQS_DISK_USR="510M" + + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR +} + +pkg_pretend() { + check-reqs_export_vars + check-reqs_pkg_pretend +} + +pkg_setup() { + python_setup + check-reqs_export_vars + check-reqs_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + if use system-boost; then + find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \ + | xargs --null sed -r \ + -e 's|Boost::|boost_|g' \ + -e 's|Boost_|boost_|g' \ + -e 's|[Bb]oost_boost|boost_system|g' -i || die + fi + + sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \ + src/bash_completion/CMakeLists.txt || die + + if ! use diskprediction; then + rm -rf src/pybind/mgr/diskprediction_local || die + fi + + # 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=$(usex cephfs) + -DWITH_DPDK=$(usex dpdk) + -DWITH_SPDK=$(usex spdk) + -DWITH_FUSE=$(usex fuse) + -DWITH_LTTNG=$(usex lttng) + -DWITH_GSSAPI=$(usex kerberos) + -DWITH_GRAFANA=$(usex grafana) + -DWITH_MGR=$(usex mgr) + -DWITH_MGR_DASHBOARD_FRONTEND=OFF + -DWITH_NUMA=$(usex numa) + -DWITH_OPENLDAP=$(usex ldap) + -DWITH_PYTHON3=3 + -DWITH_RADOSGW=$(usex radosgw) + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq) + -DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka) + -DWITH_SSL=$(usex ssl) + -DWITH_SYSTEMD=$(usex systemd) + -DWITH_TESTS=$(usex test) + -DWITH_XFS=$(usex xfs) + -DWITH_ZFS=$(usex zfs) + -DENABLE_SHARED="ON" + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')") + -DWITH_SYSTEM_BOOST=$(usex system-boost) + -DBOOST_J=$(makeopts_jobs) + -DWITH_RDMA=OFF + -DWITH_TBB=OFF + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir) + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(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 + + # needed for >=glibc-2.32 + has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON) + + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \ + || die "failed to remove cmake cache" + + cmake_src_configure + + # bug #630232 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \ + "${BUILD_DIR:-${S}}"/include/acconfig.h \ + || die "sed failed" +} + +src_configure() { + use custom-cflags || strip-flags + 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_build 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_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/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 + newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf + + readme.gentoo_create_doc + + python_setup + + # 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 + local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]' + grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \ + | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die + + 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-15.2.5.ebuild b/sys-cluster/ceph/ceph-15.2.5-r1.ebuild index 942ffd88e776..e86923bb2522 100644 --- a/sys-cluster/ceph/ceph-15.2.5.ebuild +++ b/sys-cluster/ceph/ceph-15.2.5-r1.ebuild @@ -3,6 +3,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_USE_SETUPTOOLS=rdepend CMAKE_MAKEFILE_GENERATOR=emake DISTUTILS_OPTIONAL=1 @@ -199,6 +200,7 @@ PATCHES=( "${FILESDIR}/ceph-15.2.3-spdk-compile.patch" "${FILESDIR}/ceph-15.2.4-system-uring.patch" "${FILESDIR}/ceph-15.2.5-missing-includes.patch" + "${FILESDIR}/ceph-15.2.5-systemd-unit-fix.patch" ) check-reqs_export_vars() { diff --git a/sys-cluster/ceph/files/ceph-14.2.11-systemd-unit-fix.patch b/sys-cluster/ceph/files/ceph-14.2.11-systemd-unit-fix.patch new file mode 100644 index 000000000000..7309fea029e1 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-14.2.11-systemd-unit-fix.patch @@ -0,0 +1,27 @@ +From bd8b8540f6b67a25585ca9cf140d6de760bc2a43 Mon Sep 17 00:00:00 2001 +From: Jan Fajerski <jfajerski@suse.com> +Date: Fri, 12 Jun 2020 09:27:36 +0200 +Subject: [PATCH] systemd/ceph-osd: ceph-osd-prestart.sh now lives in + /usr/libexec + +Fixes: https://tracker.ceph.com/issues/45984 +Fixes: ed6552d5067c9f1d34c426f9ae18b0c37f2a9d29 + +Signed-off-by: Jan Fajerski <jfajerski@suse.com> +--- + systemd/ceph-osd@.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/systemd/ceph-osd@.service.in b/systemd/ceph-osd@.service.in +index a0067d347220..4a2254e99478 100644 +--- a/systemd/ceph-osd@.service.in ++++ b/systemd/ceph-osd@.service.in +@@ -9,7 +9,7 @@ Environment=CLUSTER=ceph + EnvironmentFile=-@SYSTEMD_ENV_FILE@ + Environment=CLUSTER=ceph + ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph +-ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i ++ExecStartPre=@CMAKE_INSTALL_FULL_LIBEXECDIR@/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i + ExecReload=/bin/kill -HUP $MAINPID + LockPersonality=true + MemoryDenyWriteExecute=true diff --git a/sys-cluster/ceph/files/ceph-15.2.5-systemd-unit-fix.patch b/sys-cluster/ceph/files/ceph-15.2.5-systemd-unit-fix.patch new file mode 100644 index 000000000000..a127ada181f2 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-15.2.5-systemd-unit-fix.patch @@ -0,0 +1,27 @@ +From bd8b8540f6b67a25585ca9cf140d6de760bc2a43 Mon Sep 17 00:00:00 2001 +From: Jan Fajerski <jfajerski@suse.com> +Date: Fri, 12 Jun 2020 09:27:36 +0200 +Subject: [PATCH] systemd/ceph-osd: ceph-osd-prestart.sh now lives in + /usr/libexec + +Fixes: https://tracker.ceph.com/issues/45984 +Fixes: ed6552d5067c9f1d34c426f9ae18b0c37f2a9d29 + +Signed-off-by: Jan Fajerski <jfajerski@suse.com> +--- + systemd/ceph-osd@.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/systemd/ceph-osd@.service.in b/systemd/ceph-osd@.service.in +index a0067d347220..4a2254e99478 100644 +--- a/systemd/ceph-osd@.service.in ++++ b/systemd/ceph-osd@.service.in +@@ -9,7 +9,7 @@ Environment=CLUSTER=ceph + EnvironmentFile=-@SYSTEMD_ENV_FILE@ + Environment=CLUSTER=ceph + ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph +-ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i ++ExecStartPre=@CMAKE_INSTALL_FULL_LIBEXECDIR@/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i + ExecReload=/bin/kill -HUP $MAINPID + LockPersonality=true + MemoryDenyWriteExecute=true |