Merge branch 'master' into KBrown-pub

This commit is contained in:
Sandino Araico Sanchez 2019-02-26 01:21:37 -06:00
commit 691c1334c5
6 changed files with 1138 additions and 1 deletions

View file

@ -9,6 +9,7 @@ DIST libressl-2.6.2.tar.gz 3229140 BLAKE2B 65ee69ac9d5754a153ed8e9ca20240cf6d584
DIST libressl-2.6.3.tar.gz 3228661 BLAKE2B 01d1e09a5c4541e1d6b35d0a1cd9246671a7cda404c9818885cce55897dd405585a656b748ca6c959224b7d6155c20700fb4a92c37af42429959162a7ad8fb87 SHA512 5c0a0f86ecad1226c2d9a3a8a2e6f412ac0941d402c213ae1d293cd90c6a684198410db8c5250f83b8e2b00968a089afc39e90e053669fc27f82a4eb7c65f5c9
DIST libressl-2.6.4.tar.gz 3227935 BLAKE2B 48e865448a9e5b0b604b06060091073276aebd376506de73773a5eb9cb0bb4c5b93aa16353b4892abaee97ec933ad77e89775c3f52263d77bb17c68e481b4f70 SHA512 181761da573ff392aaee17dd3dde416d7cbb299ab3e07b49c97e279ceb3f619e78d1dc9ec4c59b0af024f0a8270ff31fe37f8282d0392be34c3143c9647cd246
DIST libressl-2.6.5.tar.gz 3225481 BLAKE2B fcdf0d8b4b68fdb6c17299f4b9897c84f51ec3407abc6c1bf8d474c4424161c563667ca1fb26c45dd20a0e895457e9210b7bd0539581472b94d594cc32a68191 SHA512 0601c73bb5c3d149df7eca3566831f1b35713aa16a15788a291922fce0bffa1ba0bc6ea9cac1fcecfd980009f2292b08b2a57d66b517fc1bc8c7364a24dbbd9d
DIST libressl-2.8.3.tar.gz 3366196 BLAKE2B e32c097b31998d68a31266fbbf3624d5ab8ca716f8c53e423bcf09b3a8ab3542c92a99e259ded7b86f99b45cc199cd44791520a609f18c35d150365de5768eec SHA512 3967e08b3dc2277bf77057ea1f11148df7f96a2203cd21cf841902f2a1ec11320384a001d01fa58154d35612f7981bf89d5b1a60a2387713d5657677f76cc682
EBUILD libressl-2.5.4-r100.ebuild 1295 BLAKE2B 62afb0c600956c3094a7fe1d3da9d583568ffbc768e5586dfe268b0547b9cca9b29815fb6027b05245214c48c236730b30ea43dc75afb411d469cbdabcd0bcef SHA512 805e6f0bc9170570dba7702a1e890986e42ccd045768eeba023fa499132ed427c0eee11ea9f8fd298f33cf319121e4e1a33c78663ca8233be74372a02f13bc91
EBUILD libressl-2.5.5-r100.ebuild 1295 BLAKE2B 62afb0c600956c3094a7fe1d3da9d583568ffbc768e5586dfe268b0547b9cca9b29815fb6027b05245214c48c236730b30ea43dc75afb411d469cbdabcd0bcef SHA512 805e6f0bc9170570dba7702a1e890986e42ccd045768eeba023fa499132ed427c0eee11ea9f8fd298f33cf319121e4e1a33c78663ca8233be74372a02f13bc91
EBUILD libressl-2.6.0-r100.ebuild 1295 BLAKE2B 62afb0c600956c3094a7fe1d3da9d583568ffbc768e5586dfe268b0547b9cca9b29815fb6027b05245214c48c236730b30ea43dc75afb411d469cbdabcd0bcef SHA512 805e6f0bc9170570dba7702a1e890986e42ccd045768eeba023fa499132ed427c0eee11ea9f8fd298f33cf319121e4e1a33c78663ca8233be74372a02f13bc91
@ -18,3 +19,4 @@ EBUILD libressl-2.6.3-r100.ebuild 1356 BLAKE2B db26a717bdcce836279cb11c93bd4405a
EBUILD libressl-2.6.4-r100.ebuild 1356 BLAKE2B db26a717bdcce836279cb11c93bd4405ac9cf84086ce79d90fd4d8dd63b72a19713526da4a53cf32c38d62c4ad62309e9b74ee84077113da9899e4aaaf70d495 SHA512 eedfe387bf37713efe6b27e874daa673763fe479774d0263dcad52dd8ccc9b8a98f79c208d243b0707fbc6b3d24cee2213e9297825a42ea3522d2e07043fbf3c
EBUILD libressl-2.6.4-r101.ebuild 1377 BLAKE2B d9083965ee68b7cbcfda4e86a4c8f5abdc19878de4f0bc3a9625a4ce4ef71377cfd068c97b6304c5d12e4aa6dd27ffd5031a99b31510f883b778cc6f303a48d4 SHA512 b522a20ac79205d3ba1817a3478903da8f0bbab4015bb26cc1611f74a33f61c7cbc271fc28de1faa29dc45cbd542c7bc47e971d25c7c3a65ddbce1dc0a19d79b
EBUILD libressl-2.6.5-r100.ebuild 1388 BLAKE2B 226bbbcb25443acb46997c4c3dc2b302efe1797a339acbc28223c603625f7c014afd6b1f77e302ef7abff0c95ef5027276b419bdc900564880e4fd28ff54a454 SHA512 50d160d31444602e1f3b77afb889a333ce853395ea27d43dbfc3a4d2e2fe04d0d0714592511511fcc967b81a8ca4bdb3946fe2fefec435bcd76c7d0d6d14a96b
EBUILD libressl-2.8.3-r100.ebuild 1332 BLAKE2B abde6ea284027218e7143b116c266c3a39c167b661f1d964976e0d6341968209b14409c5c01ae691f066cb7a850b72c0ede1fd6d200c9e446431ae9300d3435f SHA512 a2164cbf28b52ef7f5dd04722e437e1a342610762fd5fa8ef5dfaea3284f9174cd8d4c03ff73cea71eb6ace0ab4023135e174e60e8a3fdf07af95768d5c5fae9

