diff --git a/_constraints b/_constraints index 699bb47..d0b2ddd 100644 --- a/_constraints +++ b/_constraints @@ -1,12 +1,34 @@ - - - 40 - - - 11 - - + kvm + + + + ceph + + + + 10 + + + 8 + + + + + + + ceph-test + + + + 40 + + + 11 + + + + diff --git a/_servicedata b/_servicedata index 0ed7e90..4657b66 100644 --- a/_servicedata +++ b/_servicedata @@ -1,5 +1,5 @@ git://github.com/SUSE/ceph.git - 7232e187533f205bcc5a5f0dbaec8f9830531601 + b62fb63235d9c3a17e8d92df97c9d7d0bf1b2c13 \ No newline at end of file diff --git a/ceph-10.2.2+git.1468935528.7232e18.tar.bz2 b/ceph-10.2.2+git.1468935528.7232e18.tar.bz2 deleted file mode 100644 index 5a86c4a..0000000 --- a/ceph-10.2.2+git.1468935528.7232e18.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4a92aa23729386bcf71dd1e96b65a8f7cc84a06f4f5159e99acc907233604c59 -size 16500665 diff --git a/ceph-10.2.2+git.1469189740.b62fb63.tar.bz2 b/ceph-10.2.2+git.1469189740.b62fb63.tar.bz2 new file mode 100644 index 0000000..d726510 --- /dev/null +++ b/ceph-10.2.2+git.1469189740.b62fb63.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fda98dfd0dcaf396ae66f21049e7d6f89846f52bc66da2696c2ee3049e32b766 +size 17485311 diff --git a/ceph-test.spec b/ceph-test.spec new file mode 100644 index 0000000..c2407c4 --- /dev/null +++ b/ceph-test.spec @@ -0,0 +1,706 @@ +# +# spec file for package ceph +# +# Copyright (C) 2004-2016 The Ceph Project Developers. See COPYING file +# at the top-level directory of this distribution and at +# https://github.com/ceph/ceph/blob/master/COPYING +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. +# +# This file is under the GNU Lesser General Public License, version 2.1 +# +# Please submit bugfixes or comments via http://tracker.ceph.com/ +# +%if 0%{?suse_version} +%bcond_without ceph_test_package +%else +%bcond_without ceph_test_package +%endif +%bcond_with make_check +%bcond_with xio +%bcond_without tcmalloc +%bcond_with lowmem_builder +%bcond_with minimal_debugging_information +%if 0%{?fedora} || 0%{?rhel} +%bcond_without cephfs_java +%bcond_with ocf +%bcond_without selinux +%endif +%if 0%{?suse_version} +%bcond_with cephfs_java +%bcond_without ocf +%if %{with ocf} +%global _with_ocf --with-ocf +%endif +%bcond_with selinux +%endif + +# LTTng-UST enabled on Fedora, RHEL 6+, and SLES 12 +%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} == 1315 +%bcond_without lttng +%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)} +%endif + +%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} +%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} + +# unify libexec for all targets +%global _libexecdir %{_exec_prefix}/lib + + +################################################################################# +# common +################################################################################# +Name: ceph-test +Version: 10.2.2+git.1469189740.b62fb63 +Release: 0 +Summary: Ceph benchmarks and test tools +License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and GPL-2.0-with-autoconf-exception and BSD-3-Clause and MIT +%if 0%{?suse_version} +Group: System/Filesystems +%endif +URL: http://ceph.com/ +Source0: ceph-%{version}.tar.bz2 +Source99: ceph-rpmlintrc +ExclusiveArch: x86_64 aarch64 +################################################################################# +# dependencies that apply across all distro families +################################################################################# + + + +Requires: ceph-common +Requires: xmlstarlet +Requires(post): binutils +%if 0%{with cephfs_java} +BuildRequires: java-devel +BuildRequires: sharutils +%endif +%if 0%{with selinux} +BuildRequires: checkpolicy +BuildRequires: selinux-policy-devel +BuildRequires: /usr/share/selinux/devel/policyhelp +%endif +BuildRequires: boost-devel +BuildRequires: cmake +BuildRequires: cryptsetup +BuildRequires: fuse-devel +BuildRequires: gcc-c++ +BuildRequires: gdbm +BuildRequires: hdparm +BuildRequires: leveldb-devel > 1.2 +BuildRequires: libaio-devel +BuildRequires: libblkid-devel >= 2.17 +BuildRequires: libcurl-devel +BuildRequires: libudev-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: make +BuildRequires: parted +BuildRequires: perl +BuildRequires: pkgconfig +BuildRequires: procps +BuildRequires: python +BuildRequires: python-devel +BuildRequires: python-nose +BuildRequires: python-requests +BuildRequires: python-sphinx +BuildRequires: python-virtualenv +BuildRequires: snappy-devel +BuildRequires: util-linux +BuildRequires: valgrind-devel +BuildRequires: xfsprogs +BuildRequires: xfsprogs-devel +BuildRequires: xmlstarlet +BuildRequires: yasm + +################################################################################# +# distro-conditional dependencies +################################################################################# +%if 0%{?suse_version} +BuildRequires: pkgconfig(systemd) +BuildRequires: systemd-rpm-macros +BuildRequires: systemd +%{?systemd_requires} +PreReq: %fillup_prereq +BuildRequires: net-tools +BuildRequires: libbz2-devel +%if 0%{with tcmalloc} +BuildRequires: gperftools-devel +%endif +BuildRequires: btrfsprogs +BuildRequires: mozilla-nss-devel +BuildRequires: keyutils-devel +BuildRequires: libatomic-ops-devel +BuildRequires: libopenssl-devel +BuildRequires: lsb-release +BuildRequires: openldap2-devel +BuildRequires: python-Cython +%endif +%if 0%{?fedora} || 0%{?rhel} + +BuildRequires: boost-random +BuildRequires: btrfs-progs +BuildRequires: nss-devel +BuildRequires: keyutils-libs-devel +BuildRequires: libatomic_ops-devel +BuildRequires: gperftools-devel +BuildRequires: openldap-devel +BuildRequires: openssl-devel +BuildRequires: redhat-lsb-core +BuildRequires: Cython +%endif +# lttng and babeltrace for rbd-replay-prep +%if %{with lttng} +%if 0%{?fedora} || 0%{?rhel} +BuildRequires: lttng-ust-devel +BuildRequires: libbabeltrace-devel +%endif +%if 0%{?suse_version} +BuildRequires: lttng-ust-devel +BuildRequires: babeltrace-devel +%endif +%endif +# expat and fastcgi for RGW +%if 0%{?suse_version} +BuildRequires: libexpat-devel +BuildRequires: FastCGI-devel +%endif +%if 0%{?rhel} || 0%{?fedora} +BuildRequires: expat-devel +BuildRequires: fcgi-devel +%endif +#hardened-cc1 +%if 0%{?fedora} || 0%{?rhel} +BuildRequires: redhat-rpm-config +%endif +# Accelio IB/RDMA +%if 0%{with xio} +BuildRequires: libxio-devel +%endif + +%description +This package contains Ceph benchmarks and test tools. + +################################################################################# +# packages +################################################################################# +%if 0%{with selinux} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{with xio} +%endif +%if 0%{?suse_version} +%endif +%if 0%{with xio} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{with selinux} +%endif +%if 0%{?rhel} || 0%{?fedora} +%endif +%if 0%{?suse_version} +%endif +%if %{with ocf} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?rhel} || 0%{?fedora} +%endif +%if 0%{?rhel} || 0%{?fedora} +%endif +%if 0%{?rhel} || 0%{?fedora} +%endif +%if 0%{with ceph_test_package} +%endif +%if 0%{with cephfs_java} +%endif +%if 0%{with selinux} +%endif +%prep +%setup -q -n ceph-%version + +%build +%if 0%{with cephfs_java} +# Find jni.h +for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do + [ -d $i ] && java_inc="$java_inc -I$i" +done +%endif + +./autogen.sh + +%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/'` + +%{configure} CPPFLAGS="$java_inc" \ + --prefix=/usr \ + --libexecdir=%{_libexecdir} \ + --localstatedir=%{_localstatedir} \ + --sysconfdir=%{_sysconfdir} \ +%if 0%{?rhel} && ! 0%{?centos} + --enable-subman \ +%endif + --with-systemdsystemunitdir=%_unitdir \ + --docdir=%{_docdir}/ceph \ + --with-man-pages \ + --mandir="%_mandir" \ + --with-nss \ + --without-cryptopp \ + --with-debug \ +%if 0%{without ceph_test_package} + --without-tests \ +%endif +%if 0%{with cephfs_java} + --enable-cephfs-java \ +%endif +%if 0%{with xio} + --enable-xio \ +%endif +%if 0%{with selinux} + --with-selinux \ +%endif + --with-librocksdb-static=check \ + --with-radosgw \ +%if %{without lttng} + --without-lttng \ + --without-babeltrace \ +%endif + $CEPH_EXTRA_CONFIGURE_ARGS \ + %{?_with_ocf} \ + %{?_with_tcmalloc} \ + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" + +# 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=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 + PARALLEL_BUILD="-j$lo_jobs" +fi + +make "$PARALLEL_BUILD" + +%if 0%{with make_check} +%check +# run in-tree unittests +make CHECK_ULIMIT=false %{?_smp_mflags} check +%endif + +%install +make DESTDIR=%{buildroot} install +find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' +find %{buildroot} -type f -name "*.a" -exec rm -f {} ';' +install -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap +%if 0%{?fedora} || 0%{?rhel} +install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph +%endif +%if 0%{?suse_version} +install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} +%endif +install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf +install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph +install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset +mkdir -p %{buildroot}%{_sbindir} +install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph +chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf +chmod 0644 %{buildroot}%{_docdir}/ceph/sample.fetch_config + +# firewall templates and /sbin/mount.ceph symlink +%if 0%{?suse_version} +install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-mon %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon +install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds +mkdir -p %{buildroot}/sbin +ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph +%endif + +# udev rules +install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules +install -m 0644 -D udev/95-ceph-osd.rules %{buildroot}%{_udevrulesdir}/95-ceph-osd.rules + +#set up placeholder directories +mkdir -p %{buildroot}%{_sysconfdir}/ceph +mkdir -p %{buildroot}%{_localstatedir}/run/ceph +mkdir -p %{buildroot}%{_localstatedir}/log/ceph +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds +mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw + +rm -rf %{buildroot}/usr/share/doc/packages/ceph/sample.ceph.conf +rm -rf %{buildroot}/usr/share/doc/packages/ceph/sample.fetch_config +rm -rf %{buildroot}/usr/bin/crushtool +rm -rf %{buildroot}/usr/bin/monmaptool +rm -rf %{buildroot}/usr/bin/osdmaptool +rm -rf %{buildroot}/usr/bin/ceph-run +rm -rf %{buildroot}/usr/bin/ceph-dencoder +rm -rf %{buildroot}/usr/bin/ceph-detect-init +rm -rf %{buildroot}/usr/bin/cephfs +rm -rf %{buildroot}/usr/bin/cephfs-data-scan +rm -rf %{buildroot}/usr/bin/cephfs-journal-tool +rm -rf %{buildroot}/usr/bin/cephfs-table-tool +rm -rf %{buildroot}/usr/lib/systemd/system-preset/50-ceph.preset +rm -rf %{buildroot}/usr/sbin/ceph-create-keys +rm -rf %{buildroot}/usr/sbin/rcceph +rm -rf %{buildroot}/usr/sbin/mount.ceph +rm -rf %{buildroot}/sbin/mount.ceph +rm -rf %{buildroot}/usr/lib/ceph/ceph_common.sh +rm -rf %{buildroot}/usr/lib64/rados-classes/* +rm -rf %{buildroot}/usr/lib64/ceph/erasure-code/libec_*.so* +rm -rf %{buildroot}/usr/lib64/ceph/compressor/libceph_*.so* +rm -rf %{buildroot}/usr/lib64/libos_tp.so* +rm -rf %{buildroot}/usr/lib64/libosd_tp.so* +rm -rf %{buildroot}/etc/bash_completion.d/ceph +rm -rf %{buildroot}/etc/logrotate.d/ceph +rm -rf %{buildroot}/etc/sysconfig/ceph +rm -rf %{buildroot}/var/adm/fillup-templates/sysconfig.* +rm -rf %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/ceph-mon +rm -rf %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds +rm -rf %{buildroot}/usr/lib/systemd/system/ceph.target +rm -rf %{buildroot}/usr/lib/python2.7/site-packages/ceph_detect_init* +rm -rf %{buildroot}/usr/lib/python2.7/site-packages/ceph_disk* +rm -rf %{buildroot}/usr/share/man/man8/ceph-deploy.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-detect-init.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-create-keys.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-run.8* +rm -rf %{buildroot}/usr/share/man/man8/crushtool.8* +rm -rf %{buildroot}/usr/share/man/man8/osdmaptool.8* +rm -rf %{buildroot}/usr/share/man/man8/monmaptool.8* +rm -rf %{buildroot}/usr/share/man/man8/cephfs.8* +rm -rf %{buildroot}/usr/share/man/man8/mount.ceph.8* +rm -rf %{buildroot}/usr/bin/ceph +rm -rf %{buildroot}/usr/bin/ceph-authtool +rm -rf %{buildroot}/usr/bin/ceph-conf +rm -rf %{buildroot}/usr/bin/ceph-rbdnamer +rm -rf %{buildroot}/usr/bin/ceph-syn +rm -rf %{buildroot}/usr/bin/ceph-crush-location +rm -rf %{buildroot}/usr/bin/rados +rm -rf %{buildroot}/usr/bin/rbd +rm -rf %{buildroot}/usr/bin/rbd-replay +rm -rf %{buildroot}/usr/bin/rbd-replay-many +rm -rf %{buildroot}/usr/bin/rbdmap +rm -rf %{buildroot}/usr/bin/rbd-replay-prep +rm -rf %{buildroot}/usr/bin/ceph-post-file +rm -rf %{buildroot}/usr/bin/ceph-brag +rm -rf %{buildroot}/usr/lib/tmpfiles.d/ceph-common.conf +rm -rf %{buildroot}/usr/share/man/man8/ceph-authtool.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-conf.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-dencoder.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-rbdnamer.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-syn.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-post-file.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph.8* +rm -rf %{buildroot}/usr/share/man/man8/rados.8* +rm -rf %{buildroot}/usr/share/man/man8/rbd.8* +rm -rf %{buildroot}/usr/share/man/man8/rbdmap.8* +rm -rf %{buildroot}/usr/share/man/man8/rbd-replay.8* +rm -rf %{buildroot}/usr/share/man/man8/rbd-replay-many.8* +rm -rf %{buildroot}/usr/share/man/man8/rbd-replay-prep.8* +rm -rf %{buildroot}/usr/share/ceph/known_hosts_drop.ceph.com +rm -rf %{buildroot}/usr/share/ceph/id_dsa_drop.ceph.com +rm -rf %{buildroot}/usr/share/ceph/id_dsa_drop.ceph.com.pub +rm -rf %{buildroot}/etc/bash_completion.d/rados +rm -rf %{buildroot}/etc/bash_completion.d/rbd +rm -rf %{buildroot}/etc/ceph/rbdmap +rm -rf %{buildroot}/usr/lib/systemd/system/rbdmap.service +rm -rf %{buildroot}/usr/lib/python2.7/site-packages/ceph_argparse.py* +rm -rf %{buildroot}/usr/lib/python2.7/site-packages/ceph_daemon.py* +rm -rf %{buildroot}/usr/lib/udev/rules.d/50-rbd.rules +rm -rf %{buildroot}/usr/bin/ceph-mds +rm -rf %{buildroot}/usr/share/man/man8/ceph-mds.8* +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-mds@.service +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-mds.target +rm -rf %{buildroot}/usr/bin/ceph-mon +rm -rf %{buildroot}/usr/bin/ceph-rest-api +rm -rf %{buildroot}/usr/share/man/man8/ceph-mon.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-rest-api.8* +rm -rf %{buildroot}/usr/lib/python2.7/site-packages/ceph_rest_api.py* +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-mon@.service +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-mon.target +rm -rf %{buildroot}/usr/bin/ceph-fuse +rm -rf %{buildroot}/usr/share/man/man8/ceph-fuse.8* +rm -rf %{buildroot}/usr/sbin/mount.fuse.ceph +rm -rf %{buildroot}/usr/bin/rbd-fuse +rm -rf %{buildroot}/usr/share/man/man8/rbd-fuse.8* +rm -rf %{buildroot}/usr/bin/rbd-mirror +rm -rf %{buildroot}/usr/share/man/man8/rbd-mirror.8* +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-rbd-mirror@.service +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-rbd-mirror.target +rm -rf %{buildroot}/usr/bin/rbd-nbd +rm -rf %{buildroot}/usr/share/man/man8/rbd-nbd.8* +rm -rf %{buildroot}/usr/bin/radosgw +rm -rf %{buildroot}/usr/bin/radosgw-admin +rm -rf %{buildroot}/usr/bin/radosgw-token +rm -rf %{buildroot}/usr/bin/radosgw-object-expirer +rm -rf %{buildroot}/usr/share/man/man8/radosgw.8* +rm -rf %{buildroot}/usr/share/man/man8/radosgw-admin.8* +rm -rf %{buildroot}/etc/bash_completion.d/radosgw-admin +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-radosgw@.service +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-radosgw.target +rm -rf %{buildroot}/usr/bin/ceph-clsinfo +rm -rf %{buildroot}/usr/bin/ceph-bluefs-tool +rm -rf %{buildroot}/usr/bin/ceph-objectstore-tool +rm -rf %{buildroot}/usr/bin/ceph-osd +rm -rf %{buildroot}/usr/sbin/ceph-disk +rm -rf %{buildroot}/usr/sbin/ceph-disk-udev +rm -rf %{buildroot}/usr/lib/ceph/ceph-osd-prestart.sh +rm -rf %{buildroot}/usr/lib/udev/rules.d/95-ceph-osd.rules +rm -rf %{buildroot}/usr/share/man/man8/ceph-clsinfo.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-disk.8* +rm -rf %{buildroot}/usr/share/man/man8/ceph-osd.8* +rm -rf %{buildroot}/etc/cron.hourly/subman +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-osd@.service +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-osd.target +rm -rf %{buildroot}/usr/lib/systemd/system/ceph-disk@.service +rm -rf %{buildroot}/usr/lib/ocf/resource.d/ceph/rbd +rm -rf %{buildroot}/usr/lib64/librados.so.* +rm -rf %{buildroot}/usr/lib64/librados_tp.so.* +rm -rf %{buildroot}/usr/include/rados/librados.h +rm -rf %{buildroot}/usr/include/rados/librados.hpp +rm -rf %{buildroot}/usr/include/rados/buffer.h +rm -rf %{buildroot}/usr/include/rados/buffer_fwd.h +rm -rf %{buildroot}/usr/include/rados/page.h +rm -rf %{buildroot}/usr/include/rados/crc32c.h +rm -rf %{buildroot}/usr/include/rados/rados_types.h +rm -rf %{buildroot}/usr/include/rados/rados_types.hpp +rm -rf %{buildroot}/usr/include/rados/memory.h +rm -rf %{buildroot}/usr/lib64/librados.so +rm -rf %{buildroot}/usr/lib64/librados_tp.so +rm -rf %{buildroot}/usr/bin/librados-config +rm -rf %{buildroot}/usr/share/man/man8/librados-config.8* +rm -rf %{buildroot}/usr/lib64/python2.7/site-packages/rados.so +rm -rf %{buildroot}/usr/lib64/python2.7/site-packages/rados-*.egg-info +rm -rf %{buildroot}/usr/lib64/libradosstriper.so.* +rm -rf %{buildroot}/usr/include/radosstriper/libradosstriper.h +rm -rf %{buildroot}/usr/include/radosstriper/libradosstriper.hpp +rm -rf %{buildroot}/usr/lib64/libradosstriper.so +rm -rf %{buildroot}/usr/lib64/librbd.so.* +rm -rf %{buildroot}/usr/lib64/librbd_tp.so.* +rm -rf %{buildroot}/usr/include/rbd/librbd.h +rm -rf %{buildroot}/usr/include/rbd/librbd.hpp +rm -rf %{buildroot}/usr/include/rbd/features.h +rm -rf %{buildroot}/usr/lib64/librbd.so +rm -rf %{buildroot}/usr/lib64/librbd_tp.so +rm -rf %{buildroot}/usr/lib64/librgw.so.* +rm -rf %{buildroot}/usr/include/rados/librgw.h +rm -rf %{buildroot}/usr/include/rados/rgw_file.h +rm -rf %{buildroot}/usr/lib64/librgw.so +rm -rf %{buildroot}/usr/lib64/python2.7/site-packages/rbd.so +rm -rf %{buildroot}/usr/lib64/python2.7/site-packages/rbd-*.egg-info +rm -rf %{buildroot}/usr/lib64/libcephfs.so.* +rm -rf %{buildroot}/usr/include/cephfs/libcephfs.h +rm -rf %{buildroot}/usr/lib64/libcephfs.so +rm -rf %{buildroot}/usr/lib64/python2.7/site-packages/cephfs.so +rm -rf %{buildroot}/usr/lib64/python2.7/site-packages/cephfs-*.egg-info +rm -rf %{buildroot}/usr/lib/python2.7/site-packages/ceph_volume_client.py* +rm -rf %{buildroot}/usr/lib64/libcephfs_jni.so.* +rm -rf %{buildroot}/usr/lib64/libcephfs_jni.so +rm -rf %{buildroot}/usr/share/java/libcephfs.jar +rm -rf %{buildroot}/usr/share/java/libcephfs-test.jar +rm -rf %{buildroot}/usr/share/selinux/packages/ceph.pp +rm -rf %{buildroot}/usr/share/selinux/devel/include/contrib/ceph.if +rm -rf %{buildroot}/usr/share/man/man8/ceph_selinux.8* + +dirs=`find %{buildroot} -type d -empty` +while [[ -n $dirs ]]; do + for d in $dirs; do + rm -rf $d + done +dirs=`find %{buildroot} -type d -empty` +done + +%clean +rm -rf %{buildroot} + +################################################################################# +# files and systemd scriptlets +################################################################################# +%files + +%if 0%{?suse_version} +%endif +%if %{with lttng} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if %{with lttng} +%endif +%if 0%{?rhel} || 0%{?fedora} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?rhel} && ! 0%{?centos} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if 0%{?suse_version} +%endif +%if 0%{?fedora} || 0%{?rhel} +%endif +%if %{with ocf} +%endif +%if %{with lttng} +%endif +%if %{with lttng} +%endif +%if %{with lttng} +%endif +%if %{with lttng} +%endif +%if 0%{with ceph_test_package} +%files -n ceph-test +%defattr(-,root,root,-) +%{_bindir}/ceph-client-debug +%{_bindir}/ceph_bench_log +%{_bindir}/ceph_kvstorebench +%{_bindir}/ceph_multi_stress_watch +%{_bindir}/ceph_erasure_code +%{_bindir}/ceph_erasure_code_benchmark +%{_bindir}/ceph_omapbench +%{_bindir}/ceph_objectstore_bench +%{_bindir}/ceph_perf_objectstore +%{_bindir}/ceph_perf_local +%{_bindir}/ceph_perf_msgr_client +%{_bindir}/ceph_perf_msgr_server +%{_bindir}/ceph_psim +%{_bindir}/ceph_radosacl +%{_bindir}/ceph_rgw_jsonparser +%{_bindir}/ceph_rgw_multiparser +%{_bindir}/ceph_scratchtool +%{_bindir}/ceph_scratchtoolpp +%{_bindir}/ceph_smalliobench +%{_bindir}/ceph_smalliobenchdumb +%{_bindir}/ceph_smalliobenchfs +%{_bindir}/ceph_smalliobenchrbd +%{_bindir}/ceph_test_* +%{_bindir}/librgw_file* +%{_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 +%{_libdir}/ceph/ceph-monstore-update-crush.sh +%endif + +################################################################################# +%if 0%{with cephfs_java} +%endif +%if 0%{with selinux} +%endif # with selinux +%changelog diff --git a/ceph.changes b/ceph.changes index 23d26c0..7b4645d 100644 --- a/ceph.changes +++ b/ceph.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Jul 22 17:03:43 UTC 2016 - ncutler@suse.com + +- _constraints: set separate constraints for ceph.spec and ceph-test.spec + +------------------------------------------------------------------- +Fri Jul 22 13:33:31 UTC 2016 - rdias@suse.com + +- Split ceph.spec into ceph.spec + ceph-test.spec + + Added pre_checking.sh script to generate ceph-test.spec + + Reduced the constraints on resources required to build ceph and ceph-test packages + +------------------------------------------------------------------- +Fri Jul 22 13:30:54 UTC 2016 - rdias@suse.com + +- Update to version 10.2.2+git.1469189740.b62fb63: + + build: Added new configure option --with-tests + + build: Use WITH_TESTS flag to guard the build of ceph-test scripts/binaries + + rpm: Moved ceph-client-debug from ceph-base to ceph-test package + + rpm: Renamed bcond tests flag to make_check + + rpm: Added ceph_test_package bcond flag to control the build of ceph-test package + ------------------------------------------------------------------- Tue Jul 19 13:57:43 UTC 2016 - ncutler@suse.com diff --git a/ceph.spec b/ceph.spec index 3d8978d..9953d47 100644 --- a/ceph.spec +++ b/ceph.spec @@ -13,7 +13,12 @@ # # Please submit bugfixes or comments via http://tracker.ceph.com/ # -%bcond_with tests +%if 0%{?suse_version} +%bcond_with ceph_test_package +%else +%bcond_without ceph_test_package +%endif +%bcond_with make_check %bcond_with xio %bcond_without tcmalloc %bcond_with lowmem_builder @@ -53,7 +58,7 @@ # common ################################################################################# Name: ceph -Version: 10.2.2+git.1468935528.7232e18 +Version: 10.2.2+git.1469189740.b62fb63 Release: 0 Summary: User space components of the Ceph file system License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and GPL-2.0-with-autoconf-exception and BSD-3-Clause and MIT @@ -509,6 +514,7 @@ Obsoletes: python-ceph < %{version}-%{release} This package contains Python libraries for interacting with Cephs distributed file system. +%if 0%{with ceph_test_package} %package -n ceph-test Summary: Ceph benchmarks and test tools Group: System Environment/Libraries @@ -517,6 +523,7 @@ Requires: ceph-common Requires: xmlstarlet %description -n ceph-test This package contains Ceph benchmarks and test tools. +%endif %if 0%{with cephfs_java} @@ -611,6 +618,9 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'` --with-nss \ --without-cryptopp \ --with-debug \ +%if 0%{without ceph_test_package} + --without-tests \ +%endif %if 0%{with cephfs_java} --enable-cephfs-java \ %endif @@ -660,7 +670,7 @@ fi make "$PARALLEL_BUILD" -%if 0%{with tests} +%if 0%{with make_check} %check # run in-tree unittests make CHECK_ULIMIT=false %{?_smp_mflags} check @@ -730,7 +740,6 @@ rm -rf %{buildroot} %{_bindir}/ceph-run %{_bindir}/ceph-dencoder %{_bindir}/ceph-detect-init -%{_bindir}/ceph-client-debug %{_bindir}/cephfs %{_bindir}/cephfs-data-scan %{_bindir}/cephfs-journal-tool @@ -1344,8 +1353,10 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 %{python_sitelib}/ceph_volume_client.py* ################################################################################# +%if 0%{with ceph_test_package} %files -n ceph-test %defattr(-,root,root,-) +%{_bindir}/ceph-client-debug %{_bindir}/ceph_bench_log %{_bindir}/ceph_kvstorebench %{_bindir}/ceph_multi_stress_watch @@ -1379,6 +1390,7 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 %{_mandir}/man8/ceph-debugpack.8* %dir %{_libdir}/ceph %{_libdir}/ceph/ceph-monstore-update-crush.sh +%endif ################################################################################# %if 0%{with cephfs_java} diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..4a03108 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,303 @@ +#!/bin/bash + +set -f + +function packages_files { + local spec_file=$1 + local exclude_pkg=$2 + local in_files=false + local result="" + + while IFS='' read -r line || [[ -n "$line" ]]; do + + case $line in + "%files "*) + pkg=`echo "$line" | sed 's/%files.* \(\w\+\)/\1/g'` + if [[ $pkg == $exclude_pkg ]]; then + in_files=false + continue + fi + in_files=true + continue + ;; + "%post"* | "%pre"* | "%preun"* | "%postun"*) + in_files=false + continue + ;; + esac + + result="" + changed=true + while [[ $in_files == true ]] && [[ $changed == true ]]; do + changed=false + case $line in + "%if"* | "" | "%defattr"* | "%endif"* | "%else"* | "#"* | "%docdir"*) + break + ;; + "%dir"*) + break # for now we'll ignore %dir entries + ;; + *) + result=`echo "$line" | sed -e 's/%config \(.*\)/\1/g' \ + -e 's/%config(.*) \(.*\)/\1/g' \ + -e 's/%attr(.*) \(.*\)/\1/g' \ + -e 's/%exclude \(.*\)/\1/g'` + if [[ ! $line == $result ]]; then + changed=true + line=$result + continue + fi + ;; + esac + + # process path variables + result=`echo "$result" | sed -e 's!%{_bindir}!/usr/bin!g' \ + -e 's!%{_docdir}!/usr/share/doc/packages!g' \ + -e 's!%{_sbindir}!/usr/sbin!g' \ + -e 's!%{_libdir}!/usr/lib64!g' \ + -e 's!%{_mandir}!/usr/share/man!g' \ + -e 's!%{_sysconfdir}!/etc!g' \ + -e 's!%{_includedir}!/usr/include!g' \ + -e 's!%{_unitdir}!/usr/lib/systemd/system!g' \ + -e 's!%{python_sitelib}!/usr/lib/python2.7/site-packages!g' \ + -e 's!%{_datadir}!/usr/share!g' \ + -e 's!%{python_sitearch}!/usr/lib64/python2.7/site-packages!g' \ + -e 's!%{_javadir}!/usr/share/java!g' \ + -e 's!%{_libexecdir}!/usr/lib!g' \ + -e 's!%{_prefix}!/usr!g' \ + -e 's!%{_localstatedir}!/var!g' \ + -e 's!%{_tmpfilesdir}!/usr/lib/tmpfiles.d!g' \ + -e 's!%{_udevrulesdir}!/usr/lib/udev/rules.d!g'` + + # sanity check + if [[ "$result" == "%"* ]]; then + echo "ERROR: unparsable file entry: $result" + exit 1 + fi + + echo "$result" + done + done < $spec_file +} + +function get_package_summary { + local spec_file=$1 + local pkg_name=$2 + local in_package=false + + while IFS='' read -r line || [[ -n "$line" ]]; do + + case $line in + "%package "*) + pkg=`echo "$line" | sed 's/%package.* \(\w\+\)/\1/g'` + if [[ ! $pkg == $pkg_name ]]; then + in_package=false + else + in_package=true + fi + ;; + "%prep"* | "%build"* | "%install"*) + in_package=false + ;; + "Summary:"*) + if [[ $in_package == true ]]; then + echo $line + break + fi + ;; + esac + done < $spec_file +} + +function get_package_requires { + local spec_file=$1 + local pkg_name=$2 + local in_package=false + + while IFS='' read -r line || [[ -n "$line" ]]; do + + case $line in + "%package "*) + pkg=`echo "$line" | sed 's/%package.* \(\w\+\)/\1/g'` + if [[ ! $pkg == $pkg_name ]]; then + in_package=false + else + in_package=true + fi + ;; + "%prep"* | "%build"* | "%install"*) + in_package=false + ;; + "Requires:"*) + if [[ $in_package == true ]]; then + echo $line + fi + ;; + esac + done < $spec_file +} + +function get_package_description { + local spec_file=$1 + local pkg_name=$2 + local in_desc=false + + while IFS='' read -r line || [[ -n "$line" ]]; do + + case $line in + "%description "*) + pkg=`echo "$line" | sed 's/%description.* \(\w\+\)/\1/g'` + if [[ ! $pkg == $pkg_name ]]; then + in_desc=false + else + in_desc=true + fi + continue + ;; + "%prep"* | "%build"* | "%install"* | "%package"* | "%if"* | "%endif"*) + in_desc=false + continue + ;; + esac + + if [[ $in_desc == true ]]; then + echo "$line" + fi + done < $spec_file +} + +function transform_spec_file { + local spec_file=$1 + local include_pkg=$2 + local rm_files=$3 + local summary=$4 + local description=$5 + local requires=$6 + local in_package=false + local in_files=false + local in_desc=false + + while IFS='' read -r line || [[ -n "$line" ]]; do + + case $line in + "%bcond_with ceph_test_package"*) + line="%bcond_without ceph_test_package" + ;; + "Name:"*) + line="Name: $include_pkg" + ;; + "Summary:"*) + if [[ $in_package == false ]]; then + line="$summary" + fi + ;; + "Source0:"*) + line=`echo $line | sed 's/%{name}/ceph/g'` + ;; + "%setup -q") + line="$line -n ceph-%version" + ;; + "Requires:"*) + if [[ $in_package == false ]]; then + line="" + fi + ;; + "Requires(post):"*) + if [[ $in_package == false ]]; then + IFS='' + for r in "$requires"; do + echo "$r" + done + fi + ;; + "%description"*) + if [[ $in_package == false ]]; then + in_desc=true + echo "$line" + echo "$description" + echo "" + continue + fi + ;; + "%package "*) + #pkg=`echo "$line" | sed 's/%package.* \(\w\+\)/\1/g'` + #if [[ $pkg == $include_pkg ]]; then + # in_package=false + #else + in_package=true + continue + #fi + in_desc=false + ;; + "%prep"* | "%build"* | "%install"*) + in_package=false + in_desc=false + ;; + "%files "*) + pkg=`echo "$line" | sed 's/%files.* \(\w\+\)/\1/g'` + if [[ $pkg == $include_pkg ]]; then + in_files=false + else + in_files=true + continue + fi + ;; + "%changelog"*) + in_files=false + ;; + "%clean"*) + in_package=false + IFS='' + for rf in "$rm_files"; do + echo "$rf" + done + echo "" + echo "dirs=\`find %{buildroot} -type d -empty\`" + echo "while [[ -n \$dirs ]]; do" + echo " for d in \$dirs; do" + echo " rm -rf \$d" + echo " done" + echo "dirs=\`find %{buildroot} -type d -empty\`" + echo "done" + echo "" + ;; + "#"* | "%"*) + in_desc=false + ;; + esac + + if [[ $in_package == false ]] && [[ $in_files == false ]] && [[ $in_desc == false ]]; then + echo $line + else + if [[ $line == "%if"* ]] || [[ $line == "%endif"* ]]; then + echo $line + fi + fi + + done < $spec_file +} + +function generate_rm_exclude_files { + local exclude_list=$1 + local buildroot=$2 + + for f in $exclude_list; do + echo "rm -rf $buildroot$f" + done +} + +PACKAGE="ceph-test" +SPEC_FILE="ceph.spec" + +files=`packages_files $SPEC_FILE $PACKAGE` +if [[ "$?" == "1" ]]; then + echo "ERROR: " + echo $files + exit 0 +fi +rm_files=`generate_rm_exclude_files "$files" "%{buildroot}"` +summ=`get_package_summary $SPEC_FILE $PACKAGE` +desc=`get_package_description $SPEC_FILE $PACKAGE` +reqs=`get_package_requires $SPEC_FILE $PACKAGE` +transform_spec_file $SPEC_FILE $PACKAGE "$rm_files" "$summ" "$desc" "$reqs" > ceph-test.spec +