From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 67AFA13835A for ; Fri, 26 Feb 2021 00:44:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ACDFBE09DD; Fri, 26 Feb 2021 00:44:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 86FAAE09DD for ; Fri, 26 Feb 2021 00:44:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4392434102F for ; Fri, 26 Feb 2021 00:44:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4291C56F for ; Fri, 26 Feb 2021 00:44:21 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1614300248.113ee30b5fbc92ced3160824d5d7c0dd2881e40a.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/files/, sys-cluster/ceph/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-cluster/ceph/Manifest sys-cluster/ceph/ceph-15.2.9.ebuild sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch sys-cluster/ceph/files/rbdmap.initd-r1 X-VCS-Directories: sys-cluster/ceph/ sys-cluster/ceph/files/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 113ee30b5fbc92ced3160824d5d7c0dd2881e40a X-VCS-Branch: master Date: Fri, 26 Feb 2021 00:44:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1fd3d8fd-a6de-4190-9ee1-16c73e0e8c77 X-Archives-Hash: 2ba25f4e385c926ed19436d3fd01f2b7 commit: 113ee30b5fbc92ced3160824d5d7c0dd2881e40a Author: Patrick McLean sony com> AuthorDate: Fri Feb 26 00:35:22 2021 +0000 Commit: Patrick McLean gentoo org> CommitDate: Fri Feb 26 00:44:08 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=113ee30b sys-cluster/ceph-15.2.9: Version bump - Add patch to avoid SSE 4.1 functions when SSE 4.1 is disabled (bug #701618) - Don't call objdump directly (bug #733814) - Drop libressl support (closes bug #724522) - Add a dep on the new pmdk package (bug #52177) Closes: https://bugs.gentoo.org/701618 Bug: https://bugs.gentoo.org/733814 Closes: https://bugs.gentoo.org/724522 Closes: https://bugs.gentoo.org/752177 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-3.0.15, Repoman-3.0.2 Signed-off-by: Patrick McLean gentoo.org> sys-cluster/ceph/Manifest | 1 + sys-cluster/ceph/ceph-15.2.9.ebuild | 405 +++++++++++++++++++++ ...ompile-isal_compress-if-don-t-have-SSE4_1.patch | 22 ++ sys-cluster/ceph/files/rbdmap.initd-r1 | 122 +++++++ 4 files changed, 550 insertions(+) diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index 34eb0178d51..a920d9ddde8 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -3,3 +3,4 @@ DIST ceph-14.2.13.tar.gz 129255298 BLAKE2B 32d12ede10ff657e9341e2fc31412018041a3 DIST ceph-14.2.15.tar.gz 129254705 BLAKE2B bb30f04ace31c2175c6678a9f252fc31951fd32f47362fb460ed9b8edec3a6535752d28214530e9b996c384a6e6a23eebce5caa89cb2746a2e258f5a1e1f8a3c SHA512 20ac9244974cc1312b7c642acf00142f5b7f59b09ae338f73b6c8e1ee2054b4ebd62701b18653cc792ca575a77b98644903ebb11bee6a9f1ab3aec6b37a2ef1b DIST ceph-14.2.16.tar.gz 130220625 BLAKE2B 30fcf971dd3ebaad8decf0d8d3ade1b554c0f97844db037ca618fd3f133964c08248067dc82c525cbc7deb04949a3a3d07850a5f56e75bcb8e359957d31df85f SHA512 94cab2c9711f5ee2c826ee27b474676c7bb8507c0761ed8d0a520a7e5182c4b353402061ffafbe9b95ac45603f023015752bffbbe0936f4835dfafc9476d3275 DIST ceph-15.2.8.tar.gz 149565241 BLAKE2B 5b484734c0149aae95a5df2d4481c44e30bf23cdd25aa082084a7a69e5d3398711d45e7d634f98dc99d16a77d85456c13fe3fe0d241087a990e1524664597892 SHA512 66c7322575165b4747955ac9de34f9f9e2d4361c8cd8498819383883045601b92f786c4336c79369d6f019db1c4524c492faa40cdceed7fc1b2b373ca6ab5065 +DIST ceph-15.2.9.tar.gz 149518360 BLAKE2B 3d1d2cf7e356587d77c1ca3e6b05078a3de656607007d38ff0369f5a76fb9e12a3f06929bcbf19ed5d3de7c8e402dc0972c0b3c7245f64e6f5d94a4a78bb1d00 SHA512 1f55b0a13bf06df782831d0c9d5f8617c22442ab97fb186e6ccb08183e02bf1756caf8633fa6b1cf156c3fb7b1bdff90a60a1249adfad0b9450036e2329bf8ff diff --git a/sys-cluster/ceph/ceph-15.2.9.ebuild b/sys-cluster/ceph/ceph-15.2.9.ebuild new file mode 100644 index 00000000000..d90c82927bc --- /dev/null +++ b/sys-cluster/ceph/ceph-15.2.9.ebuild @@ -0,0 +1,405 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{7..9} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +CMAKE_MAKEFILE_GENERATOR=emake + +DISTUTILS_OPTIONAL=1 + +inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \ + python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ceph/ceph.git" + SRC_URI="" +else + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~ppc64" +fi + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +LICENSE="Apache-2.0 LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ LGPL-2.1 LGPL-3 GPL-3 BSD Boost-1.0 MIT public-domain" +SLOT="0" + +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) + +IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc + kafka kerberos ldap lttng +mgr numa 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[@]})" + +DEPEND=" + acct-group/ceph + acct-user/ceph + virtual/libudev:= + app-arch/bzip2:= + app-arch/lz4:= + app-arch/snappy:= + app-arch/zstd:= + app-shells/bash:0 + app-misc/jq:= + dev-libs/crypto++:= + dev-cpp/gflags:= + dev-libs/leveldb:=[snappy,tcmalloc(-)?] + dev-libs/libaio:= + dev-libs/libfmt:= + dev-libs/libnl:3= + dev-libs/libxml2:= + =dev-util/google-perftools-2.6.1:= ) + kafka? ( dev-libs/librdkafka:= ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + lttng? ( dev-util/lttng-ust:= ) + pmdk? ( dev-libs/pmdk:= ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + radosgw? ( + dev-libs/expat:= + dev-libs/openssl:= + net-misc/curl:=[curl_ssl_openssl] + ) + rbd-rwl? ( dev-libs/pmdk:= ) + ssl? ( dev-libs/openssl:= ) + system-boost? ( >=dev-libs/boost-1.72[threads,context,python,${PYTHON_USEDEP}] ) + uring? ( sys-libs/liburing:= ) + xfs? ( sys-fs/xfsprogs:= ) + zfs? ( sys-fs/zfs:= ) + ${PYTHON_DEPS} +" +BDEPEND=" + amd64? ( dev-lang/yasm ) + x86? ( dev-lang/yasm ) + app-arch/cpio + >=dev-util/cmake-3.5.0 + dev-python/cython[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/cunit + dev-util/gperf + dev-util/ragel + dev-util/valgrind + sys-apps/coreutils + sys-apps/findutils + sys-apps/grep + sys-apps/sed + sys-apps/which + sys-devel/bc + sys-devel/patch + virtual/pkgconfig + test? ( + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + sys-apps/grep[pcre] + sys-fs/btrfs-progs + ) +" +RDEPEND="${DEPEND} + app-admin/sudo + net-misc/socat + sys-apps/gptfdisk + sys-apps/nvme-cli + >=sys-apps/smartmontools-7.0 + sys-block/parted + sys-fs/cryptsetup + sys-fs/lsscsi + sys-fs/lvm2[-device-mapper-only(-)] + virtual/awk + dev-python/bcrypt[${PYTHON_USEDEP}] + dev-python/cherrypy[${PYTHON_USEDEP}] + dev-python/python-dateutil[${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}] + mgr? ( + dev-python/jsonpatch[${PYTHON_USEDEP}] + dev-python/more-itertools[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pyjwt[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/routes[${PYTHON_USEDEP}] + diskprediction? ( + $(python_gen_cond_dep '=glibc-2.32 + has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON) + + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \ + || die "failed to remove cmake cache" + + cmake_src_configure + + # bug #630232 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \ + "${BUILD_DIR:-${S}}"/include/acconfig.h \ + || die "sed failed" +} + +src_configure() { + use custom-cflags || strip-flags + ceph_src_configure +} + +python_compile() { + local CMAKE_USE_DIR="${S}" + ceph_src_configure + + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die + emake VERBOSE=1 clean + 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_build VERBOSE=1 all + + # we have to do this here to prevent from building everything multiple times + 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="${ED}" emake VERBOSE=1 install + popd >/dev/null || die + + python_optimize +} + +src_install() { + cmake_src_install + python_foreach_impl python_install + + find "${ED}" -name '*.la' -type f -delete || die + + exeinto /usr/$(get_libdir)/ceph + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph + + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} + + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat + + fowners -R ceph:ceph /var/log/ceph + + newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap + newinitd "${FILESDIR}/${PN}.initd-r12" ${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 + newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf + + readme.gentoo_create_doc + + python_setup + + # bug #630232 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \ + || die "sed failed" + + python_fix_shebang "${ED}"/usr/{,s}bin/ + + # python_fix_shebang apparently is not idempotent + local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]' + grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \ + | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die + + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* ) + dostrip -x "${rados_classes[@]#${ED}}" +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch b/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch new file mode 100644 index 00000000000..e9439a63018 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch @@ -0,0 +1,22 @@ +diff --git a/src/compressor/zlib/ZlibCompressor.cc b/src/compressor/zlib/ZlibCompressor.cc +index e3064d2a21..c86b19da6c 100644 +--- a/src/compressor/zlib/ZlibCompressor.cc ++++ b/src/compressor/zlib/ZlibCompressor.cc +@@ -107,7 +107,7 @@ int ZlibCompressor::zlib_compress(const bufferlist &in, bufferlist &out) + return 0; + } + +-#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) ++#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) && defined(HAVE_INTEL_SSE4_1) + int ZlibCompressor::isal_compress(const bufferlist &in, bufferlist &out) + { + int ret; +@@ -167,7 +167,7 @@ int ZlibCompressor::compress(const bufferlist &in, bufferlist &out) + if (qat_enabled) + return qat_accel.compress(in, out); + #endif +-#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) ++#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) && defined(HAVE_INTEL_SSE4_1) + if (isal_enabled) + return isal_compress(in, out); + else diff --git a/sys-cluster/ceph/files/rbdmap.initd-r1 b/sys-cluster/ceph/files/rbdmap.initd-r1 new file mode 100644 index 00000000000..f3f2ea526e4 --- /dev/null +++ b/sys-cluster/ceph/files/rbdmap.initd-r1 @@ -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} --$(printf '%s\n' "${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 +}