diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2016-05-12 14:04:08 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2016-05-12 14:04:08 -0700 |
commit | cdc8feb0f3590c62ac103efdb3f5ba903df8dc52 (patch) | |
tree | 8360e2ad28afa4069f47778160f425300cde2352 /sys-cluster/ceph | |
parent | profiles: package.use.mask sys-cluster/ceph[test] on arm since dev-python/tox... (diff) | |
download | gentoo-cdc8feb0f3590c62ac103efdb3f5ba903df8dc52.tar.gz gentoo-cdc8feb0f3590c62ac103efdb3f5ba903df8dc52.tar.bz2 gentoo-cdc8feb0f3590c62ac103efdb3f5ba903df8dc52.zip |
sys-cluster/ceph: Revision bump to 0.94.6-r1, don't try to run as "ceph" user
Gentoo-Bug: 577570
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-cluster/ceph')
-rw-r--r-- | sys-cluster/ceph/ceph-0.94.6-r1.ebuild | 163 | ||||
-rw-r--r-- | sys-cluster/ceph/files/ceph.initd-r1.1 | 39 |
2 files changed, 202 insertions, 0 deletions
diff --git a/sys-cluster/ceph/ceph-0.94.6-r1.ebuild b/sys-cluster/ceph/ceph-0.94.6-r1.ebuild new file mode 100644 index 000000000000..0892f952f50c --- /dev/null +++ b/sys-cluster/ceph/ceph-0.94.6-r1.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +if [[ $PV = *9999* ]]; then + scm_eclass=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" +fi +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" + +inherit check-reqs autotools eutils multilib python-single-r1 udev readme.gentoo-r1 systemd ${scm_eclass} + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="http://ceph.com/" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="babeltrace cryptopp debug fuse gtk libatomic +libaio lttng +nss radosgw static-libs jemalloc python tcmalloc xfs zfs" + +COMMON_DEPEND=" + app-arch/snappy + dev-libs/boost:=[threads] + dev-libs/fcgi + dev-libs/libaio + dev-libs/libedit + dev-libs/leveldb[snappy] + nss? ( dev-libs/nss ) + cryptopp? ( dev-libs/crypto++ ) + sys-apps/keyutils + sys-apps/util-linux + dev-libs/libxml2 + babeltrace? ( dev-util/babeltrace ) + fuse? ( sys-fs/fuse ) + libatomic? ( dev-libs/libatomic_ops ) + 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} + virtual/pkgconfig" +RDEPEND="${COMMON_DEPEND} + sys-apps/hdparm + dev-python/flask[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + " +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( nss cryptopp ) + ?? ( jemalloc tcmalloc ) + " + +STRIP_MASK="/usr/lib*/rados-classes/*" + +PATCHES=( + "${FILESDIR}"/${PN}-0.79-libzfs.patch +) +CHECKREQS_DISK_BUILD="1400M" + +pkg_setup() { + python_setup +} + +src_prepare() { + [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" + + epatch_user + eautoreconf +} + +src_configure() { + local myeconfargs=( + --without-hadoop + --docdir="${EPREFIX}/usr/share/doc/${PF}" + --includedir=/usr/include + $(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) + --without-kinetic + --without-librocksdb + ) + + use jemalloc || \ + myeconfargs+=( $(usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal") ) + + PYTHON="${EPYTHON}" \ + econf "${myeconfargs[@]}" +} + +src_install() { + default + + 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} + + chmod 644 "${ED}"/usr/share/doc/${PF}/sample.* + + keepdir /var/lib/${PN} + keepdir /var/lib/${PN}/tmp + keepdir /var/log/${PN}/stat + + newinitd "${FILESDIR}/rbdmap.initd" rbdmap + newinitd "${FILESDIR}/${PN}.initd-r1.1" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + + systemd_dounit "${FILESDIR}/ceph.target" + systemd_newunit "${FILESDIR}/ceph-mds_at.service" "ceph-mds@.service" + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service" + systemd_newunit "${FILESDIR}/ceph-osd_at.service" "ceph-osd@.service" + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service" + systemd_newunit "${FILESDIR}/ceph-mon_at.service" "ceph-mon@.service" + systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service" + + python_fix_shebang \ + "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \ + "${ED}"/usr/bin/{ceph,ceph-rest-api} + + #install udev rules + udev_dorules udev/50-rbd.rules + udev_dorules udev/95-ceph-osd.rules + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-cluster/ceph/files/ceph.initd-r1.1 b/sys-cluster/ceph/files/ceph.initd-r1.1 new file mode 100644 index 000000000000..bb603259715d --- /dev/null +++ b/sys-cluster/ceph/files/ceph.initd-r1.1 @@ -0,0 +1,39 @@ +#!/sbin/openrc-run + +ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}" +extra_commands="reload" +daemon_type="${RC_SVCNAME#ceph-}" +daemon_type="${daemon_type%.*}" +daemon_id="${RC_SVCNAME#ceph-*.}" +daemon_id="${daemon_id:-0}" +command="/usr/bin/ceph-${daemon_type}" +pidfile="/run/ceph/${daemon_type}.${daemon_id}.pid" +command_args="-i ${daemon_id} --pid-file ${pidfile} -c ${ceph_conf}" + +depend() { + after net ntpd ntp-client chronyd + before netmount +} + +is_type_valid() { + case ${daemon_type} in + mon|mds|osd) return 0;; + *) return 1;; + esac +} + +start_pre() { + checkpath -d -q -o ceph "$(dirname "${pidfile}")" + if ! is_type_valid ;then + eerror "Please give valid Ceph Server Type: mds, mon, osd" + return 1 + fi +} + +reload() { + ebegin "Reloading Ceph ${daemon_type}.${daemon_id}" + start-stop-daemon --signal 1 ${start_stop_daemon_args} --pidfile "${pidfile}" + eend $? +} + +# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: |