]> git.pld-linux.org Git - packages/lvm2.git/blob - lvm2.spec
- updated to 2.02.149
[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 # - fix initscripts:
7 #   # service lvm2-lvmetad start
8 #   /etc/rc.d/init.d/lvm2-lvmetad: line 55: action: command not found
9 #
10 # Conditional build:
11 # - initrd stuff
12 %bcond_with     initrd          # build initrd version
13 %bcond_without  uClibc          # link initrd version with uClibc
14 %bcond_with     dietlibc        # link initrd version with dietlibc
15 %bcond_with     glibc           # link initrd version with static GLIBC
16 # - functionality
17 %bcond_without  cluster         # disable all cluster support (clvmd&cmirrord)
18 %bcond_without  lvmetad         # lvmetad (and lvmlockd)
19 %bcond_without  lvmdbusd        # lvmdbusd
20 %bcond_without  lvmpolld        # lvmpolld (and lvmlockd)
21 %bcond_without  lvmlockd        # lvmlockd
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
27 %bcond_without  python          # Python bindings
28 %bcond_without  python2         # Python 2 binding
29 %bcond_without  python3         # Python 3 binding and lvmdbusd
30
31 # lvmlockd requires lvmetad and lvmpolld
32 %if %{without lvmetad} || %{without lvmpolld}
33 %undefine       with_lvmpolld
34 %endif
35
36 # only glibc possible on SPARC
37 %ifarch sparc sparcv9 sparc64
38 %define         with_glibc 1
39 %endif
40 # if one of the *libc is enabled disable default dietlibc
41 %if %{with dietlibc} && %{with uClibc}
42 %undefine       with_dietlibc
43 %endif
44 # with glibc disables default dietlibc
45 %if %{with glibc} && %{with dietlibc}
46 %undefine       with_dietlibc
47 %endif
48 # fallback is glibc if neither alternatives are enabled
49 %if %{without dietlibc} && %{without uClibc}
50 %define         with_glibc      1
51 %endif
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
60
61 Summary:        The new version of Logical Volume Manager for Linux
62 Summary(pl.UTF-8):      Nowa wersja Logical Volume Managera dla Linuksa
63 Name:           lvm2
64 Version:        2.02.149
65 Release:        1
66 License:        GPL v2 and LGPL v2.1
67 Group:          Applications/System
68 Source0:        ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
69 # Source0-md5:  39f766faa1cf95fcdf80868839350147
70 Source2:        clvmd.service
71 Source3:        clvmd.sysconfig
72 Patch0:         %{name}-selinux.patch
73 Patch1:         %{name}-diet.patch
74 Patch2:         device-mapper-dmsetup-export.patch
75 Patch3:         %{name}-pld_init.patch
76 Patch4:         dl-dlsym.patch
77 Patch6:         %{name}-lvm_path.patch
78 Patch7:         %{name}-sd_notify.patch
79 Patch8:         %{name}-clvmd_cmd_timeout.patch
80 Patch9:         device-mapper-dmsetup-deps-export.patch
81 Patch10:        %{name}-replicator.patch
82 Patch11:        %{name}-thin.patch
83 URL:            http://www.sourceware.org/lvm2/
84 BuildRequires:  autoconf >= 2.69
85 BuildRequires:  automake
86 # for /run detection
87 BuildRequires:  filesystem >= 3.0-43
88 BuildRequires:  libblkid-devel >= 2.24
89 %{?with_selinux:BuildRequires:  libselinux-devel >= 1.10}
90 %{?with_selinux:BuildRequires:  libsepol-devel}
91 BuildRequires:  ncurses-devel
92 BuildRequires:  pkgconfig
93 %{?with_python2:BuildRequires:  python-devel >= 2}
94 %{?with_python3:BuildRequires:  python3-devel >= 1:3.2}
95 %if %{with lvmdbusd}
96 BuildRequires:  python3-dbus
97 #BuildRequires: python3-pyudev
98 %endif
99 BuildRequires:  readline-devel
100 BuildRequires:  rpmbuild(macros) >= 1.647
101 %{?with_sanlock:BuildRequires:  sanlock-devel >= 3.3.0}
102 BuildRequires:  systemd-devel >= 1:205
103 BuildRequires:  udev-devel >= 1:176
104 %if %{with initrd}
105 %if %{with dietlibc}
106 BuildRequires:  dietlibc-static >= 2:0.32-7
107 BuildConflicts: device-mapper-dietlibc
108 %endif
109 %if %{with glibc}
110 %{?with_selinux:BuildRequires:  libselinux-static}
111 %{?with_selinux:BuildRequires:  libsepol-static}
112 %endif
113 %{?with_glibc:BuildRequires:    glibc-static}
114 %{?with_uClibc:BuildRequires:   uClibc-static >= 2:0.9.29}
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-pyudev
223 Requires:       python3-pygobject3 >= 3
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_sanlock:Requires:       sanlock-libs >= 3.3.0}
239 %{?with_cluster:Requires:       dlm-libs >= 3.99.5}
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 Conflicts:      device-mapper < 2.02.119-1
314 Requires:       libblkid >= 2.24
315 Requires:       udev-libs >= 1:176
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 %patch6 -p1
403 %patch7 -p1
404 %patch8 -p1
405 %patch9 -p1
406 %patch10 -p1
407 %patch11 -p1
408
409 # do not force --export-symbol linker option for e.g. statically linked executables
410 # -rdynamic compiler option drives linker in the right way.
411 %{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.in
412
413 %build
414 %if %{with initrd}
415 echo Using %{?with_glibc:GLIBC} %{?with_uClibc:uClibc} %{?with_dietlibc:diet} for initrd
416 %endif
417 cp -f /usr/share/automake/config.sub autoconf
418 %{__aclocal}
419 %{__autoconf}
420
421 %if %{with initrd}
422 %{?with_glibc:export CC="%{__cc}"}
423 %{?with_uClibc:export CC="%{_target_cpu}-uclibc-gcc"}
424 %{?with_dietlibc:cc="%{__cc}"; export CC="diet ${cc#ccache }"}
425
426 %configure \
427         ac_cv_lib_dl_dlopen=no \
428         %{?with_uClibc:ac_cv_func_siginterrupt=no} \
429         %{?debug:--enable-debug} \
430         --disable-nls \
431         --disable-readline \
432         --enable-selinux%{!?with_glibc:=no} \
433         --enable-static_link \
434         --with-lvm1=internal \
435         --with-optimisation="%{rpmcflags} -Os"
436 # glibc version links with normal static libdevicemapper which has selinux enabled
437 # and we need to keep these in sync between device-mapper and lvm2
438
439 %{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h
440 %{__sed} -i -e 's#rpl_realloc#realloc#g' lib/misc/configure.h
441
442 %{__make} -j1 -C include
443 %{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB=
444 %{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB=
445 %{__make} -j1 -C libdaemon/client LIB_SHARED= VERSIONED_SHLIB=
446 %{__make} -j1 -C tools dmsetup.static lvm.static %{?with_dietlibc:DIETLIBC_LIBS="-lcompat"}
447 %{__mv} tools/lvm.static initrd-lvm
448 %{__mv} tools/dmsetup.static initrd-dmsetup
449
450 # check if tools works
451 for tool in initrd-lvm initrd-dmsetup; do
452         LVM_SYSTEM_DIR=$(pwd) ./$tool help && rc=$? || rc=$?
453         if [ $rc -gt 127 ]; then
454                 echo >&2 "Unexpected failure (exit status: $rc) from $tool. Does this tool work?!"
455                 exit 1
456         fi
457 done
458
459 %{?with_dietlibc:%{__mv} libdm/ioctl/libdevmapper.a diet-libdevmapper.a}
460 %{__make} clean
461
462 unset CC
463 %endif
464
465 %configure \
466         --enable-applib \
467         --enable-cache_check_needs_check \
468         --enable-cmdlib \
469         %{?with_lvmdbusd:--enable-dbus-service} \
470         %{?debug:--enable-debug} \
471         --enable-dmeventd \
472         --enable-fsadm \
473 %if %{with lvmlockd}
474         %{?with_cluster:--enable-lockd-dlm} \
475         %{?with_sanlock:--enable-lockd-sanlock} \
476 %endif
477         %{?with_lvmetad:--enable-lvmetad} \
478         --enable-ocf \
479         %{?with_python2:--enable-python2_bindings} \
480         %{?with_python3:--enable-python3_bindings} \
481         --enable-readline \
482         %{!?with_selinux:--disable-selinux} \
483         --enable-pkgconfig \
484         --enable-thin_check_needs_check \
485         --enable-udev_sync \
486         --enable-udev_rules \
487         --with-cache=internal \
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 \
492         --with-cluster=internal \
493 %if %{with cluster}
494         --with-clvmd=corosync \
495         --enable-cmirrord \
496 %endif
497         --with-dmeventd-path=%{_sbindir}/dmeventd \
498         --with-interface=ioctl \
499         --with-lvm1=internal \
500         --with-mirrors=internal \
501         --with-optimisation="%{rpmcflags}" \
502         --with-pool=internal \
503         %{?with_replicator:--with-replicators=internal} \
504         --with-snapshots=internal \
505         --with-systemdsystemunitdir=%{systemdunitdir} \
506         --with-tmpfilesdir=%{systemdtmpfilesdir} \
507         --with-thin=internal \
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 \
512         --with-udev-prefix=/ \
513         --with-usrlibdir=%{_libdir}
514
515 %{__make} -j1
516 %{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a
517
518 %install
519 rm -rf $RPM_BUILD_ROOT
520 install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig}
521 %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
522
523 %{__make} install install_system_dirs install_systemd_units install_initscripts install_tmpfiles_configuration \
524         DESTDIR=$RPM_BUILD_ROOT \
525         OWNER="" \
526         GROUP=""
527
528 %{__make} -C scripts install_tmpfiles_configuration \
529         DESTDIR=$RPM_BUILD_ROOT \
530
531 %if %{with cluster}
532 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/clvmd.service
533 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd
534 %endif
535
536 mv $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
537 for 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
541 done
542
543 touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf
544
545 %if %{with initrd}
546 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
547 install -p initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm
548 install -p initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup
549
550 %{?with_dietlibc:cp -a diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a}
551 %endif
552
553 cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
554
555 %clean
556 rm -rf $RPM_BUILD_ROOT
557
558 %post
559 /sbin/chkconfig --add lvm2-monitor
560 %service lvm2-monitor restart
561 %systemd_post lvm2-monitor.service
562 /sbin/chkconfig --add blk-availability
563 # no service blk-availability restart
564 %systemd_post blk-availability.service
565 %if %{with lvmetad}
566 %systemd_post lvm2-lvmetad.socket
567 %endif
568 %if %{with lvmpolld}
569 %systemd_post lvm2-lvmpolld.socket
570 %endif
571
572 %preun
573 %systemd_preun lvm2-monitor.service
574 %systemd_preun blk-availability.service
575 %if %{with lvmetad}
576 %systemd_preun lvm2-lvmetad.socket
577 %endif
578 %if %{with lvmpolld}
579 %systemd_preun lvm2-lvmpolld.socket
580 %endif
581
582 %postun
583 if [ "$1" = "0" ]; then
584         %service lvm2-monitor stop
585         /sbin/chkconfig --del lvm2-monitor
586         #no service blk-availability stop
587         /sbin/chkconfig --del blk-availability
588 fi
589 %systemd_reload
590
591 %triggerpostun -- %{name} < 2.02.94-1
592 %systemd_trigger lvm2-monitor.service
593
594 %post -n device-mapper
595 %systemd_post dm-event.socket
596
597 %preun -n device-mapper
598 %systemd_preun dm-event.socket dm-event.service
599
600 %postun -n device-mapper
601 %systemd_reload
602
603 %triggerpostun -n device-mapper -- device-mapper < 2.02.94-1
604 %systemd_trigger dm-event.socket
605
606 %post   -n device-mapper-libs -p /sbin/ldconfig
607 %postun -n device-mapper-libs -p /sbin/ldconfig
608
609 %post clvmd
610 /sbin/chkconfig --add clvmd
611 # no service restart - it breaks current locks!
612 export 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
619 if [ "$1" = "0" ]; then
620         %service clvmd stop
621         /sbin/chkconfig --del clvmd
622 fi
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
643 %systemd_reload
644
645 %files
646 %defattr(644,root,root,755)
647 %doc README WHATS_NEW doc/*
648 %attr(755,root,root) %{_sbindir}/blkdeactivate
649 %attr(755,root,root) %{_sbindir}/fsadm
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
697 %{_mandir}/man5/lvm.conf.5*
698 %{_mandir}/man7/lvmcache.7*
699 %{_mandir}/man7/lvmsystemid.7*
700 %{_mandir}/man7/lvmthin.7*
701 %{_mandir}/man8/blkdeactivate.8*
702 %{_mandir}/man8/fsadm.8*
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*
753 %attr(750,root,root) %dir %{_sysconfdir}/lvm
754 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
755 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf
756 %attr(750,root,root) %dir %{_sysconfdir}/lvm/profile
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
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
762 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
763 %{systemdtmpfilesdir}/lvm2.conf
764 %{systemdunitdir}/blk-availability.service
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
773 %if %{with lvmetad}
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
777 %{systemdunitdir}/lvm2-lvmetad.service
778 %{systemdunitdir}/lvm2-lvmetad.socket
779 %{_mandir}/man8/lvmetad.8*
780 %endif
781 %if %{with lvmlockd}
782 %attr(755,root,root) %{_sbindir}/lvmlockctl
783 %attr(755,root,root) %{_sbindir}/lvmlockd
784 %{systemdunitdir}/lvm2-lvmlockd.service
785 %{systemdunitdir}/lvm2-lvmlocking.service
786 %{_mandir}/man8/lvmlockctl.8*
787 %{_mandir}/man8/lvmlockd.8*
788 %endif
789 %if %{with lvmpolld}
790 %attr(755,root,root) %{_sbindir}/lvmpolld
791 %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmpolld
792 %{systemdunitdir}/lvm2-lvmpolld.service
793 %{systemdunitdir}/lvm2-lvmpolld.socket
794 %{_mandir}/man8/lvmpolld.8*
795 %endif
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
802 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clvmd
803 %attr(755,root,root) /lib/systemd/lvm2-cluster-activation
804 %{systemdunitdir}/clvmd.service
805 %{systemdunitdir}/lvm2-cluster-activation.service
806 %{systemdunitdir}/lvm2-clvmd.service
807 %{_mandir}/man8/clvmd.8*
808
809 %files cmirrord
810 %defattr(644,root,root,755)
811 %attr(755,root,root) %{_usrsbindir}/cmirrord
812 %attr(754,root,root) /etc/rc.d/init.d/cmirrord
813 %{systemdunitdir}/lvm2-cmirrord.service
814 %{_mandir}/man8/cmirrord.8*
815 %endif
816
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
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
833 %if %{with python2}
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
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
847 %files -n device-mapper
848 %defattr(644,root,root,755)
849 %doc *_DM
850 %{systemdunitdir}/dm-event.service
851 %{systemdunitdir}/dm-event.socket
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
856 %attr(755,root,root) %{_sbindir}/dmeventd
857 %attr(755,root,root) %{_sbindir}/dmsetup
858 %attr(755,root,root) %{_sbindir}/dmstats
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
863 %dir %{_libdir}/device-mapper
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
868 %{_mandir}/man8/dmsetup.8*
869 %{_mandir}/man8/dmstats.8*
870 %{_mandir}/man8/dmeventd.8*
871
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
880 %files -n device-mapper-devel
881 %defattr(644,root,root,755)
882 %attr(755,root,root) %{_libdir}/libdevmapper.so
883 %attr(755,root,root) %{_libdir}/libdevmapper-event.so
884 %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2.so
885 %attr(755,root,root) %{_libdir}/liblvm2app.so
886 %attr(755,root,root) %{_libdir}/liblvm2cmd.so
887 %{_includedir}/libdevmapper.h
888 %{_includedir}/libdevmapper-event.h
889 %{_includedir}/lvm2app.h
890 %{_includedir}/lvm2cmd.h
891 %{_pkgconfigdir}/devmapper.pc
892 %{_pkgconfigdir}/devmapper-event.pc
893 %{_pkgconfigdir}/lvm2app.pc
894
895 %files -n device-mapper-static
896 %defattr(644,root,root,755)
897 %{_libdir}/libdevmapper.a
898
899 %if %{with initrd}
900 %if %{with dietlibc}
901 %files -n device-mapper-dietlibc
902 %defattr(644,root,root,755)
903 %{dietlibdir}/libdevmapper.a
904 %endif
905
906 %files -n device-mapper-initrd
907 %defattr(644,root,root,755)
908 %attr(755,root,root) %{_libdir}/initrd/dmsetup
909
910 %files initrd
911 %defattr(644,root,root,755)
912 %attr(755,root,root) %{_libdir}/initrd/lvm
913 %endif
This page took 0.110175 seconds and 3 git commands to generate.