summaryrefslogtreecommitdiff
path: root/sys-cluster/ceph
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-06 18:23:20 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-06 18:23:20 +0000
commitd37b97a25b8b10f748eead6574b01f893f140b01 (patch)
tree13e2a142a31cd193a39c63042a64cab29a1f7ae9 /sys-cluster/ceph
parenta833e3f4a431b8eea751b7420e127787f9c92117 (diff)
gentoo resync : 06.12.2017
Diffstat (limited to 'sys-cluster/ceph')
-rw-r--r--sys-cluster/ceph/Manifest5
-rw-r--r--sys-cluster/ceph/ceph-12.2.2.ebuild288
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch34
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r470
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r687
5 files changed, 484 insertions, 0 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
index 765ad153e995..7c0153180059 100644
--- a/sys-cluster/ceph/Manifest
+++ b/sys-cluster/ceph/Manifest
@@ -19,6 +19,7 @@ AUX ceph-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch 1353 BLAKE2B
AUX ceph-12.2.0-cflags.patch 536 BLAKE2B 9eb8dc48db09d35f86de280a36763b7a56d980adbaa2d68045e6378cb68904e939d8e7f7325fc5102151ea4e1f5133751b620885d1d0b3d6fe565291272b4b2a SHA512 9864da1a83c1145d143eedd73fd3ff142b354fd0bffa73a25f30eabd68d7eddee82208be7b7da74536ba4c996808aa77fc55bcf562a409240d69cbd249ef1d75
AUX ceph-12.2.0-use-provided-cpu-flag-values.patch 1590 BLAKE2B 684dfd301a144e2958497bf588515b0319d4e2c5cc5a6c5949d4c2c6f0d41f94aca2c43c020285f4b467f42f9f9a3944ce3a5600dc95e3b8443c8420cfb76128 SHA512 ecf4067776a146cf2aaf0b83298e508a6073147e555f4f9ba73cf2d9e0fe26d9ea72fff8af1c67eaa436e30d32ed260f75683c7d77b27a88fbb098b561d13f0d
AUX ceph-12.2.1-systemd-unitdir.patch 345 BLAKE2B b97856edd071beb28e46301e97f996176dd62b6824ccc2154b7640ce629b1c0698c2d79e074a2df3af91ab34d6f7e84b2a5a04d41d8fa3b64b571a016ab14f19 SHA512 a29373704f645f5b52597f5482fb4538f3d335bb1020c206a089ba58707f988cf42d335f17a36911f373936f8e769613c3d3fa98f55c1fd91d433d036b769bcc
+AUX ceph-12.2.2-build-without-radosgw.patch 999 BLAKE2B 2e4d995f82c43ca3d96c3e5f9acd8bf827b85055f4d558688de899b52573d7445ed72979bec5cd074b6ed3a7139227605571f79a5fbc5b2f0a2ce942d11d2296 SHA512 8ff2efef0bcf0fcf339cefeee6a54384ea6a2c219bc8b171e2306ca9043ffd9d95468c567966fabb5c1373adb00b4fe036daddb7715c232c029cda1e3d21bb83
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
@@ -26,9 +27,11 @@ AUX ceph-osd_at.service.conf 115 BLAKE2B d234b9bd718585baf43f229f583e211607aab02
AUX ceph.confd-r1 69 BLAKE2B 2e75612a1c36057ab41939b4022c8211e32082a812e9636862fd97b4250594fbf3fbd6739e4faf84c056a8b5402a9089250ea84ce504f2bf2453c09f34dc2fee SHA512 b7f7ebb48b94398eaabb6df2cf3a5697d9a055ea4dd9b73c40d2bbf0e1445f418ed760b1f4ebb13cbb7315b2583847eb97b8649f67b6b7cf98081c0599c86aaa
AUX ceph.confd-r2 171 BLAKE2B 1d36905fdf12edd863679ddaede09b479091a972eba05fab9a6db402e49907e270ecc395524326d6d7fb37901224e4ba45a3eaa23adb2227e2d1b78d9661fd0a SHA512 f7170644341e6c8dcb71ca3a4325c8da3325ebe83898cbf11b47b41ea4f899781b9bc87fd21e006292de78fe9e905ac4703d10afcf91a4687002663469201ba9
AUX ceph.confd-r3 1315 BLAKE2B bf5c573be6bcfd2c7f077087c36f8e918f027ad81b18ec496348ed155c97332ad6d1567a9c69a3c887fa0bdd184b98cbe7b73198db32aae248e31c7599857a96 SHA512 1d192cc8eec9b294440ee6c43966ccc36669b94007dd6b990c5ee8d18ee1b36730a9a0082ef7170846dcc64adcc61481808e854b6c9bdb2eb1db1c71435d3f05
+AUX ceph.confd-r4 1502 BLAKE2B 51b3d14ce7078a1ba3c458e3c028ceb8b7de02f8187b242c856efab51e64f36ae5435bec761bd85f7b42bfe78ebc28c267ba80ee0b4123b960ffaf35b749ff25 SHA512 ea3e7b668f6fcdf7f1884968a33d06c86448426a83cb132f927c32d83e28adaf8789489e7e817d4349479e3647577ef40190fc75fa88553aac1c7b4f515184c9
AUX ceph.initd-r2 958 BLAKE2B 9aeda4d2a0bad2fc1c190b19b78dd165230aeef932a5335038e650439ff3420a41d2a43ac527fadf700919ba9944b6da551b2fc5a665f915104717ef45474421 SHA512 6f42b8540797d3f55d64b9842e190ca2973c1779c720b7c9923b8bcc06dddf95672bee066275599e4feafeff38652235746433305dd4d7df8ad086a8deb960c0
AUX ceph.initd-r4 1189 BLAKE2B 065554902fdd5c44fff69868e72817ee24916c6f93a3e332b7a673414dc27f80dc73f9f4266fb3c367ccdce036bb90a03b09cdd152f64567d1ba250d711ba0d0 SHA512 dbb69228ee566490bec93823040885e419bfbd7dc076c802cc97b47dde9fbb06a99f61498cc438c90fd0474b2ad7247d756b977fb415b0f1168442036a48bd97
AUX ceph.initd-r5 2178 BLAKE2B d943da59449e796a9c592e173654275b40ba3701fd6c694521a1975e3070ee465b9dbc2ba748cbd99d94e00a82d792ca88f6b4c1cd299572bdd3d8829adcedbe SHA512 4037639b6de65e0966f1aa850778b87f4f8f926af621f68155e98f103e233b7ebb2fba18a65ca150b16767bb80581259f4720c925ed00777d640f19471147c90
+AUX ceph.initd-r6 2180 BLAKE2B c262225412e6e5bf61d315f661721c27f97726dd5eb4cb8696845c29ab95d2ad29b011db6e8d488ce58d71ac875008588737a453de8472ef7f6bb9309fd4f100 SHA512 9f19186da7a6150b4d371fdd5523a07979ef9c318242422f04ed0178b33e6886ac1333cad8a41aa0d75af2aa08d7ee8ec9075d980d32fcddc8558d143a425a01
AUX ceph.logrotate 427 BLAKE2B 9677f1a2a4872addff71527c800dd06bf65e18b589de3869e2a742c43070de789d5089f8739367efb913a64aeec5a8b82f47c129fac580e7c34e4f8cdc8b7332 SHA512 6edace611f46683ca3b8d2154b86ec77cc241909704e0362b728a5f51c2a809c22e83d69df0d58ec6b3a6b8dc8ef2518c220cac920f51e63fe668cdfe1b48bae
AUX envd-tcmalloc 48 BLAKE2B 4a0799ac6bbedfe5e701eead67600312d86f06143dbfd11d2c594c03d09bf13dfa645e5a0bde1189211ad20036dc4fcfce6758d3a5829d943eb337cc65783af9 SHA512 d180b1a888ec6d870ff523a3b10fd00eca479ee2586a236458af5ffaba21c84e7b8098da6d4bc08fb86c82c61a861dd3c3596a01063d734c329a92808682fc8c
AUX rbdmap.initd 2373 BLAKE2B b88d79efc722e2de3d1f0269664a976ed45fbb0a1c9d46fcfd058ea64d3ae7fe27d13455f2ac5ca06663d77cfac1d2f9d86d12bba926541042ac09a8778a3a52 SHA512 bbd48d6987e52eaf6d02bccf3aecd06596465af4d3ac93063f9a814106de162a27bf1a33ae1646e669efb3c754f3ba57f395523293ad643b0d81ee588252216b
@@ -38,6 +41,7 @@ DIST ceph-10.2.3.tar.gz 11596171 SHA256 dca933aa14db67b404d836ef510bd418091978ed
DIST ceph-10.2.7.tar.gz 14518491 SHA256 2cdfeaa9a08e94c2d35f540b450bbf64b2a694bd537679834185e98fc59d8ba2 SHA512 7e0686e9efa4ddd9d548f4145b448f8232f1ca29b08428daa5cd60a74ce26f1176a1f2ebbf2ac1761d9e6c1d364a5ffa194d2b3a18a8111f59b7c27f7a1d7734 WHIRLPOOL b6b6902230401b5f4c6f27801f315678bdc7b99aab4e50b54d941fc3a425b4f0fa9390484f2e12d6b4f962253fb8772fb706dad35d490b4542b06db166fab59b
DIST ceph-10.2.9.tar.gz 14550219 SHA256 3d93f4fc4a66b1d9f9ce43f65868dc18287cea32fbb2c7421faca6aed2b52a80 SHA512 1d59146614aa87ca551b05b795a684071a3cfb4ce6013e978ba650403c6732b2aa13f3c3cc191e6a1ea34b4631c82e97700593c24e200c41ec2f2b43b3ef5547 WHIRLPOOL 42215d33c4f617087e1b0ef81cd41b42330c3605acf625b0668d44eba9e982239683b466a1cc1a6f926fc1d439dfd6be4ce220f783da7d2214d36a2a6cc9181f
DIST ceph-12.2.1.tar.gz 148738778 SHA256 512666ee88610640d66b261f9307c96ccd70eb25cd3349acd083fb1220c8a32e SHA512 ec2623c1f6ab563c6fd0bb5fd046c78528fdbedca7cde347c92a9b15005d2ab2b1a46d7294e93f56933386462f1066750285109aafb6bf94f7d5bcdb7214d8a8 WHIRLPOOL 6a22bc7080483b3fe161bfc441b9fdf1a85d2bd9a394e89db2005a229397d206614d3e7a0d84cf7521822688faf4b92ca75ad4ce586de0d262fdda5c94b4f904
+DIST ceph-12.2.2.tar.gz 148763718 BLAKE2B 5c9a56bc536b723ca3a6a0aa68c7f456032c892716167dfa213cda4964e3a45e970efe6dd67e5c43ef6f6018bd9367e0c890de270acccf3217b848b58cb98488 SHA512 89b166dc4b58e0110ebe0147eef9f47e1090ccee01702b3f72cfbdca856d02bf03b2663de9e88c84b21a2a61f8f92211e217a05b8bdcf7d5de3158adbe49db88
EBUILD ceph-10.2.10.ebuild 7617 BLAKE2B c05b73d899371f5cba42a43437251b79176ac84e09b605666f1d8ff287f4521cb199fb6fda90f42dc5506810fe7bd6948a6645ca7cd32babcc2a373436df1a5f SHA512 afac8da7c498001c6fc3efdce6f0ae253cbaeeddc16076ba39a4b34bf824c61d2b90208a5943785974554b6c8e60e5a10e53ffd8c7171007df31e552a27fc4d7
EBUILD ceph-10.2.3-r2.ebuild 6106 BLAKE2B 046cd931c80f6798b1e52b79fc2acf10753c0983ae4fdfea16c22f63f4a3c17586b9ede8706316ec144309ade8e215dc36778e37ca79b5d9f6478d810008741e SHA512 817064150d5a36d16b899a9d4be37a746a5f0108d73d5fb136e3faee1624763033376087488e30bed9ceb45d1e64f8cebeeadef7b53bd2055e067f271cee328f
EBUILD ceph-10.2.7-r1.ebuild 7150 BLAKE2B d40ee06db786002f4e344fe8cd68f562a53e9b4630c2be5b3c0a2de1050dc5f6e1fc9ce98d0391afd87a446d80c9cdec170be7a8d9348b4a7db575c6727c3ee2 SHA512 52dddba20a114a6baf3fe6149bfafb14a94ab2656924b99b83aef59c6046bdff69f6f12095040e85d2328060167aa7fa43539043d724c5b5b6133546b0453dd5
@@ -46,4 +50,5 @@ EBUILD ceph-10.2.9-r2.ebuild 7467 BLAKE2B db0b1e3637de862cd7a29186e9e027c6f4c5c0
EBUILD ceph-10.2.9-r3.ebuild 8252 BLAKE2B cd99c41910ad34eec65c6702f8967d0e1b1e6e28766e24d3fd125e70bbccd3aa7ff210984855c8bd8c5a3472e1138aecd175c53be8662df119dac437ac6ba2df SHA512 5025aeae8794d66a3bb67f15dad332a8f5c004d911d1ea3bac7fd1d7090f3fc6eccae46c4724690814a5350852914ff8cb91d06a6efb7307550291a6035f26bf
EBUILD ceph-10.2.9.ebuild 7150 BLAKE2B a9300913b99b4770fc85dec74cdb38b18b466272d75901fd5387b248de5b5ff39c0553b3ddbd89649c6c0008d06200b1ecefa9e54b3cc5d2b6edad3bc98b851a SHA512 9b9b506446f88961d26d3e06100cce48c8cdca51b5634aef0c5a85268c03f9ceea8bc84347589344f08093aa98627673a7cdd1c27abeba24674efb185b2e69c9
EBUILD ceph-12.2.1.ebuild 7345 BLAKE2B c7ab34936a4addabc9b5de459427deac56950749ff11c2bcf580082d673fe2e765390119f8d62cf758e810b967bc441a5edfc10b30d32815aec8310e2292eab6 SHA512 04baa2dea342f463b54bede0e7a1286ae70f7fe326d043753ab8c3b43816d41dd98238c18bb90f485492e7354f4bff702370706a2192027a16929e0e83456be0
+EBUILD ceph-12.2.2.ebuild 7322 BLAKE2B 7b062d1a2d81e2758914b441172001d1016d708a9aed2eab8bccb7963b254b5164c91856d9cfb212a07beb7a2fb4c2409377655d8dced83a16c1d61d34543c85 SHA512 67e1e9e14c53b29965cd515fa8d3719575db37954b50c4f2cd917ab136798a6d7aa7f76f63d0e6ac42ff97aeae21267cd5f65703cade62d3b1814cc4005c4829
MISC metadata.xml 1618 BLAKE2B 6e1f4a905b498ea5c85b4fac133a713b6b38eadfcac95f56021bfd6d202568c7550e76d8fbb1caf9545a5c9b022eb9a9240b5eb628057696b9aa46f400306584 SHA512 91f04007bd5164d525fe248251c9b41e5d3a16fe61a0b14c34af0e86b51a97cd8fe8927508f983e7e63d2f40318c4e0fbcbb15e305fb8f6b3d3148455a45896b
diff --git a/sys-cluster/ceph/ceph-12.2.2.ebuild b/sys-cluster/ceph/ceph-12.2.2.ebuild
new file mode 100644
index 000000000000..7040667f3001
--- /dev/null
+++ b/sys-cluster/ceph/ceph-12.2.2.ebuild
@@ -0,0 +1,288 @@
+# Copyright 1999-2017 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 python-r1 udev user systemd \
+ readme.gentoo-r1 flag-o-matic
+
+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 ~x86"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1 CC-BY-SA-1.0 GPL-2 BSD Boost-1.0 MIT"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace cephfs fuse jemalloc ldap lttng +mgr nss +radosgw +ssl"
+IUSE+=" static-libs 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/boost:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
+ dev-libs/crypto++:=[static-libs?]
+ dev-libs/leveldb:=[snappy,static-libs?]
+ dev-libs/libaio:=[static-libs?]
+ dev-libs/libxml2:=[static-libs?]
+ 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:= )
+ nss? ( dev-libs/nss:= )
+ fuse? ( sys-fs/fuse:0=[static-libs?] )
+ ssl? ( dev-libs/openssl:=[static-libs?] )
+ xfs? ( sys-fs/xfsprogs:=[static-libs?] )
+ zfs? ( sys-fs/zfs:=[static-libs?] )
+ radosgw? (
+ dev-libs/expat:=[static-libs?]
+ dev-libs/openssl:=[static-libs?]
+ net-misc/curl:=[static-libs?]
+ )
+ jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
+ !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ app-arch/cpio
+ dev-lang/yasm
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/sphinx
+ dev-util/gperf
+ dev-util/valgrind
+ sys-apps/which
+ sys-devel/bc
+ virtual/pkgconfig
+ test? (
+ 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-apps/openrc-0.26.3
+ dev-python/cherrypy[${PYTHON_USEDEP}]
+ dev-python/flask[${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_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ?? ( ssl nss )
+ ?? ( jemalloc tcmalloc )
+ "
+
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+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.1-systemd-unitdir.patch"
+ "${FILESDIR}/ceph-12.2.2-build-without-radosgw.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 'python2*'
+ check-reqs_export_vars
+ check-reqs_pkg_setup
+ user_setup
+}
+
+src_prepare() {
+ default
+
+ # remove tests that need root access
+ rm src/test/cli/ceph-authtool/cap*.t
+
+ #rm -rf "${UNBUNDLE_LIBS[@]}"
+}
+
+ceph_src_configure() {
+ local flag
+ local mycmakeargs=(
+ -DWITH_BABELTRACE=$(usex babeltrace)
+ -DWITH_CEPHFS=$(usex cephfs)
+ -DWITH_FUSE=$(usex fuse)
+ -DWITH_LTTNG=$(usex lttng)
+ -DWITH_MGR=$(usex mgr)
+ -DWITH_NSS=$(usex nss)
+ -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=yes
+ -DWITH_RDMA=no
+ -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+ )
+ 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
+ pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+ 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 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="${D}" 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-r6" ${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 'python2*'
+
+ # 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
+}
diff --git a/sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch b/sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch
new file mode 100644
index 000000000000..29257c4747d6
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch
@@ -0,0 +1,34 @@
+From b00ac12f4045cd39ac9a436cf32d233d16bc3485 Mon Sep 17 00:00:00 2001
+From: Jason Dillaman <dillaman@redhat.com>
+Date: Tue, 5 Dec 2017 09:58:04 -0500
+Subject: [PATCH] ceph-dencoder: moved RBD types outside of RGW preprocessor
+ guard
+
+Fixes: http://tracker.ceph.com/issues/22321
+Signed-off-by: Jason Dillaman <dillaman@redhat.com>
+---
+ src/test/encoding/types.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h
+index c061e93bd58c..4cfcb15edff1 100644
+--- a/src/test/encoding/types.h
++++ b/src/test/encoding/types.h
+@@ -405,6 +405,8 @@ TYPE(rgw_data_sync_info)
+ TYPE(rgw_data_sync_marker)
+ TYPE(rgw_data_sync_status)
+
++#endif
++
+ #ifdef WITH_RBD
+ #include "cls/rbd/cls_rbd.h"
+ TYPE(cls_rbd_parent)
+@@ -416,8 +418,6 @@ TYPE(cls::rbd::MirrorImage)
+ TYPE(cls::rbd::MirrorImageMap)
+ #endif
+
+-#endif
+-
+ #include "cls/lock/cls_lock_types.h"
+ TYPE(rados::cls::lock::locker_id_t)
+ TYPE_FEATUREFUL(rados::cls::lock::locker_info_t)
diff --git a/sys-cluster/ceph/files/ceph.confd-r4 b/sys-cluster/ceph/files/ceph.confd-r4
new file mode 100644
index 000000000000..b8a0c930a495
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r4
@@ -0,0 +1,70 @@
+# /etc/conf.d/ceph: startup configurations for ceph
+
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
+
+# Set ulimits for Ceph services.
+#rc_ulimit="-n 1048576 -u 1048576"
+
+# the directory under /run to store runtime information in
+#rundir=/run/ceph
+
+# the user and group to run ceph as
+#user="ceph"
+#group="ceph"
+
+# tell openrc to use control groups to make sure everything gets killed
+# properly on stop. Highly reccommended to leave this enabled.
+rc_cgroup_cleanup=1
+
+# settings for openrc supervisor for various ceph daemons
+#
+# defaults (can be overidden for each daemon)
+# stderr and stdout values get .${id}-std{out,err}.log appended
+# to the provided value
+#
+#respawn_delay=20
+#respawn_max=5
+#respawn_period=1800
+#stdout="/dev/null"
+#stderr="/dev/null"
+
+# radosgw
+#radosgw_respawn_max
+#radosgw_respawn_delay=20
+#radosgw_respawn_period=1800
+#radosgw_stdout="/dev/null"
+#radosgw_stderr="/dev/null"
+
+# mon
+#mon_respawn_max=5
+#mon_respawn_delay=20
+#mon_respawn_period=1800
+#mon_stdout="/dev/null"
+#mon_stderr="/dev/null"
+
+# osd
+#osd_respawn_max=5
+#osd_respawn_delay=30
+#osd_respawn_period=1800
+#osd_stdout="/dev/null"
+#osd_stderr="/dev/null"
+
+# mds
+#mds_respawn_max=5
+#mds_respawn_delay=20
+#mds_respawn_period=1800
+#mds_stdout="/dev/null"
+#mds_stderr="/dev/null"
+
+# mgr
+#mgr_respawn_max=5
+#mgr_respawn_delay=20
+#mgr_respawn_period=1800
+#mgr_stdout="/dev/null"
+#mgr_stderr="/dev/null"
+
+# initd stop timeout.
+#CEPH_TERMTIMEOUT="TERM/120/KILL/5"
+#
+# vim:ft=gentoo-conf-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.initd-r6 b/sys-cluster/ceph/files/ceph.initd-r6
new file mode 100644
index 000000000000..fd31b17eb5e3
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r6
@@ -0,0 +1,87 @@
+#!/sbin/openrc-run
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+: ${rundir:=/run/ceph}
+: ${user:=ceph}
+: ${group:=ceph}
+: ${rc_ulimit:=-n 1048576 -u 1048576}
+
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
+
+command="/usr/bin/${RC_SVCNAME%%.*}"
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
+command_args_foreground="--foreground"
+
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
+start_stop_daemon_args="--user ${user} --group ${group}"
+supervise_daemon_args="--user ${user} --group ${group}"
+
+: ${supervisor:=supervise-daemon}
+: ${stdout:=/dev/null}
+: ${stderr:=/dev/null}
+: ${respawn_delay:=10}
+: ${respawn_max:=5}
+: ${respawn_period:=1800}
+
+: ${osd_respawn_delay:=15}
+: ${osd_respawn_max:=10}
+
+: ${radosgw_respawn_max:=5}
+: ${radosgw_respawn_period:=30}
+
+depend() {
+ use dns logger
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd|mgr|radosgw) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ export CEPH_CONF="${ceph_conf}"
+
+ checkpath -d -q -o "${user}:${group}" "${rundir}"
+
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+
+ elif pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then
+ eerror "${daemon_type}.${daemon_id} is still running, refusing to start"
+ return 1
+ fi
+
+ local arg_name arg_val
+ for arg_name in std{out,err} respawn_{delay,max,period}; do
+ eval arg_val="\${${daemon_type}_${arg_name}}"
+
+ if [ -z "${arg_val}" ]; then
+ eval arg_val="\${${arg_name}}"
+ else
+ eval "${arg_name}=\"${arg_val}\""
+ fi
+
+ if [ "${arg_name}" = "stderr" ] || [ "${arg_name}" = "stdout" ]; then
+ supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${arg_val}.${daemon_id}-${arg_name}.log"
+ fi
+ done
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 "${start_stop_daemon_args}"
+ eend ${?}
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: