]> git.pld-linux.org Git - packages/lvm2.git/blame - lvm2.spec
- updated to 2.02.130
[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)
5f0ee085 3# - --with-replicators (=internal/shared/none, default is none)?
1b67453e 4#
99958222 5# Conditional build:
54ec8eef
JB
6# - initrf stuff
7%bcond_with initrd # build initrd version
fe052975
JR
8%bcond_without uClibc # link initrd version with uClibc
9%bcond_with dietlibc # link initrd version with dietlibc
5f0ee085 10%bcond_with glibc # link initrd version with static GLIBC
54ec8eef 11# - functionality
7e873dd0 12%bcond_without cluster # disable all cluster support (clvmd&cmirrord)
54ec8eef
JB
13%bcond_without lvmetad # disable lvmetad (and lvmlockd)
14%bcond_without lvmpolld # disable lvmpolld (and lvmlockd)
15%bcond_without lvmlockd # disable lvmlockd
16%bcond_with sanlock # sanlock support in lvmlockd
17%bcond_with replicator # internal replicator support
18# - additional features
19%bcond_without selinux # SELinux support
20# - bindings
35a842cf 21%bcond_without python # Python binding
c70b42f6 22
54ec8eef
JB
23# lvmlockd requires lvmetad and lvmpolld
24%if %{without lvmetad} || %{without lvmpolld}
25%undefine with_lvmpolld
66800f6a 26%endif
c70b42f6 27
54ec8eef
JB
28# only glibc possible on SPARC
29%ifarch sparc sparcv9 sparc64
30%define with_glibc 1
31%endif
c70b42f6
JR
32# if one of the *libc is enabled disable default dietlibc
33%if %{with dietlibc} && %{with uClibc}
34%undefine with_dietlibc
35%endif
f1e27504 36# with glibc disables default dietlibc
c70b42f6
JR
37%if %{with glibc} && %{with dietlibc}
38%undefine with_dietlibc
39%endif
f1e27504
ER
40# fallback is glibc if neither alternatives are enabled
41%if %{without dietlibc} && %{without uClibc}
42%define with_glibc 1
43%endif
44
5672aa67 45Summary: The new version of Logical Volume Manager for Linux
6536e848 46Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa
7e72c866 47Name: lvm2
54ec8eef 48Version: 2.02.130
35a842cf 49Release: 1
0a81c260 50License: GPL v2 and LGPL v2.1
7e72c866 51Group: Applications/System
dc5d0e77 52Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
54ec8eef 53# Source0-md5: e7ae07e413120713549cc6dd2a558c75
0d673991
JK
54Source2: clvmd.service
55Source3: clvmd.sysconfig
7210a095 56Patch0: %{name}-selinux.patch
c70b42f6 57Patch1: %{name}-diet.patch
9a00e98a 58Patch2: device-mapper-dmsetup-export.patch
4cb4934b 59Patch3: %{name}-pld_init.patch
b747c17a 60Patch4: dl-dlsym.patch
4cb4934b 61Patch6: %{name}-lvm_path.patch
7d8cfaa5 62Patch7: %{name}-sd_notify.patch
105f82c3 63Patch8: %{name}-clvmd_cmd_timeout.patch
14fc1988 64Patch9: device-mapper-dmsetup-deps-export.patch
35a842cf 65URL: http://www.sourceware.org/lvm2/
5f0ee085 66BuildRequires: autoconf >= 2.61
7e72c866 67BuildRequires: automake
54ec8eef
JB
68# for /run detection
69BuildRequires: filesystem >= 3.0-43
35a842cf 70BuildRequires: libblkid-devel >= 2.24
0dc2b8f2 71%{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
e4a12efb 72%{?with_selinux:BuildRequires: libsepol-devel}
5f0ee085 73BuildRequires: ncurses-devel
3657a56d 74BuildRequires: pkgconfig
35a842cf 75%{?with_python:BuildRequires: python-devel >= 2}
5f0ee085 76BuildRequires: readline-devel
b5640c74 77BuildRequires: rpmbuild(macros) >= 1.647
54ec8eef 78%{?with_sanlock:BuildRequires: sanlock-devel >= 3.2.4}
35a842cf
JB
79BuildRequires: systemd-devel >= 1:205
80BuildRequires: udev-devel >= 1:176
1ccfba6c 81%if %{with initrd}
fa9e8aeb 82%if %{with dietlibc}
39c8d1d5 83BuildRequires: dietlibc-static >= 2:0.32-7
fa9e8aeb
AM
84BuildConflicts: device-mapper-dietlibc
85%endif
b64b85c5
ER
86%if %{with glibc}
87%{?with_selinux:BuildRequires: libselinux-static}
88%{?with_selinux:BuildRequires: libsepol-static}
89%endif
c70b42f6
JR
90%{?with_glibc:BuildRequires: glibc-static}
91%{?with_uClibc:BuildRequires: uClibc-static >= 2:0.9.29}
1ccfba6c 92%endif
7e873dd0 93%if %{with cluster}
5f0ee085 94BuildRequires: corosync-devel
4cb4934b 95BuildRequires: dlm-devel >= 3.99.5
5f0ee085 96%endif
b5640c74 97Requires(post,preun,postun): systemd-units >= 38
0a81c260 98Requires(post,postun): /sbin/chkconfig
b167057a 99Requires: device-mapper >= %{version}-%{release}
0dc2b8f2 100%{?with_selinux:Requires: libselinux >= 1.10}
b5640c74 101Requires: systemd-units >= 38
1534f04d
ER
102# doesn't work with 2.4 kernels
103Requires: uname(release) >= 2.6
54ec8eef 104Suggests: thin-provisioning-tools >= 0.5.4
25b6b609 105Obsoletes: lvm
c35cea65 106Obsoletes: lvm2-systemd
7e72c866
JR
107BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
108
109%define _sbindir /sbin
9ab13f24 110%define _usrsbindir /usr/sbin
7e72c866 111
0fbd6aae
ER
112# changing CFLAGS in the middle confuses confcache
113%undefine configure_cache
114
87a7d834
ER
115# borken on AC
116%define filterout_ld -Wl,--as-needed
117
4cb4934b
JK
118# causes: undefined reference to `__stack_chk_fail_local'
119%define filterout_c -fstack-protector
120
c70b42f6
JR
121# for some reason known only to rpm there must be "\\|" not "\|" here
122%define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
123%define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch}
124
f8fa85d0
PS
125%define skip_post_check_so '.*libdevmapper-event-lvm2.so.*'
126
7e72c866
JR
127%description
128This package includes a number of utilities for creating, checking,
129and repairing logical volumes.
130
68d45726
JR
131%description -l pl.UTF-8
132Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania
133logicznych wolumenów dyskowych (LVM2).
7e72c866 134
7e72c866 135%package initrd
5672aa67 136Summary: The new version of Logical Volume Manager for Linux - initrd version
6536e848 137Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - wersja dla initrd
7e72c866 138Group: Base
16ddcbd0 139Conflicts: geninitrd < 10000.18
7e72c866
JR
140
141%description initrd
142This package includes a number of utilities for creating, checking,
143and repairing logical volumes - staticaly linked for initrd.
144
68d45726
JR
145%description initrd -l pl.UTF-8
146Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania
147logicznych wolumenów dyskowych (LVM2) - statycznie skonsolidowane na
7e72c866
JR
148potrzeby initrd.
149
7e873dd0
JK
150%package clvmd
151Summary: Cluster LVM daemon
152Summary(pl.UTF-8): Demon clustra LVM
153Group: Applications/System
1aa2f585 154Requires: %{name} = %{version}-%{release}
7e873dd0
JK
155
156%description clvmd
4cb4934b
JK
157clvmd is the daemon that distributes LVM metadata updates around a
158cluster. It must be running on all nodes in the cluster and will give
159an error if a node in the cluster does not have this daemon running.
7e873dd0
JK
160
161%description clvmd -l pl.UTF-8
162clvmd to demon który rozprowadza zmiany meta-danych LVM po klastrze.
4cb4934b
JK
163Mysi działać na wszystkich węzłach klastra i zgłosi błąd gdy jakiś
164węzeł w klastrze nie ma tego demona uruchomionego.
7e873dd0
JK
165
166%package cmirrord
167Summary: Cluster mirror log daemon
41c3aabb 168Summary(pl.UTF-8): Demon śledzący log lustrzany w klastrze
7e873dd0 169Group: Applications/System
1aa2f585 170Requires: %{name} = %{version}-%{release}
7e873dd0
JK
171
172%description cmirrord
4cb4934b
JK
173cmirrord is the daemon that tracks mirror log information in a
174cluster. It is specific to device-mapper based mirrors (and by
175extension, LVM cluster mirrors). Cluster mirrors are not possible
176without this daemon running.
7e873dd0 177
4cb4934b
JK
178This daemon relies on the cluster infrastructure provided by the
179Cluster MANager (CMAN), which must be set up and running in order for
180cmirrord to function.
7e873dd0 181
35a842cf
JB
182%description cmirrord
183cmirrord to demon śledzący informacje logu lustrzanego w klastrze.
184Jest specyficzny dla klastrów lustrzanych opartych na device-mapperze
185(oraz, poprzez rozszerzenie, klastrów lustrzanych LVM). W klastrach
186lustrzanych ten demon jest niezbędny.
187
188Ten demon polega na infrastrukturze klastra dostarczanej przez CMAN
189(Cluster MANager), który musi być skonfigurowany i działający, aby
190działał cmirrord.
191
e55d5c02
JB
192%package resource-agents
193Summary: OCF Resource Agents for LVM2 processes
194Summary(pl.UTF-8): Agenci OCF do monitorowania procesów LVM2
195Group: Applications/System
196Requires: %{name} = %{version}-%{release}
197Requires: resource-agents
198
199%description resource-agents
200OCF Resource Agents for LVM2 processes.
201
202%description resource-agents -l pl.UTF-8
203Agenci OCF do monitorowania procesów LVM2.
204
35a842cf
JB
205%package -n python-lvm
206Summary: Python interface to LVM2
207Summary(pl.UTF-8): Interfejs Pythona do LVM2
208Group: Libraries/Python
209Requires: device-mapper-libs = %{version}-%{release}
210
211%description -n python-lvm
212Python interface to LVM2.
213
214%description -n python-lvm -l pl.UTF-8
215Interfejs Pythona do LVM2.
216
b167057a
AM
217%package -n device-mapper
218Summary: Userspace support for the device-mapper
219Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika
220Group: Base
e7dd8435 221Requires(post,postun): /sbin/ldconfig
798d7327 222Requires(post,preun,postun): systemd-units >= 38
35a842cf 223Requires: device-mapper-libs = %{version}-%{release}
b5640c74 224Requires: systemd-units >= 38
b167057a
AM
225
226%description -n device-mapper
227The goal of this driver is to support volume management. The driver
228enables the definition of new block devices composed of ranges of
229sectors of existing devices. This can be used to define disk
230partitions - or logical volumes. This light-weight kernel component
231can support user-space tools for logical volume management.
232
233%description -n device-mapper -l pl.UTF-8
234Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik
235włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów
236sektorów na istniejących urządzeniach. Może to być wykorzystane do
237definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
238składnik jądra może wspierać działające w przestrzeni użytkownika
239narzędzia do zarządzania logicznymi wolumenami.
240
35a842cf
JB
241%package -n device-mapper-libs
242Summary: Device-mapper shared libraries
243Summary(pl.UTF-8): Biblioteki współdzielone device-mappera
244Group: Libraries
245Conflicts: device-mapper < 2.02.119-1
246Requires: libblkid >= 2.24
247Requires: udev-libs >= 1:176
248
249%description -n device-mapper-libs
250Device-mapper shared libraries.
251
252%description -n device-mapper-libs -l pl.UTF-8
253Biblioteki współdzielone device-mappera.
254
b167057a 255%package -n device-mapper-devel
35a842cf
JB
256Summary: Header files for device-mapper libraries
257Summary(pl.UTF-8): Pliki nagłówkowe bibliotek device-mappera
b167057a 258Group: Development/Libraries
35a842cf
JB
259Requires: device-mapper-libs = %{version}-%{release}
260Requires: libblkid-devel >= 2.24
b167057a
AM
261%if %{with selinux}
262Requires: libselinux-devel
263Requires: libsepol-devel
264%endif
35a842cf 265Requires: udev-devel >= 1:176
b167057a
AM
266
267%description -n device-mapper-devel
35a842cf 268Header files for device-mapper libraries.
b167057a
AM
269
270%description -n device-mapper-devel -l pl.UTF-8
35a842cf 271Pliki nagłówkowe bibliotek device-mappera.
b167057a
AM
272
273%package -n device-mapper-static
274Summary: Static devmapper library
275Summary(pl.UTF-8): Statyczna biblioteka devmapper
276License: LGPL v2.1
277Group: Development/Libraries
dc900ced 278Requires: device-mapper-devel = %{version}-%{release}
b167057a
AM
279
280%description -n device-mapper-static
281Static devmapper library.
282
283%description -n device-mapper-static -l pl.UTF-8
284Statyczna biblioteka devmapper.
285
c70b42f6
JR
286%package -n device-mapper-dietlibc
287Summary: Static devmapper library built with dietlibc
288Summary(pl.UTF-8): Statyczna biblioteka devmapper zbudowana z dietlibc
289License: LGPL v2.1
290Group: Development/Libraries
291Requires: device-mapper-devel = %{version}-%{release}
292
293%description -n device-mapper-dietlibc
294Static devmapper library built with dietlibc.
295
296%description -n device-mapper-dietlibc -l pl.UTF-8
297Statyczna biblioteka devmapper zbudowana z dietlibc.
298
4a323c26
JR
299%package -n device-mapper-initrd
300Summary: Userspace support for the device-mapper - initrd version
301Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - wersja dla initrd
302Group: Base
303Obsoletes: device-mapper-initrd-devel
1f7434e8 304Conflicts: geninitrd < 10000.10
4a323c26
JR
305
306%description -n device-mapper-initrd
307The goal of this driver is to support volume management. The driver
308enables the definition of new block devices composed of ranges of
309sectors of existing devices. This can be used to define disk
310partitions - or logical volumes. This light-weight kernel component
311can support user-space tools for logical volume management.
312
313This package contains dmsetup program linked staticaly for use in
314initrd.
315
316%description -n device-mapper-initrd -l pl.UTF-8
317Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik
318włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów
319sektorów na istniejących urządzeniach. Może to być wykorzystane do
320definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
321składnik jądra może wspierać działające w przestrzeni użytkownika
322narzędzia do zarządzania logicznymi wolumenami.
323
324Ten pakiet zawiera program dmsetup skonsolidowany statycznie na
325potrzeby initrd.
326
7e72c866 327%prep
ec2de926 328%setup -q -n LVM2.%{version}
7210a095 329%{?with_selinux:%patch0 -p1}
c70b42f6 330%patch1 -p1
9a00e98a 331%patch2 -p1
f0dab9f1 332%patch3 -p1
b747c17a 333%patch4 -p1
eaa437a5 334%patch6 -p1
7d8cfaa5 335%patch7 -p1
105f82c3 336%patch8 -p1
14fc1988 337%patch9 -p1
b167057a 338
39c8d1d5 339# do not force --export-symbol linker option for e.g. statically linked executables
b5eb9717
PS
340# -rdynamic compiler option drives linker in the right way.
341%{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.in
342
7e72c866 343%build
87a7d834
ER
344%if %{with initrd}
345echo Using %{?with_glibc:GLIBC} %{?with_uClibc:uClibc} %{?with_dietlibc:diet} for initrd
346%endif
242ffb9a 347cp -f /usr/share/automake/config.sub autoconf
7e72c866
JR
348%{__aclocal}
349%{__autoconf}
350
99958222 351%if %{with initrd}
6c31051f
PS
352%{?with_glibc:export CC="%{__cc}"}
353%{?with_uClibc:export CC="%{_target_cpu}-uclibc-gcc"}
4cbea9f4 354%{?with_dietlibc:cc="%{__cc}"; export CC="diet ${cc#ccache }"}
6c31051f 355
9bdab2f4 356%configure \
a5702977 357 ac_cv_lib_dl_dlopen=no \
eaa437a5 358 %{?with_uClibc:ac_cv_func_siginterrupt=no} \
4c78aede 359 %{?debug:--enable-debug} \
43435358
JB
360 --disable-nls \
361 --disable-readline \
362 --enable-selinux%{!?with_glibc:=no} \
9bdab2f4 363 --enable-static_link \
69688a46 364 --with-lvm1=internal \
43435358 365 --with-optimisation="%{rpmcflags} -Os"
c70b42f6 366# glibc version links with normal static libdevicemapper which has selinux enabled
260d6858 367# and we need to keep these in sync between device-mapper and lvm2
4c78aede
ER
368
369%{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h
0402cba0 370%{__sed} -i -e 's#rpl_realloc#realloc#g' lib/misc/configure.h
ec2de926 371
c7bbf0c8
AM
372%{__make} -j1 -C include
373%{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB=
374%{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB=
4cb4934b 375%{__make} -j1 -C libdaemon/client LIB_SHARED= VERSIONED_SHLIB=
2afef789 376%{__make} -j1 -C tools dmsetup.static lvm.static %{?with_dietlibc:DIETLIBC_LIBS="-lcompat"}
69688a46 377mv -f tools/lvm.static initrd-lvm
4a323c26 378mv -f tools/dmsetup.static initrd-dmsetup
7cef5d95
AM
379
380# check if tools works
381for tool in initrd-lvm initrd-dmsetup; do
cfa41a73 382 LVM_SYSTEM_DIR=$(pwd) ./$tool help && rc=$? || rc=$?
7cef5d95 383 if [ $rc -gt 127 ]; then
cfa41a73 384 echo >&2 "Unexpected failure (exit status: $rc) from $tool. Does this tool work?!"
7cef5d95
AM
385 exit 1
386 fi
387done
388
c70b42f6 389%{?with_dietlibc:mv -f libdm/ioctl/libdevmapper.a diet-libdevmapper.a}
9bdab2f4 390%{__make} clean
6c31051f
PS
391
392unset CC
7e72c866
JR
393%endif
394
9d0d1d5f 395%configure \
6e7a47a9 396 --enable-applib \
b167057a 397 --enable-cmdlib \
43435358 398 %{?debug:--enable-debug} \
b167057a 399 --enable-dmeventd \
43435358 400 --enable-fsadm \
54ec8eef
JB
401%if %{with lvmlockd}
402 %{?with_cluster:--enable-lockd-dlm} \
403 %{?with_sanlock:--enable-lockd-sanlock} \
404%endif
43435358 405 %{?with_lvmetad:--enable-lvmetad} \
e55d5c02 406 --enable-ocf \
35a842cf 407 %{?with_python:--enable-python_bindings} \
43435358
JB
408 --enable-readline \
409 %{!?with_selinux:--disable-selinux} \
b167057a 410 --enable-pkgconfig \
5f0ee085
JB
411 --enable-udev_sync \
412 --enable-udev_rules \
35a842cf 413 --with-cache=internal \
54ec8eef
JB
414 --with-cache-check=/usr/sbin/cache_check \
415 --with-cache-dump=/usr/sbin/cache_dump \
416 --with-cache-repair=/usr/sbin/cache_repair \
417 --with-cache-restore=/usr/sbin/cache_restore \
43435358 418 --with-cluster=internal \
7e873dd0 419%if %{with cluster}
4cb4934b
JK
420 --with-clvmd=corosync \
421 --enable-cmirrord \
5cf18a89 422%endif
43435358
JB
423 --with-dmeventd-path=%{_sbindir}/dmeventd \
424 --with-interface=ioctl \
607d2229 425 --with-lvm1=internal \
43435358
JB
426 --with-mirrors=internal \
427 --with-optimisation="%{rpmcflags}" \
607d2229 428 --with-pool=internal \
54ec8eef 429 %{?with_replicator:--with-replicators=internal} \
607d2229 430 --with-snapshots=internal \
43435358 431 --with-systemdsystemunitdir=%{systemdunitdir} \
35a842cf 432 --with-tmpfilesdir=%{systemdtmpfilesdir} \
b5640c74 433 --with-thin=internal \
54ec8eef
JB
434 --with-thin-check=/usr/sbin/thin_check \
435 --with-thin-dump=/usr/sbin/thin_dump \
436 --with-thin-repair=/usr/sbin/thin_repair \
437 --with-thin-restore=/usr/sbin/thin_restore \
589f4db4 438 --with-udev-prefix=/ \
43435358 439 --with-usrlibdir=%{_libdir}
589f4db4 440
b167057a 441%{__make} -j1
c7bbf0c8 442%{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a
7e72c866
JR
443
444%install
445rm -rf $RPM_BUILD_ROOT
0d673991 446install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig}
c70b42f6 447%{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
7e72c866 448
35a842cf 449%{__make} install install_system_dirs install_systemd_units install_initscripts install_tmpfiles_configuration \
7e72c866 450 DESTDIR=$RPM_BUILD_ROOT \
1ccfba6c
AM
451 OWNER="" \
452 GROUP=""
7e72c866 453
35a842cf
JB
454%{__make} -C scripts install_tmpfiles_configuration \
455 DESTDIR=$RPM_BUILD_ROOT \
9b82b6a5 456
0d673991 457%if %{with cluster}
798d7327
ER
458cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/clvmd.service
459cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd
0d673991
JK
460%endif
461
b167057a
AM
462mv $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
463for lib in $RPM_BUILD_ROOT/%{_lib}/lib*.so.*; do
464 lib=$(echo $lib | sed -e "s#$RPM_BUILD_ROOT##g")
465 slib=$(basename $lib | sed -e 's#\.so\..*#.so#g')
466 ln -sf $lib $RPM_BUILD_ROOT%{_libdir}/$slib
467done
468
1cfc154f
JR
469touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf
470
88c67b5b
JR
471%if %{with initrd}
472install -d $RPM_BUILD_ROOT%{_libdir}/initrd
a3569314
ER
473install -p initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm
474install -p initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup
7e72c866 475
a3569314 476%{?with_dietlibc:cp -a diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a}
1306038e 477%endif
c70b42f6 478
a3569314 479cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
b167057a 480
7e72c866
JR
481%clean
482rm -rf $RPM_BUILD_ROOT
483
6e7a47a9
AM
484%post
485/sbin/chkconfig --add lvm2-monitor
486%service lvm2-monitor restart
c35cea65 487%systemd_post lvm2-monitor.service
4cb4934b
JK
488/sbin/chkconfig --add blk-availability
489# no service blk-availability restart
490%systemd_post blk-availability.service
c35cea65
JR
491
492%preun
493%systemd_preun lvm2-monitor.service
4cb4934b 494%systemd_preun blk-availability.service
6e7a47a9
AM
495
496%postun
497if [ "$1" = "0" ]; then
498 %service lvm2-monitor stop
499 /sbin/chkconfig --del lvm2-monitor
4cb4934b
JK
500 #no service blk-availability stop
501 /sbin/chkconfig --del blk-availability
6e7a47a9 502fi
c35cea65 503%systemd_reload
6e7a47a9 504
c35cea65
JR
505%triggerpostun -- %{name} < 2.02.94-1
506%systemd_trigger lvm2-monitor.service
b167057a 507
c35cea65 508%post -n device-mapper
c35cea65 509%systemd_post dm-event.socket
9b82b6a5 510
c35cea65
JR
511%preun -n device-mapper
512%systemd_preun dm-event.socket dm-event.service
9b82b6a5 513
c35cea65 514%postun -n device-mapper
9b82b6a5
BZ
515%systemd_reload
516
c35cea65
JR
517%triggerpostun -n device-mapper -- device-mapper < 2.02.94-1
518%systemd_trigger dm-event.socket
519
35a842cf
JB
520%post -n device-mapper-libs -p /sbin/ldconfig
521%postun -n device-mapper-libs -p /sbin/ldconfig
522
161d6a19
JK
523%post clvmd
524/sbin/chkconfig --add clvmd
525# no service restart - it breaks current locks!
526export NORESTART=1
527%systemd_post clvmd.service
528# re-exec instead
529/usr/sbin/clvmd -S 2>/dev/null || :
530
531%preun clvmd
532%systemd_preun clvmd.service
533
534%postun clvmd
535if [ "$1" = "0" ]; then
536 %service clvmd stop
537 /sbin/chkconfig --del clvmd
538fi
539%systemd_reload
540
7e72c866
JR
541%files
542%defattr(644,root,root,755)
e6ac7970 543%doc README WHATS_NEW doc/*
4cb4934b 544%attr(755,root,root) %{_sbindir}/blkdeactivate
86418c14
JB
545%attr(755,root,root) %{_sbindir}/fsadm
546%attr(755,root,root) %{_sbindir}/lv*
547%attr(755,root,root) %{_sbindir}/pv*
548%attr(755,root,root) %{_sbindir}/vg*
86418c14 549%{_mandir}/man5/lvm.conf.5*
a4dcdce5 550%{_mandir}/man7/lvmcache.7*
35a842cf 551%{_mandir}/man7/lvmsystemid.7*
0442bdaf 552%{_mandir}/man7/lvmthin.7*
4cb4934b 553%{_mandir}/man8/blkdeactivate.8*
86418c14
JB
554%{_mandir}/man8/fsadm.8*
555%{_mandir}/man8/lv*.8*
556%{_mandir}/man8/pv*.8*
557%{_mandir}/man8/vg*.8*
99958222 558%attr(750,root,root) %dir %{_sysconfdir}/lvm
2316bf4d 559%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
35a842cf 560%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf
e55d5c02 561%attr(750,root,root) %dir %{_sysconfdir}/lvm/profile
54ec8eef
JB
562%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-mq.profile
563%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-smq.profile
bfc9ab17
JB
564%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile
565%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
566%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile
ac328eef 567%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
43435358
JB
568%if %{with lvmetad}
569/lib/udev/rules.d/69-dm-lvm-metad.rules
570%endif
35a842cf 571%{systemdtmpfilesdir}/lvm2.conf
4cb4934b 572%{systemdunitdir}/blk-availability.service
43435358
JB
573%if %{with lvmetad}
574%{systemdunitdir}/lvm2-lvmetad.service
575%{systemdunitdir}/lvm2-lvmetad.socket
576%endif
54ec8eef
JB
577%if %{with lvmlockd}
578%{systemdunitdir}/lvm2-lvmlockd.service
579%{systemdunitdir}/lvm2-lvmlocking.service
580%endif
581%if %{with lvmpolld}
582%{systemdunitdir}/lvm2-lvmpolld.service
583%{systemdunitdir}/lvm2-lvmpolld.socket
584%endif
43435358
JB
585%{systemdunitdir}/lvm2-monitor.service
586%{systemdunitdir}/lvm2-pvscan@.service
6e7a47a9
AM
587%dir %{_sysconfdir}/lvm/cache
588%ghost %{_sysconfdir}/lvm/cache/.cache
4cb4934b 589%attr(754,root,root) /etc/rc.d/init.d/blk-availability
43435358
JB
590%if %{with lvmetad}
591%attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmetad
592%endif
54ec8eef
JB
593%if %{with lvmpolld}
594%attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmpolld
595%endif
6e7a47a9 596%attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor
54ec8eef
JB
597%attr(700,root,root) %dir /run/lvm
598%attr(700,root,root) %dir /var/lock/lvm
7e873dd0
JK
599
600%if %{with cluster}
601%files clvmd
602%defattr(644,root,root,755)
603%attr(755,root,root) %{_usrsbindir}/clvmd
604%attr(754,root,root) /etc/rc.d/init.d/clvmd
0d673991 605%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clvmd
0442bdaf 606%attr(755,root,root) /lib/systemd/lvm2-cluster-activation
0d673991 607%{systemdunitdir}/clvmd.service
0442bdaf
JB
608%{systemdunitdir}/lvm2-cluster-activation.service
609%{systemdunitdir}/lvm2-clvmd.service
7e873dd0
JK
610%{_mandir}/man8/clvmd.8*
611
7e873dd0
JK
612%files cmirrord
613%defattr(644,root,root,755)
614%attr(755,root,root) %{_usrsbindir}/cmirrord
7e873dd0 615%attr(754,root,root) /etc/rc.d/init.d/cmirrord
0442bdaf
JB
616%{systemdunitdir}/lvm2-cmirrord.service
617%{_mandir}/man8/cmirrord.8*
7e873dd0 618%endif
7e72c866 619
e55d5c02
JB
620%files resource-agents
621%defattr(644,root,root,755)
622%dir %{_prefix}/lib/ocf/resource.d/lvm2
623%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/lvm2/VolumeGroup
624
35a842cf
JB
625%if %{with python}
626%files -n python-lvm
627%defattr(644,root,root,755)
628%attr(755,root,root) %{py_sitedir}/lvm.so
629%{py_sitedir}/lvm-%{version}_*-py*.egg-info
630%endif
631
b167057a
AM
632%files -n device-mapper
633%defattr(644,root,root,755)
634%doc *_DM
c35cea65
JR
635%{systemdunitdir}/dm-event.service
636%{systemdunitdir}/dm-event.socket
589f4db4
JR
637/lib/udev/rules.d/10-dm.rules
638/lib/udev/rules.d/11-dm-lvm.rules
639/lib/udev/rules.d/13-dm-disk.rules
640/lib/udev/rules.d/95-dm-notify.rules
b167057a
AM
641%attr(755,root,root) %{_sbindir}/dmeventd
642%attr(755,root,root) %{_sbindir}/dmsetup
54ec8eef 643%attr(755,root,root) %{_sbindir}/dmstats
1306038e
AM
644%dir %{_libdir}/device-mapper
645%attr(755,root,root) %{_libdir}/device-mapper/*.so
bece12dd 646%attr(755,root,root) %{_libdir}/libdevmapper-event-*.so
b167057a 647%{_mandir}/man8/dmsetup.8*
54ec8eef 648%{_mandir}/man8/dmstats.8*
f0dab9f1 649%{_mandir}/man8/dmeventd.8*
b167057a 650
35a842cf
JB
651%files -n device-mapper-libs
652%defattr(644,root,root,755)
653%attr(755,root,root) /%{_lib}/libdevmapper.so.*.*
654%attr(755,root,root) /%{_lib}/libdevmapper-event.so.*.*
655%attr(755,root,root) /%{_lib}/libdevmapper-event-lvm2.so.*.*
656%attr(755,root,root) /%{_lib}/liblvm2app.so.*.*
657%attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.*
658
b167057a
AM
659%files -n device-mapper-devel
660%defattr(644,root,root,755)
bece12dd
JR
661%attr(755,root,root) %{_libdir}/libdevmapper.so
662%attr(755,root,root) %{_libdir}/libdevmapper-event.so
6e7a47a9 663%attr(755,root,root) %{_libdir}/liblvm2app.so
b167057a 664%attr(755,root,root) %{_libdir}/liblvm2cmd.so
35a842cf
JB
665%{_includedir}/libdevmapper.h
666%{_includedir}/libdevmapper-event.h
6e7a47a9 667%{_includedir}/lvm2app.h
b167057a 668%{_includedir}/lvm2cmd.h
35a842cf
JB
669%{_pkgconfigdir}/devmapper.pc
670%{_pkgconfigdir}/devmapper-event.pc
6e7a47a9 671%{_pkgconfigdir}/lvm2app.pc
b167057a
AM
672
673%files -n device-mapper-static
674%defattr(644,root,root,755)
35a842cf 675%{_libdir}/libdevmapper.a
b167057a 676
1306038e 677%if %{with initrd}
c70b42f6
JR
678%if %{with dietlibc}
679%files -n device-mapper-dietlibc
680%defattr(644,root,root,755)
681%{dietlibdir}/libdevmapper.a
682%endif
683
4a323c26
JR
684%files -n device-mapper-initrd
685%defattr(644,root,root,755)
88c67b5b 686%attr(755,root,root) %{_libdir}/initrd/dmsetup
4a323c26 687
7e72c866
JR
688%files initrd
689%defattr(644,root,root,755)
88c67b5b 690%attr(755,root,root) %{_libdir}/initrd/lvm
7e72c866 691%endif
This page took 0.143014 seconds and 4 git commands to generate.