]> git.pld-linux.org Git - packages/ceph.git/blobdiff - ceph.spec
- release 2 (by relup.sh)
[packages/ceph.git] / ceph.spec
index 20604f4ac0cbdaea63933469382a546f5af792f1..f1352b6fbda5151f377c9ff9316c1eb97e7e9654 100644 (file)
--- a/ceph.spec
+++ b/ceph.spec
@@ -1,7 +1,12 @@
-# TODO: accelio libxio (BR: accelio libibverbs-devel librdmacm-devel
+# TODO:
+#      - proper init scripts if non-systemd boot is too be supported
+#         (upstream scripts seem overcomplicated and hardly useful)
+#      - run as non-root user
+#
 #
 # Conditional build:
 %bcond_without java            # Java binding
+%bcond_with    accelio         # Accelio transport support
 %bcond_with    kinetic         # Kinetic storage support [needs update for internal API changes]
 %bcond_with    rocksdb         # RocksDB storage support [needs update for internal API changes]
 %bcond_with    zfs             # ZFS support
 Summary:       User space components of the Ceph file system
 Summary(pl.UTF-8):     Działające w przestrzeni użytkownika elementy systemu plików Ceph
 Name:          ceph
-Version:       0.94.1
-Release:       1
+Version:       0.94.3
+Release:       2
 License:       LGPL v2.1 (libraries), GPL v2 (some programs)
 Group:         Base
 Source0:       http://ceph.com/download/%{name}-%{version}.tar.bz2
-# Source0-md5: e4a625aa2c91fe5d3f0c62faa4716ca2
+# Source0-md5: ccbaba6cad56cf71719661a0cdcc6ad6
+Source1:       ceph.sysconfig
+# based on files from https://github.com/ceph/ceph/tree/master/systemd
+Source10:      cephctl
+Source11:      ceph-mds@.service
+Source12:      ceph-mon@.service
+Source13:      ceph-osd@.service
+Source14:      ceph.target
+Source15:      ceph.tmpfiles
 Patch0:                %{name}-init-fix.patch
 Patch1:                %{name}.logrotate.patch
 Patch2:                %{name}-link.patch
 Patch3:                %{name}-ac.patch
 URL:           http://ceph.com/
+%{?with_accelio:BuildRequires: accelio-devel}
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake
 %{?with_babeltrace:BuildRequires:      babeltrace-devel}
@@ -46,7 +60,9 @@ BuildRequires:        libatomic_ops
 BuildRequires: libblkid-devel >= 2.17
 BuildRequires: libedit-devel >= 2.11
 BuildRequires: libfuse-devel
+%{?with_accelio:BuildRequires: libibverbs-devel}
 BuildRequires: libltdl-devel
+%{?with_accelio:BuildRequires: librdmacm-devel}
 BuildRequires: libs3-devel
 BuildRequires: libstdc++-devel
 %{?with_tcmalloc:BuildRequires:        libtcmalloc-devel}
@@ -58,7 +74,7 @@ BuildRequires:        perl-base
 BuildRequires: pkgconfig
 BuildRequires: python >= 1:2.4
 %{?with_rocksdb:BuildRequires: rocksdb-devel}
-BuildRequires: rpmbuild(macros) >= 1.228
+BuildRequires: rpmbuild(macros) >= 1.671
 BuildRequires: snappy-devel
 BuildRequires: udev-devel
 BuildRequires: xfsprogs-devel
@@ -69,6 +85,8 @@ BuildRequires:        yasm
 Requires(post,preun):  /sbin/chkconfig
 Requires(preun):       rc-scripts
 Requires:      %{name}-libs = %{version}-%{release}
+Requires:      python-%{name} = %{version}-%{release}
+Requires:      systemd-units >= 38
 Obsoletes:     gcephtool
 Obsoletes:     hadoop-cephfs
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -225,14 +243,16 @@ Agenci OCF do monitorowania procesów Cepha.
        --with-system-leveldb \
        --with-system-libs3 \
        %{?with_java:--enable-cephfs-java --with-jdk-dir=%{_jvmdir}/java} \
