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