Merge pull request #2080 from ceph/wip-8306-rebase

Wip 8306 rebase

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
This commit is contained in:
Sage Weil 2014-07-07 14:52:17 -07:00
commit 083f9fe445

View File

@ -19,16 +19,16 @@ Source0: http://ceph.com/download/%{name}-%{version}.tar.bz2
Requires: librbd1 = %{version}-%{release}
Requires: librados2 = %{version}-%{release}
Requires: libcephfs1 = %{version}-%{release}
Requires: ceph-common = %{version}-%{release}
Requires: python
Requires: python-argparse
Requires: python-ceph
Requires: python-requests
Requires: xfsprogs
Requires: xfsprogs
Requires: cryptsetup
Requires: parted
Requires: util-linux
Requires: hdparm
Requires: redhat-lsb-core
Requires(post): binutils
BuildRequires: make
BuildRequires: gcc-c++
@ -41,42 +41,42 @@ BuildRequires: pkgconfig
BuildRequires: python
BuildRequires: python-nose
BuildRequires: python-argparse
BuildRequires: libaio-devel
BuildRequires: libcurl-devel
BuildRequires: libxml2-devel
BuildRequires: libuuid-devel
BuildRequires: libblkid-devel >= 2.17
BuildRequires: libudev-devel
BuildRequires: leveldb-devel > 1.2
BuildRequires: xfsprogs-devel
BuildRequires: yasm
%if 0%{?rhel} || 0%{?centos_version} || 0%{?fedora}
BuildRequires: snappy-devel
BuildRequires: libaio-devel
BuildRequires: libcurl-devel
BuildRequires: libxml2-devel
BuildRequires: libuuid-devel
BuildRequires: libblkid-devel >= 2.17
BuildRequires: libudev-devel
BuildRequires: leveldb-devel > 1.2
BuildRequires: xfsprogs-devel
BuildRequires: yasm
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora}
BuildRequires: snappy-devel
%endif
#################################################################################
# specific
#################################################################################
%if ! 0%{?rhel}
BuildRequires: sharutils
BuildRequires: sharutils
%endif
%if 0%{defined suse_version}
%if 0%{?suse_version} > 1210
Requires: gptfdisk
BuildRequires: gperftools-devel
Requires: gptfdisk
BuildRequires: gperftools-devel
%else
Requires: scsirastools
BuildRequires: google-perftools-devel
Requires: scsirastools
BuildRequires: google-perftools-devel
%endif
Recommends: logrotate
BuildRequires: %insserv_prereq
BuildRequires: mozilla-nss-devel
BuildRequires: keyutils-devel
BuildRequires: libatomic-ops-devel
BuildRequires: fdupes
BuildRequires: fdupes
%else
Requires: gdisk
Requires: gdisk
BuildRequires: nss-devel
BuildRequires: keyutils-libs-devel
BuildRequires: libatomic_ops-devel
@ -84,7 +84,7 @@ Requires: gdisk
Requires(post): chkconfig
Requires(preun):chkconfig
Requires(preun):initscripts
BuildRequires: gperftools-devel
BuildRequires: gperftools-devel
%endif
%description
@ -96,6 +96,17 @@ block and file system storage.
#################################################################################
# packages
#################################################################################
%package -n ceph-common
Summary: Ceph Common
Group: System Environment/Base
Requires: librbd1 = %{version}-%{release}
Requires: librados2 = %{version}-%{release}
Requires: python-ceph = %{version}-%{release}
Requires: python-requests
Requires: redhat-lsb-core
%description -n ceph-common
common utilities to mount and interact with a ceph storage cluster
%package fuse
Summary: Ceph fuse-based client
Group: System Environment/Base
@ -108,6 +119,8 @@ FUSE based client for Ceph distributed network file system
Summary: Ceph fuse-based client
Group: System Environment/Base
Requires: %{name}
Requires: librados2 = %{version}-%{release}
Requires: librbd1 = %{version}-%{release}
BuildRequires: fuse-devel
%description -n rbd-fuse
FUSE based client to map Ceph rbd images to files
@ -117,10 +130,11 @@ Summary: Ceph headers
Group: Development/Libraries
License: LGPL-2.0
Requires: %{name} = %{version}-%{release}
Requires: librados2 = %{version}
Requires: libradosstriper1 = %{version}
Requires: librbd1 = %{version}
Requires: libcephfs1 = %{version}
Requires: librados2 = %{version}-%{release}
Requires: libradosstriper1 = %{version}-%{release}
Requires: librbd1 = %{version}-%{release}
Requires: libcephfs1 = %{version}-%{release}
Requires: libcephfs_jni1 = %{version}-%{release}
%description devel
This package contains libraries and headers needed to develop programs
that use Ceph.
@ -128,6 +142,7 @@ that use Ceph.
%package radosgw
Summary: Rados REST gateway
Group: Development/Libraries
Requires: ceph-common = %{version}-%{release}
Requires: librados2 = %{version}-%{release}
%if 0%{defined suse_version}
BuildRequires: libexpat-devel
@ -182,7 +197,8 @@ an interface very similar to the rados one.
Summary: RADOS block device client library
Group: System Environment/Libraries
License: LGPL-2.0
%if 0%{?rhel} || 0%{?centos_version} || 0%{?fedora}
Requires: librados2 = %{version}-%{release}
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora}
Obsoletes: ceph-libs
%endif
%description -n librbd1
@ -210,7 +226,6 @@ Group: System Environment/Libraries
License: LGPL-2.0
Requires: librados2 = %{version}-%{release}
Requires: librbd1 = %{version}-%{release}
Requires: libcephfs1 = %{version}-%{release}
Requires: python-flask
%if 0%{defined suse_version}
%py_requires
@ -223,9 +238,7 @@ object storage.
Summary: RESTful benchmark
Group: System Environment/Libraries
License: LGPL-2.0
Requires: librados2 = %{version}-%{release}
Requires: librbd1 = %{version}-%{release}
Requires: libcephfs1 = %{version}-%{release}
Requires: ceph-common = %{version}-%{release}
%description -n rest-bench
RESTful bencher that can be used to benchmark radosgw performance.
@ -245,7 +258,7 @@ Group: System Environment/Libraries
License: LGPL-2.0
Requires: java
Requires: libcephfs1 = %{version}-%{release}
BuildRequires: java-devel
BuildRequires: java-devel
%description -n libcephfs_jni1
This package contains the Java Native Interface library for CephFS Java
bindings.
@ -256,9 +269,9 @@ Group: System Environment/Libraries
License: LGPL-2.0
Requires: java
Requires: libcephfs_jni1 = %{version}-%{release}
BuildRequires: java-devel
Requires: junit4
BuildRequires: junit4
BuildRequires: java-devel
Requires: junit4
BuildRequires: junit4
%description -n cephfs-java
This package contains the Java libraries for the Ceph File System.
@ -327,8 +340,13 @@ chmod 0644 $RPM_BUILD_ROOT%{_docdir}/ceph/sample.ceph.conf
chmod 0644 $RPM_BUILD_ROOT%{_docdir}/ceph/sample.fetch_config
# udev rules
%if 0%{?rhel} >= 7
install -m 0644 -D udev/50-rbd.rules $RPM_BUILD_ROOT/usr/lib/udev/rules.d/50-rbd.rules
install -m 0644 -D udev/60-ceph-partuuid-workaround.rules $RPM_BUILD_ROOT/usr/lib/udev/rules.d/60-ceph-partuuid-workaround.rules
%else
install -m 0644 -D udev/50-rbd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/50-rbd.rules
install -m 0644 -D udev/60-ceph-partuuid-workaround.rules $RPM_BUILD_ROOT/lib/udev/rules.d/60-ceph-partuuid-workaround.rules
%endif
%if (0%{?rhel} || 0%{?rhel} < 7)
install -m 0644 -D udev/95-ceph-osd-alt.rules $RPM_BUILD_ROOT/lib/udev/rules.d/95-ceph-osd.rules
@ -336,6 +354,13 @@ install -m 0644 -D udev/95-ceph-osd-alt.rules $RPM_BUILD_ROOT/lib/udev/rules.d/9
install -m 0644 -D udev/95-ceph-osd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/95-ceph-osd.rules
%endif
%if 0%{?rhel} >= 7
mv $RPM_BUILD_ROOT/lib/udev/rules.d/95-ceph-osd.rules $RPM_BUILD_ROOT/usr/lib/udev/rules.d/95-ceph-osd.rules
mv $RPM_BUILD_ROOT/sbin/mkcephfs $RPM_BUILD_ROOT/usr/sbin/mkcephfs
mv $RPM_BUILD_ROOT/sbin/mount.ceph $RPM_BUILD_ROOT/usr/sbin/mount.ceph
mv $RPM_BUILD_ROOT/sbin/mount.fuse.ceph $RPM_BUILD_ROOT/usr/sbin/mount.fuse.ceph
%endif
#set up placeholder directories
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/ceph
@ -380,11 +405,7 @@ fi
%restart_on_update ceph
%insserv_cleanup
%endif
# Package removal cleanup
if [ "$1" -eq "0" ] ; then
rm -rf /var/log/ceph
rm -rf /etc/ceph
fi
#################################################################################
# files
@ -395,31 +416,18 @@ fi
%dir %{_docdir}/ceph
%{_docdir}/ceph/sample.ceph.conf
%{_docdir}/ceph/sample.fetch_config
%{_datadir}/ceph/known_hosts_drop.ceph.com
%{_datadir}/ceph/id_dsa_drop.ceph.com
%{_datadir}/ceph/id_dsa_drop.ceph.com.pub
%{_bindir}/ceph
%{_bindir}/cephfs
%{_bindir}/ceph-conf
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-rest-api
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
%{_bindir}/ceph-authtool
%{_bindir}/ceph-syn
%{_bindir}/ceph-post-file
%{_bindir}/ceph-brag
%{_bindir}/ceph-crush-location
%{_bindir}/ceph-run
%{_bindir}/ceph-mon
%{_bindir}/ceph-mds
%{_bindir}/ceph-osd
%{_bindir}/ceph-rbdnamer
%{_bindir}/ceph-dencoder
%{_bindir}/librados-config
%{_bindir}/rados
%{_bindir}/rbd
%{_bindir}/ceph-client-debug
%{_bindir}/cephfs-journal-tool
%{_bindir}/ceph-debugpack
@ -432,7 +440,11 @@ fi
%{_sbindir}/ceph-disk-udev
%{_sbindir}/ceph-create-keys
%{_sbindir}/rcceph
%if 0%{?rhel} >= 7
%{_sbindir}/mount.ceph
%else
/sbin/mount.ceph
%endif
%dir %{_libdir}/ceph
%{_libdir}/ceph/ceph_common.sh
%dir %{_libdir}/rados-classes
@ -455,37 +467,27 @@ fi
%{_libdir}/ceph/erasure-code/libec_jerasure*.so*
%{_libdir}/ceph/erasure-code/libec_test_jerasure*.so*
%{_libdir}/ceph/erasure-code/libec_missing_entry_point.so*
/lib/udev/rules.d/50-rbd.rules
%if 0%{?rhel} >= 7
/usr/lib/udev/rules.d/60-ceph-partuuid-workaround.rules
/usr/lib/udev/rules.d/95-ceph-osd.rules
%else
/lib/udev/rules.d/60-ceph-partuuid-workaround.rules
/lib/udev/rules.d/95-ceph-osd.rules
%dir %{_sysconfdir}/ceph/
%endif
%config %{_sysconfdir}/bash_completion.d/ceph
%config %{_sysconfdir}/bash_completion.d/rados
%config %{_sysconfdir}/bash_completion.d/radosgw-admin
%config %{_sysconfdir}/bash_completion.d/rbd
%{_initrddir}/rbdmap
%config(noreplace) %{_sysconfdir}/ceph/rbdmap
%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
%config(noreplace) %{_sysconfdir}/logrotate.d/radosgw
%{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-mds.8*
%{_mandir}/man8/ceph-osd.8*
%{_mandir}/man8/ceph-run.8*
%{_mandir}/man8/ceph-syn.8*
%{_mandir}/man8/ceph-post-file.8*
%{_mandir}/man8/ceph-dencoder.8*
%{_mandir}/man8/ceph-rest-api.8*
%{_mandir}/man8/crushtool.8*
%{_mandir}/man8/osdmaptool.8*
%{_mandir}/man8/monmaptool.8*
%{_mandir}/man8/ceph-conf.8*
%{_mandir}/man8/ceph.8*
%{_mandir}/man8/cephfs.8*
%{_mandir}/man8/mount.ceph.8*
%{_mandir}/man8/rados.8*
%{_mandir}/man8/rbd.8*
%{_mandir}/man8/ceph-rbdnamer.8*
%{_mandir}/man8/ceph-authtool.8*
%{_mandir}/man8/ceph-debugpack.8*
%{_mandir}/man8/ceph-clsinfo.8.gz
%{_mandir}/man8/librados-config.8.gz
@ -497,16 +499,56 @@ fi
%dir %{_localstatedir}/lib/ceph/mds
%dir %{_localstatedir}/lib/ceph/bootstrap-osd
%dir %{_localstatedir}/lib/ceph/bootstrap-mds
%dir %{_localstatedir}/log/ceph/
%ghost %dir %{_localstatedir}/run/ceph/
#################################################################################
%files -n ceph-common
%defattr(-,root,root,-)
%{_bindir}/ceph
%{_bindir}/ceph-authtool
%{_bindir}/ceph-conf
%{_bindir}/ceph-dencoder
%{_bindir}/ceph-syn
%{_bindir}/ceph-crush-location
%{_bindir}/rados
%{_bindir}/rbd
%{_bindir}/ceph-post-file
%{_bindir}/ceph-brag
%{_mandir}/man8/ceph-authtool.8*
%{_mandir}/man8/ceph-conf.8*
%{_mandir}/man8/ceph-dencoder.8*
%{_mandir}/man8/ceph-syn.8*
%{_mandir}/man8/ceph-post-file.8*
%{_mandir}/man8/ceph.8*
%{_mandir}/man8/rados.8*
%{_mandir}/man8/rbd.8*
%{_datadir}/ceph/known_hosts_drop.ceph.com
%{_datadir}/ceph/id_dsa_drop.ceph.com
%{_datadir}/ceph/id_dsa_drop.ceph.com.pub
%dir %{_sysconfdir}/ceph/
%dir %{_localstatedir}/log/ceph/
%config %{_sysconfdir}/bash_completion.d/rados
%config %{_sysconfdir}/bash_completion.d/rbd
%config(noreplace) %{_sysconfdir}/ceph/rbdmap
%{_initrddir}/rbdmap
%postun -n ceph-common
# Package removal cleanup
if [ "$1" -eq "0" ] ; then
rm -rf /var/log/ceph
rm -rf /etc/ceph
fi
#################################################################################
%files fuse
%defattr(-,root,root,-)
%{_bindir}/ceph-fuse
%{_mandir}/man8/ceph-fuse.8*
%if 0%{?rhel} >= 7
%{_sbindir}/mount.fuse.ceph
%else
/sbin/mount.fuse.ceph
%endif
#################################################################################
%files -n rbd-fuse
@ -550,6 +592,7 @@ fi
%{_mandir}/man8/radosgw.8*
%{_mandir}/man8/radosgw-admin.8*
%{_sbindir}/rcceph-radosgw
%config %{_sysconfdir}/bash_completion.d/radosgw-admin
%dir %{_localstatedir}/log/radosgw/
%post radosgw
@ -611,6 +654,11 @@ fi
%files -n librbd1
%defattr(-,root,root,-)
%{_libdir}/librbd.so.*
%if 0%{?rhel} >= 7
/usr/lib/udev/rules.d/50-rbd.rules
%else
/lib/udev/rules.d/50-rbd.rules
%endif
%post -n librbd1
/sbin/ldconfig