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:
Nathan Cutler 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

20
README-checkin.txt Normal file
View File

@ -0,0 +1,20 @@
Use the "checkin.sh" script to generate ceph.spec and tarball from a git repo
and branch. For example:
$ bash checkin.sh --repo https://github.com/foo/ceph --branch wip-foo
For more options, try "./checkin.sh --help"
FAQ
===
Q. What is the pre_checkin.sh script?
A. The "pre_checkin.sh" script generates ceph-test.spec from ceph.spec, and
ceph-test.changes from ceph.changes.
Q. Should I run it before running checkin.sh?
A. It doesn't hurt to run it, but no, you don't need to run it because
checkin.sh does that for you.

View File

@ -1,20 +0,0 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="versionformat">12.2.1+git.%ct.%h</param>
<param name="url">git://github.com/SUSE/ceph.git</param>
<param name="revision">ses5</param>
<param name="filename">ceph</param>
<param name="scm">git</param>
<param name="package-meta">no</param>
<param name="changesgenerate">enable</param>
<param name="commandtorun">sh etc/ceph_ver_hack.sh</param>
</service>
<service name="extract_ceph_spec" mode="disabled" />
<service name="recompress" mode="disabled">
<param name="compression">bz2</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="disabled">
<param name="basename">ceph</param>
</service>
</services>

View File

@ -1,4 +0,0 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/SUSE/ceph.git</param>
<param name="changesrevision">8aa892202e2de4a3e6bb846c4d469903dc40c7ed</param></service></servicedata>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d66e5041bc1ed63e74fa98d3f100f824360b9a9884eec2815e503c2ed54be14f
size 127802203

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfb92c47d1ac1a5823b44b1ab0760d1d736b595b32db885592b25f00d1a95958
size 64163359

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Sat Nov 25 14:31:00 UTC 2017 - ncutler@suse.com
- Update to version 13.0.0-3522.g2d444b010f:
+ rebase to latest upstream master
+ Add "checkin.sh" script to automate the checkin process, along
with a "README-checkin.txt" file containing basic information.
-------------------------------------------------------------------
Fri Nov 24 17:23:51 UTC 2017 - ncutler@suse.com
- Update to version 13.0.0-3512.gb018e431a6:
+ rebase to upstream "Mimic" (13.0.0) development snapshot
https://github.com/SUSE/ceph/tree/ses6
+ drop OBS source services in favor of generating the spec file
and tarball using the upstream "make-dist" script
+ new version number format, replacing timestamp with git tag
offset
+ reduce tarball size from 114 MB to 47 MB by omitting unused parts
of boost
-------------------------------------------------------------------
Tue Nov 21 16:29:28 UTC 2017 - ncutler@suse.com

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

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Sat Nov 25 14:31:00 UTC 2017 - ncutler@suse.com
- Update to version 13.0.0-3522.g2d444b010f:
+ rebase to latest upstream master
+ Add "checkin.sh" script to automate the checkin process, along
with a "README-checkin.txt" file containing basic information.
-------------------------------------------------------------------
Fri Nov 24 17:23:51 UTC 2017 - ncutler@suse.com
- Update to version 13.0.0-3512.gb018e431a6:
+ rebase to upstream "Mimic" (13.0.0) development snapshot
https://github.com/SUSE/ceph/tree/ses6
+ drop OBS source services in favor of generating the spec file
and tarball using the upstream "make-dist" script
+ new version number format, replacing timestamp with git tag
offset
+ reduce tarball size from 114 MB to 47 MB by omitting unused parts
of boost
-------------------------------------------------------------------
Tue Nov 21 16:29:28 UTC 2017 - ncutler@suse.com

