aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-cluster/ceph/Manifest47
-rw-r--r--sys-cluster/ceph/ceph-12.2.10-r100.ebuild319
-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.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-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-12.2.4-boost-build-none-options.patch26
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.4-cflags.patch38
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.4-rocksdb-cflags.patch11
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.5-boost-sonames.patch165
-rw-r--r--sys-cluster/ceph/files/ceph-12.2.5-no-werror.patch55
-rw-r--r--sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch166
-rw-r--r--sys-cluster/ceph/files/ceph-13.2.0-cflags.patch26
-rw-r--r--sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch16
-rw-r--r--sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch78
-rw-r--r--sys-cluster/ceph/files/ceph-13.2.2-dont-install-sysvinit-script.patch15
-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-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-r363
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r470
-rw-r--r--sys-cluster/ceph/files/ceph.confd-r515
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r10108
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r240
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r787
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r895
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r997
-rw-r--r--sys-cluster/ceph/files/ceph.logrotate18
-rw-r--r--sys-cluster/ceph/files/ceph.logrotate-r118
-rw-r--r--sys-cluster/ceph/files/ceph.logrotate-r233
-rw-r--r--sys-cluster/ceph/files/envd-tcmalloc1
-rw-r--r--sys-cluster/ceph/files/make-node-frontend-tarball.bash140
-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
47 files changed, 2756 insertions, 0 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
new file mode 100644
index 0000000..b441ffd
--- /dev/null
+++ b/sys-cluster/ceph/Manifest
@@ -0,0 +1,47 @@
+AUX README.gentoo 1085 BLAKE2B 761a88dbcb3126a47ae6257409d47c3e936743d102430cfc71fac90ea4b8ed876af9815b445e06d88ef407a47963eacd8027cf912ab3fcde724af22fd6a43741 SHA512 cee1b5fb9823333eda0750c04db0c56d71cca1cbf6fed6887ac4ba68949114df74aace3861343bdacd2a1dc4fc38932de805cc03074f981d26891673e454f250
+AUX ceph-10.2.0-dont-use-virtualenvs.patch 3253 BLAKE2B 099d80efbccfb4ce8ac6c7809c70b2fb66b44f3c6ee5fbea64988576320df9b5ea6c420088fc4dba2d899c9410979dae3a7609676271c53b1eaef5187ab33cfa SHA512 f6351c97ca6766aa5eb4ebb91bc013aaf8222029743c95f5c88b9bd8a6caca48908315e8850ffc83651573377b48e5feb170c310b42e2447fec739379169b500
+AUX ceph-10.2.1-libzfs.patch 440 BLAKE2B 8d0c46d54917a0d8f61f913562b4e8f9a54efd04ccf548a2290832a765f69b4db120bab6e72b94295bf1fd3214512db8c598af6ec514b1e9e4361f964b7fe4d9 SHA512 5afe85113f310b86a13fb18ba57030d50ae5bd9afbf4d6f5aacd7cca415dd13544522c5d903eb58ec90cc0f6ae2cbb022941debe7036d1b7fa6c5af26af9b9db
+AUX ceph-10.2.1-unbundle-jerasure.patch 16190 BLAKE2B 6a5969ca39389ae26ed83c7a76c69adf049f32d6f183d602a460d844427d18825846d034b9753a359fd18bb19828532ba770318fd8c9c0294954d68b10c1e0ff SHA512 8076a69bb81f89f8892576c4e2ceb03131cbd7ffee82a0d4d66016120f6c79b906172d1a1c30d7642a32ef7afd46d77d7311b65ca55d065995f305cb0e89485a
+AUX ceph-10.2.3-CVE-2016-8626.patch 1102 BLAKE2B 394efc3b3cf743790ef46a1ed5941081f6c5da89fb6b72a7d0413f1ae0b90d0142f4d1a60b5f1986beafd7f3f77de45b00632f7c251c9801802bd821fe9b6c2b SHA512 e924b4719f0c4a0aa27ed383c816d0d24d7a979b73fb2962193dbdc31cd23c02061904a696222d73e58e1892b2ca51e9c6df6674fec5c17f013c2f4664790fbd
+AUX ceph-10.2.3-build-without-openldap.patch 1209 BLAKE2B 5ba29095421ebbcc7362814627b3459ee364f7a2f5d4256b9b5b85d39c15aabbba8faf725e6a67cee77d4a391e09087f12d15a94b22ffd1124dfc08cc94c9c48 SHA512 2b0476eeb78246f252bd294eabc66c6fe5724d753d0cc2dde56720aada2517e42df3387eb368a53fa553617d436d18393a4e856d6fe7395022b249d522d1ec88
+AUX ceph-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch 794 BLAKE2B d6448cfed9a67d38ed82fa7d7d3a5ba6aa26d629912cb5450cad628eb8c498b4934534404e70d2fea3db12c8e28e84e0c914e86d294071d7662a0fbee05c6cdd SHA512 1261d3f088ffc4514069e73e49f627c6f87e89683cedc0048dba6d0e18f53f9a784f6c558478ebe72dff70669e5a453809a720cde77f5b89675d92840e6609b7
+AUX ceph-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch 2155 BLAKE2B 65ecae6fe095c9b61f26d80a5f12a6d5d22ea3f65d37837e382b24e608ef1bf47bb275183b136c49a95383c9d38e2839e2c7999d21708b95d1bb678a5e2ad729 SHA512 c64b4def2ee9cdc9109ff6c32391384980d5ac4e33d425454fe1ff59910ba622ecb458a6722a5ed0f988e021b83ace5d89cb3974a1cf65862e8766595d8cfb0e
+AUX ceph-10.2.7-fix-compilation-with-zstd.patch 1782 BLAKE2B 35c63ded6f1a4740befe952e3685743f0f4cb2500f6451406133d3074179cba0703389c07a9936ecee7d2afc83db24aa212aaea3a856f240230bb6ea76fcb975 SHA512 5929217f64deb45fd803e33cd277443cbb5f5f956fc4be05490a07dae0b02467317426993c7fc44173a18955261e3a73e603775db12e788a93c851f992539ad6
+AUX ceph-10.2.9-cflags.patch 449 BLAKE2B a1fc3d1a1e5bb891932d0697631b9a604a47e4c564dc99ef1247cb9e5c26ba7bb5e421b4ca624e78b31d279c93db2965eab31d38f1d3b8fd93d247789ae9408c SHA512 17a165710b0effacc34257daf077f70f55e27f0bddd4dd58bbc8638653ebd13eeabffbb4ead40ddc3a69586c65e01f911ee5f8e1bde94576d66928f0928fa510
+AUX ceph-10.2.9-dont-run-lsb_release.patch 2862 BLAKE2B 94e31ddba114ff798f3334c71df551fd267ca716a4aa4aa8e8ebf534a5e38d1b55d7a102306b60cb7dc7337ba009898c02f953a74b34580a85369788a7169018 SHA512 e97a0c2a40c886029bbff12f8591147b88d5eae86dc79a63b267f10745a465da62786cf41c9fd0f01f51805907633c1fe954ebe09b0730660cf690f2c53a8252
+AUX ceph-12.2.0-cflags.patch 536 BLAKE2B 9eb8dc48db09d35f86de280a36763b7a56d980adbaa2d68045e6378cb68904e939d8e7f7325fc5102151ea4e1f5133751b620885d1d0b3d6fe565291272b4b2a SHA512 9864da1a83c1145d143eedd73fd3ff142b354fd0bffa73a25f30eabd68d7eddee82208be7b7da74536ba4c996808aa77fc55bcf562a409240d69cbd249ef1d75
+AUX ceph-12.2.0-use-provided-cpu-flag-values.patch 1590 BLAKE2B 684dfd301a144e2958497bf588515b0319d4e2c5cc5a6c5949d4c2c6f0d41f94aca2c43c020285f4b467f42f9f9a3944ce3a5600dc95e3b8443c8420cfb76128 SHA512 ecf4067776a146cf2aaf0b83298e508a6073147e555f4f9ba73cf2d9e0fe26d9ea72fff8af1c67eaa436e30d32ed260f75683c7d77b27a88fbb098b561d13f0d
+AUX ceph-12.2.1-systemd-unitdir.patch 345 BLAKE2B b97856edd071beb28e46301e97f996176dd62b6824ccc2154b7640ce629b1c0698c2d79e074a2df3af91ab34d6f7e84b2a5a04d41d8fa3b64b571a016ab14f19 SHA512 a29373704f645f5b52597f5482fb4538f3d335bb1020c206a089ba58707f988cf42d335f17a36911f373936f8e769613c3d3fa98f55c1fd91d433d036b769bcc
+AUX ceph-12.2.4-boost-build-none-options.patch 932 BLAKE2B 7925da8f8f18e26af24a00a4fe595f900d9f676769614576c059513299c05cae1c982db8bdd3a571c04ace1ff1ea6171631c1373c408f465261b73e05f66580e SHA512 6ff46a90d76f667fa23be0f9eb1ed2fb7e30af9a2621aec19944d0a22a431a0f5721603c588286e483ff55c14aac920adfccb039c9678a87cc59640dd70367ae
+AUX ceph-12.2.4-cflags.patch 1473 BLAKE2B 971ae7673ed21485248eb582762529c20991b487fae16221a7b6b6d30e29795e26ef83b5af3f7003f58a86784e9c846d2512cee76a440bf5f12b2b5b64968ec6 SHA512 402a5948e90f7daeb29c84a6204d88f6198fab17ac78ef69b5e7d8f54f9f61ed4995c4da2b37bed4448049077bd6167f69ad1c7c62105e924d5d8f8313f68f4e
+AUX ceph-12.2.4-rocksdb-cflags.patch 601 BLAKE2B e434a0e05148e4df0848d9d0d36c7894ecadef0f1c9254dcc1eda782002f473471803372130e12a6b070f857b5f0279e8a7ee2dcf3623b8ca8e02234d4b9d6c1 SHA512 324acb8b94a050bee19e149d6a48a73f596fdf921c5f06d75475069bafcf2a230e0c12f3bb25ec6cd78f1f12334702691b73c2e2643dac63ba4bc71ac9ad0a48
+AUX ceph-12.2.5-boost-sonames.patch 5546 BLAKE2B 8062f550dd36371b1f89981ed2c63e5d8ff4273a6843f8cb8227c38fcfe29c1ce42c07578c3491a9b04e548d0c76a27481a7cb9ae2afad2870191090697c6f4b SHA512 0f48e5107be166306c832bc998c4375759e783ce0159250b3440f22ed7ef3b16fefc9e2258b53829145361d2e2e6bae97e09dde6ed81149a137f3ce84fe4ee47
+AUX ceph-12.2.5-no-werror.patch 2214 BLAKE2B b8878f8dd9e971f0f11f0954ba81fdf2df270e0ac3588220f629255737119a05def4012caa202b2e13f693b3962322126d7b6fb91ca18e844b0a1aed3de37586 SHA512 db945087453b83a87c963bf87b35ab77946a53f3b86e24dafd4b947e098d9780ff41aa6df979adcd306fa9e740d1dbba8cf7c391feb5b934ea83c55621b350cd
+AUX ceph-13.2.0-boost-sonames.patch 6598 BLAKE2B 906530f288518b26b005140645241da4deda6ab38a1780fdd92e9a7602547cc8f6ef65da66a2fe689d047339aa1237a32ea524419649109309634b8516ce687b SHA512 4d62c4babfcd20fadbe25572d3aebb4b01360a22fa5554e73454d59d9a46ed011b59ab0538e0ddd182c006889c160394d8eda171171aeb55c131ce7237c54343
+AUX ceph-13.2.0-cflags.patch 1011 BLAKE2B a7d911ed0ded1a1eb5426bae3a7b1cc169774668cdefd120ce8a5bb2f2082d792dfa0d2e14bac558bf27343763b66d42b9d84046acfa5a1cb1d61fc1219955b3 SHA512 8ec0d668fefee12d2c7f5b5297dd81fc6a559f5823d069e6395d9b4240110eb8f95049d3054697a459948c1f3784b4450539849cf9d7f3b1aa1c7fbd96c475df
+AUX ceph-13.2.0-mgr-python-version.patch 675 BLAKE2B 2458bd067f9947189b65c439df501f1c31eaf6a9ca7d46164e84a37aec7e99ac12456bd299604d18b2f0ac70898de90427a80390644a8e3d455c5e3caf297854 SHA512 aa0f3dab73573c1ac91513bca378a8441ace5f58a0e469f4f01d7ab22869b41e5d4a1e44c3fe8e2bc23ab5249fd1a52a4b72000d458521b6ee291512e51d474c
+AUX ceph-13.2.0-no-virtualenvs.patch 4466 BLAKE2B 9f5176b7d3ee3b3602341864af8eb2494cfcc2268492d7ecf9f43576963de913c9be52259dd16c2a3ad6440eeb33604ce609fc11e7e36236a37c02b84ad81890 SHA512 7b9ab0a7e22784f66253f873dd76bb3e76cfff4781632ed51d39beefacdd1a7f4d90441aff9fd93987837fadaa847906bba32eb18c86f8a8fe31205246cbfd8d
+AUX ceph-13.2.2-dont-install-sysvinit-script.patch 471 BLAKE2B 85ef94f49408496360fa24a433e9d6f3568749a6dfb415cbd17bfb950b9500f182c5141eab402686001f95e1611e60accdac7111ceca14f03b1ff8b4345c087f SHA512 ea069b75b786c22166c609b127b512802cc5c6e9512d792d7b7b34d276f5b86d57c8c35cfc7b5c855a59c0ba87ba1aabe2ca26da72b26bff46b6ba8410ddb27e
+AUX ceph-mds_at.service 282 BLAKE2B 3a51e5d5e0490c021282a37961824d650891c2d84c077c6479a9ee733f8a16fbe65cf204aa74e30ddd24dc01f32740037a6bd137a40464d57e1afeba5a49f893 SHA512 3a37e187f925e1a5fb672ac90937f544f3b98ed5a30b6a6b931a600f9d6a245373085ed61b40e0c64b30dbfac51dd99cbeaeb7538b5f23953bc0dde1df94742d
+AUX ceph-mds_at.service.conf 115 BLAKE2B aaaa28074bf47ee98272337b536e6ca89dbbbb0443d7774c38f62da4b210a5b2ffbb53fa2b7f20dffbee08206a0868e33d381a89b613a25b88f897dd32753fd5 SHA512 e0b51882ec864271a6468141fdd185e24cafcd677f312a7658880a30c00fd58d9043b2651548ab23bd01e54be248a1e8c03545a8fda0b699ca051de7ceb925d8
+AUX ceph-osd_at.service 362 BLAKE2B 7ccbf3428d687d1dfc3a8e10d56083802bba621d7cc9b965b55677e7ae8ce19bd178d31be687e47ed4ae21eef017c8913339cb465822ceadecd2e90cf84d692d SHA512 99c932fa99679a26b288ad57ca725a50847199915368a07ae1bb589ca777cd6e6a68e84f4d506a1097a06ace06eede176ea573e694bcbe43b434381116d63300
+AUX ceph-osd_at.service.conf 115 BLAKE2B d234b9bd718585baf43f229f583e211607aab02942590f90e41d646205c44c9d4c7778c844fcc268d69410a6e76ca825882a5e1d4b1e86b0123905b1d6c081de SHA512 8f169a73f21968f550c6fb21ca7b1efde522b7cccaae0e0c4e22c67ee9c7ccfec7845de3cf84af1075ac9f8840b044dc9440e7936fb9079899df06df350ff9f2
+AUX ceph.confd-r1 69 BLAKE2B 2e75612a1c36057ab41939b4022c8211e32082a812e9636862fd97b4250594fbf3fbd6739e4faf84c056a8b5402a9089250ea84ce504f2bf2453c09f34dc2fee SHA512 b7f7ebb48b94398eaabb6df2cf3a5697d9a055ea4dd9b73c40d2bbf0e1445f418ed760b1f4ebb13cbb7315b2583847eb97b8649f67b6b7cf98081c0599c86aaa
+AUX ceph.confd-r3 1315 BLAKE2B bf5c573be6bcfd2c7f077087c36f8e918f027ad81b18ec496348ed155c97332ad6d1567a9c69a3c887fa0bdd184b98cbe7b73198db32aae248e31c7599857a96 SHA512 1d192cc8eec9b294440ee6c43966ccc36669b94007dd6b990c5ee8d18ee1b36730a9a0082ef7170846dcc64adcc61481808e854b6c9bdb2eb1db1c71435d3f05
+AUX ceph.confd-r4 1502 BLAKE2B 51b3d14ce7078a1ba3c458e3c028ceb8b7de02f8187b242c856efab51e64f36ae5435bec761bd85f7b42bfe78ebc28c267ba80ee0b4123b960ffaf35b749ff25 SHA512 ea3e7b668f6fcdf7f1884968a33d06c86448426a83cb132f927c32d83e28adaf8789489e7e817d4349479e3647577ef40190fc75fa88553aac1c7b4f515184c9
+AUX ceph.confd-r5 619 BLAKE2B 6d495b970c7ff14972845e46aafc55d227c45817f5f8a9a1cad2e242398cc49f2c53896affe1373433db4175c426f1148242588207c7dee60f28a8c3ee543e5f SHA512 288560fee187c496402d46e3fa17fe99c4d3f2c0bbb389a5a91384a1015939f2389a81398045f0d1c978c4da5a1400e97126b98374185424bc5501d0b821ad5c
+AUX ceph.initd-r10 2771 BLAKE2B a10cc830065d2a836253925af908a405ea41c518a43d5cc3abbb909f0d87ada0500f5ca5354b34dce7ef76be28a4ad5e74b5cbc3ad7a620054d67b0719dd6bd6 SHA512 7d39caf261c4f354eb03ad1802749a103fea22699b6599a29726a520a56a2600b0eaf6f4284ecfb5979302493af5d7501e6399240478bdbdb1976ae99146f6ad
+AUX ceph.initd-r2 958 BLAKE2B 9aeda4d2a0bad2fc1c190b19b78dd165230aeef932a5335038e650439ff3420a41d2a43ac527fadf700919ba9944b6da551b2fc5a665f915104717ef45474421 SHA512 6f42b8540797d3f55d64b9842e190ca2973c1779c720b7c9923b8bcc06dddf95672bee066275599e4feafeff38652235746433305dd4d7df8ad086a8deb960c0
+AUX ceph.initd-r7 2197 BLAKE2B 7df3ab975cd14a3cc782ed58f8e6c2f0bfdc3f1b96383400490d7cab27b4d5afa6381cdb02843c1bbfe30f62e5d801ccecf2b61178013855e13ec504da84aa4c SHA512 93890b9e049ff5925ce56b524389873e22560315bf25c40ac86ec11dd2375d184215e7a217d863d4e32bb817a3e0577fdea71a76bb5d5c28ecbeb8544f1b763c
+AUX ceph.initd-r8 2363 BLAKE2B 43dd8f5eb9516b76609a91b1884cbe81d3afbd7634bc39987ecceab612a431e6b967d07c9b7d4a02352fe6545d999eaf1a137bb8d49865830a865ff2ed979186 SHA512 9061c97848e1826ae731202c763d8464f09dff013ae5855ce698d839f99d5184a533c3a81bba223d8f50051573e1fec92e915db32b26ac278b01bf17406cbba8
+AUX ceph.initd-r9 2435 BLAKE2B 2e1246f9d409bbe4d2895e9747490ddd108ef22c2060e151944ad2bda1e7ae13d61330cf9f33ec4900eb4fd4a26ff454dd081869901d21bff8309bf8db6d7533 SHA512 c7f0dd45bbada67e93b2e1acdafdb0ccd1de107d9d582b6b83889c5e0f91e524ea1324ab21e96d4c56d6016be6fed718a7791695c95c68813c6b9d6d3dc2a384
+AUX ceph.logrotate 427 BLAKE2B 9677f1a2a4872addff71527c800dd06bf65e18b589de3869e2a742c43070de789d5089f8739367efb913a64aeec5a8b82f47c129fac580e7c34e4f8cdc8b7332 SHA512 6edace611f46683ca3b8d2154b86ec77cc241909704e0362b728a5f51c2a809c22e83d69df0d58ec6b3a6b8dc8ef2518c220cac920f51e63fe668cdfe1b48bae
+AUX ceph.logrotate-r1 427 BLAKE2B 9677f1a2a4872addff71527c800dd06bf65e18b589de3869e2a742c43070de789d5089f8739367efb913a64aeec5a8b82f47c129fac580e7c34e4f8cdc8b7332 SHA512 6edace611f46683ca3b8d2154b86ec77cc241909704e0362b728a5f51c2a809c22e83d69df0d58ec6b3a6b8dc8ef2518c220cac920f51e63fe668cdfe1b48bae
+AUX ceph.logrotate-r2 545 BLAKE2B ef7dab92aa5fbbe7f5d5418feaae1a1f4400dce08ca4484fe5889888f4dcb6d180bfb5888d5c7d6d9bc32bb5c58443fb83c1cb4613a2810cab45e8a74c421279 SHA512 c30edd67b7cc064f09d4e02bac68a0aa26827d8d4e3c027393932587e8ce782893b93b53d7165d361602b29c90ef3d6b755e79d11a1edb054e0172decd4e627b
+AUX envd-tcmalloc 48 BLAKE2B 4a0799ac6bbedfe5e701eead67600312d86f06143dbfd11d2c594c03d09bf13dfa645e5a0bde1189211ad20036dc4fcfce6758d3a5829d943eb337cc65783af9 SHA512 d180b1a888ec6d870ff523a3b10fd00eca479ee2586a236458af5ffaba21c84e7b8098da6d4bc08fb86c82c61a861dd3c3596a01063d734c329a92808682fc8c
+AUX make-node-frontend-tarball.bash 3196 BLAKE2B 1779c8fe924d8a341bcf922da310c9e3543dd9875db79b2f08fd99419fc2a693e24a5d0c36e7db7b9c46f02bb78b51359e844c8265ff266e8a931a32b877b665 SHA512 4c13ebc9f2a7ba3d45a01cd72135a57b2dc6ad3edfe06a05645957c5522a053be940782f1148c117d8bf785937655083d3d1c74668e8c72d75ae000888a65d85
+AUX rbdmap.initd 2373 BLAKE2B b88d79efc722e2de3d1f0269664a976ed45fbb0a1c9d46fcfd058ea64d3ae7fe27d13455f2ac5ca06663d77cfac1d2f9d86d12bba926541042ac09a8778a3a52 SHA512 bbd48d6987e52eaf6d02bccf3aecd06596465af4d3ac93063f9a814106de162a27bf1a33ae1646e669efb3c754f3ba57f395523293ad643b0d81ee588252216b
+AUX sysctld 57 BLAKE2B 840eec3d188df4998c7ba8fb923777636ae9d2aa342545b69c12e5ea8aa98ae97349b42b56c65a531b207c5f970f873a79c41789941cdd10b279e38f1616f84d SHA512 410f5d721c6cfcc5d7ddaff4f348345140d4b8e1b8fddccb537118bfc59f573ecad63db448598423c9a58fcfdb4cef90e6af27b838e6b77955dfd47673f0f52a
+DIST ceph-12.2.10.tar.gz 78884870 BLAKE2B 321d8256fc6659be3da2ce348e022e79ded63783925c02d3140ffa7fed5528a2b03388f0dfcdf536c81eec7b2484c6db9def8aefb1d5d335c86bad525977977b SHA512 2195a04bf937dba6af61389132240661126ef32e9fd86ca75af27a33c712053b15aa89b52c91ced04f06dc880d7c018afa3f26fff78bf313603f4fb73331b80c
+EBUILD ceph-12.2.10-r100.ebuild 8246 BLAKE2B bfae3a181a37b2651906bf508b3d5e3edadd865bd5953a4e912dd3d33e0e7e93691b512fb566e38cd7511d24f992a357899eba750553e691c831a5a44b1c8050 SHA512 396230db40c94b057d38bbe7bd3a6af5bf671249e1d2a89340b0f302a72a41ad4557bdb005f17c9239d1b3d7951e94eb32449a1e741bc5a1aa96d224e5edbf26
+MISC metadata.xml 1730 BLAKE2B 0cf24323ef1e88d95e448ecaa2df8a4b2a1ac9baf3f433931cd588bdb34b2f268a280a0756402787c73e4ac33dceb60042bafee1d3124dc6e98ba33abc541c73 SHA512 e54693fd32f6ecc16ca244067ce1ebf63ea5939926be2466a9d88a5373b25651bb5c25984ee6dbeecf0099be0988f002ed824b874c5a308fd4fbe35b87dcb53a
diff --git a/sys-cluster/ceph/ceph-12.2.10-r100.ebuild b/sys-cluster/ceph/ceph-12.2.10-r100.ebuild
new file mode 100644
index 0000000..bda55e1
--- /dev/null
+++ b/sys-cluster/ceph/ceph-12.2.10-r100.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2018 Gentoo Authors
+# Copyright 2017-2018 Sony Interactive Entertainment Inc.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \
+ python-r1 udev user readme.gentoo-r1 systemd
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ceph/ceph.git"
+ SRC_URI=""
+else
+ SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace cephfs fuse jemalloc ldap libressl lttng"
+IUSE+=" +mgr nss +radosgw +ssl static-libs +system-boost"
+IUSE+=" systemd +tcmalloc test xfs zfs"
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+# unbundling code commented out pending bugs 584056 and 584058
+#>=dev-libs/jerasure-2.0.0-r1
+#>=dev-libs/gf-complete-2.0.0
+COMMON_DEPEND="
+ virtual/libudev:=
+ app-arch/bzip2:=[static-libs?]
+ app-arch/lz4:=[static-libs?]
+ app-arch/snappy:=[static-libs?]
+ app-arch/zstd:=[static-libs?]
+ app-misc/jq:=[static-libs?]
+ <dev-libs/crypto++-7.0:=[static-libs?]
+ dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?]
+ 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? (
+ !libressl? ( <dev-libs/openssl-1.1:=[static-libs?] )
+ libressl? ( <dev-libs/libressl-2.8 )
+ )
+ xfs? ( sys-fs/xfsprogs:=[static-libs?] )
+ zfs? ( sys-fs/zfs:=[static-libs?] )
+ radosgw? (
+ dev-libs/expat:=[static-libs?]
+ !libressl? (
+ <dev-libs/openssl-1.1:=[static-libs?]
+ net-misc/curl:=[curl_ssl_openssl,static-libs?]
+ )
+ libressl? (
+ <dev-libs/libressl-2.8:=[static-libs?]
+ net-misc/curl:=[curl_ssl_libressl,static-libs?]
+ )
+
+ )
+ system-boost? (
+ =dev-libs/boost-1.66*:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
+ )
+ jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
+ !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
+ ${PYTHON_DEPS}
+ "
+DEPEND="${COMMON_DEPEND}
+ app-arch/cpio
+ amd64? ( dev-lang/yasm )
+ x86? ( 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/e2fsprogs
+ sys-fs/cryptsetup
+ sys-fs/lvm2
+ !<sys-apps/openrc-0.26.3
+ dev-python/cherrypy[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/pecan[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ "
+REQUIRED_USE="
+ $(python_gen_useflags 'python2*')
+ ${PYTHON_REQUIRED_USE}
+ ?? ( ssl nss )
+ ?? ( jemalloc tcmalloc )
+ "
+
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# false positives unless all USE flags are on
+CMAKE_WARN_UNUSED_CLI="no"
+
+STRIP_MASK="/usr/lib*/rados-classes/*"
+
+UNBUNDLE_LIBS=(
+ src/erasure-code/jerasure/jerasure
+ src/erasure-code/jerasure/gf-complete
+)
+
+PATCHES=(
+ "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
+ "${FILESDIR}/ceph-12.2.0-cflags.patch"
+ "${FILESDIR}/ceph-12.2.1-systemd-unitdir.patch"
+ "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
+ "${FILESDIR}/ceph-12.2.4-cflags.patch"
+ "${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
+ "${FILESDIR}/ceph-12.2.5-no-werror.patch"
+ "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+)
+
+check-reqs_export_vars() {
+ if use amd64; then
+ CHECKREQS_DISK_BUILD="12G"
+ CHECKREQS_DISK_USR="460M"
+ else
+ CHECKREQS_DISK_BUILD="1400M"
+ CHECKREQS_DISK_USR="450M"
+ fi
+
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+user_setup() {
+ enewgroup ceph ${CEPH_GID}
+ enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup 'python2*'
+ check-reqs_export_vars
+ check-reqs_pkg_setup
+ user_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ if use system-boost; then
+ eapply "${FILESDIR}/ceph-12.2.5-boost-sonames.patch"
+ fi
+
+ # 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=$(usex system-boost)
+ -DBOOST_J=$(makeopts_jobs)
+ -DWITH_RDMA=no
+ -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+ -DEPYTHON_VERSION="${EPYTHON#python}"
+ )
+ if use amd64 || use x86; then
+ for flag in ${CPU_FLAGS_X86[@]}; do
+ mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
+ done
+ fi
+
+ rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt"
+ cmake-utils_src_configure
+
+ # bug #630232
+ sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+ "${BUILD_DIR:-${CMAKE_BUILD_DIR:-${S}}}"/include/acconfig.h \
+ || die "sed failed"
+}
+
+src_configure() {
+ ceph_src_configure
+}
+
+python_compile() {
+ local CMAKE_USE_DIR="${S}"
+
+ ceph_src_configure
+ 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-r1 ${PN}
+
+ keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+ fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
+
+ newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+ newinitd "${FILESDIR}/${PN}.initd-r10" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+ # units aren't installed by the build system unless systemd is enabled
+ # so no point installing these with the USE flag disabled
+ if use systemd; then
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
+ "ceph-mds@.service"
+
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
+ "ceph-osd@.service"
+ fi
+
+ udev_dorules udev/*.rules
+
+ readme.gentoo_create_doc
+
+ python_setup '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 0000000..6e5f836
--- /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 0000000..f362763
--- /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 0000000..34f8eb8
--- /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 0000000..8340b4d
--- /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 0000000..d767d81
--- /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 0000000..ffc1645
--- /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 0000000..08a7920
--- /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 0000000..a81aae6
--- /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.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 0000000..4e76dea
--- /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 0000000..31221ae
--- /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 0000000..a6b5515
--- /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-12.2.0-cflags.patch b/sys-cluster/ceph/files/ceph-12.2.0-cflags.patch
new file mode 100644
index 0000000..0f02e6e
--- /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 0000000..55c82b0
--- /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 0000000..28d1a02
--- /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-12.2.4-boost-build-none-options.patch b/sys-cluster/ceph/files/ceph-12.2.4-boost-build-none-options.patch
new file mode 100644
index 0000000..6e3ad41
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.4-boost-build-none-options.patch
@@ -0,0 +1,26 @@
+diff --git a/src/boost/tools/build/src/tools/features/debug-feature.jam b/src/boost/tools/build/src/tools/features/debug-feature.jam
+index 04958f9a..38b6acf1 100644
+--- a/src/boost/tools/build/src/tools/features/debug-feature.jam
++++ b/src/boost/tools/build/src/tools/features/debug-feature.jam
+@@ -8,7 +8,7 @@
+ import feature ;
+
+ feature.feature debug-symbols
+- : on off
++ : on off none
+ : propagated ;
+
+ feature.feature profiling
+diff --git a/src/boost/tools/build/src/tools/features/optimization-feature.jam b/src/boost/tools/build/src/tools/features/optimization-feature.jam
+index 761f76f1..fb2a5dec 100644
+--- a/src/boost/tools/build/src/tools/features/optimization-feature.jam
++++ b/src/boost/tools/build/src/tools/features/optimization-feature.jam
+@@ -8,7 +8,7 @@
+ import feature ;
+
+ feature.feature optimization
+- : off speed space
++ : off none speed space
+ : propagated ;
+
+ feature.feature inlining
diff --git a/sys-cluster/ceph/files/ceph-12.2.4-cflags.patch b/sys-cluster/ceph/files/ceph-12.2.4-cflags.patch
new file mode 100644
index 0000000..3535d8c
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.4-cflags.patch
@@ -0,0 +1,38 @@
+diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
+index c7cd39a110..e7b8115485 100644
+--- a/cmake/modules/BuildBoost.cmake
++++ b/cmake/modules/BuildBoost.cmake
+@@ -29,7 +29,7 @@ function(do_build_boost version)
+ else()
+ list(APPEND boost_features "address-model=32")
+ endif()
+- set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX
++ set(BOOST_CXXFLAGS "${CMAKE_CXX_FLAGS} -fPIC -w") # check on arm, etc <---XXX
+ list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}")
+
+ string(REPLACE ";" "," boost_with_libs "${Boost_BUILD_COMPONENTS}")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 7aa8a4392e..c7543a62bd 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -808,6 +808,7 @@ install(TARGETS ceph-mon DESTINATION bin)
+
+ if (NOT WITH_SYSTEM_ROCKSDB)
+ set(ROCKSDB_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON)
++ list(APPEND ROCKSDB_CMAKE_ARGS -DDISABLE_WARNING_AS_ERROR=ON)
+
+ if(ALLOCATOR STREQUAL "jemalloc")
+ list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_JEMALLOC=ON)
+diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt
+index d9d2b6e560..1b2099fcbd 100644
+--- a/src/compressor/zstd/CMakeLists.txt
++++ b/src/compressor/zstd/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # zstd
+
+ # libzstd - build it statically
+-set(ZSTD_C_FLAGS -fPIC -Wno-unused-variable -O3)
++set(ZSTD_C_FLAGS -fPIC -Wno-unused-variable $ENV{CFLAGS})
+
+ include(ExternalProject)
+ ExternalProject_Add(zstd_ext
diff --git a/sys-cluster/ceph/files/ceph-12.2.4-rocksdb-cflags.patch b/sys-cluster/ceph/files/ceph-12.2.4-rocksdb-cflags.patch
new file mode 100644
index 0000000..d744318
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.4-rocksdb-cflags.patch
@@ -0,0 +1,11 @@
+--- ceph-12.2.4.orig/src/rocksdb/CMakeLists.txt 2018-03-05 19:06:21.016923872 -0800
++++ ceph-12.2.4/src/rocksdb/CMakeLists.txt 2018-03-05 19:09:01.798721666 -0800
+@@ -147,7 +147,7 @@
+ endif()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fno-omit-frame-pointer")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-momit-leaf-frame-pointer" HAVE_OMIT_LEAF_FRAME_POINTER)
+ if(HAVE_OMIT_LEAF_FRAME_POINTER)
diff --git a/sys-cluster/ceph/files/ceph-12.2.5-boost-sonames.patch b/sys-cluster/ceph/files/ceph-12.2.5-boost-sonames.patch
new file mode 100644
index 0000000..57482b3
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.5-boost-sonames.patch
@@ -0,0 +1,165 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index aa90ba65da..ea65dd4209 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -567,7 +567,7 @@ set(BOOST_COMPONENTS
+ set(BOOST_HEADER_COMPONENTS container)
+
+ if(WITH_MGR)
+- list(APPEND BOOST_COMPONENTS python)
++ list(APPEND BOOST_COMPONENTS python-${EPYTHON_VERSION})
+ endif()
+ if(WITH_BOOST_CONTEXT)
+ list(APPEND BOOST_COMPONENTS context coroutine)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 7aa8a4392e..111f669f2e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -622,13 +622,13 @@ set(ceph_common_objs
+ $<TARGET_OBJECTS:crush_objs>)
+ set(ceph_common_deps
+ json_spirit erasure_code rt ${LIB_RESOLV}
+- Boost::thread
+- Boost::system
+- Boost::regex
+- Boost::random
+- Boost::program_options
+- Boost::date_time
+- Boost::iostreams
++ boost_thread
++ boost_system
++ boost_regex
++ boost_random
++ boost_program_options
++ boost_date_time
++ boost_iostreams
+ ${BLKID_LIBRARIES}
+ ${Backtrace_LIBRARIES}
+ ${BLKIN_LIBRARIES}
+@@ -712,7 +712,7 @@ if (WITH_MGR)
+ $<TARGET_OBJECTS:heap_profiler_objs>)
+ target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
+ target_link_libraries(ceph-mgr osdc client global-static common
+- Boost::python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
++ boost_python-${EPYTHON_VERSION} ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
+ install(TARGETS ceph-mgr DESTINATION bin)
+ endif (WITH_MGR)
+
+@@ -885,7 +885,7 @@ set(ceph_mds_srcs
+ ceph_mds.cc)
+ add_executable(ceph-mds ${ceph_mds_srcs})
+ target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static common
+- Boost::thread)
++ boost_thread)
+ install(TARGETS ceph-mds DESTINATION bin)
+
+ add_subdirectory(erasure-code)
+diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
+index f3999e3b01..0ce7fca1ba 100644
+--- a/src/test/CMakeLists.txt
++++ b/src/test/CMakeLists.txt
+@@ -148,7 +148,7 @@ add_executable(ceph_omapbench
+ )
+ target_link_libraries(ceph_omapbench
+ librados
+- Boost::program_options
++ boost_program_options
+ global
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+@@ -202,7 +202,7 @@ if(${WITH_RADOSGW})
+ cls_rgw_client
+ cls_user_client
+ cls_lock_client
+- Boost::regex
++ boost_regex
+ ${BLKID_LIBRARIES}
+ ${CURL_LIBRARIES}
+ ${EXPAT_LIBRARIES}
+@@ -232,7 +232,7 @@ if(${WITH_RADOSGW})
+ cls_rgw_client
+ cls_user_client
+ cls_lock_client
+- Boost::regex
++ boost_regex
+ ${BLKID_LIBRARIES}
+ ${CURL_LIBRARIES}
+ ${EXPAT_LIBRARIES}
+diff --git a/src/test/bench/CMakeLists.txt b/src/test/bench/CMakeLists.txt
+index 9fba701e05..da3cbcfe96 100644
+--- a/src/test/bench/CMakeLists.txt
++++ b/src/test/bench/CMakeLists.txt
+@@ -8,7 +8,7 @@ set(smalliobench_srcs
+ add_executable(ceph_smalliobench
+ ${smalliobench_srcs}
+ )
+-target_link_libraries(ceph_smalliobench librados Boost::program_options global
++target_link_libraries(ceph_smalliobench librados boost_program_options global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+
+ # ceph_smalliobenchrbd
+@@ -27,7 +27,7 @@ if(WITH_RBD)
+ librados
+ os
+ global
+- Boost::program_options
++ boost_program_options
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ )
+@@ -50,7 +50,7 @@ set(ceph_smalliobenchfs_srcs
+ add_executable(ceph_smalliobenchfs
+ ${ceph_smalliobenchfs_srcs}
+ )
+-target_link_libraries(ceph_smalliobenchfs librados Boost::program_options os global
++target_link_libraries(ceph_smalliobenchfs librados boost_program_options os global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+
+ # ceph_smalliobenchdumb
+@@ -63,7 +63,7 @@ set(smalliobenchdumb_srcs
+ add_executable(ceph_smalliobenchdumb
+ ${smalliobenchdumb_srcs}
+ )
+-target_link_libraries(ceph_smalliobenchdumb librados Boost::program_options os global
++target_link_libraries(ceph_smalliobenchdumb librados boost_program_options os global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+
+ # ceph_tpbench
+@@ -73,7 +73,7 @@ set(tpbench_srcs
+ add_executable(ceph_tpbench
+ ${tpbench_srcs}
+ )
+-target_link_libraries(ceph_tpbench librados Boost::program_options global
++target_link_libraries(ceph_tpbench librados boost_program_options global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+
+ install(TARGETS
+diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
+index 9f72fa3b48..665c977606 100644
+--- a/src/tools/CMakeLists.txt
++++ b/src/tools/CMakeLists.txt
+@@ -24,13 +24,13 @@ target_link_libraries(ceph_radosacl librados global)
+ install(TARGETS ceph_radosacl DESTINATION bin)
+
+ add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
+-target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
++target_link_libraries(ceph-osdomap-tool os global boost_program_options)
+ install(TARGETS ceph-osdomap-tool DESTINATION bin)
+
+ add_executable(ceph-monstore-tool
+ ceph_monstore_tool.cc
+ ../mgr/mgr_commands.cc)
+-target_link_libraries(ceph-monstore-tool os global Boost::program_options)
++target_link_libraries(ceph-monstore-tool os global boost_program_options)
+ install(TARGETS ceph-monstore-tool DESTINATION bin)
+ install(PROGRAMS
+ ceph-monstore-update-crush.sh
+@@ -41,7 +41,7 @@ add_executable(ceph-objectstore-tool
+ ceph_objectstore_tool.cc
+ rebuild_mondb.cc
+ RadosDump.cc)
+-target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
++target_link_libraries(ceph-objectstore-tool osd os global boost_program_options ${CMAKE_DL_LIBS})
+ if(WITH_FUSE)
+ target_link_libraries(ceph-objectstore-tool fuse)
+ endif(WITH_FUSE)
diff --git a/sys-cluster/ceph/files/ceph-12.2.5-no-werror.patch b/sys-cluster/ceph/files/ceph-12.2.5-no-werror.patch
new file mode 100644
index 0000000..dd24e78
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-12.2.5-no-werror.patch
@@ -0,0 +1,55 @@
+diff -ur ceph-12.2.5.orig/src/rapidjson/CMakeLists.txt ceph-12.2.5/src/rapidjson/CMakeLists.txt
+--- ceph-12.2.5.orig/src/rapidjson/CMakeLists.txt 2018-07-09 11:18:09.188115751 -0700
++++ ceph-12.2.5/src/rapidjson/CMakeLists.txt 2018-07-09 11:36:56.848639110 -0700
+@@ -50,7 +50,7 @@
+ endif(CCACHE_FOUND)
+
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
+ if (RAPIDJSON_BUILD_CXX11)
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+@@ -73,7 +73,7 @@
+ endif()
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Wno-missing-field-initializers")
+ if (RAPIDJSON_BUILD_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
+diff -ur ceph-12.2.5.orig/src/rocksdb/CMakeLists.txt ceph-12.2.5/src/rocksdb/CMakeLists.txt
+--- ceph-12.2.5.orig/src/rocksdb/CMakeLists.txt 2018-07-09 11:18:09.219115543 -0700
++++ ceph-12.2.5/src/rocksdb/CMakeLists.txt 2018-07-09 11:34:58.843411195 -0700
+@@ -174,15 +174,6 @@
+ PROPERTIES COMPILE_FLAGS "-msse4.2")
+ endif()
+
+-option(FAIL_ON_WARNINGS "Treat compile warnings as errors" ON)
+-if(FAIL_ON_WARNINGS)
+- if(MSVC)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+- else() # assume GCC
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+- endif()
+-endif()
+-
+ option(WITH_ASAN "build with ASAN" OFF)
+ if(WITH_ASAN)
+ add_definitions(-DROCKSDB_TSAN_RUN)
+diff -ur ceph-12.2.5.orig/src/rocksdb/Makefile ceph-12.2.5/src/rocksdb/Makefile
+--- ceph-12.2.5.orig/src/rocksdb/Makefile 2018-03-11 18:58:51.000000000 -0700
++++ ceph-12.2.5/src/rocksdb/Makefile 2018-07-09 11:35:53.847049123 -0700
+@@ -243,11 +243,6 @@
+ WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
+ -Wno-unused-parameter
+
+-ifndef DISABLE_WARNING_AS_ERROR
+- WARNING_FLAGS += -Werror
+-endif
+-
+-
+ ifdef LUA_PATH
+
+ ifndef LUA_INCLUDE
diff --git a/sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch b/sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch
new file mode 100644
index 0000000..8de09b9
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch
@@ -0,0 +1,166 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f997d03f8..748cb190e6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -591,7 +591,7 @@ set(BOOST_COMPONENTS
+ set(BOOST_HEADER_COMPONENTS container)
+
+ if(WITH_MGR)
+- list(APPEND BOOST_COMPONENTS python)
++ list(APPEND BOOST_COMPONENTS python-${EPYTHON_VERSION})
+ endif()
+ if(WITH_BOOST_CONTEXT)
+ list(APPEND BOOST_COMPONENTS context coroutine)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3d3b4c0919..94ab42ef9f 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -630,12 +630,12 @@ set(ceph_common_objs
+ $<TARGET_OBJECTS:crush_objs>)
+ set(ceph_common_deps
+ json_spirit erasure_code ${LIB_RESOLV}
+- Boost::thread
+- Boost::system
+- Boost::random
+- Boost::program_options
+- Boost::date_time
+- Boost::iostreams
++ boost_thread
++ boost_system
++ boost_random
++ boost_program_options
++ boost_date_time
++ boost_iostreams
+ ${BLKID_LIBRARIES}
+ ${Backtrace_LIBRARIES}
+ ${BLKIN_LIBRARIES}
+@@ -759,7 +759,7 @@ if (WITH_MGR)
+ $<TARGET_OBJECTS:heap_profiler_objs>)
+ target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}")
+ target_link_libraries(ceph-mgr osdc client global-static ceph-common
+- Boost::python ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
++ boost_python-${EPYTHON_VERSION} ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
+ install(TARGETS ceph-mgr DESTINATION bin)
+ endif (WITH_MGR)
+
+@@ -888,7 +888,7 @@ set(ceph_mds_srcs
+ ceph_mds.cc)
+ add_executable(ceph-mds ${ceph_mds_srcs})
+ target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static ceph-common
+- Boost::thread)
++ boost_thread)
+ install(TARGETS ceph-mds DESTINATION bin)
+
+ add_subdirectory(erasure-code)
+diff --git a/src/rbd_replay/CMakeLists.txt b/src/rbd_replay/CMakeLists.txt
+index e9d3804c5f..5c6eb58de1 100644
+--- a/src/rbd_replay/CMakeLists.txt
++++ b/src/rbd_replay/CMakeLists.txt
+@@ -36,7 +36,7 @@ if(HAVE_BABELTRACE)
+ global
+ babeltrace
+ babeltrace-ctf
+- Boost::date_time
++ boost_date_time
+ )
+ install(TARGETS rbd-replay-prep DESTINATION bin)
+ endif(HAVE_BABELTRACE)
+diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
+index c1edd3b882..000c8daaf8 100644
+--- a/src/rgw/CMakeLists.txt
++++ b/src/rgw/CMakeLists.txt
+@@ -162,7 +162,7 @@ target_link_libraries(rgw_a librados cls_otp_client cls_lock_client cls_rgw_clie
+
+ if (WITH_RADOSGW_BEAST_FRONTEND)
+ target_compile_definitions(rgw_a PUBLIC BOOST_COROUTINES_NO_DEPRECATION_WARNING)
+- target_link_libraries(rgw_a Boost::coroutine Boost::context)
++ target_link_libraries(rgw_a boost_coroutine boost_context)
+ endif()
+
+ if (WITH_CURL_OPENSSL OR (WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL))
+diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
+index a43335e825..a0d056faaa 100644
+--- a/src/test/CMakeLists.txt
++++ b/src/test/CMakeLists.txt
+@@ -147,7 +147,7 @@ add_executable(ceph_omapbench
+ )
+ target_link_libraries(ceph_omapbench
+ librados
+- Boost::program_options
++ boost_program_options
+ global
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+diff --git a/src/test/erasure-code/CMakeLists.txt b/src/test/erasure-code/CMakeLists.txt
+index 4ba31ab2a8..ab66208b57 100644
+--- a/src/test/erasure-code/CMakeLists.txt
++++ b/src/test/erasure-code/CMakeLists.txt
+@@ -2,15 +2,15 @@
+ add_executable(ceph_erasure_code_benchmark
+ ${CMAKE_SOURCE_DIR}/src/erasure-code/ErasureCode.cc
+ ceph_erasure_code_benchmark.cc)
+-target_link_libraries(ceph_erasure_code_benchmark ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
++target_link_libraries(ceph_erasure_code_benchmark ceph-common boost_program_options global ${CMAKE_DL_LIBS})
+ install(TARGETS ceph_erasure_code_benchmark
+ DESTINATION bin)
+
+ add_executable(ceph_erasure_code_non_regression ceph_erasure_code_non_regression.cc)
+-target_link_libraries(ceph_erasure_code_non_regression ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
++target_link_libraries(ceph_erasure_code_non_regression ceph-common boost_program_options global ${CMAKE_DL_LIBS})
+
+ add_executable(ceph_erasure_code ceph_erasure_code.cc)
+-target_link_libraries(ceph_erasure_code ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
++target_link_libraries(ceph_erasure_code ceph-common boost_program_options global ${CMAKE_DL_LIBS})
+ install(TARGETS ceph_erasure_code
+ DESTINATION bin)
+
+diff --git a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt
+index 1c909ee1ce..7c1ef32df1 100644
+--- a/src/test/librados/CMakeLists.txt
++++ b/src/test/librados/CMakeLists.txt
+@@ -61,7 +61,7 @@ set_target_properties(ceph_test_rados_api_asio PROPERTIES COMPILE_FLAGS
+ target_link_libraries(ceph_test_rados_api_asio global
+ librados ${UNITTEST_LIBS})
+ if(WITH_BOOST_CONTEXT)
+- target_link_libraries(ceph_test_rados_api_asio Boost::coroutine Boost::context)
++ target_link_libraries(ceph_test_rados_api_asio boost_coroutine boost_context)
+ endif()
+
+ # ceph_test_rados_api_list
+@@ -147,7 +147,7 @@ add_executable(ceph_test_rados_api_tier
+ set_target_properties(ceph_test_rados_api_tier PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+ target_link_libraries(ceph_test_rados_api_tier
+- librados global ${UNITTEST_LIBS} Boost::system radostest)
++ librados global ${UNITTEST_LIBS} boost_system radostest)
+
+ # ceph_test_rados_api_snapshots
+ add_executable(ceph_test_rados_api_snapshots
+diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
+index e0844ec0c7..886839302c 100644
+--- a/src/tools/CMakeLists.txt
++++ b/src/tools/CMakeLists.txt
+@@ -29,20 +29,20 @@ install(PROGRAMS
+ endif(WITH_TESTS)
+
+ add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
+-target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
++target_link_libraries(ceph-osdomap-tool os global boost_program_options)
+ install(TARGETS ceph-osdomap-tool DESTINATION bin)
+
+ add_executable(ceph-monstore-tool
+ ceph_monstore_tool.cc
+ ../mgr/mgr_commands.cc)
+-target_link_libraries(ceph-monstore-tool os global Boost::program_options)
++target_link_libraries(ceph-monstore-tool os global boost_program_options)
+ install(TARGETS ceph-monstore-tool DESTINATION bin)
+
+ add_executable(ceph-objectstore-tool
+ ceph_objectstore_tool.cc
+ rebuild_mondb.cc
+ RadosDump.cc)
+-target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
++target_link_libraries(ceph-objectstore-tool osd os global boost_program_options ${CMAKE_DL_LIBS})
+ if(WITH_FUSE)
+ target_link_libraries(ceph-objectstore-tool fuse)
+ endif(WITH_FUSE)
diff --git a/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch b/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch
new file mode 100644
index 0000000..b275a17
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch
@@ -0,0 +1,26 @@
+diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
+index d6572115a4..cc0bdddc9f 100644
+--- a/cmake/modules/BuildBoost.cmake
++++ b/cmake/modules/BuildBoost.cmake
+@@ -62,7 +62,7 @@ function(do_build_boost version)
+ else()
+ list(APPEND boost_features "address-model=32")
+ endif()
+- set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX
++ set(BOOST_CXXFLAGS "${CMAKE_CXX_FLAGS} -fPIC -w") # check on arm, etc <---XXX
+ list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}")
+
+ list(FIND Boost_BUILD_COMPONENTS "python" with_python)
+diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt
+index 5a80aa539c..8d6ff5c8f0 100644
+--- a/src/compressor/zstd/CMakeLists.txt
++++ b/src/compressor/zstd/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # zstd
+
+ # libzstd - build it statically
+-set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable -O3")
++set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable $ENV{CFLAGS} -O3")
+
+ include(ExternalProject)
+ ExternalProject_Add(zstd_ext
diff --git a/sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch b/sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch
new file mode 100644
index 0000000..0dc90eb
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch
@@ -0,0 +1,16 @@
+diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt
+index c996cd9402..f99765702b 100644
+--- a/src/pybind/CMakeLists.txt
++++ b/src/pybind/CMakeLists.txt
+@@ -62,11 +62,6 @@ foreach(python_version ${py_vers})
+ endforeach()
+
+ if(WITH_MGR)
+- if(NOT WITH_PYTHON2 AND MGR_PYTHON_VERSION_MAJOR EQUAL 2)
+- message(FATAL_ERROR "mgr plugins require python2 binding")
+- elseif(NOT WITH_PYTHON3 AND MGR_PYTHON_VERSION_MAJOR EQUAL 3)
+- message(FATAL_ERROR "mgr plugins require python3 binding")
+- endif()
+ # Location needs to match default setting for mgr_module_path, currently:
+ # OPTION(mgr_module_path, OPT_STR, CEPH_PKGLIBDIR "/mgr")
+ install(DIRECTORY
diff --git a/sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch b/sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch
new file mode 100644
index 0000000..470dbae
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch
@@ -0,0 +1,78 @@
+diff --git a/src/ceph-detect-init/CMakeLists.txt b/src/ceph-detect-init/CMakeLists.txt
+index 6e5946b784..233cccfc9b 100644
+--- a/src/ceph-detect-init/CMakeLists.txt
++++ b/src/ceph-detect-init/CMakeLists.txt
+@@ -2,8 +2,8 @@ set(CEPH_DETECT_INIT_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtua
+
+ add_custom_target(ceph-detect-init
+ COMMAND
+- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} &&
+- ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} &&
++ #${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-detect-init
+ COMMENT "ceph-detect-init is being created")
+ add_dependencies(tests ceph-detect-init)
+diff --git a/src/ceph-disk/CMakeLists.txt b/src/ceph-disk/CMakeLists.txt
+index 00aaec4a80..b0700c488f 100644
+--- a/src/ceph-disk/CMakeLists.txt
++++ b/src/ceph-disk/CMakeLists.txt
+@@ -2,8 +2,8 @@ set(CEPH_DISK_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv)
+
+ add_custom_target(ceph-disk
+ COMMAND
+- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} &&
+- ${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} &&
++ #${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-disk
+ COMMENT "ceph-disk is being created")
+ add_dependencies(tests ceph-disk)
+diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt
+index 2b050f6c6e..e9fb87f76b 100644
+--- a/src/pybind/mgr/dashboard/CMakeLists.txt
++++ b/src/pybind/mgr/dashboard/CMakeLists.txt
+@@ -2,7 +2,7 @@ set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv)
+
+ add_custom_target(mgr-dashboard-test-venv
+ COMMAND
+- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV}
++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard
+ COMMENT "dashboard tests virtualenv is being created")
+ add_dependencies(tests mgr-dashboard-test-venv)
+@@ -13,9 +13,9 @@ set(mgr-dashboard-nodeenv ${CMAKE_CURRENT_BINARY_DIR}/node-env)
+
+ add_custom_command(
+ OUTPUT "${mgr-dashboard-nodeenv}/bin/npm"
+- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv}
+- COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv
+- COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 8.10.0
++ #COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv}
++ #COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv
++ #COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 8.10.0
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "dashboard nodeenv is being installed"
+ )
+@@ -27,7 +27,7 @@ add_custom_target(mgr-dashboard-nodeenv
+
+ add_custom_command(
+ OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules"
+- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && npm install && deactivate
++ #COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && npm install && deactivate
+ DEPENDS frontend/package.json
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend
+ COMMENT "dashboard frontend dependencies are being installed"
+@@ -62,9 +62,11 @@ else()
+ set(npm_command npm run build)
+ endif()
+
++LIST(APPEND CMAKE_PROGRAM_PATH ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules/.bin)
++
+ add_custom_command(
+ OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/dist"
+- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && ${npm_command} && deactivate
++ COMMAND PREFIX="${CMAKE_SOURCE_DIR}" ${npm_command}
+ DEPENDS ${frontend_src} frontend/node_modules
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend
+ COMMENT "dashboard frontend is being created"
diff --git a/sys-cluster/ceph/files/ceph-13.2.2-dont-install-sysvinit-script.patch b/sys-cluster/ceph/files/ceph-13.2.2-dont-install-sysvinit-script.patch
new file mode 100644
index 0000000..4fbc8b6
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-13.2.2-dont-install-sysvinit-script.patch
@@ -0,0 +1,15 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 874eabfaa1..e337f4cf8e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -601,10 +601,6 @@ install(PROGRAMS
+ ${CMAKE_SOURCE_DIR}/src/ceph-run
+ ${CMAKE_SOURCE_DIR}/src/ceph-clsinfo
+ DESTINATION bin)
+-install(PROGRAMS
+- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph
+- DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/init.d
+- RENAME ceph)
+
+ install(FILES
+ ${CMAKE_SOURCE_DIR}/share/id_rsa_drop.ceph.com
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 0000000..c28604e
--- /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 0000000..0172cbe
--- /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-osd_at.service b/sys-cluster/ceph/files/ceph-osd_at.service
new file mode 100644
index 0000000..7bf125f
--- /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 0000000..959b948
--- /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 0000000..3bdb8b4
--- /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-r3 b/sys-cluster/ceph/files/ceph.confd-r3
new file mode 100644
index 0000000..281037c
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r3
@@ -0,0 +1,63 @@
+# /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)
+# stderr and stdout values get .${id}-std{out,err}.log appended to the provided value
+#
+#respawn_delay=20
+#respawn_max=5
+#respawn_period=1800
+#stdout="/dev/null"
+#stderr="/dev/null"
+
+# radosgw
+#radosgw_respawn_max
+#radosgw_respawn_delay=20
+#radosgw_respawn_period=1800
+#radosgw_stdout="/dev/null"
+#radosgw_stderr="/dev/null"
+
+# mon
+#mon_respawn_max=5
+#mon_respawn_delay=20
+#mon_respawn_period=1800
+#mon_stdout="/dev/null"
+#mon_stderr="/dev/null"
+
+# osd
+#osd_respawn_max=5
+#osd_respawn_delay=30
+#osd_respawn_period=1800
+#osd_stdout="/dev/null"
+#osd_stderr="/dev/null"
+
+# mds
+#mds_respawn_max=5
+#mds_respawn_delay=20
+#mds_respawn_period=1800
+#mds_stdout="/dev/null"
+#mds_stderr="/dev/null"
+
+# mgr
+#mgr_respawn_max=5
+#mgr_respawn_delay=20
+#mgr_respawn_period=1800
+#mgr_stdout="/dev/null"
+#mgr_stderr="/dev/null"
+
+# initd stop timeout.
+#CEPH_TERMTIMEOUT="TERM/120/KILL/5"
+#
+# vim:ft=gentoo-conf-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.confd-r4 b/sys-cluster/ceph/files/ceph.confd-r4
new file mode 100644
index 0000000..b8a0c93
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r4
@@ -0,0 +1,70 @@
+# /etc/conf.d/ceph: startup configurations for ceph
+
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
+
+# Set ulimits for Ceph services.
+#rc_ulimit="-n 1048576 -u 1048576"
+
+# the directory under /run to store runtime information in
+#rundir=/run/ceph
+
+# the user and group to run ceph as
+#user="ceph"
+#group="ceph"
+
+# tell openrc to use control groups to make sure everything gets killed
+# properly on stop. Highly reccommended to leave this enabled.
+rc_cgroup_cleanup=1
+
+# settings for openrc supervisor for various ceph daemons
+#
+# defaults (can be overidden for each daemon)
+# stderr and stdout values get .${id}-std{out,err}.log appended
+# to the provided value
+#
+#respawn_delay=20
+#respawn_max=5
+#respawn_period=1800
+#stdout="/dev/null"
+#stderr="/dev/null"
+
+# radosgw
+#radosgw_respawn_max
+#radosgw_respawn_delay=20
+#radosgw_respawn_period=1800
+#radosgw_stdout="/dev/null"
+#radosgw_stderr="/dev/null"
+
+# mon
+#mon_respawn_max=5
+#mon_respawn_delay=20
+#mon_respawn_period=1800
+#mon_stdout="/dev/null"
+#mon_stderr="/dev/null"
+
+# osd
+#osd_respawn_max=5
+#osd_respawn_delay=30
+#osd_respawn_period=1800
+#osd_stdout="/dev/null"
+#osd_stderr="/dev/null"
+
+# mds
+#mds_respawn_max=5
+#mds_respawn_delay=20
+#mds_respawn_period=1800
+#mds_stdout="/dev/null"
+#mds_stderr="/dev/null"
+
+# mgr
+#mgr_respawn_max=5
+#mgr_respawn_delay=20
+#mgr_respawn_period=1800
+#mgr_stdout="/dev/null"
+#mgr_stderr="/dev/null"
+
+# initd stop timeout.
+#CEPH_TERMTIMEOUT="TERM/120/KILL/5"
+#
+# vim:ft=gentoo-conf-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.confd-r5 b/sys-cluster/ceph/files/ceph.confd-r5
new file mode 100644
index 0000000..5d11439
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.confd-r5
@@ -0,0 +1,15 @@
+# Example
+
+# default ceph conf file
+#ceph_conf="/etc/ceph/ceph.conf"
+
+# Set RADOSGW_WANT_NAME_PARAM=y in order to make the init script add
+# a --name=client.${RC_SVCNAME} parameter to command_args for radosgw.*
+# service instances. This will make the service use a key by the name
+# of client.${RC_SVCNAME} instead of the default client.admin key.
+# A setting like this in the ceph config file can be used to customize
+# the rgw_data and keyring paths used by radosgw instances:
+# [client]
+# rgw_data = /var/lib/ceph/radosgw/$cluster-$id
+# keyring = /var/lib/ceph/radosgw/$cluster-$id/keyring
+RADOSGW_WANT_NAME_PARAM=n
diff --git a/sys-cluster/ceph/files/ceph.initd-r10 b/sys-cluster/ceph/files/ceph.initd-r10
new file mode 100644
index 0000000..2f5150f
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r10
@@ -0,0 +1,108 @@
+#!/sbin/openrc-run
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+: ${rundir:=/run/ceph}
+: ${user:=ceph}
+: ${group:=ceph}
+: ${rc_ulimit:=-n 1048576 -u 1048576}
+
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
+
+command="/usr/bin/${RC_SVCNAME%%.*}"
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
+command_args_foreground="--foreground"
+
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
+start_stop_daemon_args="--user ${user} --group ${group}"
+supervise_daemon_args="--user ${user} --group ${group}"
+
+: ${supervisor:=supervise-daemon}
+: ${stdout:=/var/log/ceph/ceph}
+: ${stderr:=/var/log/ceph/ceph}
+: ${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() {
+ local logdir
+ 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
+
+ if [ -n "${bluestore_osd_fsid}" ]; then
+ einfo "Mounting Bluestore"
+ ceph-volume lvm activate "${daemon_id}" "${bluestore_osd_fsid}" --no-systemd
+ fi
+
+ if [ ${daemon_type} = radosgw ] && [ ${RADOSGW_WANT_NAME_PARAM} = y ]; then
+ command_args="${command_args} --name client.${daemon_id}"
+ 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
+ local log_file log_postfix
+ log_postfix=".${daemon_id}-${arg_name}.log"
+ log_file="${arg_val}"
+
+ if [ "${log_file}" != /dev/null ]; then
+ log_file="${log_file}${log_postfix}"
+ fi
+
+ log_dir="$(dirname "${log_file}")"
+ checkpath -m 0755 -o "${user}:${group}" -d "${log_dir}"
+
+ supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${log_file}"
+ 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.initd-r2 b/sys-cluster/ceph/files/ceph.initd-r2
new file mode 100644
index 0000000..16267c5
--- /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-r7 b/sys-cluster/ceph/files/ceph.initd-r7
new file mode 100644
index 0000000..110d7bd
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r7
@@ -0,0 +1,87 @@
+#!/sbin/openrc-run
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+: ${rundir:=/run/ceph}
+: ${user:=ceph}
+: ${group:=ceph}
+: ${rc_ulimit:=-n 1048576 -u 1048576}
+
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
+
+command="/usr/bin/${RC_SVCNAME%%.*}"
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
+command_args_foreground="--foreground"
+
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
+start_stop_daemon_args="--user ${user} --group ${group}"
+supervise_daemon_args="--user ${user} --group ${group}"
+
+: ${supervisor:=supervise-daemon}
+: ${stdout:=/var/log/ceph/ceph}
+: ${stderr:=/var/log/ceph/ceph}
+: ${respawn_delay:=10}
+: ${respawn_max:=5}
+: ${respawn_period:=1800}
+
+: ${osd_respawn_delay:=15}
+: ${osd_respawn_max:=10}
+
+: ${radosgw_respawn_max:=5}
+: ${radosgw_respawn_period:=30}
+
+depend() {
+ use dns logger
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd|mgr|radosgw) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ export CEPH_CONF="${ceph_conf}"
+
+ checkpath -d -q -o "${user}:${group}" "${rundir}"
+
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+
+ elif pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then
+ eerror "${daemon_type}.${daemon_id} is still running, refusing to start"
+ return 1
+ fi
+
+ local arg_name arg_val
+ for arg_name in std{out,err} respawn_{delay,max,period}; do
+ eval arg_val="\${${daemon_type}_${arg_name}}"
+
+ if [ -z "${arg_val}" ]; then
+ eval arg_val="\${${arg_name}}"
+ else
+ eval "${arg_name}=\"${arg_val}\""
+ fi
+
+ if [ "${arg_name}" = "stderr" ] || [ "${arg_name}" = "stdout" ]; then
+ supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${arg_val}.${daemon_id}-${arg_name}.log"
+ fi
+ done
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 "${start_stop_daemon_args}"
+ eend ${?}
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/ceph.initd-r8 b/sys-cluster/ceph/files/ceph.initd-r8
new file mode 100644
index 0000000..2ef2ed1
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r8
@@ -0,0 +1,95 @@
+#!/sbin/openrc-run
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+: ${rundir:=/run/ceph}
+: ${user:=ceph}
+: ${group:=ceph}
+: ${rc_ulimit:=-n 1048576 -u 1048576}
+
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
+
+command="/usr/bin/${RC_SVCNAME%%.*}"
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
+command_args_foreground="--foreground"
+
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
+start_stop_daemon_args="--user ${user} --group ${group}"
+supervise_daemon_args="--user ${user} --group ${group}"
+
+: ${supervisor:=supervise-daemon}
+: ${stdout:=/var/log/ceph/ceph}
+: ${stderr:=/var/log/ceph/ceph}
+: ${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
+ local log_file log_postfix
+ log_postfix=".${daemon_id}-${arg_name}.log"
+ log_file="${arg_val}"
+
+ if [ "${log_file}" != /dev/null ]; then
+ log_file="${log_file}${log_postfix}"
+ fi
+
+ supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${log_file}"
+ 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.initd-r9 b/sys-cluster/ceph/files/ceph.initd-r9
new file mode 100644
index 0000000..cfbd58e
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r9
@@ -0,0 +1,97 @@
+#!/sbin/openrc-run
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+: ${rundir:=/run/ceph}
+: ${user:=ceph}
+: ${group:=ceph}
+: ${rc_ulimit:=-n 1048576 -u 1048576}
+
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
+
+command="/usr/bin/${RC_SVCNAME%%.*}"
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
+command_args_foreground="--foreground"
+
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
+start_stop_daemon_args="--user ${user} --group ${group}"
+supervise_daemon_args="--user ${user} --group ${group}"
+
+: ${supervisor:=supervise-daemon}
+: ${stdout:=/var/log/ceph/ceph}
+: ${stderr:=/var/log/ceph/ceph}
+: ${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
+ local log_file log_postfix
+ log_postfix=".${daemon_id}-${arg_name}.log"
+ log_file="${arg_val}"
+
+ if [ "${log_file}" != /dev/null ]; then
+ log_file="${log_file}${log_postfix}"
+ fi
+
+ checkpath -m 0755 -o "${user}:${group}" -d $(dirname "${log_file}")
+
+ supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${log_file}"
+ 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 0000000..df03f5e
--- /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.logrotate-r1 b/sys-cluster/ceph/files/ceph.logrotate-r1
new file mode 100644
index 0000000..df03f5e
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.logrotate-r1
@@ -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.logrotate-r2 b/sys-cluster/ceph/files/ceph.logrotate-r2
new file mode 100644
index 0000000..74d96e2
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.logrotate-r2
@@ -0,0 +1,33 @@
+#
+# /etc/logrotate.d/ceph
+#
+
+/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
+}
+
+/var/log/ceph/console/*.log
+{
+ rotate 7
+ daily
+ compress
+ missingok
+ copytruncate
+}
+#
+# vim:ft=conf:ts=4:sts=4:sw=4:noet:
diff --git a/sys-cluster/ceph/files/envd-tcmalloc b/sys-cluster/ceph/files/envd-tcmalloc
new file mode 100644
index 0000000..bdb0967
--- /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/make-node-frontend-tarball.bash b/sys-cluster/ceph/files/make-node-frontend-tarball.bash
new file mode 100644
index 0000000..0a8015f
--- /dev/null
+++ b/sys-cluster/ceph/files/make-node-frontend-tarball.bash
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+frontend_path="src/pybind/mgr/dashboard/frontend"
+node_dir="node_modules"
+output_name_format="ceph-%s-frontend-node-modules.tar.xz"
+cache_dir_format="ceph-%s-npm-cache"
+
+# regexes for modules to remove
+remove_modules=(
+ "^karma.*"
+ "^jasmine.*"
+ ".+/jasmine.*"
+ "^tslint.*"
+ "^codelyzer"
+ "^protractor"
+ "^ts-node"
+)
+
+# location to find dependencies to prune
+node_dep_location="devDependencies"
+
+# node package files
+node_package_file="package.json"
+node_package_lock="package-lock.json"
+
+# system commands needed
+dependencies=(
+ wget
+ git
+ gzip
+ jq
+ tar
+ xz
+)
+
+check_deps() {
+ local dep
+
+ for dep in "${dependencies[@]}"; do
+ if ! command -v "${dep}" >/dev/null; then
+ printf '%s: ERROR could not find required command "%s"\n' "${appname}" "${dep}" >&2
+ exit 1
+ fi
+ done
+
+ # make sure that jq was compiled with support for regexes
+ if ! jq -c 'map( select(. | test("TEST"; "i")))' <<< '{"TEST": "TEST"}' >/dev/null; then
+ printf '%s: ERROR: jq does not support regular expressions, make sure the "oniguruma" USE flag is enabled\n' \
+ "${appname}"
+ exit 1
+ fi
+ :
+}
+
+get_npm_packages() {
+ local tempfile jq_regex full_cache_dir
+
+ full_cache_dir="${PWD}/${cache_dir}"
+
+ pushd "${source_path}/${frontend_path}" > /dev/null
+ if [[ ! -r "${node_package_file}" ]]; then
+ printf '%s: ERROR: could not find "%s" in "%s"\n' "${appname}" \
+ "${node_package_file}" "${frontend_path}"
+ exit 1
+ fi
+
+ tempfile="$(TMPDIR="." mktemp packages-XXXXX.json)"
+
+ jq_regex="$(printf "%s|" "${remove_modules[@]}")"
+
+ # filter out test only deps that pull in precompiled binaries
+ # shellcheck disable=SC2031
+ jq --monochrome-output --raw-output --exit-status \
+ '."'"${node_dep_location}"'"|=with_entries(select(.key|test("('"${jq_regex%|}"')")|not))' \
+ "${node_package_file}" > "${tempfile}"
+
+ # make sure output is still valid JSON
+ jq . --exit-status "${tempfile}" > /dev/null
+
+ mv "${tempfile}" "${node_package_file}"
+
+ rm -rf "${full_cache_dir:?}" "${node_dir:?}" "${node_package_lock:?}"
+
+ npm install --ignore-scripts --cache="${full_cache_dir}"
+
+ popd >/dev/null
+}
+
+main() {
+ local appname source_path version cache_dir
+
+ set -e
+ set -o pipefail
+ shopt -s nullglob
+
+ appname=$(basename "${0}")
+ source_path="${1}"
+ version="${2}"
+
+ if [[ -z ${source_path} || -z ${version} ]]; then
+ printf 'Syntax: %s <source directory> <version>\n' "${appname}" >&2
+ return 1
+
+ elif [[ ! -d ${source_path} ]]; then
+ printf '%s: ERROR: Not a directory: %s\n' "${appname}" "${source_path}"
+ return 1
+ fi
+
+ check_deps
+
+ # shellcheck disable=SC2059
+ cache_dir="$(printf -- "${cache_dir_format}\\n" "${version}")"
+
+ get_npm_packages
+ pack_tarball
+}
+
+pack_tarball() {
+ local output
+
+ # shellcheck disable=SC2059
+ output="$(printf -- "${output_name_format}\\n" "${version}")"
+
+ tar caf "${output}" \
+ --numeric-owner \
+ --anchored \
+ --owner="root:0" \
+ --group="root:0" \
+ --exclude-vcs \
+ --transform="s:^${source_path}/:ceph-${version}/:" \
+ "${cache_dir}" \
+ "${source_path}/${frontend_path}/${node_package_file}" \
+ "${source_path}/${frontend_path}/${node_package_lock}"
+
+ printf '%s: Output written to "%s"\n' "${appname}" "${output}"
+}
+
+main "${@}"
+
+# vim:ft=sh:noet:ts=4:sts=4:sw=4:
diff --git a/sys-cluster/ceph/files/rbdmap.initd b/sys-cluster/ceph/files/rbdmap.initd
new file mode 100644
index 0000000..9313cf6
--- /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 0000000..4d13326
--- /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 0000000..9e6dc1e
--- /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>
+ </maintainer>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </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="babeltrace">Add support for LTTng babeltrace</flag>
+ <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="dpdk">Enable DPDK messaging</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="mgr">Build the ceph-mgr daemon</flag>
+ <flag name="mgr-frontend">Build the mgr/dashboard frontend with npm, this is not required for the frontend to work</flag>
+ <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
+ <flag name="radosgw">Add radosgw support</flag>
+ <flag name="system-boost">Use system <pkg>dev-libs/boost</pkg> instead of the bundled one</flag>
+ <flag name="xfs">Add xfs support</flag>
+ <flag name="zfs">Add zfs support</flag>
+ </use>
+</pkgmetadata>