]> git.pld-linux.org Git - packages/drbd.git/blobdiff - drbd.spec
- added br udev-core, updated todo
[packages/drbd.git] / drbd.spec
index 75fd6a07b5cd27b97b5586d6716bc8d98a01f00f..8639542a618c508a55be466f0729ce2842dec85b 100644 (file)
--- a/drbd.spec
+++ b/drbd.spec
@@ -3,50 +3,22 @@
 #  - trigger to update drbd-8.2 config
 #  - warning: Installed (but unpackaged) file(s) found:
 #     /etc/xen/scripts/block-drbd
-#     /usr/lib/ocf/resource.d/linbit/drbd
+#  - add some provides/requires to keep in sync with kernel releases
+#    Linux 3.0.8 got drbd module version 8.3.11
 #
-# Conditional build:
-%bcond_without dist_kernel     # allow non-distribution kernel
-%bcond_without kernel          # don't build kernel modules
-%bcond_without userspace       # don't build userspace module
-%bcond_with    verbose         # verbose build (V=1)
-%bcond_with    grsec_kernel    # build for kernel-grsecurity
-#
-%ifarch sparc
-%undefine      with_smp
-%endif
-
-%if %{without kernel}
-%undefine      with_dist_kernel
-%endif
-%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
-%define        alt_kernel      grsecurity
-%endif
-%if "%{_alt_kernel}" != "%{nil}"
-%undefine      with_userspace
-%endif
-
-%define                _rel    4
-%define                pname   drbd
+
 Summary:       drbd is a block device designed to build high availibility clusters
 Summary(pl.UTF-8):     drbd jest urządzeniem blokowym dla klastrów o wysokiej niezawodności
-Name:          %{pname}%{_alt_kernel}
-Version:       8.3.2
-Release:       %{_rel}
-License:       GPL
+Name:          drbd
+Version:       8.4.0
+Release:       2
+License:       GPL v2+
 Group:         Base/Kernel
-Source0:       http://oss.linbit.com/drbd/8.3/%{pname}-%{version}.tar.gz
-# Source0-md5: 8aa8f7891d397ff25b7a3f77f56d353b
-Patch0:                %{pname}-Makefile.patch
-Patch1:                %{pname}-swab.patch
-Patch2:                %{pname}-parallel-install.patch
-Patch3:                %{pname}-bash-completion-install.patch
+Source0:       http://oss.linbit.com/drbd/8.4/%{name}-%{version}.tar.gz
+# Source0-md5: 8519246dff4e2de14595d71abcd54db4
 URL:           http://www.drbd.org/
-%if %{with userspace}
 BuildRequires: bison
 BuildRequires: flex
-%endif
-%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRequires: rpmbuild(macros) >= 1.379
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -78,8 +50,8 @@ Requires(pre):        /usr/sbin/groupadd
 Requires(postun):      /usr/sbin/groupdel
 Requires:      rc-scripts
 Provides:      group(haclient)
-Conflicts:     drbdsetup24
 Obsoletes:     drbdsetup8
+Conflicts:     drbdsetup24
 
 %description -n drbdsetup
 Setup tool and init scripts for DRBD.
@@ -87,24 +59,14 @@ Setup tool and init scripts for DRBD.
 %description -n drbdsetup -l pl.UTF-8
 Narzędzie konfiguracyjne i skrypty startowe dla DRBD.
 
-%package -n kernel%{_alt_kernel}-block-drbd
-Summary:       Kernel module with drbd - a block device designed to build high availibility clusters
-Summary(pl.UTF-8):     Moduł jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
-Release:       %{_rel}@%{_kernel_ver_str}
-Group:         Base/Kernel
-%{?with_dist_kernel:%requires_releq_kernel}
-Requires(post,postun): /sbin/depmod
-Requires:      drbdsetup
+%package -n resource-agents-drbd
+Summary:       DRBD resource agents for a cluster setup
+Group:         Daemons
+Requires:      heartbeat
+Requires:      resource-agents
 
