]> git.pld-linux.org Git - packages/drbd.git/blame - drbd.spec
- files fix
[packages/drbd.git] / drbd.spec
CommitLineData
865899a0 1#
54a31074
AG
2# TODO:
3# - trigger to update drbd-8.2 config
8c0045a6
AG
4# - warning: Installed (but unpackaged) file(s) found:
5# /etc/xen/scripts/block-drbd
6# /usr/lib/ocf/resource.d/linbit/drbd
54a31074 7#
865899a0 8# Conditional build:
8a621363 9%bcond_without dist_kernel # allow non-distribution kernel
10%bcond_without kernel # don't build kernel modules
8a621363 11%bcond_without userspace # don't build userspace module
12%bcond_with verbose # verbose build (V=1)
d5b2fc9b 13%bcond_with grsec_kernel # build for kernel-grsecurity
14#
cb2a50aa
ER
15%ifarch sparc
16%undefine with_smp
17%endif
18
19%if %{without kernel}
20%undefine with_dist_kernel
21%endif
d5b2fc9b 22%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
23%define alt_kernel grsecurity
24%endif
cb2a50aa
ER
25%if "%{_alt_kernel}" != "%{nil}"
26%undefine with_userspace
27%endif
28
3c64f9c3 29%define _rel 4
cb2a50aa 30%define pname drbd
adfef6a4 31Summary: drbd is a block device designed to build high availibility clusters
281aad7e 32Summary(pl.UTF-8): drbd jest urządzeniem blokowym dla klastrów o wysokiej niezawodności
cb2a50aa 33Name: %{pname}%{_alt_kernel}
e664584d 34Version: 8.3.2
757ccdc6 35Release: %{_rel}
6fa99396 36License: GPL
adfef6a4 37Group: Base/Kernel
54a31074 38Source0: http://oss.linbit.com/drbd/8.3/%{pname}-%{version}.tar.gz
e664584d 39# Source0-md5: 8aa8f7891d397ff25b7a3f77f56d353b
cb2a50aa 40Patch0: %{pname}-Makefile.patch
9f680c6a 41Patch1: %{pname}-swab.patch
4f968136 42Patch2: %{pname}-parallel-install.patch
8c0045a6 43Patch3: %{pname}-bash-completion-install.patch
b7104f70 44URL: http://www.drbd.org/
c3f25c5f 45%if %{with userspace}
e1e6e3f2 46BuildRequires: bison
47BuildRequires: flex
c3f25c5f 48%endif
61ec3cf3 49%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
9cb96b0b 50BuildRequires: rpmbuild(macros) >= 1.379
6fa99396 51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
dcef0ff6 52
dcef0ff6 53%description
adfef6a4
JB
54drbd is a block device which is designed to build high availability
55clusters. This is done by mirroring a whole block device via (a
56dedicated) network. You could see it as a network RAID1.
6fa99396 57
1d7c6457
JR
58%description -l pl.UTF-8
59drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
60niezawodności. drbd działa jako mirroring całego urządzenia blokowego
61przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
adfef6a4 62
1d7c6457
JR
63%description -l pt_BR.UTF-8
64O DRBD é um dispositivo de bloco que é projetado para construir
65clusters de Alta Disponibilidade. Isto é feito espelhando um
66dispositivo de bloco inteiro via rede (dedicada ou não). Pode ser
67visto como um RAID 1 via rede. Este pacote contém utilitários para
03eacf93 68gerenciar dispositivos DRBD.
69
adfef6a4
JB
70%package -n drbdsetup
71Summary: Setup tool and scripts for DRBD
281aad7e
ER
72Summary(pl.UTF-8): Narzędzie konfiguracyjne i skrypty dla DRBD
73Summary(pt_BR.UTF-8): Utilitários para gerenciar dispositivos DRBD
adfef6a4 74Group: Applications/System
865899a0 75Requires(post,preun): /sbin/chkconfig
81edeba3
JK
76Requires(pre): /usr/bin/getgid
77Requires(pre): /usr/sbin/groupadd
78Requires(postun): /usr/sbin/groupdel
62f18924 79Requires: rc-scripts
81edeba3 80Provides: group(haclient)
229016ae 81Conflicts: drbdsetup24
3f109fc6 82Obsoletes: drbdsetup8
adfef6a4
JB
83
84%description -n drbdsetup
85Setup tool and init scripts for DRBD.
86
1d7c6457
JR
87%description -n drbdsetup -l pl.UTF-8
88Narzędzie konfiguracyjne i skrypty startowe dla DRBD.
dcef0ff6 89
75784242 90%package -n kernel%{_alt_kernel}-block-drbd
2befa262 91Summary: Kernel module with drbd - a block device designed to build high availibility clusters
281aad7e 92Summary(pl.UTF-8): Moduł jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
757ccdc6 93Release: %{_rel}@%{_kernel_ver_str}
5a6d72e4 94Group: Base/Kernel
9cb96b0b 95%{?with_dist_kernel:%requires_releq_kernel}
865899a0 96Requires(post,postun): /sbin/depmod
8bbec5cd 97Requires: drbdsetup
5a6d72e4 98
75784242 99%description -n kernel%{_alt_kernel}-block-drbd
5a6d72e4 100drbd is a block device which is designed to build high availability
101clusters. This is done by mirroring a whole block device via (a
102dedicated) network. You could see it as a network RAID1.
103
1d7c6457
JR
104%description -n kernel%{_alt_kernel}-block-drbd -l pl.UTF-8
105drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
106niezawodności. drbd działa jako mirroring całego urządzenia blokowego
107przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
5a6d72e4 108
f20d65a6 109%package -n bash-completion-drbd
110Summary: bash-completion for drbd
111Summary(pl.UTF-8): Bashowe uzupełnianie poleceń dla drbd
112Group: Applications/Shells
113Requires: bash-completion
114
115%description -n bash-completion-drbd
116This package provides bash-completion for drbd.
117
118%description -n bash-completion-drbd -l pl.UTF-8
119Ten pakiet dostarcza bashowe uzupełnianie poleceń dla drbd.
120
8c0045a6
AG
121%package -n drbd-udev
122Summary: udev rules for drbd kernel module
123Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla drbd
8c0045a6
AG
124Group: Base/Kernel
125Requires: udev-core
126
127%description -n drbd-udev
128udev rules for drbd kernel module.
129
130%description -n drbd-udev -l pl.UTF-8
131Reguły udev dla modułu jądra Linuksa dla drbd.
132
dcef0ff6 133%prep
cb2a50aa 134%setup -q -n %{pname}-%{version}
6ed4faa5 135%patch0 -p1
9f680c6a 136%patch1 -p1
299e13a7 137%patch2 -p1
8c0045a6 138%patch3 -p1
6fa99396 139
dcef0ff6 140%build
2a3f4807
AM
141%if %{with userspace}
142%{__make} tools \
6ed4faa5 143 KVER=dummy \
63833c46 144 CC="%{__cc}" \
6ed4faa5 145 OPTCFLAGS="%{rpmcflags}" \
146 LDFLAGS="%{rpmldflags}"
adfef6a4 147%endif
2a3f4807
AM
148
149%if %{with kernel}
150cd drbd
151sed -i -e 's#$(CONFIG_BLK_DEV_DRBD)#m#g' Makefile-2.6
152ln -sf Makefile-2.6 Makefile
153# kernel module(s)
8a8cb102 154%build_kernel_modules -m drbd
adfef6a4 155%endif
6fa99396 156
dcef0ff6 157%install
6fa99396 158rm -rf $RPM_BUILD_ROOT
a383bc65 159install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
adfef6a4 160 $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d}
dcef0ff6 161
2a3f4807 162%if %{with kernel}
7de43e0a 163%install_kernel_modules -m drbd/drbd -d kernel/drivers/block
2a3f4807 164%endif
adfef6a4 165
2a3f4807 166%if %{with userspace}
f20d65a6 167%{__make} install -C scripts \
f6e49cad 168 DRBD_ENABLE_UDEV=1 \
f20d65a6 169 PREFIX=$RPM_BUILD_ROOT
adfef6a4 170install scripts/drbd $RPM_BUILD_ROOT/etc/rc.d/init.d
f20d65a6 171rm -rf $RPM_BUILD_ROOT/etc/init.d
172install user/{drbdadm,drbdmeta,drbdsetup} $RPM_BUILD_ROOT/sbin
dcef0ff6 173
2a3f4807
AM
174install documentation/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
175install documentation/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
176%endif
adfef6a4 177
6fa99396 178%clean
179rm -rf $RPM_BUILD_ROOT
180
75784242 181%post -n kernel%{_alt_kernel}-block-drbd
50595a60 182%depmod %{_kernel_ver}
5a6d72e4 183
75784242 184%postun -n kernel%{_alt_kernel}-block-drbd
50595a60 185%depmod %{_kernel_ver}
adfef6a4 186
81edeba3
JK
187%pre -n drbdsetup
188%groupadd -g 60 haclient
189
adfef6a4 190%post -n drbdsetup
850fc8e7 191/sbin/chkconfig --add drbd
87d17891 192%service drbd restart
adfef6a4
JB
193
194%preun -n drbdsetup
850fc8e7 195if [ "$1" = "0" ]; then
87d17891 196 %service drbd stop
850fc8e7 197 /sbin/chkconfig --del drbd
198fi
199
81edeba3
JK
200%postun -n drbdsetup
201if [ "$1" = "0" ]; then
202 %groupremove haclient
203fi
204
205
2a3f4807 206%if %{with userspace}
850fc8e7 207%files -n drbdsetup
208%defattr(644,root,root,755)
81edeba3
JK
209%attr(755,root,root) /sbin/drbdadm
210%attr(2754,root,haclient) /sbin/drbdsetup
211%attr(2754,root,haclient) /sbin/drbdmeta
ea0a006e 212%attr(754,root,root) /etc/rc.d/init.d/drbd
a915ddd5 213%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
8c0045a6 214%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbdupper
a383bc65 215%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
850fc8e7 216%{_mandir}/man[58]/*
f20d65a6 217%dir /usr/lib/drbd
218%attr(755,root,root) /usr/lib/drbd/*
8c0045a6 219%attr(755,root,root) %{_sbindir}/drbd-overview
f20d65a6 220
221%files -n bash-completion-drbd
222%defattr(644,root,root,755)
223/etc/bash_completion.d/drbdadm
8c0045a6
AG
224
225%files -n drbd-udev
226%defattr(644,root,root,755)
227%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/65-drbd.rules
2a3f4807 228%endif
adfef6a4 229
2a3f4807 230%if %{with kernel}
75784242 231%files -n kernel%{_alt_kernel}-block-drbd
6fa99396 232%defattr(644,root,root,755)
ac033d95 233%doc ChangeLog README
3c64f9c3 234/lib/modules/%{_kernel_ver}/kernel/drivers/block/drbd.ko*
2a3f4807 235%endif
This page took 0.13844 seconds and 4 git commands to generate.