173
ceph.spec
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_with 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_with 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
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: User space components of the Ceph file system
@ -83,8 +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: %{name}-%{version}.tar.bz2
# _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
@ -107,7 +101,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}
@ -144,7 +137,9 @@ BuildRequires: make
BuildRequires: parted
BuildRequires: perl
BuildRequires: pkgconfig
%if %{with lowmem_builder}
BuildRequires: procps
%endif
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-nose
@ -177,6 +172,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
@ -191,6 +187,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
@ -262,8 +259,6 @@ Requires: psmisc
Requires: which
%if 0%{?suse_version}
Recommends: ntp-daemon
Provides: libxio = 1.7
Obsoletes: libxio <= 1.7
%endif
%description base
Base is the package that includes all the files shared amongst ceph servers
@ -285,14 +280,11 @@ Requires: python-prettytable
%endif
%if 0%{?suse_version}
Requires: python-PrettyTable
Provides: libxio = 1.7
Obsoletes: libxio <= 1.7
%endif
Requires: python-requests
%{?systemd_requires}
%if 0%{?suse_version}
PreReq: permissions
Requires(pre): shadow
Requires(pre): pwdutils
%endif
%description -n ceph-common
Common utilities to mount and interact with a ceph storage cluster.
@ -343,6 +335,7 @@ Requires: pyOpenSSL
Requires: python-CherryPy
Requires: python-Werkzeug
Requires: python-pyOpenSSL
Recommends: python-influxdb
%endif
Requires: python-pecan
%description mgr
@ -788,12 +781,7 @@ python-rbd, python-rgw or python-cephfs instead.
# common
#################################################################################
%prep
%if 0%{?rhel}
%autosetup -p1 -n @TARBALL_BASENAME@
%endif
%if ! 0%{?rhel}
%autosetup -p1
%endif
%autosetup -p1 -n ceph-13.0.0-3522-g2d444b010f
%build
%if 0%{with cephfs_java}
@ -806,27 +794,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
@ -871,36 +880,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}
@ -933,7 +915,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}
@ -981,12 +963,9 @@ rm -rf %{buildroot}
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-run
%{_bindir}/ceph-dencoder
%{_bindir}/ceph-detect-init
%{_bindir}/cephfs-data-scan
%{_bindir}/cephfs-journal-tool
%{_bindir}/cephfs-table-tool
%{_libexecdir}/systemd/system-preset/50-ceph.preset
%{_sbindir}/ceph-create-keys
%{_sbindir}/ceph-disk
@ -1037,6 +1016,7 @@ rm -rf %{buildroot}
%{_mandir}/man8/crushtool.8*
%{_mandir}/man8/osdmaptool.8*
%{_mandir}/man8/monmaptool.8*
%{_mandir}/man8/ceph-kvstore-tool.8*
#set up placeholder directories
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
@ -1050,12 +1030,11 @@ rm -rf %{buildroot}
%if 0%{?suse_version}
%fillup_only
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
/usr/bin/systemctl preset ceph-disk@\*.service ceph-volume@\*.service ceph.target >/dev/null 2>&1 || :
fi
%endif
%if 0%{?fedora} || 0%{?rhel}
%systemd_post ceph-disk@\*.service ceph.target
%systemd_post ceph-volume@\*.service ceph.target
%systemd_post ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl start ceph.target >/dev/null 2>&1 || :
@ -1063,11 +1042,10 @@ fi
%preun base
%if 0%{?suse_version}
%service_del_preun ceph-disk@\*.service ceph.target
%service_del_preun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
%if 0%{?fedora} || 0%{?rhel}
%systemd_preun ceph-disk@\*.service ceph.target
%systemd_preun ceph-volume@\*.service ceph.target
%systemd_preun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
%postun base
@ -1075,10 +1053,10 @@ fi
test -n "$FIRST_ARG" || FIRST_ARG=$1
%if 0%{?suse_version}
DISABLE_RESTART_ON_UPDATE="yes"
%service_del_postun ceph-disk@\*.service ceph.target
%service_del_postun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-disk@\*.service ceph.target
%systemd_postun ceph-disk@\*.service ceph-volume@\*.service ceph.target
%endif
if [ $FIRST_ARG -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
@ -1099,9 +1077,13 @@ fi
%{_bindir}/ceph
%{_bindir}/ceph-authtool
%{_bindir}/ceph-conf
%{_bindir}/ceph-dencoder
%{_bindir}/ceph-rbdnamer
%{_bindir}/ceph-syn
%{_bindir}/ceph-crush-location
%{_bindir}/cephfs-data-scan
%{_bindir}/cephfs-journal-tool
%{_bindir}/cephfs-table-tool
%{_bindir}/rados
%{_bindir}/radosgw-admin
%{_bindir}/rbd
@ -1115,8 +1097,8 @@ fi
%if %{with lttng}
%{_bindir}/rbd-replay-prep
%endif
%exclude %{_bindir}/ceph-post-file
%exclude %{_bindir}/ceph-brag
%{_bindir}/ceph-post-file
%{_bindir}/ceph-brag
%{_tmpfilesdir}/ceph-common.conf
%{_mandir}/man8/ceph-authtool.8*
%{_mandir}/man8/ceph-conf.8*
@ -1288,6 +1270,7 @@ fi
%files mon
%{_bindir}/ceph-mon
%{_bindir}/ceph-rest-api
%{_bindir}/ceph-monstore-tool
%{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-rest-api.8*
%{python_sitelib}/ceph_rest_api.py*
@ -1456,6 +1439,7 @@ fi
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-bluestore-tool
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph-osdomap-tool
%{_bindir}/ceph-osd
%{_libexecdir}/ceph/ceph-osd-prestart.sh
%dir %{_udevrulesdir}
@ -1463,6 +1447,7 @@ fi
%{_udevrulesdir}/95-ceph-osd.rules
%{_mandir}/man8/ceph-clsinfo.8*
%{_mandir}/man8/ceph-osd.8*
%{_mandir}/man8/ceph-bluestore-tool.8*
%if 0%{?rhel} && ! 0%{?centos}
%attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman
%endif
@ -1687,9 +1672,6 @@ fi
%{_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
@ -1814,4 +1796,3 @@ exit 0
%changelog
# nospeccleaner

131
checkin.sh Normal file
View File

@ -0,0 +1,131 @@
#!/bin/bash
#
# checkin.sh
#
# This script automates generation of a new tarball and spec file from a
# git clone or repo+branch combination for the "ceph" package in OBS.
#
BASEDIR=$(pwd)
function usage {
set +x
echo "Usage:"
echo " ${0} [-h,--help] [-e,--existing CLONE]"
echo " [-r,--repo REPO] [-b,--branch BRANCH]"
echo ""
echo "Options:"
echo " --existing Use existing ceph clone CLONE"
echo " --repo Make a fresh clone of ceph repo REPO"
echo " --branch Use branch BRANCH with fresh clone"
echo ""
echo "Notes:"
echo " If existing clone is given, repo and branch are ignored."
echo " Repo defaults to https://github.com/SUSE/ceph.git"
echo " Branch defaults to ses6"
exit 1
}
function _error_exit {
echo $1
exit $2
}
function _check_ceph_clone {
local OPT="$1"
if [ -z "$OPT" ] ; then
_error_exit "Empty string sent to internal function _check_ceph_clone"
fi
if [ -e "$OPT/make-dist" ] ; then
echo "$OPT looks like a ceph clone; using it"
else
_error_exit "$OPT does not appear to be a ceph clone" 1
fi
}
GETOPT=$(getopt -o b:e:hr: --long "branch:,existing:,help,repo:" \
-n 'checkin.sh' -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
eval set -- "$GETOPT"
EXISTING=""
REPO="https://github.com/SUSE/ceph.git"
BRANCH="ses6"
while true ; do
case "$1" in
-b|--branch) BRANCH="$2" ; shift 2 ;;
-e|--existing) EXISTING="$2" ; shift 2 ;;
-h|--help) usage ;; # does not return
-r|--repo) REPO="$2" ; shift 2 ;;
--) shift ; break ;;
*) echo "Internal error" ; exit 1 ;;
esac
done
if [ -n "$EXISTING" ] ; then
if [ ! -d "$EXISTING" ] ; then
_error_exit "Alleged directory ->$EXISTING<- is not a directory" 1
fi
if [ ! -r "$EXISTING" ] ; then
_error_exit "I cannot read directory ->$EXISTING<-" 1
fi
if [ ! -w "$EXISTING" ] ; then
_error_exit "I cannot write to directory ->$EXISTING<-" 1
fi
if [ ! -x "$EXISTING" ] ; then
_error_exit "I cannot cd to directory ->$EXISTING<-" 1
fi
CLONE="$EXISTING"
else
echo "Will make fresh clone of repo ->$REPO<- branch ->$BRANCH<-"
TMPDIR=$(mktemp -d --tmpdir=$BASEDIR)
echo "Created temporary temporary $TMPDIR"
git clone --branch $BRANCH $REPO $TMPDIR
CLONE="$TMPDIR"
fi
_check_ceph_clone "$CLONE"
pushd $CLONE
if [ -z "$TMPDIR" ] ; then
echo "Deleting stale tarballs from previous runs"
rm -rf *.bz2
fi
echo "Running make-dist inside clone"
./make-dist
popd
echo "Running \"osc rm *bz2\" to nuke previous tarball"
if type osc > /dev/null 2>&1 ; then
osc rm *bz2
else
echo "ERROR: osc not installed"
exit 1
fi
if stat --printf='' *.bz2 2>/dev/null ; then
echo "There are still files ending in bz2 in the current directory - clean up yourself!"
exit 1
fi
echo "Copying new spec file and tarball from $CLONE"
cp $CLONE/ceph.spec $CLONE/ceph*bz2 .
if [ -n "$TMPDIR" ] ; then
echo "Nuking the clone"
rm -rf $TMPDIR
fi
echo "Running \"osc add *bz2\" to register the new tarball"
osc add *bz2
echo "Running pre_checkin.sh (if you touch the ceph.changes file after running this script, re-run pre_checkin.sh manually)"
if [ -f "pre_checkin.sh" ] ; then
bash pre_checkin.sh
else
echo "WARNING: no pre_checkin.sh script found!"
fi
echo "Done! Run \"osc ci --noservice\" to commit."

View File

@ -1,3 +0,0 @@
#!/bin/bash
sed -i -e 's/<size unit="M">19990/<size unit="G">26/' _constraints
sed -i -e 's/<size unit="M">7240/<size unit="G">8/' _constraints