SHA256
1
0
forked from pool/ceph

Accepting request 545526 from filesystems:ceph:mimic

13.0.0

OBS-URL: https://build.opensuse.org/request/show/545526
OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=147
This commit is contained in:
2017-11-25 15:48:00 +00:00
committed by Git OBS Bridge
parent 033fa56e7f
commit 4d15e838cb
11 changed files with 340 additions and 209 deletions

View File

@@ -14,44 +14,38 @@
# Please submit bugfixes or comments via http://tracker.ceph.com/
#
%bcond_without ocf
%bcond_with cephfs_java
%if 0%{?suse_version}
%bcond_without ceph_test_package
%else
%bcond_without ceph_test_package
%endif
%bcond_with make_check
%ifarch s390 s390x
%bcond_with tcmalloc
%else
%bcond_without tcmalloc
%endif
%bcond_without lowmem_builder
%bcond_with minimal_debugging_information
%if 0%{?fedora} || 0%{?rhel}
%bcond_with ocf
%bcond_without lttng
%bcond_without selinux
%bcond_without ceph_test_package
%bcond_without cephfs_java
%bcond_with lowmem_builder
%endif
%if 0%{?suse_version}
%bcond_without ocf
%if %{with ocf}
%global _with_ocf --with-ocf
%endif
%bcond_with selinux
%endif
# LTTng-UST enabled on Fedora, RHEL 6+, and SLE (not openSUSE)
%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
%if ! 0%{?is_opensuse}
%bcond_without ceph_test_package
%bcond_with cephfs_java
%bcond_without lowmem_builder
%if 0%{?is_opensuse}
%bcond_without lttng
%else
%ifarch x86_64 aarch64
%bcond_without lttng
%else
%bcond_with lttng
%endif
%endif
%endif
%if %{with selinux}
# get selinux policy version
%{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null || echo 0.0.0)}
%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
%endif
%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
@@ -68,13 +62,14 @@
# main package definition
#################################################################################
Name: ceph-test
Version: 12.2.1+git.1511279898.8aa892202e
Release: 0%{?dist}
Version: 13.0.0
Release: 3522.g2d444b010f%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
%endif
# define %_epoch_prefix macro which will expand to the empty string if %epoch is undefined
# define _epoch_prefix macro which will expand to the empty string if epoch is
# undefined
%global _epoch_prefix %{?epoch:%{epoch}:}
Summary: Ceph benchmarks and test tools
@@ -83,11 +78,7 @@ License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and
Group: System/Filesystems
%endif
URL: http://ceph.com/
Source0: ceph-%{version}.tar.bz2
Source97: ibs_constraints.sh
Source98: README-ceph-test.txt
Source99: ceph-rpmlintrc
# _insert_obs_source_lines_here
Source0: https://download.ceph.com/tarballs/ceph-13.0.0-3522-g2d444b010f.tar.bz2
%if 0%{?suse_version}
%if 0%{?is_opensuse}
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
@@ -114,7 +105,6 @@ BuildRequires: sharutils
%if 0%{with selinux}
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: /usr/share/selinux/devel/policyhelp
%endif
%if 0%{with make_check}
%if 0%{?fedora} || 0%{?rhel}
@@ -151,7 +141,9 @@ BuildRequires: make
BuildRequires: parted
BuildRequires: perl
BuildRequires: pkgconfig
%if %{with lowmem_builder}
BuildRequires: procps
%endif
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-nose
@@ -184,6 +176,7 @@ BuildRequires: keyutils-devel
BuildRequires: libopenssl-devel
BuildRequires: lsb-release
BuildRequires: openldap2-devel
BuildRequires: cunit-devel
BuildRequires: python-Cython
BuildRequires: python-PrettyTable
BuildRequires: python-Sphinx
@@ -198,6 +191,7 @@ BuildRequires: keyutils-libs-devel
BuildRequires: libibverbs-devel
BuildRequires: openldap-devel
BuildRequires: openssl-devel
BuildRequires: CUnit-devel
BuildRequires: redhat-lsb-core
BuildRequires: Cython
BuildRequires: python-prettytable
@@ -360,12 +354,7 @@ This package contains Ceph benchmarks and test tools.
%if 0%{?suse_version}
%endif
%prep
%if 0%{?rhel}
%autosetup -p1 -n @TARBALL_BASENAME@
%endif
%if ! 0%{?rhel}
%autosetup -p1 -n ceph-%version
%endif
%autosetup -p1 -n ceph-13.0.0-3522-g2d444b010f
%build
%if 0%{with cephfs_java}
@@ -378,27 +367,48 @@ done
%if %{with lowmem_builder}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
%endif
%if %{with minimal_debugging_information}
RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'`"
%endif
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
export CPPFLAGS="$java_inc"
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
env | sort
# Parallel build settings ...
# unlimit _smp_mflags in system macro
%global _smp_ncpus_max 0
CEPH_PARALLEL_BUILD="%{?_smp_mflags}"
%if %{with lowmem_builder}
%if 0%{?jobs} > 8
%define _smp_mflags -j8
lo_jobs="%{?jobs:%{jobs}}"
%if 0%{?suse_version}
%ifarch %arm
%if ! 0%{?qemu_user_space_build:1}
# native hardware is not that powerful
lo_jobs="1"
%endif
%endif
%endif
# do not eat all memory
echo "Available memory:"
free
echo "System limits:"
ulimit -a
lo_jobs_reduced=
if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then
mem_per_process=1600
max_mem=$(LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
max_jobs="$(($max_mem / $mem_per_process))"
test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"
test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Not using parallel build at all because of memory limits"
fi
# run make
if test -n "$lo_jobs" ; then
CEPH_PARALLEL_BUILD="-j$lo_jobs"
fi
%endif
export CEPH_PARALLEL_BUILD
export CEPH_SMP_NCPUS=$(echo "$CEPH_PARALLEL_BUILD" | sed 's/-j//')
# unlimit _smp_mflags in system macro if not set above
%define _smp_ncpus_max 0
# extract the number of processors for use with cmake
%define _smp_ncpus %(echo %{_smp_mflags} | sed 's/-j//')
env | sort
mkdir build
cd build
@@ -443,36 +453,9 @@ cmake .. \
%else
-DWITH_RADOSGW_BEAST_FRONTEND=OFF \
%endif
-DBOOST_J=%{_smp_ncpus}
-DBOOST_J=$CEPH_SMP_NCPUS
# Parallel build settings ...
PARALLEL_BUILD=%{?_smp_mflags}
lo_jobs="%{?jobs:%{jobs}}"
%ifarch %arm
%if ! 0%{?qemu_user_space_build:1}
# native hardware is not that powerful
lo_jobs="1"
%endif
%endif
# do not eat all memory
echo "Available memory:"
free
echo "System limits:"
ulimit -a
lo_jobs_reduced=
if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then
mem_per_process=1700
max_mem=$(LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
max_jobs="$(($max_mem / $mem_per_process))"
test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"
test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Not using parallel build at all because of memory limits"
fi
# run make
if test -n "$lo_jobs" ; then
PARALLEL_BUILD="-j$lo_jobs"
fi
make "$PARALLEL_BUILD"
make "$CEPH_PARALLEL_BUILD"
%if 0%{with make_check}
@@ -505,7 +488,7 @@ mkdir -p %{buildroot}%{_sbindir}
install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
install -m 0644 -D src/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
# firewall templates and /sbin/mount.ceph symlink
%if 0%{?suse_version}
@@ -544,12 +527,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
rm -rf %{buildroot}%{_bindir}/crushtool
rm -rf %{buildroot}%{_bindir}/monmaptool
rm -rf %{buildroot}%{_bindir}/osdmaptool
rm -rf %{buildroot}%{_bindir}/ceph-kvstore-tool
rm -rf %{buildroot}%{_bindir}/ceph-run
rm -rf %{buildroot}%{_bindir}/ceph-dencoder
rm -rf %{buildroot}%{_bindir}/ceph-detect-init
rm -rf %{buildroot}%{_bindir}/cephfs-data-scan
rm -rf %{buildroot}%{_bindir}/cephfs-journal-tool
rm -rf %{buildroot}%{_bindir}/cephfs-table-tool
rm -rf %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
rm -rf %{buildroot}%{_sbindir}/ceph-create-keys
rm -rf %{buildroot}%{_sbindir}/ceph-disk
@@ -585,6 +565,7 @@ rm -rf %{buildroot}%{_mandir}/man8/ceph-run.8*
rm -rf %{buildroot}%{_mandir}/man8/crushtool.8*
rm -rf %{buildroot}%{_mandir}/man8/osdmaptool.8*
rm -rf %{buildroot}%{_mandir}/man8/monmaptool.8*
rm -rf %{buildroot}%{_mandir}/man8/ceph-kvstore-tool.8*
rm -rf %{buildroot}%doc
rm -rf %{buildroot}%{_docdir}/ceph/sample.ceph.conf
rm -rf %{buildroot}%doc
@@ -592,9 +573,13 @@ rm -rf %{buildroot}%{_docdir}/ceph/COPYING
rm -rf %{buildroot}%{_bindir}/ceph
rm -rf %{buildroot}%{_bindir}/ceph-authtool
rm -rf %{buildroot}%{_bindir}/ceph-conf
rm -rf %{buildroot}%{_bindir}/ceph-dencoder
rm -rf %{buildroot}%{_bindir}/ceph-rbdnamer
rm -rf %{buildroot}%{_bindir}/ceph-syn
rm -rf %{buildroot}%{_bindir}/ceph-crush-location
rm -rf %{buildroot}%{_bindir}/cephfs-data-scan
rm -rf %{buildroot}%{_bindir}/cephfs-journal-tool
rm -rf %{buildroot}%{_bindir}/cephfs-table-tool
rm -rf %{buildroot}%{_bindir}/rados
rm -rf %{buildroot}%{_bindir}/radosgw-admin
rm -rf %{buildroot}%{_bindir}/rbd
@@ -644,6 +629,7 @@ rm -rf %{buildroot}%{_unitdir}/ceph-mgr@.service
rm -rf %{buildroot}%{_unitdir}/ceph-mgr.target
rm -rf %{buildroot}%{_bindir}/ceph-mon
rm -rf %{buildroot}%{_bindir}/ceph-rest-api
rm -rf %{buildroot}%{_bindir}/ceph-monstore-tool
rm -rf %{buildroot}%{_mandir}/man8/ceph-mon.8*
rm -rf %{buildroot}%{_mandir}/man8/ceph-rest-api.8*
rm -rf %{buildroot}%{python_sitelib}/ceph_rest_api.py*
@@ -672,12 +658,14 @@ rm -rf %{buildroot}%{_unitdir}/ceph-radosgw.target
rm -rf %{buildroot}%{_bindir}/ceph-clsinfo
rm -rf %{buildroot}%{_bindir}/ceph-bluestore-tool
rm -rf %{buildroot}%{_bindir}/ceph-objectstore-tool
rm -rf %{buildroot}%{_bindir}/ceph-osdomap-tool
rm -rf %{buildroot}%{_bindir}/ceph-osd
rm -rf %{buildroot}%{_libexecdir}/ceph/ceph-osd-prestart.sh
rm -rf %{buildroot}%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
rm -rf %{buildroot}%{_udevrulesdir}/95-ceph-osd.rules
rm -rf %{buildroot}%{_mandir}/man8/ceph-clsinfo.8*
rm -rf %{buildroot}%{_mandir}/man8/ceph-osd.8*
rm -rf %{buildroot}%{_mandir}/man8/ceph-bluestore-tool.8*
rm -rf %{buildroot}%{_sysconfdir}/cron.hourly/subman
rm -rf %{buildroot}%{_unitdir}/ceph-osd@.service
rm -rf %{buildroot}%{_unitdir}/ceph-osd.target
@@ -909,9 +897,6 @@ rm -rf %{buildroot}
%{_bindir}/ceph_tpbench
%{_bindir}/ceph_xattr_bench
%{_bindir}/ceph-coverage
%{_bindir}/ceph-monstore-tool
%{_bindir}/ceph-osdomap-tool
%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-debugpack
%{_mandir}/man8/ceph-debugpack.8*
%dir %{_libdir}/ceph
@@ -923,4 +908,3 @@ rm -rf %{buildroot}
%if 0%{with selinux}
%endif # with selinux
%changelog
# nospeccleaner