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