]> git.pld-linux.org Git - packages/lvm2.git/blame - lvm2.spec
- updated to 2.02.67
[packages/lvm2.git] / lvm2.spec
CommitLineData
e3a928dc 1# TODO
e3a928dc 2# - vgscan --ignorelocking failure creates /var/lock/lvm (even if /var is not yet mounted)
1b67453e 3#
99958222 4# Conditional build:
c70b42f6
JR
5%bcond_without initrd # don't build initrd version
6%bcond_with uClibc # link initrd version with uClibc
7%bcond_without dietlibc # link initrd version with dietlibc
8%bcond_with glibc # link initrd version with static glibc
9%bcond_without clvmd # don't build clvmd
10%bcond_without selinux # disable SELinux
11
4a323c26 12%ifarch sparc64 sparc
c70b42f6 13%define with_glibc 1
66800f6a 14%endif
c70b42f6
JR
15
16# if one of the *libc is enabled disable default dietlibc
17%if %{with dietlibc} && %{with uClibc}
18%undefine with_dietlibc
19%endif
20
21%if %{with glibc} && %{with dietlibc}
22%undefine with_dietlibc
23%endif
24
5672aa67 25Summary: The new version of Logical Volume Manager for Linux
6536e848 26Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa
7e72c866 27Name: lvm2
86418c14 28Version: 2.02.67
ebbcde93 29Release: 1
1738b891 30License: GPL v2
7e72c866 31Group: Applications/System
dc5d0e77 32Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
86418c14 33# Source0-md5: 088d037e77660f48cd1591e91ed59d20
bf171b20
JR
34Source1: %{name}-initramfs-hook
35Source2: %{name}-initramfs-local-top
7210a095 36Patch0: %{name}-selinux.patch
c70b42f6 37Patch1: %{name}-diet.patch
9a00e98a 38Patch2: device-mapper-dmsetup-export.patch
dc5d0e77 39URL: http://sources.redhat.com/lvm2/
7e72c866
JR
40BuildRequires: autoconf
41BuildRequires: automake
0dc2b8f2 42%{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
e4a12efb 43%{?with_selinux:BuildRequires: libsepol-devel}
3657a56d 44BuildRequires: pkgconfig
bd71c1b4 45BuildRequires: rpmbuild(macros) >= 1.213
1ccfba6c 46%if %{with initrd}
fa9e8aeb
AM
47%if %{with dietlibc}
48BuildRequires: dietlibc-static >= 2:0.31-5
49BuildConflicts: device-mapper-dietlibc
50%endif
c70b42f6
JR
51%{?with_glibc:BuildRequires: glibc-static}
52%{?with_uClibc:BuildRequires: uClibc-static >= 2:0.9.29}
1ccfba6c 53%endif
c97b4c11 54%if %{with clvmd}
1b67453e 55BuildRequires: cman-devel >= 1.0
4c78aede 56BuildRequires: dlm-devel >= 1.0-0.pre21.2
1b67453e 57%endif
260d6858 58BuildRequires: ncurses-devel
33d5c7d0 59BuildRequires: readline-devel
b167057a 60Requires: device-mapper >= %{version}-%{release}
1b67453e 61%if %{with clvmd}
ed044ab4 62Requires: cman-libs >= 1.0
b678d191 63Requires: dlm >= 1.0-0.pre21.2
1b67453e 64%endif
0dc2b8f2 65%{?with_selinux:Requires: libselinux >= 1.10}
1534f04d
ER
66# doesn't work with 2.4 kernels
67Requires: uname(release) >= 2.6
25b6b609 68Obsoletes: lvm
7e72c866
JR
69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71%define _sbindir /sbin
9ab13f24 72%define _usrsbindir /usr/sbin
7e72c866 73
0fbd6aae
ER
74# changing CFLAGS in the middle confuses confcache
75%undefine configure_cache
9a00e98a
ER
76# can't work with diet
77%undefine with_ccache
0fbd6aae 78
c70b42f6
JR
79# for some reason known only to rpm there must be "\\|" not "\|" here
80%define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
81%define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch}
82
7e72c866
JR
83%description
84This package includes a number of utilities for creating, checking,
85and repairing logical volumes.
86
68d45726
JR
87%description -l pl.UTF-8
88Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania
89logicznych wolumenów dyskowych (LVM2).
7e72c866 90
7e72c866 91%package initrd
5672aa67 92Summary: The new version of Logical Volume Manager for Linux - initrd version
6536e848 93Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - wersja dla initrd
7e72c866 94Group: Base
16ddcbd0 95Conflicts: geninitrd < 10000.18
7e72c866
JR
96
97%description initrd
98This package includes a number of utilities for creating, checking,
99and repairing logical volumes - staticaly linked for initrd.
100
68d45726
JR
101%description initrd -l pl.UTF-8
102Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania
103logicznych wolumenów dyskowych (LVM2) - statycznie skonsolidowane na
7e72c866
JR
104potrzeby initrd.
105
b167057a
AM
106%package -n device-mapper
107Summary: Userspace support for the device-mapper
108Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika
109Group: Base
110
111%description -n device-mapper
112The goal of this driver is to support volume management. The driver
113enables the definition of new block devices composed of ranges of
114sectors of existing devices. This can be used to define disk
115partitions - or logical volumes. This light-weight kernel component
116can support user-space tools for logical volume management.
117
118%description -n device-mapper -l pl.UTF-8
119Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik
120włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów
121sektorów na istniejących urządzeniach. Może to być wykorzystane do
122definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
123składnik jądra może wspierać działające w przestrzeni użytkownika
124narzędzia do zarządzania logicznymi wolumenami.
125
126%package -n device-mapper-devel
127Summary: Header files and development documentation for %{name}
128Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do %{name}
129Group: Development/Libraries
130Requires: device-mapper = %{version}-%{release}
131%if %{with selinux}
132Requires: libselinux-devel
133Requires: libsepol-devel
134%endif
135
136%description -n device-mapper-devel
137Header files and development documentation for %{name}.
138
139%description -n device-mapper-devel -l pl.UTF-8
140Pliki nagłówkowe i dokumentacja do %{name}.
141
142%package -n device-mapper-static
143Summary: Static devmapper library
144Summary(pl.UTF-8): Statyczna biblioteka devmapper
145License: LGPL v2.1
146Group: Development/Libraries
dc900ced 147Requires: device-mapper-devel = %{version}-%{release}
b167057a
AM
148
149%description -n device-mapper-static
150Static devmapper library.
151
152%description -n device-mapper-static -l pl.UTF-8
153Statyczna biblioteka devmapper.
154
c70b42f6
JR
155%package -n device-mapper-dietlibc
156Summary: Static devmapper library built with dietlibc
157Summary(pl.UTF-8): Statyczna biblioteka devmapper zbudowana z dietlibc
158License: LGPL v2.1
159Group: Development/Libraries
160Requires: device-mapper-devel = %{version}-%{release}
161
162%description -n device-mapper-dietlibc
163Static devmapper library built with dietlibc.
164
165%description -n device-mapper-dietlibc -l pl.UTF-8
166Statyczna biblioteka devmapper zbudowana z dietlibc.
167
4a323c26
JR
168%package -n device-mapper-initrd
169Summary: Userspace support for the device-mapper - initrd version
170Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - wersja dla initrd
171Group: Base
172Obsoletes: device-mapper-initrd-devel
1f7434e8 173Conflicts: geninitrd < 10000.10
4a323c26
JR
174
175%description -n device-mapper-initrd
176The goal of this driver is to support volume management. The driver
177enables the definition of new block devices composed of ranges of
178sectors of existing devices. This can be used to define disk
179partitions - or logical volumes. This light-weight kernel component
180can support user-space tools for logical volume management.
181
182This package contains dmsetup program linked staticaly for use in
183initrd.
184
185%description -n device-mapper-initrd -l pl.UTF-8
186Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik
187włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów
188sektorów na istniejących urządzeniach. Może to być wykorzystane do
189definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
190składnik jądra może wspierać działające w przestrzeni użytkownika
191narzędzia do zarządzania logicznymi wolumenami.
192
193Ten pakiet zawiera program dmsetup skonsolidowany statycznie na
194potrzeby initrd.
195
906ac01a
JR
196%package initramfs
197Summary: The new version of Logical Volume Manager for Linux - support scripts for initramfs-tools
198Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - skrypty dla initramfs-tools
199Group: Base
200Requires: %{name} = %{version}-%{release}
201Requires: initramfs-tools
202
203%description initramfs
3657a56d 204The new version of Logical Volume Manager for Linux - support scripts
205for initramfs-tools.
906ac01a
JR
206
207%description initramfs -l pl.UTF-8
208Nowa wersja Logical Volume Managera dla Linuksa - skrypty dla
209initramfs-tools.
210
7e72c866 211%prep
ec2de926 212%setup -q -n LVM2.%{version}
7210a095 213%{?with_selinux:%patch0 -p1}
c70b42f6 214%patch1 -p1
9a00e98a 215%patch2 -p1
b167057a 216
7e72c866 217%build
242ffb9a 218cp -f /usr/share/automake/config.sub autoconf
7e72c866
JR
219%{__aclocal}
220%{__autoconf}
221
99958222 222%if %{with initrd}
9bdab2f4 223%configure \
69688a46 224 %{?with_uClibc:CC="%{_target_cpu}-uclibc-gcc"} \
c70b42f6 225 %{?with_dietlibc:CC="diet %{__cc}"} \
a5702977 226 ac_cv_lib_dl_dlopen=no \
4c78aede 227 %{?debug:--enable-debug} \
e6cf1072 228 --with-optimisation="%{rpmcflags} -Os" \
9bdab2f4 229 --enable-static_link \
69688a46 230 --with-lvm1=internal \
c70b42f6 231 --%{?with_glibc:en}%{!?with_glibc:dis}able-selinux \
260d6858 232 --disable-readline \
ef3dbc1a 233 --disable-nls
c70b42f6 234# glibc version links with normal static libdevicemapper which has selinux enabled
260d6858 235# and we need to keep these in sync between device-mapper and lvm2
4c78aede
ER
236
237%{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h
ec2de926 238
c7bbf0c8
AM
239%{__make} -j1 -C include
240%{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB=
241%{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB=
e53c4d4f 242%{__make} -j1 -C tools dmsetup.static lvm.static DIETLIBC_LIBS="-lcompat"
69688a46 243mv -f tools/lvm.static initrd-lvm
4a323c26 244mv -f tools/dmsetup.static initrd-dmsetup
c70b42f6 245%{?with_dietlibc:mv -f libdm/ioctl/libdevmapper.a diet-libdevmapper.a}
9bdab2f4 246%{__make} clean
7e72c866
JR
247%endif
248
9d0d1d5f 249%configure \
b167057a 250 --with-usrlibdir=%{_libdir} \
4c78aede 251 %{?debug:--enable-debug} \
b167057a 252 --with-optimisation="%{rpmcflags}" \
607d2229
AM
253 --enable-readline \
254 --enable-fsadm \
b167057a
AM
255 --enable-cmdlib \
256 --enable-dmeventd \
257 --enable-pkgconfig \
ed044ab4 258 %{?with_clvmd:--with-clvmd=cman} \
607d2229
AM
259 --with-lvm1=internal \
260 --with-pool=internal \
3852b0e2 261 --with-cluster=internal \
607d2229 262 --with-snapshots=internal \
0dc2b8f2 263 --with-mirrors=internal \
b167057a 264 --with-interface=ioctl \
0dc2b8f2 265 %{!?with_selinux:--disable-selinux}
b167057a 266%{__make} -j1
c7bbf0c8 267%{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a
7e72c866
JR
268
269%install
270rm -rf $RPM_BUILD_ROOT
906ac01a
JR
271install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm} \
272 $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-top}
c70b42f6 273%{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
7e72c866
JR
274
275%{__make} install \
276 DESTDIR=$RPM_BUILD_ROOT \
1ccfba6c
AM
277 OWNER="" \
278 GROUP=""
7e72c866 279
b167057a
AM
280mv $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
281for lib in $RPM_BUILD_ROOT/%{_lib}/lib*.so.*; do
282 lib=$(echo $lib | sed -e "s#$RPM_BUILD_ROOT##g")
283 slib=$(basename $lib | sed -e 's#\.so\..*#.so#g')
284 ln -sf $lib $RPM_BUILD_ROOT%{_libdir}/$slib
285done
286
1cfc154f
JR
287touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf
288
88c67b5b
JR
289%if %{with initrd}
290install -d $RPM_BUILD_ROOT%{_libdir}/initrd
291install initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm
292install initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup
7e72c866 293
c70b42f6 294%{?with_dietlibc:install diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a}
1306038e 295%endif
c70b42f6 296
906ac01a
JR
297install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/lvm2
298install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/lvm2
299
c7bbf0c8 300install libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
b167057a 301
7e72c866
JR
302%clean
303rm -rf $RPM_BUILD_ROOT
304
b167057a
AM
305%post -n device-mapper -p /sbin/ldconfig
306%postun -n device-mapper -p /sbin/ldconfig
307
7e72c866
JR
308%files
309%defattr(644,root,root,755)
e6ac7970 310%doc README WHATS_NEW doc/*
86418c14
JB
311%attr(755,root,root) %{_sbindir}/fsadm
312%attr(755,root,root) %{_sbindir}/lv*
313%attr(755,root,root) %{_sbindir}/pv*
314%attr(755,root,root) %{_sbindir}/vg*
1ccc459a 315%{?with_clvmd:%attr(755,root,root) %{_usrsbindir}/clvmd}
86418c14
JB
316%{_mandir}/man5/lvm.conf.5*
317%{?with_clvmd:%{_mandir}/man8/clvmd.8*}
318%{_mandir}/man8/fsadm.8*
319%{_mandir}/man8/lv*.8*
320%{_mandir}/man8/pv*.8*
321%{_mandir}/man8/vg*.8*
99958222 322%attr(750,root,root) %dir %{_sysconfdir}/lvm
2316bf4d 323%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
7e72c866 324
b167057a
AM
325%files -n device-mapper
326%defattr(644,root,root,755)
327%doc *_DM
328%attr(755,root,root) %{_sbindir}/dmeventd
329%attr(755,root,root) %{_sbindir}/dmsetup
330%attr(755,root,root) /%{_lib}/libdevmapper*.so.*.*
331%attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.*
1306038e
AM
332%dir %{_libdir}/device-mapper
333%attr(755,root,root) %{_libdir}/device-mapper/*.so
b167057a
AM
334%{_mandir}/man8/dmsetup.8*
335
336%files -n device-mapper-devel
337%defattr(644,root,root,755)
338%attr(755,root,root) %{_libdir}/libdevmapper*.so
339%attr(755,root,root) %{_libdir}/liblvm2cmd.so
340%{_includedir}/libdevmapper*.h
341%{_includedir}/lvm2cmd.h
342%{_pkgconfigdir}/devmapper*.pc
343
344%files -n device-mapper-static
345%defattr(644,root,root,755)
346%{_libdir}/libdevmapper*.a
347
1306038e 348%if %{with initrd}
c70b42f6
JR
349%if %{with dietlibc}
350%files -n device-mapper-dietlibc
351%defattr(644,root,root,755)
352%{dietlibdir}/libdevmapper.a
353%endif
354
4a323c26
JR
355%files -n device-mapper-initrd
356%defattr(644,root,root,755)
88c67b5b 357%attr(755,root,root) %{_libdir}/initrd/dmsetup
4a323c26 358
7e72c866
JR
359%files initrd
360%defattr(644,root,root,755)
88c67b5b 361%attr(755,root,root) %{_libdir}/initrd/lvm
7e72c866 362%endif
906ac01a
JR
363
364%files initramfs
365%defattr(644,root,root,755)
366%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/lvm2
367%attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/lvm2
This page took 0.108385 seconds and 4 git commands to generate.