commit:     c8077590d4fd447e07508c7e511e9190920f0ca8
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu May 28 19:08:53 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu May 28 19:09:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8077590

sys-cluster/ceph-15.2.2-r1: Revbump, fix bugs #724508 and #724438

Adds a "diskprediction" USE flag to enable diskprediction_local since it
forces an old scipy (forcing off python3_8) (bug #724438)

Fixes up the systemd unit and adds a tmpfiles entry (bug #724508)

Closes: https://bugs.gentoo.org/724508
Closes: https://bugs.gentoo.org/724438
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../{ceph-15.2.2.ebuild => ceph-15.2.2-r1.ebuild}  | 30 +++++++++++++++-------
 .../ceph/files/ceph-15.2.2-systemd-unit.patch      | 12 +++++++++
 sys-cluster/ceph/files/ceph-tmpfilesd              |  1 +
 sys-cluster/ceph/metadata.xml                      |  1 +
 4 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/sys-cluster/ceph/ceph-15.2.2.ebuild 
b/sys-cluster/ceph/ceph-15.2.2-r1.ebuild
similarity index 92%
rename from sys-cluster/ceph/ceph-15.2.2.ebuild
rename to sys-cluster/ceph/ceph-15.2.2-r1.ebuild
index 2d9f2924eca..d8466689267 100644
--- a/sys-cluster/ceph/ceph-15.2.2.ebuild
+++ b/sys-cluster/ceph/ceph-15.2.2-r1.ebuild
@@ -9,7 +9,7 @@ DISTUTILS_OPTIONAL=1
 
 inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
                multiprocessing python-r1 udev readme.gentoo-r1 toolchain-funcs 
\
-               systemd
+               systemd tmpfiles
 
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
@@ -28,9 +28,9 @@ SLOT="0"
 
 CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
 
-IUSE="babeltrace +cephfs custom-cflags dpdk fuse grafana jemalloc kafka 
kerberos ldap
-       libressl lttng +mgr numa +openssl pmdk rabbitmq +radosgw rbd-rwl +ssl 
spdk
-       system-boost systemd +tcmalloc test uring xfs zfs"
+IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana 
jemalloc
+       kafka kerberos ldap libressl lttng +mgr numa +openssl pmdk rabbitmq 
+radosgw
+       rbd-rwl +ssl spdk system-boost systemd +tcmalloc test uring xfs zfs"
 IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
 
 COMMON_DEPEND="
@@ -153,18 +153,22 @@ RDEPEND="${COMMON_DEPEND}
                dev-python/pyjwt[${PYTHON_USEDEP}]
                dev-python/pyyaml[${PYTHON_USEDEP}]
                dev-python/routes[${PYTHON_USEDEP}]
-               sci-libs/scipy[${PYTHON_USEDEP}]
+               diskprediction? (
+                       $(python_gen_cond_dep 
'<sci-libs/scipy-1.4.0[${PYTHON_USEDEP}]' python3_{6,7})
+               )
                sci-libs/scikits_learn[${PYTHON_USEDEP}]
                dev-python/six[${PYTHON_USEDEP}]
        )
 "
+# diskprediction needs older scipy not compatible with py38
+# bug #724438
 REQUIRED_USE="
        ${PYTHON_REQUIRED_USE}
+       ?? ( jemalloc tcmalloc )
        ^^ ( openssl libressl )
+       diskprediction? ( mgr !python_targets_python3_8 )
        kafka? ( radosgw )
-       rabbitmq? ( radosgw )
        mgr? ( cephfs )
-       ?? ( jemalloc tcmalloc )
        rabbitmq? ( radosgw )
 "
 RESTRICT="!test? ( test )"
@@ -189,10 +193,11 @@ PATCHES=(
        "${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
        "${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
        "${FILESDIR}/ceph-15.2.0-rocksdb-cmake.patch"
+       "${FILESDIR}/ceph-15.2.2-systemd-unit.patch"
 )
 
 check-reqs_export_vars() {
-       CHECKREQS_DISK_BUILD="5.2G"
+       CHECKREQS_DISK_BUILD="5200M"
        CHECKREQS_DISK_USR="510M"
 
        export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
@@ -223,6 +228,10 @@ src_prepare() {
        sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
                src/bash_completion/CMakeLists.txt || die
 
+       if ! use diskprediction; then
+               rm -rf src/pybind/mgr/diskprediction_local || die
+       fi
+
        # remove tests that need root access
        rm src/test/cli/ceph-authtool/cap*.t || die
 }
@@ -262,6 +271,7 @@ ceph_src_configure() {
                -DWITH_RDMA=OFF
                -DWITH_TBB=OFF
                -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+               -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(systemd_get_systemunitdir)
                -DEPYTHON_VERSION="${EPYTHON#python}"
                -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
                -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
@@ -356,13 +366,15 @@ src_install() {
 
                systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" 
\
                        "[email protected]"
+
        fi
 
        udev_dorules udev/*.rules
+       newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
 
        readme.gentoo_create_doc
 
-       python_setup 'python3*'
+       python_setup
 
        # bug #630232
        sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" 
"${ED}"/usr/bin/ceph{,-crash} \

diff --git a/sys-cluster/ceph/files/ceph-15.2.2-systemd-unit.patch 
b/sys-cluster/ceph/files/ceph-15.2.2-systemd-unit.patch
new file mode 100644
index 00000000000..fdd3a6ac2ac
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-15.2.2-systemd-unit.patch
@@ -0,0 +1,12 @@
+diff -ur ceph-15.2.2/systemd/[email protected] 
ceph-15.2.2.af/systemd/[email protected]
+--- ceph-15.2.2/systemd/[email protected]    2020-05-18 16:25:12.000000000 
+0000
++++ ceph-15.2.2.af/systemd/[email protected] 2020-05-21 21:20:58.318655944 
+0000
+@@ -10,7 +10,7 @@
+ EnvironmentFile=-@SYSTEMD_ENV_FILE@
+ Environment=CLUSTER=ceph
+ ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph 
--setgroup ceph
+-ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
++ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id 
%i
+ ExecReload=/bin/kill -HUP $MAINPID
+ LockPersonality=true
+ MemoryDenyWriteExecute=true

diff --git a/sys-cluster/ceph/files/ceph-tmpfilesd 
b/sys-cluster/ceph/files/ceph-tmpfilesd
new file mode 100644
index 00000000000..2ded82f5f65
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-tmpfilesd
@@ -0,0 +1 @@
+d /run/ceph 0770 ceph ceph -

diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml
index dcf0de05f77..b29a383d9b5 100644
--- a/sys-cluster/ceph/metadata.xml
+++ b/sys-cluster/ceph/metadata.xml
@@ -20,6 +20,7 @@
     <flag name="babeltrace">Add support for LTTng babeltrace</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="diskprediction">Enable local diskprediction module to predict 
disk failures</flag>
     <flag name="spdk">Enable SPDK user-mode storage driver toolkit</flag>
     <flag name="fuse">Build fuse client</flag>
     <flag name="grafana">Install grafana dashboards</flag>

Reply via email to