View file

@ -0,0 +1,51 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit multilib-minimal
DESCRIPTION="Free version of the SSL/TLS protocol forked from OpenSSL"
HOMEPAGE="https://www.libressl.org/"
SRC_URI="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${P}.tar.gz"
LICENSE="ISC openssl"
# Reflects ABI of libcrypto.so and libssl.so. Since these can differ,
# we'll try to use the max of either. However, if either change between
# versions, we have to change the subslot to trigger rebuild of consumers.
SLOT="0/46"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="+asm static-libs test"
REQUIRED_USE="test? ( static-libs )"
PDEPEND="app-misc/ca-certificates"
src_prepare() {
touch crypto/Makefile.in
sed -i \
-e '/^[ \t]*CFLAGS=/s#-g ##' \
-e '/^[ \t]*CFLAGS=/s#-g"#"#' \
-e '/^[ \t]*CFLAGS=/s#-O2 ##' \
-e '/^[ \t]*CFLAGS=/s#-O2"#"#' \
-e '/^[ \t]*USER_CFLAGS=/s#-O2 ##' \
-e '/^[ \t]*USER_CFLAGS=/s#-O2"#"#' \
configure || die "fixing CFLAGS failed"
eapply_user
}
multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
$(use_enable asm) \
$(use_enable static-libs static)
}
multilib_src_test() {
emake check
}
multilib_src_install_all() {
einstalldocs
find "${D}" -name '*.la' -exec rm -f {} + || die
}

View file

