SHA256
1
0
forked from pool/ceph

Accepting request 545707 from filesystems:ceph

13.0.0 (forwarded request 545706 from smithfarm)

OBS-URL: https://build.opensuse.org/request/show/545707
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ceph?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2017-12-12 20:15:38 +00:00 committed by Git OBS Bridge
commit 3f1e6481b9
12 changed files with 387 additions and 194 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">af9ea5e71523250936836ac9ded7019b8c8eeab2</param></service></servicedata>

View File

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

View File

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

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Sat Nov 25 21:33:23 UTC 2017 - ncutler@suse.com
- Replace references to /var/adm/fillup-templates with new %_fillupdir macro
(boo#1069468)
-------------------------------------------------------------------
Sat Nov 25 14:31:00 UTC 2017 - ncutler@suse.com
- Update to version 13.0.0-3531.g3692e00bab:
+ 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
- Update to version 12.2.1+git.1511279898.8aa892202e:
+ bsc#1060904
* rgw: keystone: bump up logging when error is received
+ bsc#1067705
* rgw: set sync_from_all as true when no value is seen
+ bsc#1066182
* rgw: data sync: set num_shards when building full maps
* dencoder/rgw: expose rgw sync status types
* rgw: set num_shards on 'radosgw-admin data sync init'
-------------------------------------------------------------------
Thu Nov 09 12:00:20 UTC 2017 - ncutler@suse.com
@ -33,7 +73,7 @@ Fri Oct 27 19:15:21 UTC 2017 - ncutler@suse.com
Sun Oct 15 07:58:18 UTC 2017 - ncutler@suse.com
- Update to version 12.2.1+git.1507910930.aea79b8b7a:
+ rgw: Remove assertions in IAM Policy (bsc#1063014)
+ rgw: Remove assertions in IAM Policy (bsc#1063014, CVE-2017-16818)
-------------------------------------------------------------------
Thu Oct 12 17:08:14 UTC 2017 - ncutler@suse.com

View File

@ -14,44 +14,43 @@
# 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
%global _remote_tarball_prefix https://download.ceph.com/tarballs/
%endif
%if 0%{?suse_version}
%bcond_without ocf
%if %{with ocf}
%global _with_ocf --with-ocf
%endif
%bcond_with selinux
%bcond_without ceph_test_package
%bcond_with cephfs_java
%bcond_without lowmem_builder
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%global _fillupdir /var/adm/fillup-templates
%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}
%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 +67,14 @@
# main package definition
#################################################################################
Name: ceph-test
Version: 12.2.1+git.1510221942.af9ea5e715
Release: 0%{?dist}
Version: 13.0.0
Release: 3535.g8b10d08c04%{?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,12 +83,13 @@ 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
Source0: %{?_remote_tarball_prefix}ceph-13.0.0-3535-g8b10d08c04.tar.bz2
%if 0%{?suse_version}
Source96: checkin.sh
Source97: README-checkin.txt
Source98: README-ceph-test.txt
Source99: ceph-rpmlintrc
# _insert_obs_source_lines_here
%if 0%{?suse_version}
%if 0%{?is_opensuse}
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
%else
@ -114,7 +115,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 +151,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 +186,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 +201,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 +364,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-3535-g8b10d08c04
%build
%if 0%{with cephfs_java}
@ -378,27 +377,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 +463,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}
@ -496,7 +489,7 @@ install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
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}
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/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
@ -505,7 +498,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,6 +537,7 @@ 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
@ -565,7 +559,7 @@ rm -rf %{buildroot}%{_libdir}/libos_tp.so*
rm -rf %{buildroot}%{_libdir}/libosd_tp.so*
rm -rf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
rm -rf %{buildroot}%{_sysconfdir}/sysconfig/ceph
rm -rf %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.*
rm -rf %{buildroot}%{_fillupdir}/sysconfig.*
rm -rf %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
rm -rf %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
rm -rf %{buildroot}%{_unitdir}/ceph-disk@.service
@ -585,6 +579,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
@ -644,6 +639,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 +668,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 +907,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

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Sat Nov 25 21:33:23 UTC 2017 - ncutler@suse.com
- Replace references to /var/adm/fillup-templates with new %_fillupdir macro
(boo#1069468)
-------------------------------------------------------------------
Sat Nov 25 14:31:00 UTC 2017 - ncutler@suse.com
- Update to version 13.0.0-3531.g3692e00bab:
+ 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
- Update to version 12.2.1+git.1511279898.8aa892202e:
+ bsc#1060904
* rgw: keystone: bump up logging when error is received
+ bsc#1067705
* rgw: set sync_from_all as true when no value is seen
+ bsc#1066182
* rgw: data sync: set num_shards when building full maps
* dencoder/rgw: expose rgw sync status types
* rgw: set num_shards on 'radosgw-admin data sync init'
-------------------------------------------------------------------
Thu Nov 09 12:00:20 UTC 2017 - ncutler@suse.com
@ -33,7 +73,7 @@ Fri Oct 27 19:15:21 UTC 2017 - ncutler@suse.com
Sun Oct 15 07:58:18 UTC 2017 - ncutler@suse.com
- Update to version 12.2.1+git.1507910930.aea79b8b7a:
+ rgw: Remove assertions in IAM Policy (bsc#1063014)
+ rgw: Remove assertions in IAM Policy (bsc#1063014, CVE-2017-16818)
-------------------------------------------------------------------
Thu Oct 12 17:08:14 UTC 2017 - ncutler@suse.com

161
ceph.spec
View File

@ -14,44 +14,43 @@
# 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
%global _remote_tarball_prefix https://download.ceph.com/tarballs/
%endif
%if 0%{?suse_version}
%bcond_without ocf
%if %{with ocf}
%global _with_ocf --with-ocf
%endif
%bcond_with selinux
%bcond_with ceph_test_package
%bcond_with cephfs_java
%bcond_without lowmem_builder
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%global _fillupdir /var/adm/fillup-templates
%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}
%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 +67,14 @@
# main package definition
#################################################################################
Name: ceph
Version: 12.2.1+git.1510221942.af9ea5e715
Release: 0%{?dist}
Version: 13.0.0
Release: 3535.g8b10d08c04%{?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,9 +83,9 @@ 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: %{?_remote_tarball_prefix}ceph-13.0.0-3535-g8b10d08c04.tar.bz2
%if 0%{?suse_version}
# _insert_obs_source_lines_here
%if 0%{?is_opensuse}
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
%else
@ -107,7 +107,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 +143,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 +178,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 +193,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
@ -343,6 +346,7 @@ Requires: pyOpenSSL
Requires: python-CherryPy
Requires: python-Werkzeug
Requires: python-pyOpenSSL
Recommends: python-influxdb
%endif
Requires: python-pecan
%description mgr
@ -788,12 +792,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-3535-g8b10d08c04
%build
%if 0%{with cephfs_java}
@ -806,27 +805,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 +891,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}
@ -924,7 +917,7 @@ install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
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}
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/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
@ -933,7 +926,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,6 +974,7 @@ rm -rf %{buildroot}
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-run
%{_bindir}/ceph-dencoder
%{_bindir}/ceph-detect-init
@ -1015,7 +1009,7 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/sysconfig/ceph
%endif
%if 0%{?suse_version}
%{_localstatedir}/adm/fillup-templates/sysconfig.*
%{_fillupdir}/sysconfig.*
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
%endif
@ -1037,6 +1031,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 +1045,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 +1057,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 +1068,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
@ -1288,6 +1281,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 +1450,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 +1458,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 +1683,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

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

View File

@ -287,5 +287,6 @@ reqs=`get_package_requires $SPEC_FILE $PACKAGE`
transform_spec_file $SPEC_FILE $PACKAGE "$rm_files" "$summ" "$desc" "$reqs" > $PACKAGE.spec
insert_line_before "${PACKAGE}.spec" "Source99: ceph-rpmlintrc" "_insert_obs_source_lines_here"
insert_line_before "${PACKAGE}.spec" "Source98: README-ceph-test.txt" "^Source99:"
insert_line_before "${PACKAGE}.spec" "Source97: ibs_constraints.sh" "^Source98:"
insert_line_before "${PACKAGE}.spec" "Source97: README-checkin.txt" "^Source98:"
insert_line_before "${PACKAGE}.spec" "Source96: checkin.sh" "^Source97:"
copy_changes_file $PACKAGE