Various fixes:

- Do not require xfsprogs/xfsprogs-devel for el6
- Require gperftools-devel for non-ppc*/s390* architectures only
- Do not require junit -- no need to build libcephfs-test.jar
- Build without libxfs for el6
- Build without tcmalloc for ppc*/s390* architectures
- Location of mkcephfs must depend on a rhel release
- Use epoch in the Requires fields [1130700]
This commit is contained in:
Boris Ranto 2014-08-16 16:00:20 +02:00
parent 830e99f484
commit e44806fede

View File

@ -10,7 +10,7 @@
################################################################################# #################################################################################
Name: ceph Name: ceph
Version: 0.80.5 Version: 0.80.5
Release: 4%{?dist} Release: 5%{?dist}
Epoch: 1 Epoch: 1
Summary: User space components of the Ceph file system Summary: User space components of the Ceph file system
License: GPL-2.0 License: GPL-2.0
@ -19,15 +19,17 @@ URL: http://ceph.com/
Source0: http://ceph.com/download/%{name}-%{version}.tar.bz2 Source0: http://ceph.com/download/%{name}-%{version}.tar.bz2
Patch0: ceph-google-gperftools.patch Patch0: ceph-google-gperftools.patch
Patch1: ceph-no-format-security.patch Patch1: ceph-no-format-security.patch
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release}
Requires: ceph-common = %{version}-%{release} Requires: ceph-common = %{epoch}:%{version}-%{release}
Requires: python Requires: python
Requires: python-argparse Requires: python-argparse
Requires: python-ceph Requires: python-ceph
Requires: python-requests Requires: python-requests
%if ! ( 0%{?rhel} && 0%{?rhel} <= 6 )
Requires: xfsprogs Requires: xfsprogs
%endif
Requires: cryptsetup Requires: cryptsetup
Requires: parted Requires: parted
Requires: util-linux Requires: util-linux
@ -54,7 +56,9 @@ BuildRequires: libuuid-devel
BuildRequires: libblkid-devel >= 2.17 BuildRequires: libblkid-devel >= 2.17
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: leveldb-devel > 1.2 BuildRequires: leveldb-devel > 1.2
%if ! ( 0%{?rhel} && 0%{?rhel} <= 6 )
BuildRequires: xfsprogs-devel BuildRequires: xfsprogs-devel
%endif
BuildRequires: yasm BuildRequires: yasm
%if 0%{?rhel} || 0%{?centos} || 0%{?fedora} %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
BuildRequires: snappy-devel BuildRequires: snappy-devel
@ -90,8 +94,10 @@ Requires: gdisk
Requires(post): chkconfig Requires(post): chkconfig
Requires(preun):chkconfig Requires(preun):chkconfig
Requires(preun):initscripts Requires(preun):initscripts
%ifnarch ppc ppc64 s390 s390x
BuildRequires: gperftools-devel BuildRequires: gperftools-devel
%endif %endif
%endif
%description %description
Ceph is a massively scalable, open-source, distributed Ceph is a massively scalable, open-source, distributed
@ -105,9 +111,9 @@ block and file system storage.
%package -n ceph-common %package -n ceph-common
Summary: Ceph Common Summary: Ceph Common
Group: System Environment/Base Group: System Environment/Base
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: python-ceph = %{version}-%{release} Requires: python-ceph = %{epoch}:%{version}-%{release}
Requires: python-requests Requires: python-requests
Requires: redhat-lsb-core Requires: redhat-lsb-core
%description -n ceph-common %description -n ceph-common
@ -116,7 +122,7 @@ common utilities to mount and interact with a ceph storage cluster
%package fuse %package fuse
Summary: Ceph fuse-based client Summary: Ceph fuse-based client
Group: System Environment/Base Group: System Environment/Base
Requires: %{name} Requires: %{name} = %{epoch}:%{version}-%{release}
BuildRequires: fuse-devel BuildRequires: fuse-devel
%description fuse %description fuse
FUSE based client for Ceph distributed network file system FUSE based client for Ceph distributed network file system
@ -124,9 +130,9 @@ FUSE based client for Ceph distributed network file system
%package -n rbd-fuse %package -n rbd-fuse
Summary: Ceph fuse-based client Summary: Ceph fuse-based client
Group: System Environment/Base Group: System Environment/Base
Requires: %{name} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
BuildRequires: fuse-devel BuildRequires: fuse-devel
%description -n rbd-fuse %description -n rbd-fuse
FUSE based client to map Ceph rbd images to files FUSE based client to map Ceph rbd images to files
@ -135,11 +141,11 @@ FUSE based client to map Ceph rbd images to files
Summary: Ceph headers Summary: Ceph headers
Group: Development/Libraries Group: Development/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release}
Requires: libcephfs_jni1 = %{version}-%{release} Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release}
%description devel %description devel
This package contains libraries and headers needed to develop programs This package contains libraries and headers needed to develop programs
that use Ceph. that use Ceph.
@ -147,8 +153,8 @@ that use Ceph.
%package radosgw %package radosgw
Summary: Rados REST gateway Summary: Rados REST gateway
Group: Development/Libraries Group: Development/Libraries
Requires: ceph-common = %{version}-%{release} Requires: ceph-common = %{epoch}:%{version}-%{release}
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
%if 0%{defined suse_version} %if 0%{defined suse_version}
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: FastCGI-devel BuildRequires: FastCGI-devel
@ -167,7 +173,7 @@ conjunction with any FastCGI capable web server.
Summary: OCF-compliant resource agents for Ceph daemons Summary: OCF-compliant resource agents for Ceph daemons
Group: System Environment/Base Group: System Environment/Base
License: LGPL-2.0 License: LGPL-2.0
Requires: %{name} = %{version} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: resource-agents Requires: resource-agents
%description resource-agents %description resource-agents
Resource agents for monitoring and managing Ceph daemons Resource agents for monitoring and managing Ceph daemons
@ -192,7 +198,7 @@ store using a simple file-like interface.
Summary: RADOS block device client library Summary: RADOS block device client library
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
%if 0%{?rhel} || 0%{?centos} || 0%{?fedora} %if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
Obsoletes: ceph-libs < 1:0.80.5 Obsoletes: ceph-libs < 1:0.80.5
%endif %endif
@ -220,8 +226,8 @@ POSIX-like interface.
Summary: Python libraries for the Ceph distributed filesystem Summary: Python libraries for the Ceph distributed filesystem
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: python-flask Requires: python-flask
%if 0%{defined suse_version} %if 0%{defined suse_version}
%py_requires %py_requires
@ -234,7 +240,7 @@ object storage.
Summary: RESTful benchmark Summary: RESTful benchmark
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: ceph-common = %{version}-%{release} Requires: ceph-common = %{epoch}:%{version}-%{release}
%description -n rest-bench %description -n rest-bench
RESTful bencher that can be used to benchmark radosgw performance. RESTful bencher that can be used to benchmark radosgw performance.
@ -242,9 +248,9 @@ RESTful bencher that can be used to benchmark radosgw performance.
Summary: Ceph benchmarks and test tools Summary: Ceph benchmarks and test tools
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release}
%description -n ceph-test %description -n ceph-test
This package contains Ceph benchmarks and test tools. This package contains Ceph benchmarks and test tools.
@ -253,7 +259,7 @@ Summary: Java Native Interface library for CephFS Java bindings.
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: java Requires: java
Requires: libcephfs1 = %{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release}
BuildRequires: java-devel BuildRequires: java-devel
%description -n libcephfs_jni1 %description -n libcephfs_jni1
This package contains the Java Native Interface library for CephFS Java This package contains the Java Native Interface library for CephFS Java
@ -264,10 +270,8 @@ Summary: Java libraries for the Ceph File System.
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Requires: java Requires: java
Requires: libcephfs_jni1 = %{version}-%{release} Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release}
BuildRequires: java-devel BuildRequires: java-devel
Requires: junit >= 4.0
BuildRequires: junit >= 4.0
%description -n cephfs-java %description -n cephfs-java
This package contains the Java libraries for the Ceph File System. This package contains the Java libraries for the Ceph File System.
@ -276,9 +280,9 @@ Summary: Meta package to include ceph libraries.
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPL-2.0 License: LGPL-2.0
Obsoletes: ceph-libs < 1:0.80.5 Obsoletes: ceph-libs < 1:0.80.5
Requires: librados2 = %{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release}
Provides: ceph-libs Provides: ceph-libs
%description libs-compat %description libs-compat
@ -307,10 +311,20 @@ for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
done done
./autogen.sh ./autogen.sh
%if ( 0%{?rhel} && 0%{?rhel} <= 6)
MY_CONF_OPT="--without-libxfs"
%else
MY_CONF_OPT="" MY_CONF_OPT=""
%endif
MY_CONF_OPT="$MY_CONF_OPT --with-radosgw" MY_CONF_OPT="$MY_CONF_OPT --with-radosgw"
# No gperftools on these architectures
%ifarch ppc ppc64 s390 s390x
MY_CONF_OPT="$MY_CONF_OPT --without-tcmalloc"
%endif
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'` export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
%ifarch armv5tel %ifarch armv5tel
@ -461,10 +475,11 @@ fi
%{_sbindir}/ceph-disk-udev %{_sbindir}/ceph-disk-udev
%{_sbindir}/ceph-create-keys %{_sbindir}/ceph-create-keys
%{_sbindir}/rcceph %{_sbindir}/rcceph
%{_sbindir}/mkcephfs
%if 0%{?rhel} >= 7 || 0%{?fedora} %if 0%{?rhel} >= 7 || 0%{?fedora}
%{_sbindir}/mkcephfs
%{_sbindir}/mount.ceph %{_sbindir}/mount.ceph
%else %else
/sbin/mkcephfs
/sbin/mount.ceph /sbin/mount.ceph
%endif %endif
%dir %{_libdir}/ceph %dir %{_libdir}/ceph
@ -742,6 +757,15 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%files libs-compat %files libs-compat
%changelog %changelog
* Sat Aug 16 2014 Boris Ranto <branto@redhat.com> - 1:0.80.5-5
- Do not require xfsprogs/xfsprogs-devel for el6
- Require gperftools-devel for non-ppc*/s390* architectures only
- Do not require junit -- no need to build libcephfs-test.jar
- Build without libxfs for el6
- Build without tcmalloc for ppc*/s390* architectures
- Location of mkcephfs must depend on a rhel release
- Use epoch in the Requires fields [1130700]
* Sat Aug 16 2014 Boris Ranto <branto@redhat.com> - 1:0.80.5-4 * Sat Aug 16 2014 Boris Ranto <branto@redhat.com> - 1:0.80.5-4
- Use the proper version name in Obsoletes - Use the proper version name in Obsoletes