@ -43,5 +43,13 @@ AUX make-node-frontend-tarball.bash 3196 BLAKE2B 1779c8fe924d8a341bcf922da310c9e
AUX rbdmap.initd 2373 BLAKE2B b88d79efc722e2de3d1f0269664a976ed45fbb0a1c9d46fcfd058ea64d3ae7fe27d13455f2ac5ca06663d77cfac1d2f9d86d12bba926541042ac09a8778a3a52 SHA512 bbd48d6987e52eaf6d02bccf3aecd06596465af4d3ac93063f9a814106de162a27bf1a33ae1646e669efb3c754f3ba57f395523293ad643b0d81ee588252216b
AUX sysctld 57 BLAKE2B 840eec3d188df4998c7ba8fb923777636ae9d2aa342545b69c12e5ea8aa98ae97349b42b56c65a531b207c5f970f873a79c41789941cdd10b279e38f1616f84d SHA512 410f5d721c6cfcc5d7ddaff4f348345140d4b8e1b8fddccb537118bfc59f573ecad63db448598423c9a58fcfdb4cef90e6af27b838e6b77955dfd47673f0f52a
DIST ceph-12.2.10.tar.gz 78884870 BLAKE2B 321d8256fc6659be3da2ce348e022e79ded63783925c02d3140ffa7fed5528a2b03388f0dfcdf536c81eec7b2484c6db9def8aefb1d5d335c86bad525977977b SHA512 2195a04bf937dba6af61389132240661126ef32e9fd86ca75af27a33c712053b15aa89b52c91ced04f06dc880d7c018afa3f26fff78bf313603f4fb73331b80c
DIST ceph-13.2.1-frontend-node-modules.tar.xz 44352460 BLAKE2B 0a0099e60f0b36d48928dcda3f69dbb00e14a9a9e10c688ecbeb3daa3adbe339655652a43924043fe140ce1754525be2abed61f1ad5f24779fa4ff890d2b7cf6 SHA512 3938e8cadb6385cdaf023fe55ab5f202e44ed80173b128e3b76fc4849556cea90ce5d8884a928b93776b0509b5aef814f1078ba5e44a9d644b43a871aea06dd9
DIST ceph-13.2.1.tar.gz 90786830 BLAKE2B e0884a039ff0e8a1705d8f31f4dcf4cd8ab8989d7c2fa703417038ff9a6cf7b0fbca09abceb901970fbb2dd9a1dc87c2500fec38a2bfca86a9a6dcaab15be991 SHA512 411218ea6037bdf9425a741720ea89876e893e64fbfa518c9584ba581f805fde2c82b13ed47313279665e5d20f36223fc8d5c27055b580c72b22c2004e4da81b
DIST ceph-13.2.2-frontend-node-modules.tar.xz 45100632 BLAKE2B c3929a6c5e6ec3da5ff60967ae40b99377b2186f31e64af571d9be14889d90bc48b570489aea300ead8e99afc0e62db4438cf343686757a39d84889e772c7fa9 SHA512 93eabc2010c0977c2980c739e131d231a809e375c42120e81effc6cecdeaf0e50b4f8c88286993ef60f1ffaede94f637475104e09fd7af58a289350bd670bf2f
DIST ceph-13.2.2.tar.gz 90840817 BLAKE2B db5933f358a1ae6888030bca7522e20545a2e107055dca44b371e295537c854568682fa558d3f90193e0dfe618947918ce21816b5e20795fff8a14bc837216bb SHA512 37c4845ae52550428c7f1e0d77d9d671ea1d6f5cad5bce0713dce97b54f3abe7346daa2cbd44b76638fb74fe7bdc4797033a4bf808253cfc8bec0fa495ec7e03
DIST ceph-13.2.4.tar.gz 90910119 BLAKE2B eb395f435552d91789869bd92fee2a8b2fef155205f13b118bd01be4ff78a8e1dde682425a24311822bb819ec8cf41a9d45245ffa3cb7a921d3269f6658bf920 SHA512 5055979067234ad7fd2774007d524ef4643d968bf7ce42fc8c3f8e469fd84cbd7afc163cd6ddda53584bd5677fdea2fecf8194a378d49724504f639b9f688ff7
EBUILD ceph-12.2.10-r100.ebuild 8246 BLAKE2B bfae3a181a37b2651906bf508b3d5e3edadd865bd5953a4e912dd3d33e0e7e93691b512fb566e38cd7511d24f992a357899eba750553e691c831a5a44b1c8050 SHA512 396230db40c94b057d38bbe7bd3a6af5bf671249e1d2a89340b0f302a72a41ad4557bdb005f17c9239d1b3d7951e94eb32449a1e741bc5a1aa96d224e5edbf26
MISC metadata.xml 1730 BLAKE2B 0cf24323ef1e88d95e448ecaa2df8a4b2a1ac9baf3f433931cd588bdb34b2f268a280a0756402787c73e4ac33dceb60042bafee1d3124dc6e98ba33abc541c73 SHA512 e54693fd32f6ecc16ca244067ce1ebf63ea5939926be2466a9d88a5373b25651bb5c25984ee6dbeecf0099be0988f002ed824b874c5a308fd4fbe35b87dcb53a
EBUILD ceph-13.2.1-r100.ebuild 9417 BLAKE2B e87adb02011d05caf7e9c352a2f7beb86565399cf9eb7f1395a78c08f68a653f75945eec0062687513dec8d1f35ffb1d2f050efba01afe59fd28eea35cbfd002 SHA512 e0042a6caadd9122f358a71646ea996da6867553de1d991a47c5a20ca4af70d113f884fbeacc525134ffda83d130e7843a88bf16b851b40d717989c991090e69
EBUILD ceph-13.2.2-r100.ebuild 10141 BLAKE2B 1d053c2f2f0622eeffcd4234e572ccbc07b7ebd12f87087147fbc1b5a219eaed5c71c6075f6e9a727812c2e4724b1917959de571c3c2a588bf234200a59d99f1 SHA512 4b6c270082be2adbb943cf9378db4adcc673c56fe564fee6bd546088b79491a3f5cd1ee10b3150dc2bac9d2051c3012bcc712d69e15fccaac0f03e11b405f224
EBUILD ceph-13.2.4-r100.ebuild 8740 BLAKE2B 46359af415bf0bcbdac1133521d99a9248c5ffde74753d29f4544633379a4fdbeeb73cda713028f74211250fda56f4a2649ebbb515eae412a192a1b52d820bc0 SHA512 43d410d012adafb59005d57bd753b2e2a7484f54ebebcb4cccd6a588cfe7c4cc960c361f226d1de4f34e1c0841527c98642f18683b37b0be94932cc5ecd4d6ca
MISC metadata.xml 1262 BLAKE2B 53ecfba42a93503f5319f54d8a8ba85edb891a051bdea0c93b5a717225a2ba8d828069458e7039a7b8785c0b092c87c8d33e53f7516721db45196af4de372a8a SHA512 5f4bedc0fb4ab055568b75f91fee497a5effc437bebbd72b18571228bb1a1c07c5c1486d6df0c5da29c0e489ec4ccd80a8eeeaf0916f8ec8ce892cd6695b9d42

