summaryrefslogtreecommitdiff
path: root/sys-cluster/ceph
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/ceph
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/ceph')
-rw-r--r--sys-cluster/ceph/Manifest55
-rw-r--r--sys-cluster/ceph/ceph-10.2.10.ebuild305
-rw-r--r--sys-cluster/ceph/ceph-10.2.3-r2.ebuild264
-rw-r--r--sys-cluster/ceph/ceph-10.2.7-r1.ebuild292
-rw-r--r--sys-cluster/ceph/ceph-10.2.9-r1.ebuild298
-rw-r--r--sys-cluster/ceph/ceph-10.2.9-r2.ebuild299
-rw-r--r--sys-cluster/ceph/ceph-10.2.9-r3.ebuild313
-rw-r--r--sys-cluster/ceph/ceph-10.2.9.ebuild292
-rw-r--r--sys-cluster/ceph/ceph-12.2.1.ebuild290
-rw-r--r--sys-cluster/ceph/files/README.gentoo30
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.0-dont-use-virtualenvs.patch95
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.1-libzfs.patch11
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.1-unbundle-jerasure.patch355
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.3-CVE-2016-8626.patch33
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch32
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch22
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch45
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch92
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.7-fix-compilation-with-zstd.patch49
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-cflags.patch15
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch65
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-filestore_fix_infinit_loops_in_fiemap.patch82
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch35
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch28
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch39
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch39
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch28
-rw-r--r--sys-cluster/ceph/files/ceph-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch32
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.0-cflags.patch13
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.0-use-provided-cpu-flag-values.patch37
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.1-systemd-unitdir.patch10
-rw-r--r--sys-cluster/ceph/files/ceph-mds_at.service12
-rw-r--r--sys-cluster/ceph/files/ceph-mds_at.service.conf4
-rw-r--r--sys-cluster/ceph/files/ceph-mon_at.service19
-rw-r--r--sys-cluster/ceph/files/ceph-osd_at.service13
-rw-r--r--sys-cluster/ceph/files/ceph-osd_at.service.conf4
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r14
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r28
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r361
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r1.139
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r240
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r449
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r587
-rw-r--r--sys-cluster/ceph/files/ceph.logrotate18
-rw-r--r--sys-cluster/ceph/files/ceph.target4
-rw-r--r--sys-cluster/ceph/files/envd-tcmalloc1
-rw-r--r--sys-cluster/ceph/files/rbdmap.initd122
-rw-r--r--sys-cluster/ceph/files/sysctld2
-rw-r--r--sys-cluster/ceph/metadata.xml36
49 files changed, 4118 insertions, 0 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
new file mode 100644
index 000000000000..66c8aeca5071
--- /dev/null
+++ b/sys-cluster/ceph/Manifest
@@ -0,0 +1,55 @@
+AUX README.gentoo 1085 SHA256 55d41aa4de356ecefcc50225b7e81999dc84eca3909600fe51fa35f767fed554 SHA512 cee1b5fb9823333eda0750c04db0c56d71cca1cbf6fed6887ac4ba68949114df74aace3861343bdacd2a1dc4fc38932de805cc03074f981d26891673e454f250 WHIRLPOOL 7c1604f2c884e89ab7a12e5527a162cbe76f8332ff8963bae537b2e6f26fc6b026fcbffad37bbb4109293042cd6283e6ba395bcff4847837d753d507a447ea72
+AUX ceph-10.2.0-dont-use-virtualenvs.patch 3253 SHA256 a1a4dd0a31ae69449ea0b3472a47715eebb95a62ba04179ec47e82dd1a7a9f77 SHA512 f6351c97ca6766aa5eb4ebb91bc013aaf8222029743c95f5c88b9bd8a6caca48908315e8850ffc83651573377b48e5feb170c310b42e2447fec739379169b500 WHIRLPOOL 1b2daf0e9bfd5c7c9607e06e2a2833ee0e8171234aa61a5514d600318b76e65df04d06176255d4b474b471cb4a6d06b4d29ff31f0e7089f1a9cc65e998976744
+AUX ceph-10.2.1-libzfs.patch 440 SHA256 e7397b9fc52646fc621f8fa4ce37b1de68862338f1f4fdc06bcc0c63c6c6c894 SHA512 5afe85113f310b86a13fb18ba57030d50ae5bd9afbf4d6f5aacd7cca415dd13544522c5d903eb58ec90cc0f6ae2cbb022941debe7036d1b7fa6c5af26af9b9db WHIRLPOOL e46fd9ab96ac30933a420130a73135423c458aec274cc2fef27b02169e3f876fbb4f00ed8fcb8f56ea873aa91f6f8288c95d8eaa329f2113cdce74dc4f065e80
+AUX ceph-10.2.1-unbundle-jerasure.patch 16190 SHA256 2532efdc625d317c4c127192d2e54697a0b39786fe6d2db69c928db60620f540 SHA512 8076a69bb81f89f8892576c4e2ceb03131cbd7ffee82a0d4d66016120f6c79b906172d1a1c30d7642a32ef7afd46d77d7311b65ca55d065995f305cb0e89485a WHIRLPOOL 49e76fe4180f575aba7af820e3d9aa32d05f917b379fd9d3942785b47fae4ff9e7e59bc17b1bbe97d0ed52b6ab54aad4a20230bf6ab97f4f6efd9d9c9ee9acc8
+AUX ceph-10.2.3-CVE-2016-8626.patch 1102 SHA256 97e97c840e72d8bcfafbec610fd6b605f14c9ce54bff01541254737ad2f806a0 SHA512 e924b4719f0c4a0aa27ed383c816d0d24d7a979b73fb2962193dbdc31cd23c02061904a696222d73e58e1892b2ca51e9c6df6674fec5c17f013c2f4664790fbd WHIRLPOOL 3daa3cc3c0ad44ebbf76de7cd80e413b3f27d0fcfc757f4858827a8eafefc3980ce917cebe305cda268ccf9d085e623887934ca77eb49f9adf68ec0e4dab65be
+AUX ceph-10.2.3-build-without-openldap.patch 1209 SHA256 45027bcd80ce3cc7ec573f2ddedd956cd6b99a911ef7bbd96dbab3625b61ee10 SHA512 2b0476eeb78246f252bd294eabc66c6fe5724d753d0cc2dde56720aada2517e42df3387eb368a53fa553617d436d18393a4e856d6fe7395022b249d522d1ec88 WHIRLPOOL 3ef938b99ba70f8eb3e382ca4e2d184dca2c85faba5b6838b123efdd84a92dcfe35059bed1aeb6cbc70a49e987bb978d68f55c49cf79551ef755801d101fb8d0
+AUX ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch 794 SHA256 de155f38a6a0811a2c34a85d3b32a6ade3d31a471b8d6403ce28d997f8b63f89 SHA512 1261d3f088ffc4514069e73e49f627c6f87e89683cedc0048dba6d0e18f53f9a784f6c558478ebe72dff70669e5a453809a720cde77f5b89675d92840e6609b7 WHIRLPOOL 665aa5983ae52a9c92ef4eb0468a47cae67f39e8f489115b8aab92e4b030dc25e26ad327f6112b44c5e0f57634a335a3dcc4e12f0a6fe3eaa4ca27b0bf2838b6
+AUX ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch 2155 SHA256 7c3472383a49683fdb45483d54d9d8758c6415f635a2703aad837d84bef34507 SHA512 c64b4def2ee9cdc9109ff6c32391384980d5ac4e33d425454fe1ff59910ba622ecb458a6722a5ed0f988e021b83ace5d89cb3974a1cf65862e8766595d8cfb0e WHIRLPOOL 60d6ac98552962c752054dc9d2fc0511966419baa452833710f3aef3985b775b19087e7dccfd670191171b18a3bec10a2ec33adb3a1bf9d01b6302693b5877bd
+AUX ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch 2997 SHA256 e734fc435c58374d897e246a047f1e0b241393dfc3b6f70b6587ee5b83c0c674 SHA512 6450981ca274216ae6d394804911a2d7fc57902914a6ad6e9ff1d9db69e71a46f59b5e05d3b2d743d026952405b86ceb5d88134aafc5f95d69ae490c805898dd WHIRLPOOL 5fe2df64fd6eb1871dbc8deb67af55ca2a98236ac6ae3bb21add422d945ec29e8d86eb91f80cc39eb3cd32b0e5076eb4529326e6d03afee65dd3c75135b95b3d
+AUX ceph-10.2.7-fix-compilation-with-zstd.patch 1782 SHA256 291664ca8c1fc51d560b58077eacdae10598aedfd38d73e73d2922053aa2df44 SHA512 5929217f64deb45fd803e33cd277443cbb5f5f956fc4be05490a07dae0b02467317426993c7fc44173a18955261e3a73e603775db12e788a93c851f992539ad6 WHIRLPOOL 06b4e7c8b44d11ed11f8645668bb35e9f25855c5f6e3d5777cdfcd3235584b897f73d40b6fbf50b8f6ed7784dfad6f0c622f2b150dd09215f63547100dad62a9
+AUX ceph-10.2.9-cflags.patch 449 SHA256 d848d0180728d2a79d58833795864eed7a0b8473763256166be21d11fce35881 SHA512 17a165710b0effacc34257daf077f70f55e27f0bddd4dd58bbc8638653ebd13eeabffbb4ead40ddc3a69586c65e01f911ee5f8e1bde94576d66928f0928fa510 WHIRLPOOL 323a1170d3ead0f2b7dcfe92170424b1fdbd29ab2edf2d77b43bf34515ae99ba17a4863b7287eed324f85a26f81e4d0cfae6e22c87c9370dfef41a59b6c0d312
+AUX ceph-10.2.9-dont-run-lsb_release.patch 2862 SHA256 6c3f0b1115f2731f33a02bb11d95d215520e743dcd2556e99c4258fc3cbfbc88 SHA512 e97a0c2a40c886029bbff12f8591147b88d5eae86dc79a63b267f10745a465da62786cf41c9fd0f01f51805907633c1fe954ebe09b0730660cf690f2c53a8252 WHIRLPOOL 601f58a0f764e1b7d97cfb70bb089eb79da1e8259951796571e1a39968333d67892c4232f17eaf2069d7991b26ed8a26208a8303e03a8c268fe741ba6a79be50
+AUX ceph-10.2.9-filestore_fix_infinit_loops_in_fiemap.patch 2970 SHA256 49d665e0a8b904614e75bc76aa581331faa637b514338eef548bcf3afa7d1928 SHA512 e0adf5b7c299a69393dcf0ff31def1ad7f39eb242f8d9e170c84ee5c1ea92442287575af1f64fd630ac6877500b9e2ccb34dee1286cf91b1d52094042dfdb0d8 WHIRLPOOL 91315101c268ac12be7903b66498321aaee4a77988ac1f6356b1d9d316314efe47d2082e106c709087030d31368d2a84d80ee6ef9570e34abb76d9034d00708f
+AUX ceph-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch 1412 SHA256 a4e7ecd7b676df4f4dc40fbf56934ccf8400a5c5f1edf77bb41fcbd26b936618 SHA512 23dd7651edb176419d62648e9d29957b9819129f1f50ac97608c16d658d21787ded5f162b6f4c3e6b404f2d5aee47514a84278692684f0d6f7506c84cc71f37a WHIRLPOOL 57b3e618541605bc1b7601194edf7cedc03634a2d98c97aad49cee09a2f2d9571a5c3b941e9225f3d705fc4444cad4c67055d948e395571827b06262ec73bee5
+AUX ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch 1017 SHA256 a3c9f0ba9c75266dab9e4a30fa6b2593f1b86224f8e5a89e782de862d05a3c04 SHA512 76a051a0fb2cf2f2b38655f7cc1866c745b6e59d999bc49666efc0e29d5e72aa26259241b9a9f4cc20a1863c3636a42a4d49d6d942d2d7456ce122b346a0f378 WHIRLPOOL e8f5ab2ccf67d8c340b18c85ad401a3c855c7c31d3085f7991d944dda09ed22e09b0cbfc60d5184ee3fb98062d8367237d763fdc24984beebd52b2344b0a910f
+AUX ceph-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch 1422 SHA256 2b19b9ae3c482d7bd705197b07a954ba38f6ec1b40406b86cad995084e033ae4 SHA512 62351c1ac682938e138cb1b6f668f9d9b841d3d57b84fbe6402ae9f7d7e2379c538c5d83335535d842da2870c3449bfcd39f66118f89422e7eb6fe8f04b0a52b WHIRLPOOL 2c2e599ca5fb0d0e53cc7f6bf54eae92164ab7159860d515d4721ad3fecde873f59f8502b33155e9ea968105265826427eadc7585006462c0b3bf9f7b60ca326
+AUX ceph-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch 1358 SHA256 e5c06297569fbcb46e77e3277e38845e8fa5cf2603a93d666747e43046b8f26a SHA512 0c07702ca78195575a66efecb8e75393da8dc5706e08ffc1e598daab288f6678f6333085d929d69dc5828494c360a83bae3df2b96efb7ddaf782d43691eedba9 WHIRLPOOL 0aa5572d2c00039e89cb01d08936287ead5d149575241fa5d0bbf495ec9c33f4b3baad2edbc8c8b40040e599e83be47a68e2cdf7b0faaaae362e7696722dcbd2
+AUX ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch 1111 SHA256 7924d3e89cea9dcfb77ff858e5089e6921634c9eeae844d9795468cd782b9d5e SHA512 cf475d9de2ae0c4c41389458f9f256da0f584650ce8204779e7a537cf62195cb5017233b3dcdbe0a5aeed8d7512e4db964a43ac4856e779b6ebcb7a6f676e7bc WHIRLPOOL e4c1e793f2394bcec8176df0e709196b71c4474233465bddf7615a64ad830ecf7b7e5425ba334770b920f415b8a05f949aa8fa8d21df20875c6bd0cc39115e12
+AUX ceph-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch 1353 SHA256 fe79a292354403ceea7216dbb9bd727033bda5f519a1c33eccc0ecd9ecdabb03 SHA512 050d4439fb66b8dcb3ec3fe010bc6193e287dae2a7d25e7a58c4ce733e32a596271f6a69667039abe3e21b66918396a65d579b5da5665fb6e1e292be4b78ffa1 WHIRLPOOL f5337f5af508a71b918022c162ffe54fdc1047a6b4445105e892c6218be9af40849998419d43379186a955f45b9304f2f1dcb0b6393eaa374ecfebcc8517d2be
+AUX ceph-12.2.0-cflags.patch 536 SHA256 d6d1ccf53cc272c97da28ff5253ed2c78f4f4a0c2eb2ab6e5aed271c32e6da0a SHA512 9864da1a83c1145d143eedd73fd3ff142b354fd0bffa73a25f30eabd68d7eddee82208be7b7da74536ba4c996808aa77fc55bcf562a409240d69cbd249ef1d75 WHIRLPOOL 422f0df365fe6b6d284c3a6c45fd1bd104cdb80626f1decb0f3aeb1a5c73aa0ca3ab690409a0bf17e92759d0cd30b268bef9fbe6b1fc602d177d457c8f1ba241
+AUX ceph-12.2.0-use-provided-cpu-flag-values.patch 1590 SHA256 37a33221333559d86e3dbbd80767ba964e64d0b1581f3f78393696c28198457f SHA512 ecf4067776a146cf2aaf0b83298e508a6073147e555f4f9ba73cf2d9e0fe26d9ea72fff8af1c67eaa436e30d32ed260f75683c7d77b27a88fbb098b561d13f0d WHIRLPOOL c2930af3cf09bb6b18565b412c353ca8d2a27f56ddc2aecb0621c9b5cabf393b025847c7c4a7e529b17b4a9e0510e903a074e4aa38dfb62a3d5af56e1e26e618
+AUX ceph-12.2.1-systemd-unitdir.patch 345 SHA256 9ecea9307cc8831d14175127b10ed78d81dbfbfff0debbaf6d25b72daa147844 SHA512 a29373704f645f5b52597f5482fb4538f3d335bb1020c206a089ba58707f988cf42d335f17a36911f373936f8e769613c3d3fa98f55c1fd91d433d036b769bcc WHIRLPOOL b17902983baf2dde5a7e1ece73476be566d722e74a1651a2f130af1a5a195259a0b0556e5135df3640e3ccd888af8f2feda9a381f0b9bdeeea5b60bf291673f7
+AUX ceph-mds_at.service 282 SHA256 f4788a5ed5c9b2fff1eed094b76888b7cc7fc75efcf35cd4f8dda7d9e3c29eb2 SHA512 3a37e187f925e1a5fb672ac90937f544f3b98ed5a30b6a6b931a600f9d6a245373085ed61b40e0c64b30dbfac51dd99cbeaeb7538b5f23953bc0dde1df94742d WHIRLPOOL f274492e8a7239d99cc4fe2efc76e0abc6c55bf111598403ffc515866e731a13ff04329ca0b1711d9446664c8e7355634945f39b1062d63434a11df3445aa166
+AUX ceph-mds_at.service.conf 115 SHA256 d3303079beb2a5aa715016ab489279e142557877382fa8b066abea631189b835 SHA512 e0b51882ec864271a6468141fdd185e24cafcd677f312a7658880a30c00fd58d9043b2651548ab23bd01e54be248a1e8c03545a8fda0b699ca051de7ceb925d8 WHIRLPOOL dde434fc21857a36179f2681261a3b821cfa1be9cce66c83fed2faeaa0df6dc2c6b2613b795d12cbce4f31eab15767dd058d0c354b333a1b87cbbb01b93f4132
+AUX ceph-mon_at.service 508 SHA256 0804d32699777c981ebecc616999bec3c019cbf1379f8e308f1a8a1a6c306a7d SHA512 4e5846b10f2d7e1d2156eb35c96afb3cbb00f38ddd7dc4672a7f249f25142018d507cbccb747d2f552954834ee23c357d6d82b305b9fd30e78d92e5aaa3fc98e WHIRLPOOL d85a1fb22b7768217a40694b18861af29377839a1d843bc7f94e77d3b68233b304490ec4dfd238cf181ec579a01bc66284668905e6375feb6894c3a0d4edea66
+AUX ceph-osd_at.service 362 SHA256 c628755279d58a860d8a35c693d21d7b532c13880a181e46bdce30fd81de9052 SHA512 99c932fa99679a26b288ad57ca725a50847199915368a07ae1bb589ca777cd6e6a68e84f4d506a1097a06ace06eede176ea573e694bcbe43b434381116d63300 WHIRLPOOL 3a44c5a6c25e9e4543a9540420940ae683d014fd4d71d9fd3beefd669dd07a287a1363de6fe03e71906def9c555a27e9d02558dfb40954954d87d6ce7e65b372
+AUX ceph-osd_at.service.conf 115 SHA256 e3515ad3e002969ff3b06069ef8ccdad2fae5cd4aa35d9e982b59d386ae0e40e SHA512 8f169a73f21968f550c6fb21ca7b1efde522b7cccaae0e0c4e22c67ee9c7ccfec7845de3cf84af1075ac9f8840b044dc9440e7936fb9079899df06df350ff9f2 WHIRLPOOL b783cf96382d901b4203d12cd4be6278cdd2f9b53808fbf9194bde58a252d855343f802586925731abc97e2d8c605ef7b5d19fcf3a5e2e6fbf2695c0404c17aa
+AUX ceph.confd-r1 69 SHA256 68d0b46b925fbc0e1571230c8bcc55f46beab4e575a3d964a3753534d751fe31 SHA512 b7f7ebb48b94398eaabb6df2cf3a5697d9a055ea4dd9b73c40d2bbf0e1445f418ed760b1f4ebb13cbb7315b2583847eb97b8649f67b6b7cf98081c0599c86aaa WHIRLPOOL 0e1989d813e7e8234112f656a4e017fae521aa5f09d344ddd1f685a6afbe3afdd51adcaf979a8395ab85ae30e6526a03d8c838d10e46f674eec7651d2df43abe
+AUX ceph.confd-r2 171 SHA256 8c6d7e408165eaf95b2736b27d670a0c2c43b60c6458e4e33969140c3f3fb171 SHA512 f7170644341e6c8dcb71ca3a4325c8da3325ebe83898cbf11b47b41ea4f899781b9bc87fd21e006292de78fe9e905ac4703d10afcf91a4687002663469201ba9 WHIRLPOOL f64c2db5852675b88da0c8db64b0702f1282d27763453f6a8c7aa0c92fcf5295d6e02acde76bc4a1c374c7ceeb5754d81978fd6467000b8a3dc6ebf1a7b3aaaf
+AUX ceph.confd-r3 1227 SHA256 ab73671e1b2972d888f3b20272be615baa5e8d936840e50c3ff14f7fa437f41e SHA512 821b86e196d17abaefa6b6c74f451cede62ca813ed0aeb5c497bd78e48bf55c19cc6af98c0d74ad63a4e359ec27af101dddeb88033cbf449333833a3a7fb8185 WHIRLPOOL fb395d4f5b589c83d20ed5cb7cf140edfe1ae63c0a1c93c3d1ebd205abdcd7cd76835b87480ec24b51aa61223ef857093c338d27d160036d52eabaa5d3fb0e0e
+AUX ceph.initd-r1.1 908 SHA256 7ec4e82f8ed2b25accb929a6700e70078a64a7ecf5abc92f9a2c918b3dbbbcfc SHA512 a6860372f935d64a978f0b2584074791ed945af8172f57910b42a2d92f373711c655a566e6935ca4bba28d3d87aafecb3242d307631378481fd9d05207dd4809 WHIRLPOOL c110163ed12b9220d970b198c789435eff137b55f595aa31f3c2b765338d91e2d88343e6542509714f4ea694f3f6764213402e1f90238e719de09615361b8735
+AUX ceph.initd-r2 958 SHA256 49e69cb418f76a45dc933edca944d78630a8460153bf0a4c511b6d10223615f4 SHA512 6f42b8540797d3f55d64b9842e190ca2973c1779c720b7c9923b8bcc06dddf95672bee066275599e4feafeff38652235746433305dd4d7df8ad086a8deb960c0 WHIRLPOOL 3670c40a1ecd935667f1c8e5d3ebd25d0a41dcc18c3ac6a6e155e95a28682295858f2c06794beba7c7173c40ad403986541ebe8827370ee4aa9c922b40ae636c
+AUX ceph.initd-r4 1189 SHA256 03a6fe825f5bdfe2a9e91b8dc2f1b1d16bb2f487f617bf35f58cfd8b514de5b8 SHA512 dbb69228ee566490bec93823040885e419bfbd7dc076c802cc97b47dde9fbb06a99f61498cc438c90fd0474b2ad7247d756b977fb415b0f1168442036a48bd97 WHIRLPOOL 11dfa061dfad1018f0f4feff279cc2d449bdb57c85bebc5160271a65752c1e9198be5cfcd55ad457b8649aa997a0cb61e41650c6c29cd2be0863d35a5febe9f1
+AUX ceph.initd-r5 2149 SHA256 6c148a328c3ac8082dd2e5d2eb1e3396f65feebd7711c411a715fa8d98f914d4 SHA512 e572d91f5fab3f77ef39759e1e145f0d73c5bde3515c8b3c6185f58fb28592da38e13201972b61c7071daa338a997e78e051a4f2adac912d7e8d1ddd3809345c WHIRLPOOL d2be9e89e5bb408da4a8aab1477c8f0182bd768a39a77fb98d743c1804983a1fc08fb87882dd28ff2232e44090cda68acd34bc5202b96e247230c4791e9b566f
+AUX ceph.logrotate 427 SHA256 f893364080dfaf5fb3b250e4811be7f1880ea937c7a6b70f913ad560fb14381d SHA512 6edace611f46683ca3b8d2154b86ec77cc241909704e0362b728a5f51c2a809c22e83d69df0d58ec6b3a6b8dc8ef2518c220cac920f51e63fe668cdfe1b48bae WHIRLPOOL f9e3643177805202a0c07b04cc38e7a3e8bdce76f59bbdd4aca050527ceab04ddcfb293e13632c2fd25eeff725f3bc532e90e223b4f003ecfc5bab377e8669cb
+AUX ceph.target 128 SHA256 2dc38c2aff560067604d4ee0a3b569ed0032928223bf865198c500560bd8ea0e SHA512 f667a92e9d8dfcd52dab8ce8bcdeb4c7da1fc65f5b11df96340df3b6362a06b3ba71bbc6677aef278514b856a85a65ddfd9e7b96b48a9684256ccf4825e98dd5 WHIRLPOOL 0bd67c47391ad21853f3a859b8cfa53d740f41a06f024526bba29c69c98a5bffb871ba45581a3fbfaf8b3fff9ac2c04a8e4e042e364926ccbfd0c01f52a1ebd9
+AUX envd-tcmalloc 48 SHA256 b24741f787828fa45844af0a5ed36ac89e2e4139244990bf044268e28f0d7e15 SHA512 d180b1a888ec6d870ff523a3b10fd00eca479ee2586a236458af5ffaba21c84e7b8098da6d4bc08fb86c82c61a861dd3c3596a01063d734c329a92808682fc8c WHIRLPOOL 73468450e14c4e55dcfef10c8cf17ca1f2471a54752d4c0ae110dccf43bae47db5641d62f16ac331b0fb78e0b0a52edcae370a18c7870dcc1501c3d288cf791a
+AUX rbdmap.initd 2373 SHA256 7e1c5507f015eb42d274af165492d8ca495bdf9467e77c276b962605fe8080a8 SHA512 bbd48d6987e52eaf6d02bccf3aecd06596465af4d3ac93063f9a814106de162a27bf1a33ae1646e669efb3c754f3ba57f395523293ad643b0d81ee588252216b WHIRLPOOL 5605cb10e847492c5e73353ce2f41f8d9f2d2e5fb17fe41266b6d0f3e045a328b9e1dffe547c2ef24e4ed916ff9f2fd52b137678d6c532ad5dba459470ed1610
+AUX sysctld 57 SHA256 de2d90c6a49e8703565858a912e0806edd3b96322ccfbb8454751ecfe33dc373 SHA512 410f5d721c6cfcc5d7ddaff4f348345140d4b8e1b8fddccb537118bfc59f573ecad63db448598423c9a58fcfdb4cef90e6af27b838e6b77955dfd47673f0f52a WHIRLPOOL fe714df1d7b42f2767ebbb4d365534b2ed6dcee3a90589150ead40cd3b911e06431c6c94465ba3ab97321d43b6d3a0b67f83210cc6506d40a8e2f36b4698b7b8
+DIST ceph-10.2.10.tar.gz 14573701 SHA256 41210ac8cb71d9c9d6504b57adce496d3272ee8f79089537d262898747d68e75 SHA512 883d1b8340aaefc7a1eee4bbfb5b1d1cc15bffed8f35fb1e8fb86b1208a4d0d16753eb6c688ea0e661c4877d3d148b2b6c2b41620c4e8a61e47c69f46f98e537 WHIRLPOOL 4a2c7b9c7ff2f7f7bf5b36314f2da5630cf948b1558e4b6d33669ffd76836d7fdb6104f3bddcf7209ead2a31209fcc59fe86020763303be10db52729d5e5b648
+DIST ceph-10.2.3.tar.gz 11596171 SHA256 dca933aa14db67b404d836ef510bd418091978edc2f0c74dfc530ba0aa5e8994 SHA512 9de1e6851fc343d2c52c72cec3f7887d998d5b588f1251ee3a1fda14427badfa10408e6691fb03a374a10f4ec9844868423fee70fbbe2c0d962af98481412f19 WHIRLPOOL 981ebca66113a07a5cc6e5934272a72b29a2c19e03398f7b622c11df6ea0a05339558dfc2f11504403cbbd0efe0b090ad59f4b86206b46db57587744091aa26a
+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
+EBUILD ceph-10.2.10.ebuild 7617 SHA256 4a423268303778d75a0e52c75e3d3a129f790ce0db95d53bf5fdae0ab87664e2 SHA512 afac8da7c498001c6fc3efdce6f0ae253cbaeeddc16076ba39a4b34bf824c61d2b90208a5943785974554b6c8e60e5a10e53ffd8c7171007df31e552a27fc4d7 WHIRLPOOL 771b2762eab61564c73823ad89d0f6759dbce3ac7832ccc4513a0b59c1dc806418d7ec8d50e9e7cb510129df713bf59363251206bd16f326426399ca5ce580d5
+EBUILD ceph-10.2.3-r2.ebuild 6106 SHA256 3424b622c7cd0b2edaae05b14d4f5197e9c337748abb5c74cdea4beba53bdf3b SHA512 817064150d5a36d16b899a9d4be37a746a5f0108d73d5fb136e3faee1624763033376087488e30bed9ceb45d1e64f8cebeeadef7b53bd2055e067f271cee328f WHIRLPOOL 1358f6f1f266b6f7cab6aff8fe481b36684544f1f5d6cce8db410609c2fadb0ee9cc52d83667816a7a908d69c9b511064dec72eece62107ef0135022936d8b0a
+EBUILD ceph-10.2.7-r1.ebuild 7150 SHA256 cb440d6aff0bb038675626e45663330ce526412877388e0b5b98dc2267f19e15 SHA512 52dddba20a114a6baf3fe6149bfafb14a94ab2656924b99b83aef59c6046bdff69f6f12095040e85d2328060167aa7fa43539043d724c5b5b6133546b0453dd5 WHIRLPOOL 36f86be44041f8a99d3d0c88dabdeff0ad1f9854a36b35fe0aa4e934c288dfd0e3e1cff186b831b1a8b6ad517f7f27813b200c888de1088534d301feccbd2909
+EBUILD ceph-10.2.9-r1.ebuild 7382 SHA256 42be2b5e22848ba166201b99874cea6aa2e8643afdfa323f14d9f94c401e9430 SHA512 aa178faac0bb130b85fafc6fa50b96d093f8162d2c64bd1a4d92663e86bb41e8ae1f728c6d62470cc5b9fc22abedfb8378be5c0ff616da8d5c262e22144a9477 WHIRLPOOL 6cd3e0af704f2d2a5708138bfd03f586a7d0104d96900730084b6bfcc22b8a3772737b24f15103088a2a2bd9db2caaed737dee5919cc3707dd5ebe8a37df133e
+EBUILD ceph-10.2.9-r2.ebuild 7467 SHA256 eea7612e3093e76d144f3924b134a00da1fae1ae598b799f74ad220c4a57e8d6 SHA512 91a5fa648a7a57ec5fbf32c5aecabdde7d2d2211bd0453673e8db364de4869899add700b191bf38e37237cb35133bdbc2415b92c766c9c5e25f467854a4eb6a3 WHIRLPOOL ae6db5b9ef5ef9513f6c2de3888db9efd2883aead0ee8b7fd878ce6c1c77c86d69c0c637b0d1e89f56f981d441bf4c7f41eb9ee519b57ae4a9338d0d6c9972d3
+EBUILD ceph-10.2.9-r3.ebuild 8252 SHA256 7eeb96bd482540ad7fe740ccdc441aaa8dd2d8f92ac08c7be8e4648987b2c96d SHA512 5025aeae8794d66a3bb67f15dad332a8f5c004d911d1ea3bac7fd1d7090f3fc6eccae46c4724690814a5350852914ff8cb91d06a6efb7307550291a6035f26bf WHIRLPOOL 946802440c3c979a19214fe92ea64ad21e86867fed0a76e1b4dc497623776cdea031635e40be7cae8b96e2eabe4394e22b37fdb7b08196e8d759d68307feba82
+EBUILD ceph-10.2.9.ebuild 7150 SHA256 c1743c6b955f60887f82aca88480f0619bbc40eb6a2f1f8fa25c559245c3c774 SHA512 9b9b506446f88961d26d3e06100cce48c8cdca51b5634aef0c5a85268c03f9ceea8bc84347589344f08093aa98627673a7cdd1c27abeba24674efb185b2e69c9 WHIRLPOOL 17515dfa6b7e39a9929e6f1d039760d65ed9bb8337dc221b5eb87b6e97f437258b89ed2c30b19ff56a0bee5916a766f5cc390a3434a9c99f443e358f6cb7eb2a
+EBUILD ceph-12.2.1.ebuild 7345 SHA256 6cef166baef9b61fca9b5e7fd81bf55bfd7718a6221656cead077f3b7e15d857 SHA512 04baa2dea342f463b54bede0e7a1286ae70f7fe326d043753ab8c3b43816d41dd98238c18bb90f485492e7354f4bff702370706a2192027a16929e0e83456be0 WHIRLPOOL f9dd965a8678381e87b59a40554ffac8908b62a4fcbd1bb23b36210e9cb0bed216c50d24375681ff8829684e32fb9c3150364ec4f7ea52e717866fc33b2d9dec
+MISC ChangeLog 13931 SHA256 d9090f48b7f1f483f77b9cdd0f8c3b2059187c1ac0cb003d34d2f35a51d27aa0 SHA512 27b4788a437f8599557c32018ff5c6e7a429ef21df1b37f0a2663b94d4aed540da6f9ad08edb64b752ec81565ec864c5cc8c57ab025f556aa3fdf1e010595ab5 WHIRLPOOL 52d36e0d10a3795dd912f1708deeee81b9d472a5c50ff3c97de9dd31d52926ebde1a3c6bd284824c64779cc3c42a2f170192d1be0963d68498a4e56f36906bd3
+MISC ChangeLog-2015 14588 SHA256 632846972e3ea39a1957c8b0d171e88516cd916cbd69a949213c8abe0e13e1c3 SHA512 3507c7b20f0f6a5678b259ad439ae6d93b0366dc08e44cb828420b811fde113436d800cea38537696df55230cb958398b82acd5031701e675a38bd91a4c0b790 WHIRLPOOL c07b058340e006371ab56d4e345f2708681b01d7002da2e67030987c8414377d1d2f2ed3555c5c9f74fa0c5cd5cdb0830e1e095b7a462431e0eedc4d3286a4ac
+MISC metadata.xml 1618 SHA256 c1c93c63b460775f2d543091e5dda684afa22502ddda66ac11f1c1b0bd76ab6d SHA512 91f04007bd5164d525fe248251c9b41e5d3a16fe61a0b14c34af0e86b51a97cd8fe8927508f983e7e63d2f40318c4e0fbcbb15e305fb8f6b3d3148455a45896b WHIRLPOOL 35d98ff632010d5b01fcd252cac7be28fcce6979f0b47dae62155cf16461250d5e9c9179bd3db0b8008dd5483a8e41741856192b5883218c00caab5af6e4c113
diff --git a/sys-cluster/ceph/ceph-10.2.10.ebuild b/sys-cluster/ceph/ceph-10.2.10.ebuild
new file mode 100644
index 000000000000..f142f0748198
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.10.ebuild
@@ -0,0 +1,305 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator flag-o-matic toolchain-funcs
+
+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"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy:=
+ sys-libs/zlib:=
+ app-arch/lz4:=
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/boost:=[threads]
+ dev-libs/libaio:=
+ dev-libs/leveldb:=[snappy]
+ nss? ( dev-libs/nss:= )
+ libatomic? ( dev-libs/libatomic_ops:= )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2:=
+ radosgw? ( dev-libs/fcgi:= )
+ ldap? ( net-nds/openldap:= )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+ gtk? (
+ x11-libs/gtk+:2=
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg:=
+ )
+ radosgw? (
+ dev-libs/fcgi:=
+ dev-libs/expat:=
+ net-misc/curl:=
+ )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( =dev-util/google-perftools-2.4*:= )
+ lttng? ( dev-util/lttng-ust:= )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ !<sys-apps/openrc-0.26.3
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+#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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
+ "${FILESDIR}/${PN}-10.2.9-cflags.patch"
+ "${FILESDIR}/${PN}-10.2.9-dont-run-lsb_release.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding module
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ ceph_run_econf "${EPYTHON}"
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]]; then
+ for module in "${S}"/src/pybind/*.py; do
+ module_basename="$(basename "${module}")"
+ if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
+ continue
+ elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
+ python_domodule ${module}
+ fi
+ done
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+
+ if tc-is-gcc && [[ $(gcc-fullversion) == "7.2.0" ]] && is-flag "-g*"; then
+ ewarn "Filtering out -g* flags since gcc-7.2 tends to ICE with them and ceph"
+ filter-flags "-g*"
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ ECONFARGS=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ ceph_run_econf "python2*"
+}
+
+ceph_run_econf() {
+ [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
+ [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
+
+ pushd "${S}" >/dev/null || die
+ #
+ # This generates a QA warning about running econf in src_compile
+ # and src_install. Unfortunately the only other way to do this would
+ # involve building all of for each python implementation times, which
+ # wastes a _lot_ of CPU time and disk space. This hack will no longer
+ # be needed with >=ceph-11.2.
+ #
+ python_setup "${1}"
+ econf "${ECONFARGS[@]}"
+
+ popd >/dev/null || die
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r5" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-10.2.3-r2.ebuild b/sys-cluster/ceph/ceph-10.2.3-r2.ebuild
new file mode 100644
index 000000000000..9453bf66abc5
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.3-r2.ebuild
@@ -0,0 +1,264 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator 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 ~arm ~ppc ~ppc64 x86"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy
+ app-arch/lz4:=
+ app-arch/bzip2
+ dev-libs/boost:=[threads]
+ dev-libs/libaio
+ dev-libs/leveldb[snappy]
+ nss? ( dev-libs/nss )
+ libatomic? ( dev-libs/libatomic_ops )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2
+ radosgw? ( dev-libs/fcgi )
+ ldap? ( net-nds/openldap )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0 )
+ xfs? ( sys-fs/xfsprogs )
+ zfs? ( sys-fs/zfs )
+ gtk? (
+ x11-libs/gtk+:2
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg
+ )
+ radosgw? (
+ dev-libs/fcgi
+ dev-libs/expat
+ net-misc/curl
+ )
+ jemalloc? ( dev-libs/jemalloc )
+ !jemalloc? ( dev-util/google-perftools )
+ lttng? ( dev-util/lttng-ust )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ sys-apps/lsb-release
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.3-CVE-2016-8626.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]] && python_is_python3; then
+ rm -f "${ED}/$(python_get_sitedir)"/ceph_{argparse,volume_client}.py
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ python_setup 'python2*'
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-10.2.7-r1.ebuild b/sys-cluster/ceph/ceph-10.2.7-r1.ebuild
new file mode 100644
index 000000000000..e77e546d7b3c
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.7-r1.ebuild
@@ -0,0 +1,292 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator 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"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy:=
+ sys-libs/zlib:=
+ app-arch/lz4:=
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/boost:=[threads]
+ dev-libs/libaio:=
+ dev-libs/leveldb:=[snappy]
+ nss? ( dev-libs/nss:= )
+ libatomic? ( dev-libs/libatomic_ops:= )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2:=
+ radosgw? ( dev-libs/fcgi:= )
+ ldap? ( net-nds/openldap:= )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+ gtk? (
+ x11-libs/gtk+:2=
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg:=
+ )
+ radosgw? (
+ dev-libs/fcgi:=
+ dev-libs/expat:=
+ net-misc/curl:=
+ )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( dev-util/google-perftools )
+ lttng? ( dev-util/lttng-ust:= )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+#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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding module
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ ceph_run_econf "${EPYTHON}"
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]]; then
+ for module in "${S}"/src/pybind/*.py; do
+ module_basename="$(basename "${module}")"
+ if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
+ continue
+ elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
+ python_domodule ${module}
+ fi
+ done
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+ eautoreconf
+}
+
+src_configure() {
+ ECONFARGS=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ ceph_run_econf "python2*"
+}
+
+ceph_run_econf() {
+ [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
+ [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
+
+ pushd "${S}" >/dev/null || die
+ #
+ # This generates a QA warning about running econf in src_compile
+ # and src_install. Unfortunately the only other way to do this would
+ # involve building all of for each python implementation times, which
+ # wastes a _lot_ of CPU time and disk space. This hack will no longer
+ # be needed with >=ceph-11.2.
+ #
+ python_setup "${1}"
+ econf "${ECONFARGS[@]}"
+
+ popd >/dev/null || die
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r4" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-10.2.9-r1.ebuild b/sys-cluster/ceph/ceph-10.2.9-r1.ebuild
new file mode 100644
index 000000000000..7d477491a495
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.9-r1.ebuild
@@ -0,0 +1,298 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator 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"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy:=
+ sys-libs/zlib:=
+ app-arch/lz4:=
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/boost:=[threads]
+ dev-libs/libaio:=
+ dev-libs/leveldb:=[snappy]
+ nss? ( dev-libs/nss:= )
+ libatomic? ( dev-libs/libatomic_ops:= )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2:=
+ radosgw? ( dev-libs/fcgi:= )
+ ldap? ( net-nds/openldap:= )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+ gtk? (
+ x11-libs/gtk+:2=
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg:=
+ )
+ radosgw? (
+ dev-libs/fcgi:=
+ dev-libs/expat:=
+ net-misc/curl:=
+ )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( =dev-util/google-perftools-2.4*:= )
+ lttng? ( dev-util/lttng-ust:= )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+#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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
+ "${FILESDIR}/${PN}-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding module
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ ceph_run_econf "${EPYTHON}"
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]]; then
+ for module in "${S}"/src/pybind/*.py; do
+ module_basename="$(basename "${module}")"
+ if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
+ continue
+ elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
+ python_domodule ${module}
+ fi
+ done
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+ eautoreconf
+}
+
+src_configure() {
+ ECONFARGS=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ ceph_run_econf "python2*"
+}
+
+ceph_run_econf() {
+ [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
+ [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
+
+ pushd "${S}" >/dev/null || die
+ #
+ # This generates a QA warning about running econf in src_compile
+ # and src_install. Unfortunately the only other way to do this would
+ # involve building all of for each python implementation times, which
+ # wastes a _lot_ of CPU time and disk space. This hack will no longer
+ # be needed with >=ceph-11.2.
+ #
+ python_setup "${1}"
+ econf "${ECONFARGS[@]}"
+
+ popd >/dev/null || die
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r5" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-10.2.9-r2.ebuild b/sys-cluster/ceph/ceph-10.2.9-r2.ebuild
new file mode 100644
index 000000000000..a9d0eec50ea7
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.9-r2.ebuild
@@ -0,0 +1,299 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator 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"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy:=
+ sys-libs/zlib:=
+ app-arch/lz4:=
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/boost:=[threads]
+ dev-libs/libaio:=
+ dev-libs/leveldb:=[snappy]
+ nss? ( dev-libs/nss:= )
+ libatomic? ( dev-libs/libatomic_ops:= )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2:=
+ radosgw? ( dev-libs/fcgi:= )
+ ldap? ( net-nds/openldap:= )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+ gtk? (
+ x11-libs/gtk+:2=
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg:=
+ )
+ radosgw? (
+ dev-libs/fcgi:=
+ dev-libs/expat:=
+ net-misc/curl:=
+ )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( =dev-util/google-perftools-2.4*:= )
+ lttng? ( dev-util/lttng-ust:= )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+#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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
+ "${FILESDIR}/${PN}-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch"
+ "${FILESDIR}/${PN}-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding module
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ ceph_run_econf "${EPYTHON}"
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]]; then
+ for module in "${S}"/src/pybind/*.py; do
+ module_basename="$(basename "${module}")"
+ if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
+ continue
+ elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
+ python_domodule ${module}
+ fi
+ done
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+ eautoreconf
+}
+
+src_configure() {
+ ECONFARGS=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ ceph_run_econf "python2*"
+}
+
+ceph_run_econf() {
+ [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
+ [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
+
+ pushd "${S}" >/dev/null || die
+ #
+ # This generates a QA warning about running econf in src_compile
+ # and src_install. Unfortunately the only other way to do this would
+ # involve building all of for each python implementation times, which
+ # wastes a _lot_ of CPU time and disk space. This hack will no longer
+ # be needed with >=ceph-11.2.
+ #
+ python_setup "${1}"
+ econf "${ECONFARGS[@]}"
+
+ popd >/dev/null || die
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r5" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-10.2.9-r3.ebuild b/sys-cluster/ceph/ceph-10.2.9-r3.ebuild
new file mode 100644
index 000000000000..73d8983868db
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.9-r3.ebuild
@@ -0,0 +1,313 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator flag-o-matic toolchain-funcs
+
+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"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy:=
+ sys-libs/zlib:=
+ app-arch/lz4:=
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/boost:=[threads]
+ dev-libs/libaio:=
+ dev-libs/leveldb:=[snappy]
+ nss? ( dev-libs/nss:= )
+ libatomic? ( dev-libs/libatomic_ops:= )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2:=
+ radosgw? ( dev-libs/fcgi:= )
+ ldap? ( net-nds/openldap:= )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+ gtk? (
+ x11-libs/gtk+:2=
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg:=
+ )
+ radosgw? (
+ dev-libs/fcgi:=
+ dev-libs/expat:=
+ net-misc/curl:=
+ )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( =dev-util/google-perftools-2.4*:= )
+ lttng? ( dev-util/lttng-ust:= )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ !<sys-apps/openrc-0.26.3
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+#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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
+ "${FILESDIR}/${PN}-10.2.9-cflags.patch"
+ "${FILESDIR}/${PN}-10.2.9-dont-run-lsb_release.patch"
+ # pull in some bugfixes from upstream
+ "${FILESDIR}/${PN}-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch"
+ "${FILESDIR}/${PN}-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch"
+ "${FILESDIR}/${PN}-10.2.9-filestore_fix_infinit_loops_in_fiemap.patch"
+ "${FILESDIR}/${PN}-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch"
+ "${FILESDIR}/${PN}-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch"
+ "${FILESDIR}/${PN}-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch"
+ "${FILESDIR}/${PN}-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding module
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ ceph_run_econf "${EPYTHON}"
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]]; then
+ for module in "${S}"/src/pybind/*.py; do
+ module_basename="$(basename "${module}")"
+ if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
+ continue
+ elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
+ python_domodule ${module}
+ fi
+ done
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+
+ if tc-is-gcc && [[ $(gcc-fullversion) == "7.2.0" ]] && is-flag "-g*"; then
+ ewarn "Filtering out -g* flags since gcc-7.2 tends to ICE with them and ceph"
+ filter-flags "-g*"
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ ECONFARGS=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ ceph_run_econf "python2*"
+}
+
+ceph_run_econf() {
+ [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
+ [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
+
+ pushd "${S}" >/dev/null || die
+ #
+ # This generates a QA warning about running econf in src_compile
+ # and src_install. Unfortunately the only other way to do this would
+ # involve building all of for each python implementation times, which
+ # wastes a _lot_ of CPU time and disk space. This hack will no longer
+ # be needed with >=ceph-11.2.
+ #
+ python_setup "${1}"
+ econf "${ECONFARGS[@]}"
+
+ popd >/dev/null || die
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r5" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-10.2.9.ebuild b/sys-cluster/ceph/ceph-10.2.9.ebuild
new file mode 100644
index 000000000000..90cd7f880ef3
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.9.ebuild
@@ -0,0 +1,292 @@
+# 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}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+ readme.gentoo-r1 systemd versionator 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"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs +tcmalloc test xfs zfs"
+
+# 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="
+ app-arch/snappy:=
+ sys-libs/zlib:=
+ app-arch/lz4:=
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/boost:=[threads]
+ dev-libs/libaio:=
+ dev-libs/leveldb:=[snappy]
+ nss? ( dev-libs/nss:= )
+ libatomic? ( dev-libs/libatomic_ops:= )
+ cryptopp? ( dev-libs/crypto++:= )
+ sys-apps/keyutils
+ sys-apps/util-linux
+ dev-libs/libxml2:=
+ radosgw? ( dev-libs/fcgi:= )
+ ldap? ( net-nds/openldap:= )
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:0= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+ gtk? (
+ x11-libs/gtk+:2=
+ dev-cpp/gtkmm:2.4
+ gnome-base/librsvg:=
+ )
+ radosgw? (
+ dev-libs/fcgi:=
+ dev-libs/expat:=
+ net-misc/curl:=
+ )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( dev-util/google-perftools )
+ lttng? ( dev-util/lttng-ust:= )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ app-arch/cpio
+ virtual/pkgconfig
+ dev-python/sphinx
+ test? (
+ sys-fs/btrfs-progs
+ sys-apps/grep[pcre]
+ dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/hdparm
+ sys-block/parted
+ sys-fs/cryptsetup
+ sys-apps/gptfdisk
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ^^ ( nss cryptopp )
+ ?? ( jemalloc tcmalloc )
+ "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+=" radosgw"
+
+#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-10.2.0-dont-use-virtualenvs.patch"
+ #"${FILESDIR}/ceph-10.2.1-unbundle-jerasure.patch"
+ "${FILESDIR}/${PN}-10.2.1-libzfs.patch"
+ "${FILESDIR}/${PN}-10.2.3-build-without-openldap.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch"
+ "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch"
+)
+
+check-reqs_export_vars() {
+ if use debug; then
+ CHECKREQS_DISK_BUILD="23G"
+ CHECKREQS_DISK_USR="7G"
+ elif use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="450M"
+ 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
+}
+
+emake_python_bindings() {
+ local action="${1}" params binding module
+ shift
+ params=("${@}")
+
+ __emake_python_bindings_do_impl() {
+ ceph_run_econf "${EPYTHON}"
+ emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}"
+
+ # these don't work and aren't needed on python3
+ if [[ ${EBUILD_PHASE} == install ]]; then
+ for module in "${S}"/src/pybind/*.py; do
+ module_basename="$(basename "${module}")"
+ if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then
+ continue
+ elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then
+ python_domodule ${module}
+ fi
+ done
+ fi
+ }
+
+ pushd "${S}/src"
+ for binding in rados rbd $(use cephfs && echo cephfs); do
+ python_foreach_impl __emake_python_bindings_do_impl
+ done
+ popd
+
+ unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ 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[@]}"
+
+ append-flags -fPIC
+ eautoreconf
+}
+
+src_configure() {
+ ECONFARGS=(
+ --without-hadoop
+ --includedir=/usr/include
+ $(use_with cephfs)
+ $(use_with debug)
+ $(use_with fuse)
+ $(use_with libaio)
+ $(use_with libatomic libatomic-ops)
+ $(use_with nss)
+ $(use_with cryptopp)
+ $(use_with radosgw)
+ $(use_with gtk gtk2)
+ $(use_enable static-libs static)
+ $(use_with jemalloc)
+ $(use_with xfs libxfs)
+ $(use_with zfs libzfs)
+ $(use_with lttng )
+ $(use_with babeltrace)
+ $(use_with ldap openldap)
+ $(use jemalloc || usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal")
+ --with-mon
+ --with-eventfd
+ --with-cython
+ --without-kinetic
+ --without-librocksdb
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ # we can only use python2.7 for building at the moment
+ ceph_run_econf "python2*"
+}
+
+ceph_run_econf() {
+ [[ -z ${ECONFARGS} ]] && die "called ${FUNCNAME[0]} with ECONFARGS unset"
+ [[ -z ${1} ]] && die "called ${FUNCNAME[0]} without passing python implementation"
+
+ pushd "${S}" >/dev/null || die
+ #
+ # This generates a QA warning about running econf in src_compile
+ # and src_install. Unfortunately the only other way to do this would
+ # involve building all of for each python implementation times, which
+ # wastes a _lot_ of CPU time and disk space. This hack will no longer
+ # be needed with >=ceph-11.2.
+ #
+ python_setup "${1}"
+ econf "${ECONFARGS[@]}"
+
+ popd >/dev/null || die
+}
+
+src_compile() {
+ emake
+ emake_python_bindings all
+
+ use test && emake check-local
+}
+
+src_test() {
+ make check || die "make check failed"
+}
+
+src_install() {
+ default
+ emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+ prune_libtool_files --all
+
+ exeinto /usr/$(get_libdir)/ceph
+ newexe src/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-r5" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup 'python2*'
+ 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/ceph-12.2.1.ebuild b/sys-cluster/ceph/ceph-12.2.1.ebuild
new file mode 100644
index 000000000000..9e8142ef5698
--- /dev/null
+++ b/sys-cluster/ceph/ceph-12.2.1.ebuild
@@ -0,0 +1,290 @@
+# 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 )
+ "
+
+# radosgw seems to be required to actually build
+REQUIRED_USE+=" radosgw"
+
+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}/${PN}-12.2.0-use-provided-cpu-flag-values.patch"
+ "${FILESDIR}/${PN}-12.2.0-cflags.patch"
+ "${FILESDIR}/${PN}-12.2.1-systemd-unitdir.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-r5" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${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/README.gentoo b/sys-cluster/ceph/files/README.gentoo
new file mode 100644
index 000000000000..6e5f8366136c
--- /dev/null
+++ b/sys-cluster/ceph/files/README.gentoo
@@ -0,0 +1,30 @@
+1) We'd suggest you to install following packages
+ sys-block/parted to manage disk partions
+ sys-fs/btrfs-progs to use btrfs filesytem
+ sys-fs/cryptsetup to use encrypted devices with dm-crypt
+
+2) To start several daemons of one specific type, create your own scripts
+ cd /etc/init.d
+ for dmn in mds.a mon.a osd.0 osd.1 osd.2; do
+ ln -s ceph ceph-${dmn};
+ rc-update add ceph-${dmn} default;
+ done
+
+3) If you spread ceph daemons over several different machines,
+ We'd highly recommend you to start ntp-client to keep the system time sync.
+ Try to choose one of following ntp client to install and add into runlevel.
+ net-misc/ntp
+ net-misc/openntpd
+ net-misc/chrony
+
+4) Starting from version 9.0.x, Ceph daemons run as user 'ceph' instead of 'root'.
+ In order to solve this, we recommand to stop ceph daemons, and fix the ownership
+
+ # chown -R ceph:ceph /var/lib/ceph
+
+ or
+
+ Add the following line to ceph.conf on all hosts:
+ " setuser match path = /var/lib/ceph/$type/$cluster-$id "
+
+ https://ceph.com/releases/v9-2-0-infernalis-released/
diff --git a/sys-cluster/ceph/files/ceph-10.2.0-dont-use-virtualenvs.patch b/sys-cluster/ceph/files/ceph-10.2.0-dont-use-virtualenvs.patch
new file mode 100644
index 000000000000..f3627636aeb9
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.0-dont-use-virtualenvs.patch
@@ -0,0 +1,95 @@
+diff --git a/Makefile.am b/Makefile.am
+index 7734be2..ba33bda 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -79,7 +79,6 @@ clean-local:
+ cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
+ fi
+
+- @rm -rf src/test/virtualenv
+ @rm -rf install-deps-*
+
+
+diff --git a/src/Makefile-env.am b/src/Makefile-env.am
+index df225d6..ca030cf 100644
+--- a/src/Makefile-env.am
++++ b/src/Makefile-env.am
+@@ -297,10 +297,6 @@ LIBCIVETWEB_DEPS =
+ DENCODER_SOURCES =
+ DENCODER_DEPS =
+
+-# put virtualenvs in this directory
+-# otherwise it may overflow #! 80 kernel limit
+-# beware that some build environments might not be able to write to /tmp
+ export TMPDIR ?= /tmp
+-export CEPH_BUILD_VIRTUALENV = $(TMPDIR)
+
+ radoslibdir = $(libdir)/rados-classes
+diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am
+index 8ddcb1e..52dd5d5 100644
+--- a/src/ceph-detect-init/Makefile.am
++++ b/src/ceph-detect-init/Makefile.am
+@@ -53,15 +53,10 @@ EXTRA_DIST += \
+ ceph-detect-init/tests/test_all.py \
+ ceph-detect-init/tox.ini
+
+-export CEPH_DETECT_INIT_VIRTUALENV = ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv
+-
+-ceph-detect-init-all: ${CEPH_DETECT_INIT_VIRTUALENV}
+-
+-${CEPH_DETECT_INIT_VIRTUALENV}:
+- cd $(srcdir)/ceph-detect-init ; ../tools/setup-virtualenv.sh ${CEPH_DETECT_INIT_VIRTUALENV} ; test -d wheelhouse && export NO_INDEX=--no-index ; ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e .
++ceph-detect-init-all:
+
+ ceph-detect-init-clean:
+- cd $(srcdir)/ceph-detect-init ; python setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DETECT_INIT_VIRTUALENV} .coverage *.egg-info
++ cd $(srcdir)/ceph-detect-init
+
+ ceph-detect-init-install-data:
+ cd $(srcdir)/ceph-detect-init ; \
+diff --git a/src/ceph-disk/Makefile.am b/src/ceph-disk/Makefile.am
+index 9006303..0b35b0f 100644
+--- a/src/ceph-disk/Makefile.am
++++ b/src/ceph-disk/Makefile.am
+@@ -29,15 +29,10 @@ EXTRA_DIST += \
+ ceph-disk/tests/test_main.py \
+ ceph-disk/tox.ini
+
+-export CEPH_DISK_VIRTUALENV = ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv
+-
+-ceph-disk-all: ${CEPH_DISK_VIRTUALENV}
+-
+-${CEPH_DISK_VIRTUALENV}:
+- cd $(srcdir)/ceph-disk ; ../tools/setup-virtualenv.sh ${CEPH_DISK_VIRTUALENV} ; test -d wheelhouse && export NO_INDEX=--no-index ; ${CEPH_DISK_VIRTUALENV}/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e .
++ceph-disk-all:
+
+ ceph-disk-clean:
+- cd $(srcdir)/ceph-disk ; python setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DISK_VIRTUALENV} .coverage *.egg-info
++ cd $(srcdir)/ceph-disk
+
+ ceph-disk-install-data:
+ cd $(srcdir)/ceph-disk ; \
+diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
+index e730850..9569947 100644
+--- a/src/tools/Makefile.am
++++ b/src/tools/Makefile.am
+@@ -45,6 +45,3 @@ noinst_HEADERS += \
+ tools/rados/PoolDump.h \
+ tools/cephfs/DataScan.h \
+ tools/cephfs/RoleSelector.h
+-
+-EXTRA_DIST += \
+- tools/setup-virtualenv.sh
+diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh
+index 9ff2d26..b6fca0a 100755
+--- a/src/tools/setup-virtualenv.sh
++++ b/src/tools/setup-virtualenv.sh
+@@ -15,6 +15,8 @@
+ # GNU Library Public License for more details.
+ #
+
++exit 0
++
+ DIR=$1
+ rm -fr $DIR
+ mkdir -p $DIR
diff --git a/sys-cluster/ceph/files/ceph-10.2.1-libzfs.patch b/sys-cluster/ceph/files/ceph-10.2.1-libzfs.patch
new file mode 100644
index 000000000000..34f8eb84beee
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.1-libzfs.patch
@@ -0,0 +1,11 @@
+--- ceph-10.2.1/configure.ac
++++ ceph-10.2.1/configure.ac
+@@ -908,7 +908,7 @@
+ ,
+ [with_libzfs=no])
+ AS_IF([test "x$with_libzfs" = xyes],
+- [PKG_CHECK_MODULES([LIBZFS], [zfs], [], [true])])
++ [PKG_CHECK_MODULES([LIBZFS], [libzfs], [], [true])])
+ AS_IF([test "x$with_libzfs" = xyes],
+ [AC_DEFINE([HAVE_LIBZFS], [1], [Defined if you have libzfs enabled])])
+ AM_CONDITIONAL(WITH_LIBZFS, [ test "$with_libzfs" = "yes" ])
diff --git a/sys-cluster/ceph/files/ceph-10.2.1-unbundle-jerasure.patch b/sys-cluster/ceph/files/ceph-10.2.1-unbundle-jerasure.patch
new file mode 100644
index 000000000000..8340b4d18bfd
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.1-unbundle-jerasure.patch
@@ -0,0 +1,355 @@
+diff --git a/src/erasure-code/jerasure/Makefile.am b/src/erasure-code/jerasure/Makefile.am
+index adcb95d..8099208 100644
+--- a/src/erasure-code/jerasure/Makefile.am
++++ b/src/erasure-code/jerasure/Makefile.am
+@@ -1,52 +1,17 @@
+ # jerasure plugin
+ noinst_HEADERS += \
+- erasure-code/jerasure/gf-complete/include/gf_complete.h \
+- erasure-code/jerasure/gf-complete/include/gf_general.h \
+- erasure-code/jerasure/gf-complete/include/gf_int.h \
+- erasure-code/jerasure/gf-complete/include/gf_method.h \
+- erasure-code/jerasure/gf-complete/include/gf_rand.h \
+- erasure-code/jerasure/gf-complete/include/gf_w16.h \
+- erasure-code/jerasure/gf-complete/include/gf_w32.h \
+- erasure-code/jerasure/gf-complete/include/gf_w4.h \
+- erasure-code/jerasure/gf-complete/include/gf_w64.h \
+- erasure-code/jerasure/gf-complete/include/gf_w8.h \
+- erasure-code/jerasure/jerasure/include/cauchy.h \
+- erasure-code/jerasure/jerasure/include/galois.h \
+- erasure-code/jerasure/jerasure/include/jerasure.h \
+- erasure-code/jerasure/jerasure/include/liberation.h \
+- erasure-code/jerasure/jerasure/include/reed_sol.h \
+ erasure-code/jerasure/ErasureCodeJerasure.h
+
+ jerasure_sources = \
+ erasure-code/ErasureCode.cc \
+- erasure-code/jerasure/jerasure/src/cauchy.c \
+- erasure-code/jerasure/jerasure/src/galois.c \
+- erasure-code/jerasure/jerasure/src/jerasure.c \
+- erasure-code/jerasure/jerasure/src/liberation.c \
+- erasure-code/jerasure/jerasure/src/reed_sol.c \
+- erasure-code/jerasure/gf-complete/src/gf_wgen.c \
+- erasure-code/jerasure/gf-complete/src/gf_method.c \
+- erasure-code/jerasure/gf-complete/src/gf_w16.c \
+- erasure-code/jerasure/gf-complete/src/gf.c \
+- erasure-code/jerasure/gf-complete/src/gf_w32.c \
+- erasure-code/jerasure/gf-complete/src/gf_w64.c \
+- erasure-code/jerasure/gf-complete/src/gf_w128.c \
+- erasure-code/jerasure/gf-complete/src/gf_general.c \
+- erasure-code/jerasure/gf-complete/src/gf_w4.c \
+- erasure-code/jerasure/gf-complete/src/gf_rand.c \
+- erasure-code/jerasure/gf-complete/src/gf_w8.c \
+ erasure-code/jerasure/ErasureCodePluginJerasure.cc \
+ erasure-code/jerasure/ErasureCodeJerasure.cc
+
+ erasure-code/jerasure/ErasureCodePluginJerasure.cc: ./ceph_ver.h
+
+ libec_jerasure_generic_la_SOURCES = ${jerasure_sources}
+-libec_jerasure_generic_la_CFLAGS = ${AM_CFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
+-libec_jerasure_generic_la_CXXFLAGS= ${AM_CXXFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++libec_jerasure_generic_la_CFLAGS = ${AM_CFLAGS}
++libec_jerasure_generic_la_CXXFLAGS= ${AM_CXXFLAGS}
+ libec_jerasure_generic_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+ libec_jerasure_generic_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
+ if LINUX
+@@ -55,20 +20,11 @@ endif
+
+ erasure_codelib_LTLIBRARIES += libec_jerasure_generic.la
+
+-libec_jerasure_neon_la_SOURCES = ${jerasure_sources} \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w4_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w8_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w16_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w32_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w64_neon.c
++libec_jerasure_neon_la_SOURCES = ${jerasure_sources}
+ libec_jerasure_neon_la_CFLAGS = ${AM_CFLAGS} \
+- ${ARM_NEON_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++ ${ARM_NEON_FLAGS}
+ libec_jerasure_neon_la_CXXFLAGS= ${AM_CXXFLAGS} \
+- ${ARM_NEON_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++ ${ARM_NEON_FLAGS}
+ libec_jerasure_neon_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+ libec_jerasure_neon_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
+ if LINUX
+@@ -84,16 +40,12 @@ libec_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS} \
+ ${INTEL_SSE_FLAGS} \
+ ${INTEL_SSE2_FLAGS} \
+ ${INTEL_SSE3_FLAGS} \
+- ${INTEL_SSSE3_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++ ${INTEL_SSSE3_FLAGS}
+ libec_jerasure_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
+ ${INTEL_SSE_FLAGS} \
+ ${INTEL_SSE2_FLAGS} \
+ ${INTEL_SSE3_FLAGS} \
+- ${INTEL_SSSE3_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++ ${INTEL_SSSE3_FLAGS}
+ libec_jerasure_sse3_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+ libec_jerasure_sse3_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
+ if LINUX
+@@ -111,18 +63,14 @@ libec_jerasure_sse4_la_CFLAGS = ${AM_CFLAGS} \
+ ${INTEL_SSE3_FLAGS} \
+ ${INTEL_SSSE3_FLAGS} \
+ ${INTEL_SSE4_1_FLAGS} \
+- ${INTEL_SSE4_2_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++ ${INTEL_SSE4_2_FLAGS}
+ libec_jerasure_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
+ ${INTEL_SSE_FLAGS} \
+ ${INTEL_SSE2_FLAGS} \
+ ${INTEL_SSE3_FLAGS} \
+ ${INTEL_SSSE3_FLAGS} \
+ ${INTEL_SSE4_1_FLAGS} \
+- ${INTEL_SSE4_2_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include
++ ${INTEL_SSE4_2_FLAGS}
+ libec_jerasure_sse4_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+ libec_jerasure_sse4_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared
+ if LINUX
+diff --git a/src/erasure-code/shec/ErasureCodePluginShec.cc b/src/erasure-code/shec/ErasureCodePluginShec.cc
+index d2b72f5..acbd172 100644
+--- a/src/erasure-code/shec/ErasureCodePluginShec.cc
++++ b/src/erasure-code/shec/ErasureCodePluginShec.cc
+@@ -71,7 +71,7 @@ public:
+ };
+
+ extern "C" {
+-#include "jerasure/include/galois.h"
++#include "galois.h"
+
+ extern gf_t *gfp_array[];
+ extern int gfp_is_composite[];
+diff --git a/src/erasure-code/shec/ErasureCodeShec.cc b/src/erasure-code/shec/ErasureCodeShec.cc
+index 2180328..c84ffc7 100644
+--- a/src/erasure-code/shec/ErasureCodeShec.cc
++++ b/src/erasure-code/shec/ErasureCodeShec.cc
+@@ -28,8 +28,8 @@
+ #include "crush/CrushWrapper.h"
+ #include "osd/osd_types.h"
+ extern "C" {
+-#include "jerasure/include/jerasure.h"
+-#include "jerasure/include/galois.h"
++#include "jerasure.h"
++#include "galois.h"
+
+ extern int calc_determinant(int *matrix, int dim);
+ extern int* reed_sol_vandermonde_coding_matrix(int k, int m, int w);
+diff --git a/src/erasure-code/shec/Makefile.am b/src/erasure-code/shec/Makefile.am
+index 6b658d5..3281c60 100644
+--- a/src/erasure-code/shec/Makefile.am
++++ b/src/erasure-code/shec/Makefile.am
+@@ -4,49 +4,19 @@ shec_sources = \
+ erasure-code/shec/ErasureCodePluginShec.cc \
+ erasure-code/shec/ErasureCodeShec.cc \
+ erasure-code/shec/ErasureCodeShecTableCache.cc \
+- erasure-code/shec/determinant.c \
+- erasure-code/jerasure/jerasure/src/cauchy.c \
+- erasure-code/jerasure/jerasure/src/galois.c \
+- erasure-code/jerasure/jerasure/src/jerasure.c \
+- erasure-code/jerasure/jerasure/src/liberation.c \
+- erasure-code/jerasure/jerasure/src/reed_sol.c \
+- erasure-code/jerasure/gf-complete/src/gf_wgen.c \
+- erasure-code/jerasure/gf-complete/src/gf_method.c \
+- erasure-code/jerasure/gf-complete/src/gf_w16.c \
+- erasure-code/jerasure/gf-complete/src/gf.c \
+- erasure-code/jerasure/gf-complete/src/gf_w32.c \
+- erasure-code/jerasure/gf-complete/src/gf_w64.c \
+- erasure-code/jerasure/gf-complete/src/gf_w128.c \
+- erasure-code/jerasure/gf-complete/src/gf_general.c \
+- erasure-code/jerasure/gf-complete/src/gf_w4.c \
+- erasure-code/jerasure/gf-complete/src/gf_rand.c \
+- erasure-code/jerasure/gf-complete/src/gf_w8.c
++ erasure-code/shec/determinant.c
+
+ noinst_HEADERS += \
+ erasure-code/shec/ErasureCodeShec.h \
+- erasure-code/shec/ErasureCodeShecTableCache.h \
+- erasure-code/jerasure/jerasure/include/cauchy.h \
+- erasure-code/jerasure/jerasure/include/galois.h \
+- erasure-code/jerasure/jerasure/include/jerasure.h \
+- erasure-code/jerasure/jerasure/include/liberation.h \
+- erasure-code/jerasure/jerasure/include/reed_sol.h \
+- erasure-code/jerasure/gf-complete/include/gf_int.h \
+- erasure-code/jerasure/gf-complete/include/gf_complete.h \
+- erasure-code/jerasure/gf-complete/include/gf_rand.h \
+- erasure-code/jerasure/gf-complete/include/gf_method.h \
+- erasure-code/jerasure/gf-complete/include/gf_general.h
++ erasure-code/shec/ErasureCodeShecTableCache.h
+
+ erasure-code/shec/ErasureCodePluginShec.cc: ./ceph_ver.h
+
+ libec_shec_generic_la_SOURCES = ${shec_sources}
+ libec_shec_generic_la_CFLAGS = ${AM_CFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_generic_la_CXXFLAGS= ${AM_CXXFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_generic_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+@@ -57,22 +27,13 @@ endif
+
+ erasure_codelib_LTLIBRARIES += libec_shec_generic.la
+
+-libec_shec_neon_la_SOURCES = ${shec_sources} \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w4_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w8_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w16_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w32_neon.c \
+- erasure-code/jerasure/gf-complete/src/neon/gf_w64_neon.c
++libec_shec_neon_la_SOURCES = ${shec_sources}
+ libec_shec_neon_la_CFLAGS = ${AM_CFLAGS} \
+ ${ARM_NEON_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_neon_la_CXXFLAGS= ${AM_CXXFLAGS} \
+ ${ARM_NEON_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_neon_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+@@ -91,8 +52,6 @@ libec_shec_sse3_la_CFLAGS = ${AM_CFLAGS} \
+ ${INTEL_SSE2_FLAGS} \
+ ${INTEL_SSE3_FLAGS} \
+ ${INTEL_SSSE3_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
+@@ -100,8 +59,6 @@ libec_shec_sse3_la_CXXFLAGS= ${AM_CXXFLAGS} \
+ ${INTEL_SSE2_FLAGS} \
+ ${INTEL_SSE3_FLAGS} \
+ ${INTEL_SSSE3_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_sse3_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+@@ -122,8 +79,6 @@ libec_shec_sse4_la_CFLAGS = ${AM_CFLAGS} \
+ ${INTEL_SSSE3_FLAGS} \
+ ${INTEL_SSE4_1_FLAGS} \
+ ${INTEL_SSE4_2_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
+@@ -133,8 +88,6 @@ libec_shec_sse4_la_CXXFLAGS= ${AM_CXXFLAGS} \
+ ${INTEL_SSSE3_FLAGS} \
+ ${INTEL_SSE4_1_FLAGS} \
+ ${INTEL_SSE4_2_FLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ libec_shec_sse4_la_LIBADD = $(LIBCRUSH) $(PTHREAD_LIBS) $(EXTRALIBS)
+diff --git a/src/erasure-code/shec/determinant.c b/src/erasure-code/shec/determinant.c
+index 15b62c9..bf5d290 100755
+--- a/src/erasure-code/shec/determinant.c
++++ b/src/erasure-code/shec/determinant.c
+@@ -19,7 +19,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#include "jerasure/include/galois.h"
++#include "galois.h"
+
+ void print_matrix(int *mat, int dim)
+ {
+diff --git a/src/test/erasure-code/Makefile.am b/src/test/erasure-code/Makefile.am
+index bdce080..11895ae 100644
+--- a/src/test/erasure-code/Makefile.am
++++ b/src/test/erasure-code/Makefile.am
+@@ -166,12 +166,8 @@ check_TESTPROGRAMS += unittest_erasure_code
+ unittest_erasure_code_jerasure_SOURCES = \
+ test/erasure-code/TestErasureCodeJerasure.cc \
+ ${jerasure_sources}
+-unittest_erasure_code_jerasure_CFLAGS = $(AM_CFLAGS) \
+- -Ierasure-code/jerasure/gf-complete/include \
+- -Ierasure-code/jerasure/jerasure/include
+-unittest_erasure_code_jerasure_CXXFLAGS = $(UNITTEST_CXXFLAGS) \
+- -Ierasure-code/jerasure/gf-complete/include \
+- -Ierasure-code/jerasure/jerasure/include
++unittest_erasure_code_jerasure_CFLAGS = $(AM_CFLAGS)
++unittest_erasure_code_jerasure_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+ unittest_erasure_code_jerasure_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ if LINUX
+ unittest_erasure_code_jerasure_LDADD += -ldl
+@@ -232,13 +228,9 @@ unittest_erasure_code_shec_SOURCES = \
+ test/erasure-code/TestErasureCodeShec.cc \
+ ${shec_sources}
+ unittest_erasure_code_shec_CFLAGS = ${libec_shec_la_CFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+@@ -251,13 +243,9 @@ unittest_erasure_code_shec_all_SOURCES = \
+ test/erasure-code/TestErasureCodeShec_all.cc \
+ ${shec_sources}
+ unittest_erasure_code_shec_all_CFLAGS = ${libec_shec_la_CFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_all_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_all_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+@@ -270,13 +258,9 @@ unittest_erasure_code_shec_thread_SOURCES = \
+ test/erasure-code/TestErasureCodeShec_thread.cc \
+ ${shec_sources}
+ unittest_erasure_code_shec_thread_CFLAGS = ${libec_shec_la_CFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_thread_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_thread_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+@@ -289,13 +273,9 @@ unittest_erasure_code_shec_arguments_SOURCES = \
+ test/erasure-code/TestErasureCodeShec_arguments.cc \
+ ${shec_sources}
+ unittest_erasure_code_shec_arguments_CFLAGS = ${libec_shec_la_CFLAGS} \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_arguments_CXXFLAGS = ${libec_shec_la_CXXFLAGS} $(UNITTEST_CXXFLAGS) \
+- -I$(srcdir)/erasure-code/jerasure/jerasure/include \
+- -I$(srcdir)/erasure-code/jerasure/gf-complete/include \
+ -I$(srcdir)/erasure-code/jerasure \
+ -I$(srcdir)/erasure-code/shec
+ unittest_erasure_code_shec_arguments_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
diff --git a/sys-cluster/ceph/files/ceph-10.2.3-CVE-2016-8626.patch b/sys-cluster/ceph/files/ceph-10.2.3-CVE-2016-8626.patch
new file mode 100644
index 000000000000..d767d8170dfa
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.3-CVE-2016-8626.patch
@@ -0,0 +1,33 @@
+commit dc2ffda7819d2ebeed3526d9e6da8f53221818de
+Author: Yehuda Sadeh <yehuda@redhat.com>
+Date: Thu Oct 20 10:17:36 2016 -0700
+
+ rgw: handle empty POST condition
+
+ Fixes: http://tracker.ceph.com/issues/17635
+
+ Before accessing json entity, need to check that iterator is valid.
+ If there is no entry return appropriate error code.
+
+ Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
+ (cherry picked from commit 23cb642243e09ca4a8e104f62a3bb7b2cbb6ea12)
+
+diff --git a/src/rgw/rgw_policy_s3.cc b/src/rgw/rgw_policy_s3.cc
+index 3843511..8af70a8 100644
+--- a/src/rgw/rgw_policy_s3.cc
++++ b/src/rgw/rgw_policy_s3.cc
+@@ -286,11 +286,13 @@ int RGWPolicy::from_json(bufferlist& bl, string& err_msg)
+ int r = add_condition(v[0], v[1], v[2], err_msg);
+ if (r < 0)
+ return r;
+- } else {
++ } else if (!citer.end()) {
+ JSONObj *c = *citer;
+ dout(0) << "adding simple_check: " << c->get_name() << " : " << c->get_data() << dendl;
+
+ add_simple_check(c->get_name(), c->get_data());
++ } else {
++ return -EINVAL;
+ }
+ }
+ return 0;
diff --git a/sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch b/sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch
new file mode 100644
index 000000000000..ffc164536048
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.3-build-without-openldap.patch
@@ -0,0 +1,32 @@
+diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc
+index c476129..cad54b8 100644
+--- a/src/rgw/librgw.cc
++++ b/src/rgw/librgw.cc
+@@ -470,7 +470,11 @@ namespace rgw {
+ const string& ldap_searchdn = store->ctx()->_conf->rgw_ldap_searchdn;
+ const string& ldap_dnattr =
+ store->ctx()->_conf->rgw_ldap_dnattr;
++#ifdef HAVE_OPENLDAP
+ std::string ldap_bindpw = parse_rgw_ldap_bindpw(store->ctx());
++#else
++ std::string ldap_bindpw;
++#endif /* HAVE_OPENLDAP */
+
+ ldh = new rgw::LDAPHelper(ldap_uri, ldap_binddn, ldap_bindpw.c_str(),
+ ldap_searchdn, ldap_dnattr);
+diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
+index e9f24f3..7291e69 100644
+--- a/src/rgw/rgw_rest_s3.cc
++++ b/src/rgw/rgw_rest_s3.cc
+@@ -3091,7 +3091,11 @@ void RGW_Auth_S3::init_impl(RGWRados* store)
+ const string& ldap_searchdn = store->ctx()->_conf->rgw_ldap_searchdn;
+ const string& ldap_dnattr =
+ store->ctx()->_conf->rgw_ldap_dnattr;
++#ifdef HAVE_OPENLDAP
+ std::string ldap_bindpw = parse_rgw_ldap_bindpw(store->ctx());
++#else
++ std::string ldap_bindpw;
++#endif /* HAVE_OPENLDAP */
+
+ ldh = new rgw::LDAPHelper(ldap_uri, ldap_binddn, ldap_bindpw,
+ ldap_searchdn, ldap_dnattr);
diff --git a/sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch b/sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch
new file mode 100644
index 000000000000..08a7920035aa
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch
@@ -0,0 +1,22 @@
+commit e1dc386f93eb4613dc7e89cc76a031aeee5022ba
+Author: Oleh Prypin <oleh@pryp.in>
+Date: Thu Jul 21 18:33:25 2016 +0300
+
+ pybind: Make CephFS bindings and tests compatible with Python 3
+
+ Signed-off-by: Oleh Prypin <oleh@pryp.in>
+
+diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx
+index ac17ada1a1..bd14de3b16 100644
+--- a/src/pybind/cephfs/cephfs.pyx
++++ b/src/pybind/cephfs/cephfs.pyx
+@@ -613,8 +613,7 @@ cdef class LibCephFS(object):
+
+ if not isinstance(mode, int):
+ raise TypeError('mode must be an int')
+- if isinstance(flags, basestring):
+- flags = cstr(flags, 'flags')
++ if isinstance(flags, str_type):
+ cephfs_flags = 0
+ if flags == '':
+ cephfs_flags = os.O_RDONLY
diff --git a/sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch b/sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch
new file mode 100644
index 000000000000..a81aae6e7ce8
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch
@@ -0,0 +1,45 @@
+commit 773e01294da518c6ec18f0a8b72e05def85fef6c
+Author: Oleh Prypin <oleh@pryp.in>
+Date: Fri Jun 24 15:48:57 2016 +0300
+
+ pybind: Make RBD Python bindings compatible with Python 3
+
+ Signed-off-by: Oleh Prypin <oleh@pryp.in>
+
+diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx
+index 52727bf39e..8f25dfbee0 100644
+--- a/src/pybind/rbd/rbd.pyx
++++ b/src/pybind/rbd/rbd.pyx
+@@ -745,7 +745,7 @@ class RBD(object):
+ break
+ elif ret != -errno.ERANGE:
+ raise make_ex(ret, 'error listing images')
+- return [decode_cstr(name) for name in c_names[:ret].split('\0')
++ return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
+ if name]
+ finally:
+ free(c_names)
+@@ -1885,8 +1885,8 @@ written." % (self.name, ret, length))
+ raise make_ex(ret, 'error listing images')
+ if ret == 0:
+ return []
+- pools = map(decode_cstr, c_pools[:pools_size - 1].split('\0'))
+- images = map(decode_cstr, c_images[:images_size - 1].split('\0'))
++ pools = map(decode_cstr, c_pools[:pools_size - 1].split(b'\0'))
++ images = map(decode_cstr, c_images[:images_size - 1].split(b'\0'))
+ return list(zip(pools, images))
+ finally:
+ free(c_pools)
+@@ -1933,9 +1933,9 @@ written." % (self.name, ret, length))
+ raise make_ex(ret, 'error listing images')
+ if ret == 0:
+ return []
+- clients = map(decode_cstr, c_clients[:clients_size - 1].split('\0'))
+- cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split('\0'))
+- addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split('\0'))
++ clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
++ cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
++ addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
+ return {
+ 'tag' : decode_cstr(c_tag),
+ 'exclusive' : exclusive == 1,
diff --git a/sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch b/sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch
new file mode 100644
index 000000000000..3202de3cbe98
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.6-radosgw-swift-clean-up-flush-newline-behavior.patch
@@ -0,0 +1,92 @@
+From 39848e41b7c517cc5faab1ccf77c2804fd7d2628 Mon Sep 17 00:00:00 2001
+From: Marcus Watts <mwatts@redhat.com>
+Date: Wed, 11 Jan 2017 00:06:15 -0500
+Subject: [PATCH] radosgw/swift: clean up flush / newline behavior.
+
+The current code emits a newline after swift errors, but fails
+to account for it when it calculates 'content-length'. This results in
+some clients (go github.com/ncw/swift) producing complaints about the
+unsolicited newline such as this,
+ Unsolicited response received on idle HTTP channel starting with "\n"; err=<nil>
+
+This logic eliminates the newline on flush. This makes the content length
+calculation correct and eliminates the stray newline.
+
+There was already existing separator logic in the rgw plain formatter
+that can emit a newline at the correct point. It had been checking
+"len" to decide if previous data had been emitted, but that's reset to 0
+by flush(). So, this logic adds a new per-instance variable to separately
+track state that it emitted a previous item (and should emit a newline).
+
+Fixes: http://tracker.ceph.com/issues/18473
+Signed-off-by: Marcus Watts <mwatts@redhat.com>
+Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
+(cherry picked from commit 5f229d6a33eae4906f22cdb90941835e47ee9f02)
+---
+ src/rgw/rgw_formats.cc | 11 +++++++----
+ src/rgw/rgw_formats.h | 1 +
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/rgw/rgw_formats.cc b/src/rgw/rgw_formats.cc
+index 698ec96..61e9b66 100644
+--- a/src/rgw/rgw_formats.cc
++++ b/src/rgw/rgw_formats.cc
+@@ -25,6 +25,7 @@ RGWFormatter_Plain::RGWFormatter_Plain(const bool ukv)
+ : buf(NULL),
+ len(0),
+ max_len(0),
++ wrote_something(false),
+ min_stack_level(0),
+ use_kv(ukv)
+ {
+@@ -41,7 +42,7 @@ void RGWFormatter_Plain::flush(ostream& os)
+ return;
+
+ if (len) {
+- os << buf << "\n";
++ os << buf;
+ os.flush();
+ }
+
+@@ -156,13 +157,14 @@ void RGWFormatter_Plain::dump_format_va(const char *name, const char *ns, bool q
+ vsnprintf(buf, LARGE_SIZE, fmt, ap);
+
+ const char *eol;
+- if (len) {
++ if (wrote_something) {
+ if (use_kv && entry.is_array && entry.size > 1)
+ eol = ", ";
+ else
+ eol = "\n";
+ } else
+ eol = "";
++ wrote_something = true;
+
+ if (use_kv && !entry.is_array)
+ write_data("%s%s: %s", eol, name, buf);
+@@ -268,10 +270,11 @@ void RGWFormatter_Plain::dump_value_int(const char *name, const char *fmt, ...)
+ va_end(ap);
+
+ const char *eol;
+- if (len)
++ if (wrote_something) {
+ eol = "\n";
+- else
++ } else
+ eol = "";
++ wrote_something = true;
+
+ if (use_kv && !entry.is_array)
+ write_data("%s%s: %s", eol, name, buf);
+diff --git a/src/rgw/rgw_formats.h b/src/rgw/rgw_formats.h
+index 9df5251..1c5afd1 100644
+--- a/src/rgw/rgw_formats.h
++++ b/src/rgw/rgw_formats.h
+@@ -56,6 +56,7 @@ class RGWFormatter_Plain : public Formatter {
+ std::list<struct plain_stack_entry> stack;
+ size_t min_stack_level;
+ bool use_kv;
++ bool wrote_something;
+ };
+
+ class RGWFormatterFlusher {
diff --git a/sys-cluster/ceph/files/ceph-10.2.7-fix-compilation-with-zstd.patch b/sys-cluster/ceph/files/ceph-10.2.7-fix-compilation-with-zstd.patch
new file mode 100644
index 000000000000..4e76deabe65f
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.7-fix-compilation-with-zstd.patch
@@ -0,0 +1,49 @@
+From 5a11f31aac4fa6a5c5ebb4fa0964e1c07a420e8c Mon Sep 17 00:00:00 2001
+From: Zac Medico <zmedico@gentoo.org>
+Date: Wed, 12 Apr 2017 01:49:09 -0700
+Subject: [PATCH] configure: link against zstd if detected
+
+https://bugs.gentoo.org/show_bug.cgi?id=601610
+---
+ configure.ac | 6 ++++--
+ src/Makefile-env.am | 3 +++
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 51daf91..8914b71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -851,12 +851,14 @@ AS_IF([test "x$with_librocksdb_static" = "xyes"],
+ AM_CONDITIONAL(WITH_SLIBROCKSDB, [ test "x$with_librocksdb_static" = "xyes" ])
+ AM_CONDITIONAL(WITH_LIBROCKSDB, [ test "x$with_librocksdb_static" = "xyes" -o "x$with_librocksdb" = "xyes" ])
+
+-# rocksdb detects bzlib and lz4 in its Makefile, which forces us to do the same.
++# rocksdb detects headers in its Makefile, which forces us to do the same.
+ AS_IF([test "x$with_librocksdb_static" = "xyes"], [
+ AC_CHECK_HEADER([bzlib.h], [have_bzlib=yes])
+- AC_CHECK_HEADER([lz4.h], [have_lz4=yes])])
++ AC_CHECK_HEADER([lz4.h], [have_lz4=yes])]
++ AC_CHECK_HEADER([zstd.h], [have_zstd=yes])])
+ AM_CONDITIONAL(HAVE_BZLIB, [test "x$have_bzlib" = "xyes"])
+ AM_CONDITIONAL(HAVE_LZ4, [test "x$have_lz4" = "xyes"])
++AM_CONDITIONAL(HAVE_ZSTD, [test "x$have_zstd" = "xyes"])
+
+ # needs libcurl and libxml2
+ if test "x$with_rest_bench" = xyes && test "x$with_system_libs3" = xno; then
+diff --git a/src/Makefile-env.am b/src/Makefile-env.am
+index 4771bad..0ee42f8 100644
+--- a/src/Makefile-env.am
++++ b/src/Makefile-env.am
+@@ -280,6 +280,9 @@ endif
+ if HAVE_LZ4
+ LIBKV += -llz4
+ endif
++if HAVE_ZSTD
++LIBKV += -lzstd
++endif
+ endif # WITH_SLIBROCKSDB
+ LIBKV += -lz -lleveldb -lsnappy
+ LIBOS += $(LIBOS_TYPES) $(LIBKV) $(LIBFUSE_LIBS)
+--
+2.10.2
+
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch b/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch
new file mode 100644
index 000000000000..31221ae2f994
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch
@@ -0,0 +1,15 @@
+diff --git a/src/Makefile-env.am b/src/Makefile-env.am
+index 4771bad02d..f92e20479b 100644
+--- a/src/Makefile-env.am
++++ b/src/Makefile-env.am
+@@ -53,10 +53,6 @@ endif
+ ## automake environment
+
+ HARDENING_CFLAGS = \
+- -O2 \
+- -g \
+- -pipe \
+- -Wall \
+ -Wp,-U_FORTIFY_SOURCE \
+ -Wp,-D_FORTIFY_SOURCE=2 \
+ -fexceptions \
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch b/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch
new file mode 100644
index 000000000000..a6b5515cee28
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch
@@ -0,0 +1,65 @@
+diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am
+index 3926ac4bec..90e2eae50c 100644
+--- a/src/ceph-detect-init/Makefile.am
++++ b/src/ceph-detect-init/Makefile.am
+@@ -67,7 +67,7 @@ ceph-detect-init-clean:
+ ceph-detect-init-install-data:
+ cd $(srcdir)/ceph-detect-init ; \
+ if test "$(DESTDIR)" ; then \
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
+ options=--install-layout=deb ; \
+ else \
+ options=--prefix=/usr ; \
+diff --git a/src/ceph-disk/Makefile.am b/src/ceph-disk/Makefile.am
+index a8532878c8..d908b1649a 100644
+--- a/src/ceph-disk/Makefile.am
++++ b/src/ceph-disk/Makefile.am
+@@ -43,7 +43,7 @@ ceph-disk-clean:
+ ceph-disk-install-data:
+ cd $(srcdir)/ceph-disk ; \
+ if test "$(DESTDIR)" ; then \
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
+ options=--install-layout=deb ; \
+ else \
+ options=--prefix=/usr ; \
+diff --git a/src/pybind/cephfs/Makefile.am b/src/pybind/cephfs/Makefile.am
+index 698522daa4..c49c190986 100644
+--- a/src/pybind/cephfs/Makefile.am
++++ b/src/pybind/cephfs/Makefile.am
+@@ -15,7 +15,7 @@ cephfs-pybind-clean: ${srcdir}/ceph_ver.h
+
+ cephfs-pybind-install-exec: ${srcdir}/ceph_ver.h
+ if test "$(DESTDIR)" ; then \
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
+ options=--install-layout=deb ; \
+ else \
+ options=--prefix=/usr ; \
+diff --git a/src/pybind/rados/Makefile.am b/src/pybind/rados/Makefile.am
+index a4145bf0f4..960395fee8 100644
+--- a/src/pybind/rados/Makefile.am
++++ b/src/pybind/rados/Makefile.am
+@@ -15,7 +15,7 @@ rados-pybind-clean: ${srcdir}/ceph_ver.h
+
+ rados-pybind-install-exec: ${srcdir}/ceph_ver.h
+ if test "$(DESTDIR)" ; then \
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
+ options=--install-layout=deb ; \
+ else \
+ options=--prefix=/usr ; \
+diff --git a/src/pybind/rbd/Makefile.am b/src/pybind/rbd/Makefile.am
+index 7dd49333fa..fbb940d07d 100644
+--- a/src/pybind/rbd/Makefile.am
++++ b/src/pybind/rbd/Makefile.am
+@@ -15,7 +15,7 @@ rbd-pybind-clean: ${srcdir}/ceph_ver.h
+
+ rbd-pybind-install-exec: ${srcdir}/ceph_ver.h
+ if test "$(DESTDIR)" ; then \
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
+ options=--install-layout=deb ; \
+ else \
+ options=--prefix=/usr ; \
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-filestore_fix_infinit_loops_in_fiemap.patch b/sys-cluster/ceph/files/ceph-10.2.9-filestore_fix_infinit_loops_in_fiemap.patch
new file mode 100644
index 000000000000..e67113e51cc8
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-filestore_fix_infinit_loops_in_fiemap.patch
@@ -0,0 +1,82 @@
+From b52bfe6b443f0ff88c8614441752102058063699 Mon Sep 17 00:00:00 2001
+From: Ning Yao <yaoning@unitedstack.com>
+Date: Thu, 6 Apr 2017 11:12:04 +0000
+Subject: [PATCH] os/filestore: fix infinit loops in fiemap()
+
+since fiemap can get extents based on offset --> len
+but we should consider last extents is retrieved when len == 0
+even though it is not last fiemap extents
+
+Signed-off-by: Ning Yao <yaoning@unitedstack.com>
+(cherry picked from commit 36f6b668a8910d76847674086cbc86910c78faee)
+---
+ src/os/filestore/FileStore.cc | 13 +++++--------
+ src/test/objectstore/store_test.cc | 21 +++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 8 deletions(-)
+
+diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc
+index c47b0d0d2eae..95f48cdf4960 100644
+--- a/src/os/filestore/FileStore.cc
++++ b/src/os/filestore/FileStore.cc
+@@ -3102,17 +3102,14 @@ int FileStore::_do_fiemap(int fd, uint64_t offset, size_t len,
+ i++;
+ last = extent++;
+ }
+- const bool is_last = last->fe_flags & FIEMAP_EXTENT_LAST;
++ uint64_t xoffset = last->fe_logical + last->fe_length - offset;
++ offset = last->fe_logical + last->fe_length;
++ len -= xoffset;
++ const bool is_last = (last->fe_flags & FIEMAP_EXTENT_LAST) || (len == 0);
++ free(fiemap);
+ if (!is_last) {
+- uint64_t xoffset = last->fe_logical + last->fe_length - offset;
+- offset = last->fe_logical + last->fe_length;
+- len -= xoffset;
+- free(fiemap); /* fix clang warn: use-after-free */
+ goto more;
+ }
+- else {
+- free(fiemap);
+- }
+
+ return r;
+ }
+diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc
+index 5ab011ad17d8..4cada7e2e435 100644
+--- a/src/test/objectstore/store_test.cc
++++ b/src/test/objectstore/store_test.cc
+@@ -279,6 +279,7 @@ TEST_P(StoreTest, FiemapHoles) {
+ ASSERT_EQ(r, 0);
+ }
+ {
++ //fiemap test from 0 to SKIP_STEP * (MAX_EXTENTS - 1) + 3
+ bufferlist bl;
+ store->fiemap(cid, oid, 0, SKIP_STEP * (MAX_EXTENTS - 1) + 3, bl);
+ map<uint64_t,uint64_t> m, e;
+@@ -295,6 +296,26 @@ TEST_P(StoreTest, FiemapHoles) {
+ ASSERT_TRUE((m.size() == 1 &&
+ m[0] > SKIP_STEP * (MAX_EXTENTS - 1)) ||
+ (m.size() == MAX_EXTENTS && extents_exist));
++
++ // fiemap test from SKIP_STEP to SKIP_STEP * (MAX_EXTENTS - 2) + 3
++ // reset bufferlist and map
++ bl.clear();
++ m.clear();
++ e.clear();
++ store->fiemap(cid, oid, SKIP_STEP, SKIP_STEP * (MAX_EXTENTS - 2) + 3, bl);
++ p = bl.begin();
++ ::decode(m, p);
++ cout << " got " << m << std::endl;
++ ASSERT_TRUE(!m.empty());
++ ASSERT_GE(m[SKIP_STEP], 3u);
++ extents_exist = true;
++ if (m.size() == (MAX_EXTENTS - 2)) {
++ for (uint64_t i = 1; i < MAX_EXTENTS - 1; i++)
++ extents_exist = extents_exist && m.count(SKIP_STEP*i);
++ }
++ ASSERT_TRUE((m.size() == 1 &&
++ m[SKIP_STEP] > SKIP_STEP * (MAX_EXTENTS - 2)) ||
++ (m.size() == (MAX_EXTENTS - 1) && extents_exist));
+ }
+ {
+ ObjectStore::Transaction t;
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch b/sys-cluster/ceph/files/ceph-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch
new file mode 100644
index 000000000000..eaf18c35783d
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch
@@ -0,0 +1,35 @@
+diff --git a/src/libradosstriper/RadosStriperImpl.cc b/src/libradosstriper/RadosStriperImpl.cc
+index 22352d9125..70dcb7569f 100644
+--- a/src/libradosstriper/RadosStriperImpl.cc
++++ b/src/libradosstriper/RadosStriperImpl.cc
+@@ -12,6 +12,8 @@
+ *
+ */
+
++#include <boost/algorithm/string/replace.hpp>
++
+ #include "libradosstriper/RadosStriperImpl.h"
+
+ #include <errno.h>
+@@ -466,7 +468,9 @@ int libradosstriper::RadosStriperImpl::aio_read(const std::string& soid,
+ // get list of extents to be read from
+ vector<ObjectExtent> *extents = new vector<ObjectExtent>();
+ if (read_len > 0) {
+- std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT;
++ std::string format = soid;
++ boost::replace_all(format, "%", "%%");
++ format += RADOS_OBJECT_EXTENSION_FORMAT;
+ file_layout_t l;
+ l.from_legacy(layout);
+ Striper::file_to_extents(cct(), format.c_str(), &l, off, read_len,
+@@ -776,7 +780,9 @@ libradosstriper::RadosStriperImpl::internal_aio_write(const std::string& soid,
+ if (len > 0) {
+ // get list of extents to be written to
+ vector<ObjectExtent> extents;
+- std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT;
++ std::string format = soid;
++ boost::replace_all(format, "%", "%%");
++ format += RADOS_OBJECT_EXTENSION_FORMAT;
+ file_layout_t l;
+ l.from_legacy(layout);
+ Striper::file_to_extents(cct(), format.c_str(), &l, off, len, 0, extents);
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch b/sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch
new file mode 100644
index 000000000000..6800285318f0
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch
@@ -0,0 +1,28 @@
+From 787ba33e5dba285dff874955a8f0d7aabd3f87fe Mon Sep 17 00:00:00 2001
+From: Jason Dillaman <dillaman@redhat.com>
+Date: Mon, 5 Jun 2017 08:17:05 -0400
+Subject: [PATCH] librbd: filter expected error codes from
+ is_exclusive_lock_owner
+
+Fixes: http://tracker.ceph.com/issues/20182
+Signed-off-by: Jason Dillaman <dillaman@redhat.com>
+(cherry picked from commit d4daaf54e6bc42cd4fb2111ea20b2042941b0c31)
+---
+ src/librbd/internal.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc
+index 9fecb1e1688f..6021be078090 100644
+--- a/src/librbd/internal.cc
++++ b/src/librbd/internal.cc
+@@ -2110,7 +2110,9 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
+ // might have been blacklisted by peer -- ensure we still own
+ // the lock by pinging the OSD
+ int r = ictx->exclusive_lock->assert_header_locked();
+- if (r < 0) {
++ if (r == -EBUSY || r == -ENOENT) {
++ return 0;
++ } else if (r < 0) {
+ return r;
+ }
+
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch b/sys-cluster/ceph/files/ceph-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch
new file mode 100644
index 000000000000..8bf14c2944ba
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch
@@ -0,0 +1,39 @@
+From 153f77544118613e19d5e88c030c3901234cf950 Mon Sep 17 00:00:00 2001
+From: David Zafman <dzafman@redhat.com>
+Date: Tue, 18 Jul 2017 15:08:14 -0700
+Subject: [PATCH] osd: scrub_to specifies clone ver, but transaction include
+ head write ver
+
+Fixes: http://tracker.ceph.com/issues/20041
+
+Signed-off-by: David Zafman <dzafman@redhat.com>
+(cherry picked from commit fd598a0d23d61c645633ae774c3404a43d035e3c)
+
+Conflicts:
+ src/osd/ReplicatedPG.cc (trivial)
+---
+ src/osd/ReplicatedPG.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
+index 4b4dc34c602a..4d80ad1770e1 100644
+--- a/src/osd/ReplicatedPG.cc
++++ b/src/osd/ReplicatedPG.cc
+@@ -8318,7 +8318,7 @@ void ReplicatedPG::op_applied(const eversion_t &applied_version)
+ last_update_applied = applied_version;
+ if (is_primary()) {
+ if (scrubber.active) {
+- if (last_update_applied == scrubber.subset_last_update) {
++ if (last_update_applied >= scrubber.subset_last_update) {
+ requeue_scrub();
+ }
+ } else {
+@@ -8326,7 +8326,7 @@ void ReplicatedPG::op_applied(const eversion_t &applied_version)
+ }
+ } else {
+ if (scrubber.active_rep_scrub) {
+- if (last_update_applied == static_cast<MOSDRepScrub*>(
++ if (last_update_applied >= static_cast<MOSDRepScrub*>(
+ scrubber.active_rep_scrub->get_req())->scrub_to) {
+ osd->op_wq.queue(
+ make_pair(
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch b/sys-cluster/ceph/files/ceph-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch
new file mode 100644
index 000000000000..4b03e335bc58
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch
@@ -0,0 +1,39 @@
+From 0cd7df3649d7486d444a61cab89c48a89ddd3e8d Mon Sep 17 00:00:00 2001
+From: Jason Dillaman <dillaman@redhat.com>
+Date: Thu, 29 Jun 2017 14:54:40 -0400
+Subject: [PATCH] rbd: do not attempt to load key if auth is disabled
+
+Fixes: http://tracker.ceph.com/issues/19035
+Signed-off-by: Jason Dillaman <dillaman@redhat.com>
+(cherry picked from commit 8b9c8df6d7f0b75c5451953bb322bc1f9afb6299)
+---
+ src/krbd.cc | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/src/krbd.cc b/src/krbd.cc
+index a0e546fa7f6f..2bb6b4270abd 100644
+--- a/src/krbd.cc
++++ b/src/krbd.cc
+@@ -129,13 +129,15 @@ static int build_map_buf(CephContext *cct, const char *pool, const char *image,
+ oss << " name=" << cct->_conf->name.get_id();
+
+ KeyRing keyring;
+- r = keyring.from_ceph_context(cct);
+- if (r == -ENOENT && !(cct->_conf->keyfile.length() ||
+- cct->_conf->key.length()))
+- r = 0;
+- if (r < 0) {
+- cerr << "rbd: failed to get secret" << std::endl;
+- return r;
++ if (cct->_conf->auth_client_required != "none") {
++ r = keyring.from_ceph_context(cct);
++ if (r == -ENOENT && !(cct->_conf->keyfile.length() ||
++ cct->_conf->key.length()))
++ r = 0;
++ if (r < 0) {
++ cerr << "rbd: failed to get secret" << std::endl;
++ return r;
++ }
+ }
+
+ CryptoKey secret;
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch b/sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch
new file mode 100644
index 000000000000..5cb89be0edf1
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch
@@ -0,0 +1,28 @@
+diff --git a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc
+index 2e399ab832..88e1e0ff65 100644
+--- a/src/tools/rbd_nbd/rbd-nbd.cc
++++ b/src/tools/rbd_nbd/rbd-nbd.cc
+@@ -469,6 +469,10 @@ static int open_device(const char* path, bool try_load_moudle = false)
+
+ static int check_device_size(int nbd_index, unsigned long expected_size)
+ {
++ // There are bugs with some older kernel versions that result in an
++ // overflow for large image sizes. This check is to ensure we are
++ // not affected.
++
+ unsigned long size = 0;
+ std::string path = "/sys/block/nbd" + stringify(nbd_index) + "/size";
+ std::ifstream ifs;
+@@ -480,6 +484,12 @@ static int check_device_size(int nbd_index, unsigned long expected_size)
+ ifs >> size;
+ size *= RBD_NBD_BLKSIZE;
+
++ if (size == 0) {
++ // Newer kernel versions will report real size only after nbd
++ // connect. Assume this is the case and return success.
++ return 0;
++ }
++
+ if (size != expected_size) {
+ cerr << "rbd-nbd: kernel reported invalid device size (" << size
+ << ", expected " << expected_size << ")" << std::endl;
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch b/sys-cluster/ceph/files/ceph-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch
new file mode 100644
index 000000000000..60f46ab36a40
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch
@@ -0,0 +1,32 @@
+From 3fa277b479d69699bf5a6875cd4a5efcf9ae0788 Mon Sep 17 00:00:00 2001
+From: Alexey Sheplyakov <asheplyakov@mirantis.com>
+Date: Tue, 27 Jun 2017 16:07:01 +0400
+Subject: [PATCH] jewel: osd: unlock sdata_op_ordering_lock with sdata_lock
+ hold to avoid missing wakeup signal
+
+Based on commit bc683385819146f3f6f096ceec97e1226a3cd237. The OSD code has
+been refactored a lot since Jewel, hence cherry-picking that patch introduces
+a lot of unrelated changes, and is much more difficult than reusing the idea.
+
+Fixes: http://tracker.ceph.com/issues/20428
+
+Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
+---
+ src/osd/OSD.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
+index f5cfda3b686a..38a2711f6f92 100644
+--- a/src/osd/OSD.cc
++++ b/src/osd/OSD.cc
+@@ -8727,9 +8727,9 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb )
+ assert(NULL != sdata);
+ sdata->sdata_op_ordering_lock.Lock();
+ if (sdata->pqueue->empty()) {
+- sdata->sdata_op_ordering_lock.Unlock();
+ osd->cct->get_heartbeat_map()->reset_timeout(hb, 4, 0);
+ sdata->sdata_lock.Lock();
++ sdata->sdata_op_ordering_lock.Unlock();
+ sdata->sdata_cond.WaitInterval(osd->cct, sdata->sdata_lock, utime_t(2, 0));
+ sdata->sdata_lock.Unlock();
+ sdata->sdata_op_ordering_lock.Lock();
diff --git a/sys-cluster/ceph/files/ceph-12.2.0-cflags.patch b/sys-cluster/ceph/files/ceph-12.2.0-cflags.patch
new file mode 100644
index 000000000000..0f02e6e6d433
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.0-cflags.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
+index 24d1a50654..a9fac61196 100644
+--- a/cmake/modules/Distutils.cmake
++++ b/cmake/modules/Distutils.cmake
+@@ -43,7 +43,7 @@ function(distutils_add_cython_module name src)
+ CC=${PY_CC}
+ CXX=${PY_CXX}
+ LDSHARED=${PY_LDSHARED}
+- OPT=\"-DNDEBUG -g -fwrapv -O2 -w\"
++ OPT=\"-DNDEBUG -fwrapv -w\"
+ LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+ CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
+ CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
diff --git a/sys-cluster/ceph/files/ceph-12.2.0-use-provided-cpu-flag-values.patch b/sys-cluster/ceph/files/ceph-12.2.0-use-provided-cpu-flag-values.patch
new file mode 100644
index 000000000000..55c82b0a272b
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.0-use-provided-cpu-flag-values.patch
@@ -0,0 +1,37 @@
+diff --git a/cmake/modules/SIMDExt.cmake b/cmake/modules/SIMDExt.cmake
+index 5330835aa1..a4dd881e34 100644
+--- a/cmake/modules/SIMDExt.cmake
++++ b/cmake/modules/SIMDExt.cmake
+@@ -76,32 +76,25 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
+ set(HAVE_INTEL 1)
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
+- CHECK_C_COMPILER_FLAG(-msse HAVE_INTEL_SSE)
+ if(HAVE_INTEL_SSE)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse")
+ endif()
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+- CHECK_C_COMPILER_FLAG(-msse2 HAVE_INTEL_SSE2)
+ if(HAVE_INTEL_SSE2)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse2")
+ endif()
+- CHECK_C_COMPILER_FLAG(-msse3 HAVE_INTEL_SSE3)
+ if(HAVE_INTEL_SSE3)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse3")
+ endif()
+- CHECK_C_COMPILER_FLAG(-mssse3 HAVE_INTEL_SSSE3)
+ if(HAVE_INTEL_SSSE3)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mssse3")
+ endif()
+- CHECK_C_COMPILER_FLAG(-mpclmul HAVE_INTEL_PCLMUL)
+ if(HAVE_INTEL_PCLMUL)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mpclmul")
+ endif()
+- CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_INTEL_SSE4_1)
+ if(HAVE_INTEL_SSE4_1)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.1")
+ endif()
+- CHECK_C_COMPILER_FLAG(-msse4.2 HAVE_INTEL_SSE4_2)
+ if(HAVE_INTEL_SSE4_2)
+ set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.2")
+ endif()
diff --git a/sys-cluster/ceph/files/ceph-12.2.1-systemd-unitdir.patch b/sys-cluster/ceph/files/ceph-12.2.1-systemd-unitdir.patch
new file mode 100644
index 000000000000..28d1a02d711b
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.1-systemd-unitdir.patch
@@ -0,0 +1,10 @@
+diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
+index 3b03b6e613..c359ad2df9 100644
+--- a/systemd/CMakeLists.txt
++++ b/systemd/CMakeLists.txt
+@@ -17,4 +17,4 @@ install(FILES
+ ceph-disk@.service
+ ceph-volume@.service
+ rbdmap.service
+- DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/systemd/system)
++ DESTINATION ${SYSTEMD_UNITDIR})
diff --git a/sys-cluster/ceph/files/ceph-mds_at.service b/sys-cluster/ceph/files/ceph-mds_at.service
new file mode 100644
index 000000000000..c28604e3c430
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mds_at.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Ceph metadata server daemon
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+PartOf=ceph.target
+
+[Service]
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %i
+
+[Install]
+WantedBy=ceph.target
diff --git a/sys-cluster/ceph/files/ceph-mds_at.service.conf b/sys-cluster/ceph/files/ceph-mds_at.service.conf
new file mode 100644
index 000000000000..0172cbeadeee
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mds_at.service.conf
@@ -0,0 +1,4 @@
+# Uncomment the following lines to configure the cluster name for Ceph MDSs.
+
+#[Service]
+#Environment=CLUSTER=ceph
diff --git a/sys-cluster/ceph/files/ceph-mon_at.service b/sys-cluster/ceph/files/ceph-mon_at.service
new file mode 100644
index 000000000000..4f54cc158c5b
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-mon_at.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Ceph cluster monitor daemon
+After=network-online.target
+Wants=network-online.target
+
+# According to:
+# http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
+# these can be removed once ceph-mon will dynamically change network
+# configuration.
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+PartOf=ceph.target
+
+[Service]
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i
+
+[Install]
+WantedBy=ceph.target
diff --git a/sys-cluster/ceph/files/ceph-osd_at.service b/sys-cluster/ceph/files/ceph-osd_at.service
new file mode 100644
index 000000000000..7bf125f63c78
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-osd_at.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ceph object storage daemon
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+PartOf=ceph.target
+
+[Service]
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i
+ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
+
+[Install]
+WantedBy=ceph.target
diff --git a/sys-cluster/ceph/files/ceph-osd_at.service.conf b/sys-cluster/ceph/files/ceph-osd_at.service.conf
new file mode 100644
index 000000000000..959b948c1178
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-osd_at.service.conf
@@ -0,0 +1,4 @@
+# Uncomment the following lines to configure the cluster name for Ceph OSDs.
+
+#[Service]
+#Environment=CLUSTER=ceph
diff --git a/sys-cluster/ceph/files/ceph.confd-r1 b/sys-cluster/ceph/files/ceph.confd-r1
new file mode 100644
index 000000000000..3bdb8b485ed8
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r1
@@ -0,0 +1,4 @@
+# Example
+
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
diff --git a/sys-cluster/ceph/files/ceph.confd-r2 b/sys-cluster/ceph/files/ceph.confd-r2
new file mode 100644
index 000000000000..13b1cfad4588
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r2
@@ -0,0 +1,8 @@
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
+
+# Set ulimits for Ceph services.
+rc_ulimit="-n 32768"
+
+# initd stop timeout.
+#CEPH_TERMTIMEOUT="TERM/60/KILL/5"
diff --git a/sys-cluster/ceph/files/ceph.confd-r3 b/sys-cluster/ceph/files/ceph.confd-r3
new file mode 100644
index 000000000000..54673c2688f7
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r3
@@ -0,0 +1,61 @@
+# /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 131072 -u 257256"
+
+# the directory under /run to store runtime information in
+#rundir=/run/ceph
+
+# the user and group to run ceph as
+
+# settings for openrc supervisor for various ceph daemons
+#
+# defaults (can be overidden for each daemon)
+#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-r1.1 b/sys-cluster/ceph/files/ceph.initd-r1.1
new file mode 100644
index 000000000000..bb603259715d
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r1.1
@@ -0,0 +1,39 @@
+#!/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}"
+command="/usr/bin/ceph-${daemon_type}"
+pidfile="/run/ceph/${daemon_type}.${daemon_id}.pid"
+command_args="-i ${daemon_id} --pid-file ${pidfile} -c ${ceph_conf}"
+
+depend() {
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ checkpath -d -q -o ceph "$(dirname "${pidfile}")"
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 ${start_stop_daemon_args} --pidfile "${pidfile}"
+ eend $?
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.initd-r2 b/sys-cluster/ceph/files/ceph.initd-r2
new file mode 100644
index 000000000000..16267c58a139
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r2
@@ -0,0 +1,40 @@
+#!/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}"
+command="/usr/bin/ceph-${daemon_type}"
+pidfile="/run/ceph/${daemon_type}.${daemon_id}.pid"
+command_args="-i ${daemon_id} --pid-file ${pidfile} -c ${ceph_conf}"
+start_stop_daemon_args="--user ceph --group ceph"
+
+depend() {
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ checkpath -d -q -o ceph "$(dirname "${pidfile}")"
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 ${start_stop_daemon_args} --pidfile "${pidfile}"
+ eend $?
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.initd-r4 b/sys-cluster/ceph/files/ceph.initd-r4
new file mode 100644
index 000000000000..33e1a3002ac9
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r4
@@ -0,0 +1,49 @@
+#!/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}"
+command="/usr/bin/ceph-${daemon_type}"
+pidfile="/run/ceph/${daemon_type}.${daemon_id}.pid"
+command_args="-i ${daemon_id} --pid-file ${pidfile} -c ${ceph_conf}"
+start_stop_daemon_args="--user ceph --group ceph"
+retry="${CEPH_TERMTIMEOUT:-TERM/60/KILL/5}"
+
+depend() {
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ export CEPH_CONF="${ceph_conf}"
+
+ checkpath -d -q -o ceph "$(dirname "${pidfile}")"
+
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+ fi
+
+ if pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then
+ eerror "${daemon_type}.${daemon_id} is still running, refusing to start"
+ return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 ${start_stop_daemon_args} --pidfile "${pidfile}"
+ eend $?
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.initd-r5 b/sys-cluster/ceph/files/ceph.initd-r5
new file mode 100644
index 000000000000..7087de605175
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r5
@@ -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 131072 -u 257256}
+
+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}"
+ 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:
diff --git a/sys-cluster/ceph/files/ceph.logrotate b/sys-cluster/ceph/files/ceph.logrotate
new file mode 100644
index 000000000000..df03f5e69a4b
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.logrotate
@@ -0,0 +1,18 @@
+/var/log/ceph/*.log
+{
+ rotate 7
+ daily
+ compress
+ sharedscripts
+ prerotate
+ for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do
+ ceph --admin-daemon /run/ceph/${dmn} log flush 2>/dev/null >/dev/null
+ done
+ endscript
+ postrotate
+ for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do
+ ceph --admin-daemon /run/ceph/${dmn} log reopen 2>/dev/null >/dev/null
+ done
+ endscript
+ missingok
+}
diff --git a/sys-cluster/ceph/files/ceph.target b/sys-cluster/ceph/files/ceph.target
new file mode 100644
index 000000000000..60734baff689
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.target
@@ -0,0 +1,4 @@
+[Unit]
+Description=ceph target allowing to start/stop all ceph*@.service instances at once
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-cluster/ceph/files/envd-tcmalloc b/sys-cluster/ceph/files/envd-tcmalloc
new file mode 100644
index 000000000000..bdb09670c636
--- /dev/null
+++ b/sys-cluster/ceph/files/envd-tcmalloc
@@ -0,0 +1 @@
+TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=134217728
diff --git a/sys-cluster/ceph/files/rbdmap.initd b/sys-cluster/ceph/files/rbdmap.initd
new file mode 100644
index 000000000000..9313cf658863
--- /dev/null
+++ b/sys-cluster/ceph/files/rbdmap.initd
@@ -0,0 +1,122 @@
+#!/sbin/openrc-run
+
+DESC="RBD Mapping:"
+RBDMAPFILE="/etc/ceph/rbdmap"
+
+extra_started_commands="reload"
+
+depend() {
+ need localmount net
+ before netmount
+}
+
+start() {
+
+ if [ ! -f "${RBDMAPFILE}" ]; then
+ ewarn "$DESC : No ${RBDMAPFILE} found."
+ exit 0
+ fi
+
+ RET=0
+ # Read /etc/ceph/rbdmap to create non-existant mapping
+ while read DEV PARAMS; do
+ case "$DEV" in
+ ""|\#*)
+ continue
+ ;;
+ */*)
+ ;;
+ *)
+ DEV=rbd/$DEV
+ ;;
+ esac
+ ebegin "${DESC} '${DEV}'"
+ newrbd=""
+ MAP_RV=""
+ RET_OP=0
+ OIFS=$IFS
+ IFS=','
+ for PARAM in ${PARAMS[@]}; do
+ CMDPARAMS="${CMDPARAMS} --$(echo ${PARAM} | tr '=' ' ')"
+ done
+ IFS=$OIFS
+ if [ ! -b /dev/rbd/${DEV} ]; then
+ MAP_RV=$(rbd map ${DEV} ${CMDPARAMS} 2>&1)
+ if [ $? -eq 0 ]; then
+ newrbd="yes"
+ else
+ RET=$((${RET}+$?))
+ RET_OP=1
+ fi
+ fi
+ eend ${RET_OP} "${MAP_RV}"
+
+ if [ "$newrbd" ]; then
+ ## Mount new rbd
+ MNT_RV=""
+ mount --fake /dev/rbd/${DEV} >>/dev/null 2>&1 \
+ && MNT_RV=$(mount -vn /dev/rbd/${DEV} 2>&1)
+ [ -n "${MNT_RV}" ] && einfo "mount: ${MNT_RV}"
+
+ ## post-mapping
+ if [ -x "/etc/ceph/rbd.d/${DEV}" ]; then
+ einfo "RBD Running post-map hook '/etc/ceph/rbd.d/${DEV}'"
+ /etc/ceph/rbd.d/${DEV} map "/dev/rbd/${DEV}"
+ fi
+ fi
+ done < ${RBDMAPFILE}
+ eend ${RET}
+}
+
+stop() {
+
+ RET=0
+ ## Unmount and unmap all rbd devices
+ if ls /dev/rbd[0-9]* >/dev/null 2>&1; then
+ for DEV in /dev/rbd[0-9]*; do
+ ## pre-unmapping
+ for L in $(find /dev/rbd -type l); do
+ LL="${L##/dev/rbd/}"
+ if [ "$(readlink -f $L)" = "${DEV}" ] \
+ && [ -x "/etc/ceph/rbd.d/${LL}" ]; then
+ einfo "RBD pre-unmap: '${DEV}' hook '/etc/ceph/rbd.d/${LL}'"
+ /etc/ceph/rbd.d/${LL} unmap "$L"
+ break
+ fi
+ done
+
+ ebegin "Unmapping RBD device: '${DEV}'"
+ UMNT_RV=""
+ UMAP_RV=""
+ RET_OP=0
+ MNT=$(findmnt --mtab --source ${DEV} --noheadings | awk '{print $1'})
+ if [ -n "${MNT}" ]; then
+ einfo "un-mounting '${MNT}'"
+ UMNT_RV=$(umount "${MNT}" 2>&1)
+ fi
+ if mountpoint -q "${MNT}"; then
+ ## Un-mounting failed.
+ RET_OP=1
+ RET=$((${RET}+1))
+ else
+ ## Un-mapping.
+ UMAP_RV=$(rbd unmap $DEV 2>&1)
+ if [ $? -ne 0 ]; then
+ RET=$((${RET}+$?))
+ RET_OP=1
+ fi
+ fi
+ eend ${RET_OP} "${UMAP_RV}"
+ [ -n "${UMNT_RV}" ] && einfo "${UMNT_RV}"
+ done
+ fi
+ eend ${RET}
+}
+
+reload() {
+ start
+}
+
+status() {
+ rbd showmapped
+}
diff --git a/sys-cluster/ceph/files/sysctld b/sys-cluster/ceph/files/sysctld
new file mode 100644
index 000000000000..4d133264f554
--- /dev/null
+++ b/sys-cluster/ceph/files/sysctld
@@ -0,0 +1,2 @@
+# up the global pid max for ceph
+kernel.pid_max = 257256
diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml
new file mode 100644
index 000000000000..be0d84faee0b
--- /dev/null
+++ b/sys-cluster/ceph/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ <description>Co Maintainer</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ <description>Co Maintainer</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>cluster@gentoo.org</email>
+ <name>Gentoo Cluster Project</name>
+ </maintainer>
+ <longdescription>
+Ceph is a distributed network file system designed to provide excellent performance, reliability, and scalability.
+</longdescription>
+ <use>
+ <flag name="cryptopp">Use <pkg>dev-libs/crypto++</pkg> for cryptography</flag>
+ <flag name="cephfs">Build support for cephfs, a POSIX compatible filesystem built on top of ceph</flag>
+ <flag name="fuse">Build fuse client</flag>
+ <flag name="libatomic">Use libatomic instead of builtin atomic operations</flag>
+ <flag name="libaio">Use libaio as asynchronous input/output library</flag>
+ <flag name="lttng">Add support for LTTng</flag>
+ <flag name="babeltrace">Add support for LTTng babeltrace</flag>
+ <flag name="mgr">Build the ceph-mgr daemon</flag>
+ <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
+ <flag name="radosgw">Add radosgw support</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations</flag>
+ <flag name="xfs">Add xfs support</flag>
+ <flag name="zfs">Add zfs support</flag>
+ </use>
+</pkgmetadata>