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