commit:     02e633365fd994d9601fc84ddd742a6b20742e1e
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu May 12 18:55:55 2016 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu May 12 18:55:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02e63336

sys-cluster/ceph: Version bump to 10.2.0 (bug #580878)

This also adds a new init script that is written in POSIX shell (bug #581358)

Gentoo-Bug: 580878

Package-Manager: portage-2.2.28

 sys-cluster/ceph/Manifest                          |   1 +
 sys-cluster/ceph/ceph-10.2.0.ebuild                | 250 +++++++++++++++++++++
 .../files/ceph-10.2.0-dont-use-virtualenvs.patch   |  95 ++++++++
 sys-cluster/ceph/files/ceph.initd-r2               |  40 ++++
 sys-cluster/ceph/metadata.xml                      |   1 +
 5 files changed, 387 insertions(+)

diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
index 8129c0d..0387562 100644
--- a/sys-cluster/ceph/Manifest
+++ b/sys-cluster/ceph/Manifest
@@ -3,5 +3,6 @@ DIST ceph-0.94.5.tar.bz2 7084809 SHA256 
7658bec8cf6e6c8f5ceb1e85116c4df2582c497a
 DIST ceph-0.94.6.tar.gz 9131464 SHA256 
d2e65e21bdecdfa1fffb2661e9be2d5382bd975a0eb8296df0e96bacc11c251f SHA512 
4920857d7493769929754877e3f255cc816400757b014b0c075d65ce9c83c47a86725540fa012eb95f9c6395a477945d3a46322f3055f05345298858fec53997
 WHIRLPOOL 
cb1a230dc1f07903b3712d9d23df718b12df219255b680737d3a746e9cbeee0d0c3ddb21da6dad1e31fb4d77aa9b3283e2dbd6e59ca38146db2ae91c5e7d4229
 DIST ceph-10.0.0.tar.gz 10429823 SHA256 
fd92052e0de135e1f35ea2add44b5b8add28a2a8235639d69c33cced06a4a357 SHA512 
f0e36bf83c97d1dc0328fbba96897e583c6d29b11dc54ea7fa0186ffaa1cf4d26519f336083825d64dda70bd290dc45bd6f3f17ff67ada33322caee5f2f3ce07
 WHIRLPOOL 
f443ab25ab8f89455d76f509f215b55519f9338d3b9daec318b097de4dffff7009a01521da0d963c4b5549485b6aebca1c0a705746cf2e64fef8e9f5e66676cf
 DIST ceph-10.0.2.tar.gz 10674888 SHA256 
b62a906c3e7fa36d612077d2400a048a6a8c5beebd5763d550c3c8ca1506db37 SHA512 
d7ee38d1ceb8f4593c2cbaf6fb87a51abd484793969d6b1aa7b396e49b115e4b939216b4df9f50add40621e78aff33bae91980615b428039ed64e26aaf05a80d
 WHIRLPOOL 
1a6a35cb73b5afe979ddb1b9612b26a02cae48103701dee6a96ee4d1f88e3e75bebf13de299c3787379559a9ab17ed5547cf8cbbbbce7db279aa86f1aa41e1fd
+DIST ceph-10.2.0.tar.gz 11667920 SHA256 
1a39d919beccaa26ddfbaeac04eebb80f4d43946a59a18e2e25a9a805d5b262d SHA512 
1277f08aa7f8e30d962e455d611ff21667334c27012b7a4c2e22faf0e03c0f3e3278c561ce7ea7548d065c26824e8d212b01303201d0749648b741d2a4eb0125
 WHIRLPOOL 
3d6e85888f74b629f67107199c4c5de5dffc2f7bdb639a24aaea8cce447710996281685623f667b95786b5218ec586ea1c0b497237ff344b857eb6cbffc28713
 DIST ceph-9.2.0.tar.bz2 7663088 SHA256 
706d33e097b4489a75cfaff8d835e05d91df6dac5cdd3a32a57404f0522dbdbb SHA512 
d462f2e4696873552b232f0b89bcda8ddb0cddeab89cbab58e99eb068acb082a42cb558898bd4dee66239df64d15992cfd1c1158217b2ce60a465e1761bcea78
 WHIRLPOOL 
d016b873a26afef4816921e5b9cbaae3ba4c9ece6683e3d60b1f689ab7dcc285bc386963e83b410a66a313cc953b7d0d9baa427b3b3eb12697daa08f3a5a6a18
 DIST ceph-9.2.1.tar.gz 9933444 SHA256 
1918dfc3df80df5986c5b7ff6bc6c78064eef0f6c5e8269dba30e08c703a7c2f SHA512 
1e84c1e2d64f4156a523658ed11552b045f75986922b7b7dbaf4719e73a0a6aadc71eb2b94ae363526f729534a592921a437468a41a3cea88c1b84e09de8505a
 WHIRLPOOL 
3a0eb6712e5b0235707e86129e1d66f1184f50cd4980c30f6d8cc0e7dfd96d30b91177ed16dd7abf2ad4983c6a543eb91915f74f661f7d3e3c810b5b1d656aca

diff --git a/sys-cluster/ceph/ceph-10.2.0.ebuild 
b/sys-cluster/ceph/ceph-10.2.0.ebuild
new file mode 100644
index 0000000..34a1ae6
--- /dev/null
+++ b/sys-cluster/ceph/ceph-10.2.0.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5}} )
+
+inherit check-reqs autotools eutils python-r1 udev user \
+       readme.gentoo-r1 systemd versionator flag-o-matic
+
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="
+               git://github.com/ceph/ceph.git
+               https://github.com/ceph/ceph.git";
+       SRC_URI=""
+else
+       SRC_URI="http://ceph.com/download/${P}.tar.gz";
+       KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="http://ceph.com/";
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+IUSE="babeltrace cephfs cryptopp debug fuse gtk jemalloc ldap +libaio"
+IUSE+=" libatomic lttng +nss +radosgw static-libs tcmalloc test xfs zfs"
+
+COMMON_DEPEND="
+       app-arch/snappy
+       dev-libs/boost:=[threads]
+       dev-libs/fcgi
+       dev-libs/libaio
+       dev-libs/libedit
+       dev-python/sphinx[$(python_gen_usedep 'python2*')]
+       dev-libs/leveldb[snappy]
+       nss? ( dev-libs/nss )
+       libatomic? ( dev-libs/libatomic_ops )
+       cryptopp? ( dev-libs/crypto++ )
+       sys-apps/keyutils
+       sys-apps/util-linux
+       dev-libs/libxml2
+       ldap? ( net-nds/openldap )
+       babeltrace? ( dev-util/babeltrace )
+       fuse? ( sys-fs/fuse )
+       xfs? ( sys-fs/xfsprogs )
+       zfs? ( sys-fs/zfs )
+       gtk? (
+               x11-libs/gtk+:2
+               dev-cpp/gtkmm:2.4
+               gnome-base/librsvg
+       )
+       radosgw? (
+               dev-libs/fcgi
+               dev-libs/expat
+               net-misc/curl
+       )
+       jemalloc? ( dev-libs/jemalloc )
+       !jemalloc? ( dev-util/google-perftools )
+       lttng? ( dev-util/lttng-ust )
+       ${PYTHON_DEPS}
+       "
+DEPEND="${COMMON_DEPEND}
+       dev-python/cython[${PYTHON_USEDEP}]
+       app-arch/cpio
+       sys-apps/lsb-release
+       virtual/pkgconfig
+       test? (
+               sys-fs/btrfs-progs
+               sys-apps/grep[pcre]
+               dev-python/tox[${PYTHON_USEDEP}]
+               dev-python/virtualenv[${PYTHON_USEDEP}]
+       )"
+RDEPEND="${COMMON_DEPEND}
+       sys-apps/which
+       sys-apps/hdparm
+       sys-block/parted
+       sys-fs/cryptsetup
+       sys-apps/gptfdisk
+       sys-apps/findutils
+       dev-python/flask[${PYTHON_USEDEP}]
+       dev-python/requests[${PYTHON_USEDEP}]
+       "
+REQUIRED_USE="
+       $(python_gen_useflags 'python2*')
+       ${PYTHON_REQUIRED_USE}
+       ^^ ( nss cryptopp )
+       ?? ( jemalloc tcmalloc )
+       "
+
+# work around bug in ceph compilation (rgw/ceph_dencoder-rgw_dencoder.o... 
undefined reference to `vtable for RGWZoneGroup')
+REQUIRED_USE+="        radosgw"
+
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+STRIP_MASK="/usr/lib*/rados-classes/*"
+
+PATCHES=(
+       "${FILESDIR}/ceph-10.2.0-dont-use-virtualenvs.patch"
+)
+
+check-reqs_export_vars() {
+       if use debug; then
+               CHECKREQS_DISK_BUILD="23G"
+               CHECKREQS_DISK_USR="7G"
+       elif use amd64; then
+               CHECKREQS_DISK_BUILD="12G"
+               CHECKREQS_DISK_USR="450M"
+       else
+               CHECKREQS_DISK_BUILD="1400M"
+               CHECKREQS_DISK_USR="450M"
+       fi
+
+       export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+user_setup() {
+       enewgroup ceph
+       enewuser ceph -1 -1 /var/lib/ceph ceph
+}
+
+emake_python_bindings() {
+       local action="${1}" params binding
+       shift
+       params=("${@}")
+
+       __emake_python_bindings_do_impl() {
+               emake "${params[@]}" PYTHON="${EPYTHON}" 
"${binding}-pybind-${action}"
+
+               # these don't work and aren't needed on python3
+               if [[ ${EBUILD_PHASE} == install ]] && python_is_python3; then
+                       rm -f 
"${ED}/$(python_get_sitedir)"/ceph_{argparse,volume_client}.py
+               fi
+       }
+
+       pushd "${S}/src"
+       for binding in rados rbd $(use cephfs && echo cephfs); do
+               python_foreach_impl __emake_python_bindings_do_impl
+       done
+       popd
+
+       unset __emake_python_bindings_do_impl
+}
+
+pkg_pretend() {
+       check-reqs_export_vars
+       check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+       python_setup
+       check-reqs_export_vars
+       check-reqs_pkg_setup
+       user_setup
+}
+
+src_prepare() {
+       default
+
+       # remove tests that need root access
+       rm src/test/cli/ceph-authtool/cap*.t
+
+       append-flags -fPIC
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               --without-hadoop
+               --includedir=/usr/include
+               $(use_with cephfs)
+               $(use_with debug)
+               $(use_with fuse)
+               $(use_with libaio)
+               $(use_with libatomic libatomic-ops)
+               $(use_with nss)
+               $(use_with cryptopp)
+               $(use_with radosgw)
+               $(use_with gtk gtk2)
+               $(use_enable static-libs static)
+               $(use_with jemalloc)
+               $(use_with xfs libxfs)
+               $(use_with zfs libzfs)
+               $(use_with lttng )
+               $(use_with babeltrace)
+               $(use_with ldap openldap)
+               $(use jemalloc || usex tcmalloc " --with-tcmalloc" " 
--with-tcmalloc-minimal")
+               --with-mon
+               --with-eventfd
+               --with-cython
+               --without-kinetic
+               --without-librocksdb
+               --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+       )
+
+       # we can only use python2.7 for building at the moment
+       python_export python2.7 PYTHON EPYTHON
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       emake
+       emake_python_bindings all
+
+       use test && emake check-local
+}
+
+src_test() {
+       make check || die "make check failed"
+}
+
+src_install() {
+       default
+       emake_python_bindings install-exec "DESTDIR=\"${D}\""
+
+       prune_libtool_files --all
+
+       exeinto /usr/$(get_libdir)/ceph
+       newexe src/init-ceph ceph_init.sh
+
+       insinto /etc/logrotate.d/
+       newins "${FILESDIR}"/ceph.logrotate ${PN}
+
+       keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+       fowners ceph:ceph /var/lib/ceph
+
+       newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+       newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+       newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+
+       systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" 
"[email protected]"
+       systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" 
"[email protected]"
+       systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" 
"[email protected]"
+
+       python_fix_shebang "${ED}"/usr/{,s}bin/
+
+       udev_dorules udev/*.rules
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+}

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.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/metadata.xml b/sys-cluster/ceph/metadata.xml
index 7810753..958ea7e 100644
--- a/sys-cluster/ceph/metadata.xml
+++ b/sys-cluster/ceph/metadata.xml
@@ -20,6 +20,7 @@ Ceph is a distributed network file system designed to provide 
excellent performa
 </longdescription>
   <use>
     <flag name="cryptopp">Use <pkg>dev-libs/crypto++</pkg> for 
cryptography</flag>
+    <flag name="cephfs">Build support for cephfs, a POSIX compatible 
filesystem built on top of ceph</flag>
     <flag name="fuse">Build fuse client</flag>
     <flag name="libatomic">Use libatomic instead of builtin atomic 
operations</flag>
     <flag name="libaio">Use libaio as asynchronous input/output library</flag>

Reply via email to