-       --disable-silent-rules
+       --disable-silent-rules \
+       %{?with_accelio:--enable-xio}
 
 %{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/ceph/tmp,log/ceph/stat} \
-       $RPM_BUILD_ROOT%{_sysconfdir}/{ceph,bash_completion.d,logrotate.d,rc.d/init.d}
+install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/ceph/{tmp,mon,osd,mds},log/ceph/stat,run/ceph} \
+       $RPM_BUILD_ROOT%{_sysconfdir}/{ceph,bash_completion.d,logrotate.d,rc.d/init.d,sysconfig} \
+       $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir},/etc/systemd/system/ceph.target.wants}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -241,6 +261,12 @@ install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/ceph/tmp,log/ceph/stat} \
 install -p src/init-ceph $RPM_BUILD_ROOT/etc/rc.d/init.d/ceph
 install -p src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph
 
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/ceph
+install %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} $RPM_BUILD_ROOT%{systemdunitdir}
+ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/ceph.service
+install %{SOURCE15} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ceph.conf
+
 # loadable modules
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ceph/erasure-code/*.{a,la}
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/rados-classes/*.{a,la}
@@ -260,11 +286,18 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/chkconfig --add ceph
 %service ceph restart
 
+# actual services are to be enabled on cluster deployment
+%systemd_post %{name}.target
+
 %preun
 if [ "$1" = "0" ] ; then
        %service ceph stop
        /sbin/chkconfig --del ceph
 fi
+%systemd_preun %{name}.target
+
+%postun
+%systemd_reload
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
@@ -277,6 +310,14 @@ fi
 # COPYING specifies licenses of individual parts
 %doc AUTHORS COPYING README src/sample.ceph.conf src/sample.fetch_config
 %attr(754,root,root) /etc/rc.d/init.d/ceph
+%config(noreplace) /etc/sysconfig/ceph
+%dir /etc/systemd/system/ceph.target.wants
+%{systemdunitdir}/ceph-mds@.service
+%{systemdunitdir}/ceph-mon@.service
+%{systemdunitdir}/ceph-osd@.service
+%{systemdunitdir}/ceph.service
+%{systemdunitdir}/ceph.target
+%{systemdtmpfilesdir}/ceph.conf
 %dir %{_sysconfdir}/ceph
 %attr(755,root,root) %{_bindir}/ceph
 %attr(755,root,root) %{_bindir}/ceph-authtool
@@ -296,6 +337,7 @@ fi
 %attr(755,root,root) %{_bindir}/ceph-rest-api
 %attr(755,root,root) %{_bindir}/ceph-run
 %attr(755,root,root) %{_bindir}/ceph-syn
+%attr(755,root,root) %{_bindir}/cephctl
 %attr(755,root,root) %{_bindir}/cephfs
 %attr(755,root,root) %{_bindir}/cephfs-journal-tool
 %attr(755,root,root) %{_bindir}/cephfs-table-tool
@@ -367,6 +409,7 @@ fi
 %{_mandir}/man8/ceph-authtool.8*
 %{_mandir}/man8/ceph-clsinfo.8*
 %{_mandir}/man8/ceph-conf.8*
+%{_mandir}/man8/ceph-create-keys.8*
 %{_mandir}/man8/ceph-debugpack.8*
 %{_mandir}/man8/ceph-dencoder.8*
 %{_mandir}/man8/ceph-deploy.8*
@@ -395,8 +438,12 @@ fi
 %{_mandir}/man8/rbd-replay-prep.8*
 
 %dir %{_localstatedir}/lib/ceph
+%dir %{_localstatedir}/lib/ceph/mds
+%dir %{_localstatedir}/lib/ceph/mon
+%dir %{_localstatedir}/lib/ceph/osd
 %dir %{_localstatedir}/lib/ceph/tmp
 %dir %{_localstatedir}/log/ceph
+%dir %{_localstatedir}/run/ceph
 
 %files libs
 %defattr(644,root,root,755)
This page took 0.03337 seconds and 4 git commands to generate.