-%description -n kernel%{_alt_kernel}-block-drbd
-drbd is a block device which is designed to build high availability
-clusters. This is done by mirroring a whole block device via (a
-dedicated) network. You could see it as a network RAID1.
-
-%description -n kernel%{_alt_kernel}-block-drbd -l pl.UTF-8
-drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
-niezawodności. drbd działa jako mirroring całego urządzenia blokowego
-przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
+%description -n resource-agents-drbd
+DRBD resource agents for a cluster setup.
 
 %package -n bash-completion-drbd
 Summary:       bash-completion for drbd
@@ -122,6 +84,7 @@ Ten pakiet dostarcza bashowe uzupełnianie poleceń dla drbd.
 Summary:       udev rules for drbd kernel module
 Summary(pl.UTF-8):     Reguły udev dla modułów jądra Linuksa dla drbd
 Group:         Base/Kernel
+BuildRequires: udev-core
 Requires:      udev-core
 
 %description -n drbd-udev
@@ -131,59 +94,36 @@ udev rules for drbd kernel module.
 Reguły udev dla modułu jądra Linuksa dla drbd.
 
 %prep
-%setup -q -n %{pname}-%{version}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+%setup -q
 
 %build
-%if %{with userspace}
+%configure
 %{__make} tools \
        KVER=dummy \
        CC="%{__cc}" \
        OPTCFLAGS="%{rpmcflags}" \
        LDFLAGS="%{rpmldflags}"
-%endif
-
-%if %{with kernel}
-cd drbd
-sed -i -e 's#$(CONFIG_BLK_DEV_DRBD)#m#g' Makefile-2.6
-ln -sf Makefile-2.6 Makefile
-# kernel module(s)
-%build_kernel_modules -m drbd
-%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
-       $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d}
+       $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d} \
+       $RPM_BUILD_ROOT/var/lib/drbd
 
-%if %{with kernel}
-%install_kernel_modules -m drbd/drbd -d kernel/drivers/block
-%endif
-
-%if %{with userspace}
 %{__make} install -C scripts \
        DRBD_ENABLE_UDEV=1 \
-       PREFIX=$RPM_BUILD_ROOT
+       DESTDIR=$RPM_BUILD_ROOT
+
 install scripts/drbd $RPM_BUILD_ROOT/etc/rc.d/init.d
 rm -rf $RPM_BUILD_ROOT/etc/init.d
 install user/{drbdadm,drbdmeta,drbdsetup} $RPM_BUILD_ROOT/sbin
 
 install documentation/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
 install documentation/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -n kernel%{_alt_kernel}-block-drbd
-%depmod %{_kernel_ver}
-
-%postun -n kernel%{_alt_kernel}-block-drbd
-%depmod %{_kernel_ver}
-
 %pre -n drbdsetup
 %groupadd -g 60 haclient
 
@@ -202,21 +142,27 @@ if [ "$1" = "0" ]; then
        %groupremove haclient
 fi
 
-
-%if %{with userspace}
 %files -n drbdsetup
 %defattr(644,root,root,755)
 %attr(755,root,root) /sbin/drbdadm
-%attr(2754,root,haclient) /sbin/drbdsetup
-%attr(2754,root,haclient) /sbin/drbdmeta
+%attr(4754,root,haclient) /sbin/drbdsetup
+%attr(4754,root,haclient) /sbin/drbdmeta
 %attr(754,root,root) /etc/rc.d/init.d/drbd
-%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
-%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbdupper
+%dir %{_sysconfdir}/drbd.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.d/global_common.conf
 %{_mandir}/man[58]/*
 %dir /usr/lib/drbd
 %attr(755,root,root) /usr/lib/drbd/*
 %attr(755,root,root) %{_sbindir}/drbd-overview
+%attr(750,root,root) %dir /var/lib/drbd
+
+%files -n resource-agents-drbd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
+%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbdupper
+%dir /usr/lib/ocf/resource.d/linbit
+%attr(755,root,root) /usr/lib/ocf/resource.d/linbit/*
 
 %files -n bash-completion-drbd
 %defattr(644,root,root,755)
@@ -225,11 +171,3 @@ fi
 %files -n drbd-udev
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/65-drbd.rules
-%endif
-
-%if %{with kernel}
-%files -n kernel%{_alt_kernel}-block-drbd
-%defattr(644,root,root,755)
-%doc ChangeLog README
-/lib/modules/%{_kernel_ver}/kernel/drivers/block/drbd.ko*
-%endif
This page took 0.039324 seconds and 4 git commands to generate.