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