]>
Commit | Line | Data |
---|---|---|
e3a928dc | 1 | # TODO |
e3a928dc | 2 | # - vgscan --ignorelocking failure creates /var/lock/lvm (even if /var is not yet mounted) |
e2727f8c JB |
3 | # - spec default value for --with-replicators (=internal/shared/none, configure default is none)? |
4 | # (also internal vs shared for lvm1,pool,cluster,snapshots,mirrors,raid,replicators,thin,cache; | |
5 | # note: dmeventd requires mirrors=internal) | |
407a710a ER |
6 | # - fix initscripts: |
7 | # # service lvm2-lvmetad start | |
8 | # /etc/rc.d/init.d/lvm2-lvmetad: line 55: action: command not found | |
1b67453e | 9 | # |
99958222 | 10 | # Conditional build: |
e2727f8c | 11 | # - initrd stuff |
54ec8eef | 12 | %bcond_with initrd # build initrd version |
fe052975 JR |
13 | %bcond_without uClibc # link initrd version with uClibc |
14 | %bcond_with dietlibc # link initrd version with dietlibc | |
5f0ee085 | 15 | %bcond_with glibc # link initrd version with static GLIBC |
54ec8eef | 16 | # - functionality |
7e873dd0 | 17 | %bcond_without cluster # disable all cluster support (clvmd&cmirrord) |
e2727f8c JB |
18 | %bcond_without lvmetad # lvmetad (and lvmlockd) |
19 | %bcond_without lvmdbusd # lvmdbusd | |
20 | %bcond_without lvmpolld # lvmpolld (and lvmlockd) | |
21 | %bcond_without lvmlockd # lvmlockd | |
54ec8eef JB |
22 | %bcond_with sanlock # sanlock support in lvmlockd |
23 | %bcond_with replicator # internal replicator support | |
24 | # - additional features | |
25 | %bcond_without selinux # SELinux support | |
26 | # - bindings | |
e2727f8c JB |
27 | %bcond_without python # Python bindings |
28 | %bcond_without python2 # Python 2 binding | |
29 | %bcond_without python3 # Python 3 binding and lvmdbusd | |
c70b42f6 | 30 | |
54ec8eef JB |
31 | # lvmlockd requires lvmetad and lvmpolld |
32 | %if %{without lvmetad} || %{without lvmpolld} | |
33 | %undefine with_lvmpolld | |
66800f6a | 34 | %endif |
c70b42f6 | 35 | |
54ec8eef JB |
36 | # only glibc possible on SPARC |
37 | %ifarch sparc sparcv9 sparc64 | |
38 | %define with_glibc 1 | |
39 | %endif | |
c70b42f6 JR |
40 | # if one of the *libc is enabled disable default dietlibc |
41 | %if %{with dietlibc} && %{with uClibc} | |
42 | %undefine with_dietlibc | |
43 | %endif | |
f1e27504 | 44 | # with glibc disables default dietlibc |
c70b42f6 JR |
45 | %if %{with glibc} && %{with dietlibc} |
46 | %undefine with_dietlibc | |
47 | %endif | |
f1e27504 ER |
48 | # fallback is glibc if neither alternatives are enabled |
49 | %if %{without dietlibc} && %{without uClibc} | |
50 | %define with_glibc 1 | |
51 | %endif | |
e2727f8c JB |
52 | # for convenience |
53 | %if %{without python} | |
54 | %undefine with_python2 | |
55 | %undefine with_python3 | |
56 | %endif | |
57 | %if %{without python3} | |
58 | %undefine with_lvmdbusd | |
59 | %endif | |
f1e27504 | 60 | |
5672aa67 | 61 | Summary: The new version of Logical Volume Manager for Linux |
6536e848 | 62 | Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa |
7e72c866 | 63 | Name: lvm2 |
e2727f8c JB |
64 | Version: 2.02.149 |
65 | Release: 1 | |
0a81c260 | 66 | License: GPL v2 and LGPL v2.1 |
7e72c866 | 67 | Group: Applications/System |
dc5d0e77 | 68 | Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz |
e2727f8c | 69 | # Source0-md5: 39f766faa1cf95fcdf80868839350147 |
0d673991 JK |
70 | Source2: clvmd.service |
71 | Source3: clvmd.sysconfig | |
7210a095 | 72 | Patch0: %{name}-selinux.patch |
c70b42f6 | 73 | Patch1: %{name}-diet.patch |
9a00e98a | 74 | Patch2: device-mapper-dmsetup-export.patch |
4cb4934b | 75 | Patch3: %{name}-pld_init.patch |
b747c17a | 76 | Patch4: dl-dlsym.patch |
4cb4934b | 77 | Patch6: %{name}-lvm_path.patch |
7d8cfaa5 | 78 | Patch7: %{name}-sd_notify.patch |
105f82c3 | 79 | Patch8: %{name}-clvmd_cmd_timeout.patch |
14fc1988 | 80 | Patch9: device-mapper-dmsetup-deps-export.patch |
e2727f8c JB |
81 | Patch10: %{name}-replicator.patch |
82 | Patch11: %{name}-thin.patch | |
35a842cf | 83 | URL: http://www.sourceware.org/lvm2/ |
e2727f8c | 84 | BuildRequires: autoconf >= 2.69 |
7e72c866 | 85 | BuildRequires: automake |
54ec8eef JB |
86 | # for /run detection |
87 | BuildRequires: filesystem >= 3.0-43 | |
35a842cf | 88 | BuildRequires: libblkid-devel >= 2.24 |
0dc2b8f2 | 89 | %{?with_selinux:BuildRequires: libselinux-devel >= 1.10} |
e4a12efb | 90 | %{?with_selinux:BuildRequires: libsepol-devel} |
5f0ee085 | 91 | BuildRequires: ncurses-devel |
3657a56d | 92 | BuildRequires: pkgconfig |
e2727f8c JB |
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 | |
5f0ee085 | 99 | BuildRequires: readline-devel |
b5640c74 | 100 | BuildRequires: rpmbuild(macros) >= 1.647 |
e2727f8c | 101 | %{?with_sanlock:BuildRequires: sanlock-devel >= 3.3.0} |
35a842cf JB |
102 | BuildRequires: systemd-devel >= 1:205 |
103 | BuildRequires: udev-devel >= 1:176 | |
1ccfba6c | 104 | %if %{with initrd} |
fa9e8aeb | 105 | %if %{with dietlibc} |
39c8d1d5 | 106 | BuildRequires: dietlibc-static >= 2:0.32-7 |
fa9e8aeb AM |
107 | BuildConflicts: device-mapper-dietlibc |
108 | %endif | |
b64b85c5 ER |
109 | %if %{with glibc} |
110 | %{?with_selinux:BuildRequires: libselinux-static} | |
111 | %{?with_selinux:BuildRequires: libsepol-static} | |
112 | %endif | |
c70b42f6 JR |
113 | %{?with_glibc:BuildRequires: glibc-static} |
114 | %{?with_uClibc:BuildRequires: uClibc-static >= 2:0.9.29} | |
1ccfba6c | 115 | %endif |
7e873dd0 | 116 | %if %{with cluster} |
5f0ee085 | 117 | BuildRequires: corosync-devel |
4cb4934b | 118 | BuildRequires: dlm-devel >= 3.99.5 |
5f0ee085 | 119 | %endif |
b5640c74 | 120 | Requires(post,preun,postun): systemd-units >= 38 |
0a81c260 | 121 | Requires(post,postun): /sbin/chkconfig |
b167057a | 122 | Requires: device-mapper >= %{version}-%{release} |
0dc2b8f2 | 123 | %{?with_selinux:Requires: libselinux >= 1.10} |
b5640c74 | 124 | Requires: systemd-units >= 38 |
1534f04d ER |
125 | # doesn't work with 2.4 kernels |
126 | Requires: uname(release) >= 2.6 | |
54ec8eef | 127 | Suggests: thin-provisioning-tools >= 0.5.4 |
25b6b609 | 128 | Obsoletes: lvm |
c35cea65 | 129 | Obsoletes: lvm2-systemd |
7e72c866 JR |
130 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
131 | ||
132 | %define _sbindir /sbin | |
9ab13f24 | 133 | %define _usrsbindir /usr/sbin |
7e72c866 | 134 | |
0fbd6aae ER |
135 | # changing CFLAGS in the middle confuses confcache |
136 | %undefine configure_cache | |
137 | ||
87a7d834 ER |
138 | # borken on AC |
139 | %define filterout_ld -Wl,--as-needed | |
140 | ||
4cb4934b JK |
141 | # causes: undefined reference to `__stack_chk_fail_local' |
142 | %define filterout_c -fstack-protector | |
143 | ||
c70b42f6 JR |
144 | # for some reason known only to rpm there must be "\\|" not "\|" here |
145 | %define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/') | |
146 | %define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch} | |
147 | ||
f8fa85d0 PS |
148 | %define skip_post_check_so '.*libdevmapper-event-lvm2.so.*' |
149 | ||
7e72c866 JR |
150 | %description |
151 | This package includes a number of utilities for creating, checking, | |
152 | and repairing logical volumes. | |
153 | ||
68d45726 JR |
154 | %description -l pl.UTF-8 |
155 | Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania | |
156 | logicznych wolumenów dyskowych (LVM2). | |
7e72c866 | 157 | |
7e72c866 | 158 | %package initrd |
5672aa67 | 159 | Summary: The new version of Logical Volume Manager for Linux - initrd version |
6536e848 | 160 | Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - wersja dla initrd |
7e72c866 | 161 | Group: Base |
16ddcbd0 | 162 | Conflicts: geninitrd < 10000.18 |
7e72c866 JR |
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 | ||
68d45726 JR |
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 | |
7e72c866 JR |
171 | potrzeby initrd. |
172 | ||
7e873dd0 JK |
173 | %package clvmd |
174 | Summary: Cluster LVM daemon | |
175 | Summary(pl.UTF-8): Demon clustra LVM | |
176 | Group: Applications/System | |
1aa2f585 | 177 | Requires: %{name} = %{version}-%{release} |
7e873dd0 JK |
178 | |
179 | %description clvmd | |
4cb4934b JK |
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. | |
7e873dd0 JK |
183 | |
184 | %description clvmd -l pl.UTF-8 | |
185 | clvmd to demon który rozprowadza zmiany meta-danych LVM po klastrze. | |
4cb4934b JK |
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. | |
7e873dd0 JK |
188 | |
189 | %package cmirrord | |
190 | Summary: Cluster mirror log daemon | |
41c3aabb | 191 | Summary(pl.UTF-8): Demon śledzący log lustrzany w klastrze |
7e873dd0 | 192 | Group: Applications/System |
1aa2f585 | 193 | Requires: %{name} = %{version}-%{release} |
7e873dd0 JK |
194 | |
195 | %description cmirrord | |
4cb4934b JK |
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. | |
7e873dd0 | 200 | |
4cb4934b JK |
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. | |
7e873dd0 | 204 | |
35a842cf JB |
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 | ||
e2727f8c JB |
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 | ||
e55d5c02 JB |
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 | ||
35a842cf | 261 | %package -n python-lvm |
e2727f8c JB |
262 | Summary: Python 2 interface to LVM2 |
263 | Summary(pl.UTF-8): Interfejs Pythona 2 do LVM2 | |
35a842cf JB |
264 | Group: Libraries/Python |
265 | Requires: device-mapper-libs = %{version}-%{release} | |
266 | ||
267 | %description -n python-lvm | |
e2727f8c | 268 | Python 2 interface to LVM2. |
35a842cf JB |
269 | |
270 | %description -n python-lvm -l pl.UTF-8 | |
e2727f8c JB |
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. | |
35a842cf | 284 | |
b167057a AM |
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 | |
e7dd8435 | 289 | Requires(post,postun): /sbin/ldconfig |
798d7327 | 290 | Requires(post,preun,postun): systemd-units >= 38 |
35a842cf | 291 | Requires: device-mapper-libs = %{version}-%{release} |
b5640c74 | 292 | Requires: systemd-units >= 38 |
b167057a AM |
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 | ||
35a842cf JB |
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 | ||
b167057a | 323 | %package -n device-mapper-devel |
35a842cf JB |
324 | Summary: Header files for device-mapper libraries |
325 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek device-mappera | |
b167057a | 326 | Group: Development/Libraries |
35a842cf JB |
327 | Requires: device-mapper-libs = %{version}-%{release} |
328 | Requires: libblkid-devel >= 2.24 | |
b167057a AM |
329 | %if %{with selinux} |
330 | Requires: libselinux-devel | |
331 | Requires: libsepol-devel | |
332 | %endif | |
35a842cf | 333 | Requires: udev-devel >= 1:176 |
b167057a AM |
334 | |
335 | %description -n device-mapper-devel | |
35a842cf | 336 | Header files for device-mapper libraries. |
b167057a AM |
337 | |
338 | %description -n device-mapper-devel -l pl.UTF-8 | |
35a842cf | 339 | Pliki nagłówkowe bibliotek device-mappera. |
b167057a AM |
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 | |
dc900ced | 346 | Requires: device-mapper-devel = %{version}-%{release} |
b167057a AM |
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 | ||
c70b42f6 JR |
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 | ||
4a323c26 JR |
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 | |
1f7434e8 | 372 | Conflicts: geninitrd < 10000.10 |
4a323c26 JR |
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 | ||
7e72c866 | 395 | %prep |
ec2de926 | 396 | %setup -q -n LVM2.%{version} |
7210a095 | 397 | %{?with_selinux:%patch0 -p1} |
c70b42f6 | 398 | %patch1 -p1 |
9a00e98a | 399 | %patch2 -p1 |
f0dab9f1 | 400 | %patch3 -p1 |
b747c17a | 401 | %patch4 -p1 |
eaa437a5 | 402 | %patch6 -p1 |
7d8cfaa5 | 403 | %patch7 -p1 |
105f82c3 | 404 | %patch8 -p1 |
14fc1988 | 405 | %patch9 -p1 |
e2727f8c JB |
406 | %patch10 -p1 |
407 | %patch11 -p1 | |
b167057a | 408 | |
39c8d1d5 | 409 | # do not force --export-symbol linker option for e.g. statically linked executables |
b5eb9717 PS |
410 | # -rdynamic compiler option drives linker in the right way. |
411 | %{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.in | |
412 | ||
7e72c866 | 413 | %build |
87a7d834 ER |
414 | %if %{with initrd} |
415 | echo Using %{?with_glibc:GLIBC} %{?with_uClibc:uClibc} %{?with_dietlibc:diet} for initrd | |
416 | %endif | |
242ffb9a | 417 | cp -f /usr/share/automake/config.sub autoconf |
7e72c866 JR |
418 | %{__aclocal} |
419 | %{__autoconf} | |
420 | ||
99958222 | 421 | %if %{with initrd} |
6c31051f PS |
422 | %{?with_glibc:export CC="%{__cc}"} |
423 | %{?with_uClibc:export CC="%{_target_cpu}-uclibc-gcc"} | |
4cbea9f4 | 424 | %{?with_dietlibc:cc="%{__cc}"; export CC="diet ${cc#ccache }"} |
6c31051f | 425 | |
9bdab2f4 | 426 | %configure \ |
a5702977 | 427 | ac_cv_lib_dl_dlopen=no \ |
eaa437a5 | 428 | %{?with_uClibc:ac_cv_func_siginterrupt=no} \ |
4c78aede | 429 | %{?debug:--enable-debug} \ |
43435358 JB |
430 | --disable-nls \ |
431 | --disable-readline \ | |
432 | --enable-selinux%{!?with_glibc:=no} \ | |
9bdab2f4 | 433 | --enable-static_link \ |
69688a46 | 434 | --with-lvm1=internal \ |
43435358 | 435 | --with-optimisation="%{rpmcflags} -Os" |
c70b42f6 | 436 | # glibc version links with normal static libdevicemapper which has selinux enabled |
260d6858 | 437 | # and we need to keep these in sync between device-mapper and lvm2 |
4c78aede ER |
438 | |
439 | %{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h | |
0402cba0 | 440 | %{__sed} -i -e 's#rpl_realloc#realloc#g' lib/misc/configure.h |
ec2de926 | 441 | |
c7bbf0c8 AM |
442 | %{__make} -j1 -C include |
443 | %{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB= | |
444 | %{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB= | |
4cb4934b | 445 | %{__make} -j1 -C libdaemon/client LIB_SHARED= VERSIONED_SHLIB= |
2afef789 | 446 | %{__make} -j1 -C tools dmsetup.static lvm.static %{?with_dietlibc:DIETLIBC_LIBS="-lcompat"} |
e2727f8c JB |
447 | %{__mv} tools/lvm.static initrd-lvm |
448 | %{__mv} tools/dmsetup.static initrd-dmsetup | |
7cef5d95 AM |
449 | |
450 | # check if tools works | |
451 | for tool in initrd-lvm initrd-dmsetup; do | |
cfa41a73 | 452 | LVM_SYSTEM_DIR=$(pwd) ./$tool help && rc=$? || rc=$? |
7cef5d95 | 453 | if [ $rc -gt 127 ]; then |
cfa41a73 | 454 | echo >&2 "Unexpected failure (exit status: $rc) from $tool. Does this tool work?!" |
7cef5d95 AM |
455 | exit 1 |
456 | fi | |
457 | done | |
458 | ||
e2727f8c | 459 | %{?with_dietlibc:%{__mv} libdm/ioctl/libdevmapper.a diet-libdevmapper.a} |
9bdab2f4 | 460 | %{__make} clean |
6c31051f PS |
461 | |
462 | unset CC | |
7e72c866 JR |
463 | %endif |
464 | ||
9d0d1d5f | 465 | %configure \ |
6e7a47a9 | 466 | --enable-applib \ |
e2727f8c | 467 | --enable-cache_check_needs_check \ |
b167057a | 468 | --enable-cmdlib \ |
e2727f8c | 469 | %{?with_lvmdbusd:--enable-dbus-service} \ |
43435358 | 470 | %{?debug:--enable-debug} \ |
b167057a | 471 | --enable-dmeventd \ |
43435358 | 472 | --enable-fsadm \ |
54ec8eef JB |
473 | %if %{with lvmlockd} |
474 | %{?with_cluster:--enable-lockd-dlm} \ | |
475 | %{?with_sanlock:--enable-lockd-sanlock} \ | |
476 | %endif | |
43435358 | 477 | %{?with_lvmetad:--enable-lvmetad} \ |
e55d5c02 | 478 | --enable-ocf \ |
e2727f8c JB |
479 | %{?with_python2:--enable-python2_bindings} \ |
480 | %{?with_python3:--enable-python3_bindings} \ | |
43435358 JB |
481 | --enable-readline \ |
482 | %{!?with_selinux:--disable-selinux} \ | |
b167057a | 483 | --enable-pkgconfig \ |
e2727f8c | 484 | --enable-thin_check_needs_check \ |
5f0ee085 JB |
485 | --enable-udev_sync \ |
486 | --enable-udev_rules \ | |
35a842cf | 487 | --with-cache=internal \ |
54ec8eef JB |
488 | --with-cache-check=/usr/sbin/cache_check \ |
489 | --with-cache-dump=/usr/sbin/cache_dump \ | |
490 | --with-cache-repair=/usr/sbin/cache_repair \ | |
491 | --with-cache-restore=/usr/sbin/cache_restore \ | |
43435358 | 492 | --with-cluster=internal \ |
7e873dd0 | 493 | %if %{with cluster} |
4cb4934b JK |
494 | --with-clvmd=corosync \ |
495 | --enable-cmirrord \ | |
5cf18a89 | 496 | %endif |
43435358 JB |
497 | --with-dmeventd-path=%{_sbindir}/dmeventd \ |
498 | --with-interface=ioctl \ | |
607d2229 | 499 | --with-lvm1=internal \ |
43435358 JB |
500 | --with-mirrors=internal \ |
501 | --with-optimisation="%{rpmcflags}" \ | |
607d2229 | 502 | --with-pool=internal \ |
54ec8eef | 503 | %{?with_replicator:--with-replicators=internal} \ |
607d2229 | 504 | --with-snapshots=internal \ |
43435358 | 505 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
35a842cf | 506 | --with-tmpfilesdir=%{systemdtmpfilesdir} \ |
b5640c74 | 507 | --with-thin=internal \ |
54ec8eef JB |
508 | --with-thin-check=/usr/sbin/thin_check \ |
509 | --with-thin-dump=/usr/sbin/thin_dump \ | |
510 | --with-thin-repair=/usr/sbin/thin_repair \ | |
511 | --with-thin-restore=/usr/sbin/thin_restore \ | |
589f4db4 | 512 | --with-udev-prefix=/ \ |
43435358 | 513 | --with-usrlibdir=%{_libdir} |
589f4db4 | 514 | |
b167057a | 515 | %{__make} -j1 |
c7bbf0c8 | 516 | %{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a |
7e72c866 JR |
517 | |
518 | %install | |
519 | rm -rf $RPM_BUILD_ROOT | |
0d673991 | 520 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig} |
c70b42f6 | 521 | %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}} |
7e72c866 | 522 | |
35a842cf | 523 | %{__make} install install_system_dirs install_systemd_units install_initscripts install_tmpfiles_configuration \ |
7e72c866 | 524 | DESTDIR=$RPM_BUILD_ROOT \ |
1ccfba6c AM |
525 | OWNER="" \ |
526 | GROUP="" | |
7e72c866 | 527 | |
35a842cf JB |
528 | %{__make} -C scripts install_tmpfiles_configuration \ |
529 | DESTDIR=$RPM_BUILD_ROOT \ | |
9b82b6a5 | 530 | |
0d673991 | 531 | %if %{with cluster} |
798d7327 ER |
532 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/clvmd.service |
533 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd | |
0d673991 JK |
534 | %endif |
535 | ||
b167057a AM |
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 | ||
1cfc154f JR |
543 | touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf |
544 | ||
88c67b5b JR |
545 | %if %{with initrd} |
546 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd | |
a3569314 ER |
547 | install -p initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm |
548 | install -p initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup | |
7e72c866 | 549 | |
a3569314 | 550 | %{?with_dietlibc:cp -a diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a} |
1306038e | 551 | %endif |
c70b42f6 | 552 | |
a3569314 | 553 | cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir} |
b167057a | 554 | |
7e72c866 JR |
555 | %clean |
556 | rm -rf $RPM_BUILD_ROOT | |
557 | ||
6e7a47a9 AM |
558 | %post |
559 | /sbin/chkconfig --add lvm2-monitor | |
560 | %service lvm2-monitor restart | |
c35cea65 | 561 | %systemd_post lvm2-monitor.service |
4cb4934b JK |
562 | /sbin/chkconfig --add blk-availability |
563 | # no service blk-availability restart | |
564 | %systemd_post blk-availability.service | |
e2727f8c JB |
565 | %if %{with lvmetad} |
566 | %systemd_post lvm2-lvmetad.socket | |
567 | %endif | |
568 | %if %{with lvmpolld} | |
569 | %systemd_post lvm2-lvmpolld.socket | |
570 | %endif | |
c35cea65 JR |
571 | |
572 | %preun | |
573 | %systemd_preun lvm2-monitor.service | |
4cb4934b | 574 | %systemd_preun blk-availability.service |
e2727f8c JB |
575 | %if %{with lvmetad} |
576 | %systemd_preun lvm2-lvmetad.socket | |
577 | %endif | |
578 | %if %{with lvmpolld} | |
579 | %systemd_preun lvm2-lvmpolld.socket | |
580 | %endif | |
6e7a47a9 AM |
581 | |
582 | %postun | |
583 | if [ "$1" = "0" ]; then | |
584 | %service lvm2-monitor stop | |
585 | /sbin/chkconfig --del lvm2-monitor | |
4cb4934b JK |
586 | #no service blk-availability stop |
587 | /sbin/chkconfig --del blk-availability | |
6e7a47a9 | 588 | fi |
c35cea65 | 589 | %systemd_reload |
6e7a47a9 | 590 | |
c35cea65 JR |
591 | %triggerpostun -- %{name} < 2.02.94-1 |
592 | %systemd_trigger lvm2-monitor.service | |
b167057a | 593 | |
c35cea65 | 594 | %post -n device-mapper |
c35cea65 | 595 | %systemd_post dm-event.socket |
9b82b6a5 | 596 | |
c35cea65 JR |
597 | %preun -n device-mapper |
598 | %systemd_preun dm-event.socket dm-event.service | |
9b82b6a5 | 599 | |
c35cea65 | 600 | %postun -n device-mapper |
9b82b6a5 BZ |
601 | %systemd_reload |
602 | ||
c35cea65 JR |
603 | %triggerpostun -n device-mapper -- device-mapper < 2.02.94-1 |
604 | %systemd_trigger dm-event.socket | |
605 | ||
35a842cf JB |
606 | %post -n device-mapper-libs -p /sbin/ldconfig |
607 | %postun -n device-mapper-libs -p /sbin/ldconfig | |
608 | ||
161d6a19 JK |
609 | %post clvmd |
610 | /sbin/chkconfig --add clvmd | |
611 | # no service restart - it breaks current locks! | |
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 | |
161d6a19 JK |
619 | if [ "$1" = "0" ]; then |
620 | %service clvmd stop | |
621 | /sbin/chkconfig --del clvmd | |
622 | fi | |
e2727f8c JB |
623 | |
624 | %postun clvmd | |
625 | %systemd_reload | |
626 | ||
627 | %post dbusd | |
628 | %systemd_post lvm2-lvmdbusd.service | |
629 | ||
630 | %preun dbusd | |
631 | %systemd_preun lvm2-lvmdbusd.service | |
632 | ||
633 | %postun dbusd | |
634 | %systemd_reload | |
635 | ||
636 | %post lockd | |
637 | %systemd_post lvm2-lvmlockd.service lvm2-lvmlocking.service | |
638 | ||
639 | %preun lockd | |
640 | %systemd_preun lvm2-lvmlockd.service lvm2-lvmlocking.service | |
641 | ||
642 | %postun lockd | |
161d6a19 JK |
643 | %systemd_reload |
644 | ||
7e72c866 JR |
645 | %files |
646 | %defattr(644,root,root,755) | |
e6ac7970 | 647 | %doc README WHATS_NEW doc/* |
4cb4934b | 648 | %attr(755,root,root) %{_sbindir}/blkdeactivate |
86418c14 | 649 | %attr(755,root,root) %{_sbindir}/fsadm |
e2727f8c JB |
650 | %attr(755,root,root) %{_sbindir}/lvchange |
651 | %attr(755,root,root) %{_sbindir}/lvconvert | |
652 | %attr(755,root,root) %{_sbindir}/lvcreate | |
653 | %attr(755,root,root) %{_sbindir}/lvdisplay | |
654 | %attr(755,root,root) %{_sbindir}/lvextend | |
655 | %attr(755,root,root) %{_sbindir}/lvm | |
656 | %attr(755,root,root) %{_sbindir}/lvmchange | |
657 | %attr(755,root,root) %{_sbindir}/lvmconf | |
658 | %attr(755,root,root) %{_sbindir}/lvmconfig | |
659 | %attr(755,root,root) %{_sbindir}/lvmdiskscan | |
660 | %attr(755,root,root) %{_sbindir}/lvmdump | |
661 | %attr(755,root,root) %{_sbindir}/lvmsadc | |
662 | %attr(755,root,root) %{_sbindir}/lvmsar | |
663 | %attr(755,root,root) %{_sbindir}/lvreduce | |
664 | %attr(755,root,root) %{_sbindir}/lvremove | |
665 | %attr(755,root,root) %{_sbindir}/lvrename | |
666 | %attr(755,root,root) %{_sbindir}/lvresize | |
667 | %attr(755,root,root) %{_sbindir}/lvs | |
668 | %attr(755,root,root) %{_sbindir}/lvscan | |
669 | %attr(755,root,root) %{_sbindir}/pvchange | |
670 | %attr(755,root,root) %{_sbindir}/pvck | |
671 | %attr(755,root,root) %{_sbindir}/pvcreate | |
672 | %attr(755,root,root) %{_sbindir}/pvdisplay | |
673 | %attr(755,root,root) %{_sbindir}/pvmove | |
674 | %attr(755,root,root) %{_sbindir}/pvremove | |
675 | %attr(755,root,root) %{_sbindir}/pvresize | |
676 | %attr(755,root,root) %{_sbindir}/pvs | |
677 | %attr(755,root,root) %{_sbindir}/pvscan | |
678 | %attr(755,root,root) %{_sbindir}/vgcfgbackup | |
679 | %attr(755,root,root) %{_sbindir}/vgcfgrestore | |
680 | %attr(755,root,root) %{_sbindir}/vgchange | |
681 | %attr(755,root,root) %{_sbindir}/vgck | |
682 | %attr(755,root,root) %{_sbindir}/vgconvert | |
683 | %attr(755,root,root) %{_sbindir}/vgcreate | |
684 | %attr(755,root,root) %{_sbindir}/vgdisplay | |
685 | %attr(755,root,root) %{_sbindir}/vgexport | |
686 | %attr(755,root,root) %{_sbindir}/vgextend | |
687 | %attr(755,root,root) %{_sbindir}/vgimport | |
688 | %attr(755,root,root) %{_sbindir}/vgimportclone | |
689 | %attr(755,root,root) %{_sbindir}/vgmerge | |
690 | %attr(755,root,root) %{_sbindir}/vgmknodes | |
691 | %attr(755,root,root) %{_sbindir}/vgreduce | |
692 | %attr(755,root,root) %{_sbindir}/vgremove | |
693 | %attr(755,root,root) %{_sbindir}/vgrename | |
694 | %attr(755,root,root) %{_sbindir}/vgs | |
695 | %attr(755,root,root) %{_sbindir}/vgscan | |
696 | %attr(755,root,root) %{_sbindir}/vgsplit | |
86418c14 | 697 | %{_mandir}/man5/lvm.conf.5* |
a4dcdce5 | 698 | %{_mandir}/man7/lvmcache.7* |
35a842cf | 699 | %{_mandir}/man7/lvmsystemid.7* |
0442bdaf | 700 | %{_mandir}/man7/lvmthin.7* |
4cb4934b | 701 | %{_mandir}/man8/blkdeactivate.8* |
86418c14 | 702 | %{_mandir}/man8/fsadm.8* |
e2727f8c JB |
703 | %{_mandir}/man8/lvchange.8* |
704 | %{_mandir}/man8/lvconvert.8* | |
705 | %{_mandir}/man8/lvcreate.8* | |
706 | %{_mandir}/man8/lvdisplay.8* | |
707 | %{_mandir}/man8/lvextend.8* | |
708 | %{_mandir}/man8/lvm-config.8 | |
709 | %{_mandir}/man8/lvm-dumpconfig.8 | |
710 | %{_mandir}/man8/lvm-lvpoll.8* | |
711 | %{_mandir}/man8/lvm.8* | |
712 | %{_mandir}/man8/lvmchange.8* | |
713 | %{_mandir}/man8/lvmconf.8* | |
714 | %{_mandir}/man8/lvmconfig.8* | |
715 | %{_mandir}/man8/lvmdiskscan.8* | |
716 | %{_mandir}/man8/lvmdump.8* | |
717 | %{_mandir}/man8/lvmsadc.8* | |
718 | %{_mandir}/man8/lvmsar.8* | |
719 | %{_mandir}/man8/lvreduce.8* | |
720 | %{_mandir}/man8/lvremove.8* | |
721 | %{_mandir}/man8/lvrename.8* | |
722 | %{_mandir}/man8/lvresize.8* | |
723 | %{_mandir}/man8/lvs.8* | |
724 | %{_mandir}/man8/lvscan.8* | |
725 | %{_mandir}/man8/pvchange.8* | |
726 | %{_mandir}/man8/pvck.8* | |
727 | %{_mandir}/man8/pvcreate.8* | |
728 | %{_mandir}/man8/pvdisplay.8* | |
729 | %{_mandir}/man8/pvmove.8* | |
730 | %{_mandir}/man8/pvremove.8* | |
731 | %{_mandir}/man8/pvresize.8* | |
732 | %{_mandir}/man8/pvs.8* | |
733 | %{_mandir}/man8/pvscan.8* | |
734 | %{_mandir}/man8/vgcfgbackup.8* | |
735 | %{_mandir}/man8/vgcfgrestore.8* | |
736 | %{_mandir}/man8/vgchange.8* | |
737 | %{_mandir}/man8/vgck.8* | |
738 | %{_mandir}/man8/vgconvert.8* | |
739 | %{_mandir}/man8/vgcreate.8* | |
740 | %{_mandir}/man8/vgdisplay.8* | |
741 | %{_mandir}/man8/vgexport.8* | |
742 | %{_mandir}/man8/vgextend.8* | |
743 | %{_mandir}/man8/vgimport.8* | |
744 | %{_mandir}/man8/vgimportclone.8* | |
745 | %{_mandir}/man8/vgmerge.8* | |
746 | %{_mandir}/man8/vgmknodes.8* | |
747 | %{_mandir}/man8/vgreduce.8* | |
748 | %{_mandir}/man8/vgremove.8* | |
749 | %{_mandir}/man8/vgrename.8* | |
750 | %{_mandir}/man8/vgs.8* | |
751 | %{_mandir}/man8/vgscan.8* | |
752 | %{_mandir}/man8/vgsplit.8* | |
99958222 | 753 | %attr(750,root,root) %dir %{_sysconfdir}/lvm |
2316bf4d | 754 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf |
35a842cf | 755 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf |
e55d5c02 | 756 | %attr(750,root,root) %dir %{_sysconfdir}/lvm/profile |
54ec8eef JB |
757 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-mq.profile |
758 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-smq.profile | |
bfc9ab17 JB |
759 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile |
760 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile | |
761 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile | |
ac328eef | 762 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile |
35a842cf | 763 | %{systemdtmpfilesdir}/lvm2.conf |
4cb4934b | 764 | %{systemdunitdir}/blk-availability.service |
e2727f8c JB |
765 | %{systemdunitdir}/lvm2-monitor.service |
766 | %{systemdunitdir}/lvm2-pvscan@.service | |
767 | %dir %{_sysconfdir}/lvm/cache | |
768 | %ghost %{_sysconfdir}/lvm/cache/.cache | |
769 | %attr(754,root,root) /etc/rc.d/init.d/blk-availability | |
770 | %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor | |
771 | %attr(700,root,root) %dir /run/lvm | |
772 | %attr(700,root,root) %dir /var/lock/lvm | |
43435358 | 773 | %if %{with lvmetad} |
e2727f8c JB |
774 | %attr(755,root,root) %{_sbindir}/lvmetad |
775 | /lib/udev/rules.d/69-dm-lvm-metad.rules | |
776 | %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmetad | |
43435358 JB |
777 | %{systemdunitdir}/lvm2-lvmetad.service |
778 | %{systemdunitdir}/lvm2-lvmetad.socket | |
e2727f8c | 779 | %{_mandir}/man8/lvmetad.8* |
43435358 | 780 | %endif |
54ec8eef | 781 | %if %{with lvmlockd} |
e2727f8c JB |
782 | %attr(755,root,root) %{_sbindir}/lvmlockctl |
783 | %attr(755,root,root) %{_sbindir}/lvmlockd | |
54ec8eef JB |
784 | %{systemdunitdir}/lvm2-lvmlockd.service |
785 | %{systemdunitdir}/lvm2-lvmlocking.service | |
e2727f8c JB |
786 | %{_mandir}/man8/lvmlockctl.8* |
787 | %{_mandir}/man8/lvmlockd.8* | |
54ec8eef JB |
788 | %endif |
789 | %if %{with lvmpolld} | |
e2727f8c JB |
790 | %attr(755,root,root) %{_sbindir}/lvmpolld |
791 | %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmpolld | |
54ec8eef JB |
792 | %{systemdunitdir}/lvm2-lvmpolld.service |
793 | %{systemdunitdir}/lvm2-lvmpolld.socket | |
e2727f8c | 794 | %{_mandir}/man8/lvmpolld.8* |
54ec8eef | 795 | %endif |
7e873dd0 JK |
796 | |
797 | %if %{with cluster} | |
798 | %files clvmd | |
799 | %defattr(644,root,root,755) | |
800 | %attr(755,root,root) %{_usrsbindir}/clvmd | |
801 | %attr(754,root,root) /etc/rc.d/init.d/clvmd | |
0d673991 | 802 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clvmd |
0442bdaf | 803 | %attr(755,root,root) /lib/systemd/lvm2-cluster-activation |
0d673991 | 804 | %{systemdunitdir}/clvmd.service |
0442bdaf JB |
805 | %{systemdunitdir}/lvm2-cluster-activation.service |
806 | %{systemdunitdir}/lvm2-clvmd.service | |
7e873dd0 JK |
807 | %{_mandir}/man8/clvmd.8* |
808 | ||
7e873dd0 JK |
809 | %files cmirrord |
810 | %defattr(644,root,root,755) | |
811 | %attr(755,root,root) %{_usrsbindir}/cmirrord | |
7e873dd0 | 812 | %attr(754,root,root) /etc/rc.d/init.d/cmirrord |
0442bdaf JB |
813 | %{systemdunitdir}/lvm2-cmirrord.service |
814 | %{_mandir}/man8/cmirrord.8* | |
7e873dd0 | 815 | %endif |
7e72c866 | 816 | |
e2727f8c JB |
817 | %if %{with lvmdbusd} |
818 | %files dbusd | |
819 | %defattr(644,root,root,755) | |
820 | %attr(755,root,root) %{_sbindir}/lvmdbusd | |
821 | %{py3_sitedir}/lvmdbusd | |
822 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf | |
823 | %{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service | |
824 | %{systemdunitdir}/lvm2-lvmdbusd.service | |
825 | %{_mandir}/man8/lvmdbusd.8* | |
826 | %endif | |
827 | ||
e55d5c02 JB |
828 | %files resource-agents |
829 | %defattr(644,root,root,755) | |
830 | %dir %{_prefix}/lib/ocf/resource.d/lvm2 | |
831 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/lvm2/VolumeGroup | |
832 | ||
e2727f8c | 833 | %if %{with python2} |
35a842cf JB |
834 | %files -n python-lvm |
835 | %defattr(644,root,root,755) | |
836 | %attr(755,root,root) %{py_sitedir}/lvm.so | |
837 | %{py_sitedir}/lvm-%{version}_*-py*.egg-info | |
838 | %endif | |
839 | ||
e2727f8c JB |
840 | %if %{with python3} |
841 | %files -n python3-lvm | |
842 | %defattr(644,root,root,755) | |
843 | %attr(755,root,root) %{py3_sitedir}/lvm.cpython-*.so | |
844 | %{py3_sitedir}/lvm-%{version}_*-py*.egg-info | |
845 | %endif | |
846 | ||
b167057a AM |
847 | %files -n device-mapper |
848 | %defattr(644,root,root,755) | |
849 | %doc *_DM | |
c35cea65 JR |
850 | %{systemdunitdir}/dm-event.service |
851 | %{systemdunitdir}/dm-event.socket | |
589f4db4 JR |
852 | /lib/udev/rules.d/10-dm.rules |
853 | /lib/udev/rules.d/11-dm-lvm.rules | |
854 | /lib/udev/rules.d/13-dm-disk.rules | |
855 | /lib/udev/rules.d/95-dm-notify.rules | |
b167057a AM |
856 | %attr(755,root,root) %{_sbindir}/dmeventd |
857 | %attr(755,root,root) %{_sbindir}/dmsetup | |
54ec8eef | 858 | %attr(755,root,root) %{_sbindir}/dmstats |
e2727f8c JB |
859 | %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2mirror.so |
860 | %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2raid.so | |
861 | %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2snapshot.so | |
862 | %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2thin.so | |
1306038e | 863 | %dir %{_libdir}/device-mapper |
e2727f8c JB |
864 | %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2mirror.so |
865 | %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2raid.so | |
866 | %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2snapshot.so | |
867 | %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2thin.so | |
b167057a | 868 | %{_mandir}/man8/dmsetup.8* |
54ec8eef | 869 | %{_mandir}/man8/dmstats.8* |
f0dab9f1 | 870 | %{_mandir}/man8/dmeventd.8* |
b167057a | 871 | |
35a842cf JB |
872 | %files -n device-mapper-libs |
873 | %defattr(644,root,root,755) | |
874 | %attr(755,root,root) /%{_lib}/libdevmapper.so.*.* | |
875 | %attr(755,root,root) /%{_lib}/libdevmapper-event.so.*.* | |
876 | %attr(755,root,root) /%{_lib}/libdevmapper-event-lvm2.so.*.* | |
877 | %attr(755,root,root) /%{_lib}/liblvm2app.so.*.* | |
878 | %attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.* | |
879 | ||
b167057a AM |
880 | %files -n device-mapper-devel |
881 | %defattr(644,root,root,755) | |
bece12dd JR |
882 | %attr(755,root,root) %{_libdir}/libdevmapper.so |
883 | %attr(755,root,root) %{_libdir}/libdevmapper-event.so | |
e2727f8c | 884 | %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2.so |
6e7a47a9 | 885 | %attr(755,root,root) %{_libdir}/liblvm2app.so |
b167057a | 886 | %attr(755,root,root) %{_libdir}/liblvm2cmd.so |
35a842cf JB |
887 | %{_includedir}/libdevmapper.h |
888 | %{_includedir}/libdevmapper-event.h | |
6e7a47a9 | 889 | %{_includedir}/lvm2app.h |
b167057a | 890 | %{_includedir}/lvm2cmd.h |
35a842cf JB |
891 | %{_pkgconfigdir}/devmapper.pc |
892 | %{_pkgconfigdir}/devmapper-event.pc | |
6e7a47a9 | 893 | %{_pkgconfigdir}/lvm2app.pc |
b167057a AM |
894 | |
895 | %files -n device-mapper-static | |
896 | %defattr(644,root,root,755) | |
35a842cf | 897 | %{_libdir}/libdevmapper.a |
b167057a | 898 | |
1306038e | 899 | %if %{with initrd} |
c70b42f6 JR |
900 | %if %{with dietlibc} |
901 | %files -n device-mapper-dietlibc | |
902 | %defattr(644,root,root,755) | |
903 | %{dietlibdir}/libdevmapper.a | |
904 | %endif | |
905 | ||
4a323c26 JR |
906 | %files -n device-mapper-initrd |
907 | %defattr(644,root,root,755) | |
88c67b5b | 908 | %attr(755,root,root) %{_libdir}/initrd/dmsetup |
4a323c26 | 909 | |
7e72c866 JR |
910 | %files initrd |
911 | %defattr(644,root,root,755) | |
88c67b5b | 912 | %attr(755,root,root) %{_libdir}/initrd/lvm |
7e72c866 | 913 | %endif |