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