View file

@ -0,0 +1,361 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
DISTUTILS_OPTIONAL=1
inherit check-reqs 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
mgr-frontend? ( mirror://gentoo/${P}-frontend-node-modules.tar.xz )"
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"
IUSE+=" +mgr mgr-frontend +radosgw +ssl static-libs +system-boost"
IUSE+=" systemd +tcmalloc 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?] )
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?] )
mgr? (
<net-libs/nodejs-9.0
>net-libs/nodejs-8.10
)
mgr-frontend? ( net-libs/nodejs[npm] )
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/tox[${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
!<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*') )
mgr-frontend? ( mgr || ( $(python_gen_useflags 'python2*') ) )
?? ( jemalloc tcmalloc )
"
# currently does not configure without the mgr
REQUIRED_USE+=" mgr"
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"
STRIP_MASK="/usr/lib*/rados-classes/*"
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.0-no-virtualenvs.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
# 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=$(usex mgr-frontend)
-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
-DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
-DEPYTHON_VERSION="${EPYTHON#python}"
)
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:-${CMAKE_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 -r "${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() {
if use mgr-frontend; then
# npm likes trying to create /etc/npm
addpredict /etc/npm
# subshell to avoid polluting the environment
(
python_setup 'python2*'
export CC="$(tc-getCC)" CXX="$(tc-getCXX)"
set -e
pushd src/pybind/mgr/dashboard/frontend >/dev/null
npm install --offline --no-save --verbose --parseable \
--no-rollback --no-progress --fetch-retries=0 \
--nodedir="/usr/include/node" \
--cache="${WORKDIR}/${P}-npm-cache" \
--registry="http://npmjs.invalid" \
--sass-binary-site="http://sass.invalid"
# this tends to get installed to the system if it's still here
rm -rf node_modules/node-sass/build
popd >/dev/null
) || die "failed to build node modules for mgr-frontend"
fi
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
prune_libtool_files --all
exeinto /usr/$(get_libdir)/ceph
newexe "${CMAKE_BUILD_DIR}/bin/init-ceph" ceph_init.sh
insinto /etc/logrotate.d/
newins "${FILESDIR}"/ceph.logrotate ${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-r8" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r4" ${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"
}
pkg_postinst() {
readme.gentoo_print_elog
}

View file

@ -0,0 +1,380 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 2017-2018 Sony Interactive Entertainment Inc.
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
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
mgr-frontend? ( mirror://gentoo/${P}-frontend-node-modules.tar.xz )"
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"
IUSE+=" +mgr mgr-frontend +radosgw +ssl static-libs +system-boost"
IUSE+=" systemd +tcmalloc 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?] )
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?] )
mgr? (
<net-libs/nodejs-9.0
>net-libs/nodejs-8.10
)
mgr-frontend? ( net-libs/nodejs[npm] )
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/tox[${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
!<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*') )
mgr-frontend? ( mgr || ( $(python_gen_useflags 'python2*') ) )
?? ( jemalloc tcmalloc )
"
# building npm stuff is currently broken
REQUIRED_USE="!mgr-frontend"
# 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"
STRIP_MASK="/usr/lib*/rados-classes/*"
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.0-no-virtualenvs.patch"
"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.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() {
if use cephfs; then
eerror "Cephfs support is broken in 13.2.2, please mask ${PF} if"
eerror "you need cephfs support: "
eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
eerror
eerror "See https://bugs.gentoo.org/670592 for more information"
die "CephFS support is currently broken"
fi
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=$(usex mgr-frontend)
-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
-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:-${CMAKE_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 -r "${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() {
if use mgr-frontend; then
# npm likes trying to create /etc/npm
addpredict /etc/npm
# subshell to avoid polluting the environment
(
python_setup 'python2*'
export CC="$(tc-getCC)" CXX="$(tc-getCXX)"
set -e
pushd src/pybind/mgr/dashboard/frontend >/dev/null
npm install --offline --no-save --verbose --parseable \
--no-rollback --no-progress --fetch-retries=0 \
--nodedir="/usr/include/node" \
--cache="${WORKDIR}/${P}-npm-cache" \
--registry="http://npmjs.invalid" \
--sass-binary-site="http://sass.invalid"
# this tends to get installed to the system if it's still here
rm -rf node_modules/node-sass/build
popd >/dev/null
) || die "failed to build node modules for mgr-frontend"
fi
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
prune_libtool_files --all
exeinto /usr/$(get_libdir)/ceph
newexe "${CMAKE_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-r10" ${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"
}
pkg_postinst() {
readme.gentoo_print_elog
}

View file

@ -0,0 +1,335 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
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 ~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+=" +radosgw +ssl static-libs +system-boost systemd +tcmalloc test"
IUSE+=" 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?] )
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?] )
mgr? (
<net-libs/nodejs-9.0
>net-libs/nodejs-8.10
)
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/tox[${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
!<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"
STRIP_MASK="/usr/lib*/rados-classes/*"
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.0-no-virtualenvs.patch"
"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.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
-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
-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:-${CMAKE_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 -r "${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
prune_libtool_files --all
exeinto /usr/$(get_libdir)/ceph
newexe "${CMAKE_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-r11" ${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"
}
pkg_postinst() {
readme.gentoo_print_elog
}