]>
Commit | Line | Data |
---|---|---|
e3a928dc | 1 | # TODO |
e3a928dc | 2 | # - vgscan --ignorelocking failure creates /var/lock/lvm (even if /var is not yet mounted) |
5f0ee085 | 3 | # - --with-replicators (=internal/shared/none, default is none)? |
1b67453e | 4 | # |
99958222 | 5 | # Conditional build: |
8b89021c | 6 | %bcond_with initrd # don't build initrd version |
fe052975 JR |
7 | %bcond_without uClibc # link initrd version with uClibc |
8 | %bcond_with dietlibc # link initrd version with dietlibc | |
5f0ee085 | 9 | %bcond_with glibc # link initrd version with static GLIBC |
7e873dd0 | 10 | %bcond_without cluster # disable all cluster support (clvmd&cmirrord) |
43435358 | 11 | %bcond_without lvmetad # disable lvmetad |
c70b42f6 JR |
12 | %bcond_without selinux # disable SELinux |
13 | ||
4a323c26 | 14 | %ifarch sparc64 sparc |
c70b42f6 | 15 | %define with_glibc 1 |
66800f6a | 16 | %endif |
c70b42f6 JR |
17 | |
18 | # if one of the *libc is enabled disable default dietlibc | |
19 | %if %{with dietlibc} && %{with uClibc} | |
20 | %undefine with_dietlibc | |
21 | %endif | |
22 | ||
f1e27504 | 23 | # with glibc disables default dietlibc |
c70b42f6 JR |
24 | %if %{with glibc} && %{with dietlibc} |
25 | %undefine with_dietlibc | |
26 | %endif | |
27 | ||
f1e27504 ER |
28 | # fallback is glibc if neither alternatives are enabled |
29 | %if %{without dietlibc} && %{without uClibc} | |
30 | %define with_glibc 1 | |
31 | %endif | |
32 | ||
5672aa67 | 33 | Summary: The new version of Logical Volume Manager for Linux |
6536e848 | 34 | Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa |
7e72c866 | 35 | Name: lvm2 |
181bc27d | 36 | Version: 2.02.111 |
0442bdaf | 37 | Release: 1 |
0a81c260 | 38 | License: GPL v2 and LGPL v2.1 |
7e72c866 | 39 | Group: Applications/System |
dc5d0e77 | 40 | Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz |
181bc27d | 41 | # Source0-md5: 02487ab2a9e02d1ee76fe217183df28a |
c386faf9 | 42 | Source1: %{name}-tmpfiles.conf |
0d673991 JK |
43 | Source2: clvmd.service |
44 | Source3: clvmd.sysconfig | |
7210a095 | 45 | Patch0: %{name}-selinux.patch |
c70b42f6 | 46 | Patch1: %{name}-diet.patch |
9a00e98a | 47 | Patch2: device-mapper-dmsetup-export.patch |
4cb4934b | 48 | Patch3: %{name}-pld_init.patch |
b747c17a | 49 | Patch4: dl-dlsym.patch |
4cb4934b | 50 | Patch6: %{name}-lvm_path.patch |
7d8cfaa5 | 51 | Patch7: %{name}-sd_notify.patch |
105f82c3 | 52 | Patch8: %{name}-clvmd_cmd_timeout.patch |
14fc1988 | 53 | Patch9: device-mapper-dmsetup-deps-export.patch |
dc5d0e77 | 54 | URL: http://sources.redhat.com/lvm2/ |
5f0ee085 | 55 | BuildRequires: autoconf >= 2.61 |
7e72c866 | 56 | BuildRequires: automake |
0dc2b8f2 | 57 | %{?with_selinux:BuildRequires: libselinux-devel >= 1.10} |
e4a12efb | 58 | %{?with_selinux:BuildRequires: libsepol-devel} |
5f0ee085 | 59 | BuildRequires: ncurses-devel |
3657a56d | 60 | BuildRequires: pkgconfig |
5f0ee085 | 61 | BuildRequires: readline-devel |
b5640c74 | 62 | BuildRequires: rpmbuild(macros) >= 1.647 |
e55d5c02 | 63 | BuildRequires: udev-devel >= 1:143 |
1ccfba6c | 64 | %if %{with initrd} |
fa9e8aeb | 65 | %if %{with dietlibc} |
39c8d1d5 | 66 | BuildRequires: dietlibc-static >= 2:0.32-7 |
fa9e8aeb AM |
67 | BuildConflicts: device-mapper-dietlibc |
68 | %endif | |
b64b85c5 ER |
69 | %if %{with glibc} |
70 | %{?with_selinux:BuildRequires: libselinux-static} | |
71 | %{?with_selinux:BuildRequires: libsepol-static} | |
72 | %endif | |
c70b42f6 JR |
73 | %{?with_glibc:BuildRequires: glibc-static} |
74 | %{?with_uClibc:BuildRequires: uClibc-static >= 2:0.9.29} | |
1ccfba6c | 75 | %endif |
7e873dd0 | 76 | %if %{with cluster} |
5f0ee085 | 77 | BuildRequires: corosync-devel |
4cb4934b | 78 | BuildRequires: dlm-devel >= 3.99.5 |
7d8cfaa5 | 79 | BuildRequires: systemd-devel |
5f0ee085 | 80 | %endif |
b5640c74 | 81 | Requires(post,preun,postun): systemd-units >= 38 |
0a81c260 | 82 | Requires(post,postun): /sbin/chkconfig |
b167057a | 83 | Requires: device-mapper >= %{version}-%{release} |
0dc2b8f2 | 84 | %{?with_selinux:Requires: libselinux >= 1.10} |
b5640c74 | 85 | Requires: systemd-units >= 38 |
1534f04d ER |
86 | # doesn't work with 2.4 kernels |
87 | Requires: uname(release) >= 2.6 | |
25b6b609 | 88 | Obsoletes: lvm |
c35cea65 | 89 | Obsoletes: lvm2-systemd |
7e72c866 JR |
90 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
91 | ||
92 | %define _sbindir /sbin | |
9ab13f24 | 93 | %define _usrsbindir /usr/sbin |
7e72c866 | 94 | |
0fbd6aae ER |
95 | # changing CFLAGS in the middle confuses confcache |
96 | %undefine configure_cache | |
97 | ||
87a7d834 ER |
98 | # borken on AC |
99 | %define filterout_ld -Wl,--as-needed | |
100 | ||
4cb4934b JK |
101 | # causes: undefined reference to `__stack_chk_fail_local' |
102 | %define filterout_c -fstack-protector | |
103 | ||
c70b42f6 JR |
104 | # for some reason known only to rpm there must be "\\|" not "\|" here |
105 | %define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/') | |
106 | %define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch} | |
107 | ||
f8fa85d0 PS |
108 | %define skip_post_check_so '.*libdevmapper-event-lvm2.so.*' |
109 | ||
7e72c866 JR |
110 | %description |
111 | This package includes a number of utilities for creating, checking, | |
112 | and repairing logical volumes. | |
113 | ||
68d45726 JR |
114 | %description -l pl.UTF-8 |
115 | Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania | |
116 | logicznych wolumenów dyskowych (LVM2). | |
7e72c866 | 117 | |
7e72c866 | 118 | %package initrd |
5672aa67 | 119 | Summary: The new version of Logical Volume Manager for Linux - initrd version |
6536e848 | 120 | Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - wersja dla initrd |
7e72c866 | 121 | Group: Base |
16ddcbd0 | 122 | Conflicts: geninitrd < 10000.18 |
7e72c866 JR |
123 | |
124 | %description initrd | |
125 | This package includes a number of utilities for creating, checking, | |
126 | and repairing logical volumes - staticaly linked for initrd. | |
127 | ||
68d45726 JR |
128 | %description initrd -l pl.UTF-8 |
129 | Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania | |
130 | logicznych wolumenów dyskowych (LVM2) - statycznie skonsolidowane na | |
7e72c866 JR |
131 | potrzeby initrd. |
132 | ||
7e873dd0 JK |
133 | %package clvmd |
134 | Summary: Cluster LVM daemon | |
135 | Summary(pl.UTF-8): Demon clustra LVM | |
136 | Group: Applications/System | |
1aa2f585 | 137 | Requires: %{name} = %{version}-%{release} |
7e873dd0 JK |
138 | |
139 | %description clvmd | |
4cb4934b JK |
140 | clvmd is the daemon that distributes LVM metadata updates around a |
141 | cluster. It must be running on all nodes in the cluster and will give | |
142 | an error if a node in the cluster does not have this daemon running. | |
7e873dd0 JK |
143 | |
144 | %description clvmd -l pl.UTF-8 | |
145 | clvmd to demon który rozprowadza zmiany meta-danych LVM po klastrze. | |
4cb4934b JK |
146 | Mysi działać na wszystkich węzłach klastra i zgłosi błąd gdy jakiś |
147 | węzeł w klastrze nie ma tego demona uruchomionego. | |
7e873dd0 JK |
148 | |
149 | %package cmirrord | |
150 | Summary: Cluster mirror log daemon | |
151 | Group: Applications/System | |
1aa2f585 | 152 | Requires: %{name} = %{version}-%{release} |
7e873dd0 JK |
153 | |
154 | %description cmirrord | |
4cb4934b JK |
155 | cmirrord is the daemon that tracks mirror log information in a |
156 | cluster. It is specific to device-mapper based mirrors (and by | |
157 | extension, LVM cluster mirrors). Cluster mirrors are not possible | |
158 | without this daemon running. | |
7e873dd0 | 159 | |
4cb4934b JK |
160 | This daemon relies on the cluster infrastructure provided by the |
161 | Cluster MANager (CMAN), which must be set up and running in order for | |
162 | cmirrord to function. | |
7e873dd0 | 163 | |
e55d5c02 JB |
164 | %package resource-agents |
165 | Summary: OCF Resource Agents for LVM2 processes | |
166 | Summary(pl.UTF-8): Agenci OCF do monitorowania procesów LVM2 | |
167 | Group: Applications/System | |
168 | Requires: %{name} = %{version}-%{release} | |
169 | Requires: resource-agents | |
170 | ||
171 | %description resource-agents | |
172 | OCF Resource Agents for LVM2 processes. | |
173 | ||
174 | %description resource-agents -l pl.UTF-8 | |
175 | Agenci OCF do monitorowania procesów LVM2. | |
176 | ||
b167057a AM |
177 | %package -n device-mapper |
178 | Summary: Userspace support for the device-mapper | |
179 | Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika | |
180 | Group: Base | |
e7dd8435 | 181 | Requires(post,postun): /sbin/ldconfig |
798d7327 | 182 | Requires(post,preun,postun): systemd-units >= 38 |
b5640c74 | 183 | Requires: systemd-units >= 38 |
b167057a AM |
184 | |
185 | %description -n device-mapper | |
186 | The goal of this driver is to support volume management. The driver | |
187 | enables the definition of new block devices composed of ranges of | |
188 | sectors of existing devices. This can be used to define disk | |
189 | partitions - or logical volumes. This light-weight kernel component | |
190 | can support user-space tools for logical volume management. | |
191 | ||
192 | %description -n device-mapper -l pl.UTF-8 | |
193 | Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik | |
194 | włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów | |
195 | sektorów na istniejących urządzeniach. Może to być wykorzystane do | |
196 | definiowania partycji na dysku lub logicznych wolumenów. Ten lekki | |
197 | składnik jądra może wspierać działające w przestrzeni użytkownika | |
198 | narzędzia do zarządzania logicznymi wolumenami. | |
199 | ||
200 | %package -n device-mapper-devel | |
201 | Summary: Header files and development documentation for %{name} | |
202 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do %{name} | |
203 | Group: Development/Libraries | |
204 | Requires: device-mapper = %{version}-%{release} | |
205 | %if %{with selinux} | |
206 | Requires: libselinux-devel | |
207 | Requires: libsepol-devel | |
208 | %endif | |
209 | ||
210 | %description -n device-mapper-devel | |
211 | Header files and development documentation for %{name}. | |
212 | ||
213 | %description -n device-mapper-devel -l pl.UTF-8 | |
214 | Pliki nagłówkowe i dokumentacja do %{name}. | |
215 | ||
216 | %package -n device-mapper-static | |
217 | Summary: Static devmapper library | |
218 | Summary(pl.UTF-8): Statyczna biblioteka devmapper | |
219 | License: LGPL v2.1 | |
220 | Group: Development/Libraries | |
dc900ced | 221 | Requires: device-mapper-devel = %{version}-%{release} |
b167057a AM |
222 | |
223 | %description -n device-mapper-static | |
224 | Static devmapper library. | |
225 | ||
226 | %description -n device-mapper-static -l pl.UTF-8 | |
227 | Statyczna biblioteka devmapper. | |
228 | ||
c70b42f6 JR |
229 | %package -n device-mapper-dietlibc |
230 | Summary: Static devmapper library built with dietlibc | |
231 | Summary(pl.UTF-8): Statyczna biblioteka devmapper zbudowana z dietlibc | |
232 | License: LGPL v2.1 | |
233 | Group: Development/Libraries | |
234 | Requires: device-mapper-devel = %{version}-%{release} | |
235 | ||
236 | %description -n device-mapper-dietlibc | |
237 | Static devmapper library built with dietlibc. | |
238 | ||
239 | %description -n device-mapper-dietlibc -l pl.UTF-8 | |
240 | Statyczna biblioteka devmapper zbudowana z dietlibc. | |
241 | ||
4a323c26 JR |
242 | %package -n device-mapper-initrd |
243 | Summary: Userspace support for the device-mapper - initrd version | |
244 | Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - wersja dla initrd | |
245 | Group: Base | |
246 | Obsoletes: device-mapper-initrd-devel | |
1f7434e8 | 247 | Conflicts: geninitrd < 10000.10 |
4a323c26 JR |
248 | |
249 | %description -n device-mapper-initrd | |
250 | The goal of this driver is to support volume management. The driver | |
251 | enables the definition of new block devices composed of ranges of | |
252 | sectors of existing devices. This can be used to define disk | |
253 | partitions - or logical volumes. This light-weight kernel component | |
254 | can support user-space tools for logical volume management. | |
255 | ||
256 | This package contains dmsetup program linked staticaly for use in | |
257 | initrd. | |
258 | ||
259 | %description -n device-mapper-initrd -l pl.UTF-8 | |
260 | Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik | |
261 | włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów | |
262 | sektorów na istniejących urządzeniach. Może to być wykorzystane do | |
263 | definiowania partycji na dysku lub logicznych wolumenów. Ten lekki | |
264 | składnik jądra może wspierać działające w przestrzeni użytkownika | |
265 | narzędzia do zarządzania logicznymi wolumenami. | |
266 | ||
267 | Ten pakiet zawiera program dmsetup skonsolidowany statycznie na | |
268 | potrzeby initrd. | |
269 | ||
7e72c866 | 270 | %prep |
ec2de926 | 271 | %setup -q -n LVM2.%{version} |
7210a095 | 272 | %{?with_selinux:%patch0 -p1} |
c70b42f6 | 273 | %patch1 -p1 |
9a00e98a | 274 | %patch2 -p1 |
f0dab9f1 | 275 | %patch3 -p1 |
b747c17a | 276 | %patch4 -p1 |
eaa437a5 | 277 | %patch6 -p1 |
7d8cfaa5 | 278 | %patch7 -p1 |
105f82c3 | 279 | %patch8 -p1 |
14fc1988 | 280 | %patch9 -p1 |
b167057a | 281 | |
39c8d1d5 | 282 | # do not force --export-symbol linker option for e.g. statically linked executables |
b5eb9717 PS |
283 | # -rdynamic compiler option drives linker in the right way. |
284 | %{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.in | |
285 | ||
7e72c866 | 286 | %build |
87a7d834 ER |
287 | %if %{with initrd} |
288 | echo Using %{?with_glibc:GLIBC} %{?with_uClibc:uClibc} %{?with_dietlibc:diet} for initrd | |
289 | %endif | |
242ffb9a | 290 | cp -f /usr/share/automake/config.sub autoconf |
7e72c866 JR |
291 | %{__aclocal} |
292 | %{__autoconf} | |
293 | ||
99958222 | 294 | %if %{with initrd} |
6c31051f PS |
295 | %{?with_glibc:export CC="%{__cc}"} |
296 | %{?with_uClibc:export CC="%{_target_cpu}-uclibc-gcc"} | |
4cbea9f4 | 297 | %{?with_dietlibc:cc="%{__cc}"; export CC="diet ${cc#ccache }"} |
6c31051f | 298 | |
9bdab2f4 | 299 | %configure \ |
a5702977 | 300 | ac_cv_lib_dl_dlopen=no \ |
eaa437a5 | 301 | %{?with_uClibc:ac_cv_func_siginterrupt=no} \ |
4c78aede | 302 | %{?debug:--enable-debug} \ |
43435358 JB |
303 | --disable-nls \ |
304 | --disable-readline \ | |
305 | --enable-selinux%{!?with_glibc:=no} \ | |
9bdab2f4 | 306 | --enable-static_link \ |
69688a46 | 307 | --with-lvm1=internal \ |
43435358 | 308 | --with-optimisation="%{rpmcflags} -Os" |
c70b42f6 | 309 | # glibc version links with normal static libdevicemapper which has selinux enabled |
260d6858 | 310 | # and we need to keep these in sync between device-mapper and lvm2 |
4c78aede ER |
311 | |
312 | %{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h | |
0402cba0 | 313 | %{__sed} -i -e 's#rpl_realloc#realloc#g' lib/misc/configure.h |
ec2de926 | 314 | |
c7bbf0c8 AM |
315 | %{__make} -j1 -C include |
316 | %{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB= | |
317 | %{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB= | |
4cb4934b | 318 | %{__make} -j1 -C libdaemon/client LIB_SHARED= VERSIONED_SHLIB= |
2afef789 | 319 | %{__make} -j1 -C tools dmsetup.static lvm.static %{?with_dietlibc:DIETLIBC_LIBS="-lcompat"} |
69688a46 | 320 | mv -f tools/lvm.static initrd-lvm |
4a323c26 | 321 | mv -f tools/dmsetup.static initrd-dmsetup |
7cef5d95 AM |
322 | |
323 | # check if tools works | |
324 | for tool in initrd-lvm initrd-dmsetup; do | |
cfa41a73 | 325 | LVM_SYSTEM_DIR=$(pwd) ./$tool help && rc=$? || rc=$? |
7cef5d95 | 326 | if [ $rc -gt 127 ]; then |
cfa41a73 | 327 | echo >&2 "Unexpected failure (exit status: $rc) from $tool. Does this tool work?!" |
7cef5d95 AM |
328 | exit 1 |
329 | fi | |
330 | done | |
331 | ||
332 | ||
c70b42f6 | 333 | %{?with_dietlibc:mv -f libdm/ioctl/libdevmapper.a diet-libdevmapper.a} |
9bdab2f4 | 334 | %{__make} clean |
6c31051f PS |
335 | |
336 | unset CC | |
7e72c866 JR |
337 | %endif |
338 | ||
9d0d1d5f | 339 | %configure \ |
6e7a47a9 | 340 | --enable-applib \ |
b167057a | 341 | --enable-cmdlib \ |
43435358 | 342 | %{?debug:--enable-debug} \ |
b167057a | 343 | --enable-dmeventd \ |
43435358 JB |
344 | --enable-fsadm \ |
345 | %{?with_lvmetad:--enable-lvmetad} \ | |
e55d5c02 | 346 | --enable-ocf \ |
43435358 JB |
347 | --enable-readline \ |
348 | %{!?with_selinux:--disable-selinux} \ | |
b167057a | 349 | --enable-pkgconfig \ |
5f0ee085 JB |
350 | --enable-udev_sync \ |
351 | --enable-udev_rules \ | |
43435358 | 352 | --with-cluster=internal \ |
7e873dd0 | 353 | %if %{with cluster} |
4cb4934b JK |
354 | --with-clvmd=corosync \ |
355 | --enable-cmirrord \ | |
5cf18a89 | 356 | %endif |
43435358 JB |
357 | --with-dmeventd-path=%{_sbindir}/dmeventd \ |
358 | --with-interface=ioctl \ | |
607d2229 | 359 | --with-lvm1=internal \ |
43435358 JB |
360 | --with-mirrors=internal \ |
361 | --with-optimisation="%{rpmcflags}" \ | |
607d2229 AM |
362 | --with-pool=internal \ |
363 | --with-snapshots=internal \ | |
43435358 | 364 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
a4dcdce5 | 365 | --with-cache=internal \ |
b5640c74 | 366 | --with-thin=internal \ |
e55d5c02 JB |
367 | --with-thin-check=%{_sbindir}/thin_check \ |
368 | --with-thin-dump=%{_sbindir}/thin_dump \ | |
369 | --with-thin-repair=%{_sbindir}/thin_repair \ | |
589f4db4 | 370 | --with-udev-prefix=/ \ |
43435358 | 371 | --with-usrlibdir=%{_libdir} |
589f4db4 | 372 | |
b167057a | 373 | %{__make} -j1 |
c7bbf0c8 | 374 | %{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a |
7e72c866 JR |
375 | |
376 | %install | |
377 | rm -rf $RPM_BUILD_ROOT | |
0d673991 | 378 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig} |
c70b42f6 | 379 | %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}} |
7e72c866 | 380 | |
9b82b6a5 | 381 | %{__make} install install_system_dirs install_systemd_units install_initscripts \ |
7e72c866 | 382 | DESTDIR=$RPM_BUILD_ROOT \ |
1ccfba6c AM |
383 | OWNER="" \ |
384 | GROUP="" | |
7e72c866 | 385 | |
4cb4934b | 386 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d |
798d7327 | 387 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf |
9b82b6a5 | 388 | |
0d673991 | 389 | %if %{with cluster} |
798d7327 ER |
390 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/clvmd.service |
391 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd | |
0d673991 JK |
392 | %endif |
393 | ||
b167057a AM |
394 | mv $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib} |
395 | for lib in $RPM_BUILD_ROOT/%{_lib}/lib*.so.*; do | |
396 | lib=$(echo $lib | sed -e "s#$RPM_BUILD_ROOT##g") | |
397 | slib=$(basename $lib | sed -e 's#\.so\..*#.so#g') | |
398 | ln -sf $lib $RPM_BUILD_ROOT%{_libdir}/$slib | |
399 | done | |
400 | ||
1cfc154f JR |
401 | touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf |
402 | ||
88c67b5b JR |
403 | %if %{with initrd} |
404 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd | |
a3569314 ER |
405 | install -p initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm |
406 | install -p initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup | |
7e72c866 | 407 | |
a3569314 | 408 | %{?with_dietlibc:cp -a diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a} |
1306038e | 409 | %endif |
c70b42f6 | 410 | |
a3569314 | 411 | cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir} |
b167057a | 412 | |
7e72c866 JR |
413 | %clean |
414 | rm -rf $RPM_BUILD_ROOT | |
415 | ||
6e7a47a9 AM |
416 | %post |
417 | /sbin/chkconfig --add lvm2-monitor | |
418 | %service lvm2-monitor restart | |
c35cea65 | 419 | %systemd_post lvm2-monitor.service |
4cb4934b JK |
420 | /sbin/chkconfig --add blk-availability |
421 | # no service blk-availability restart | |
422 | %systemd_post blk-availability.service | |
c35cea65 JR |
423 | |
424 | %preun | |
425 | %systemd_preun lvm2-monitor.service | |
4cb4934b | 426 | %systemd_preun blk-availability.service |
6e7a47a9 AM |
427 | |
428 | %postun | |
429 | if [ "$1" = "0" ]; then | |
430 | %service lvm2-monitor stop | |
431 | /sbin/chkconfig --del lvm2-monitor | |
4cb4934b JK |
432 | #no service blk-availability stop |
433 | /sbin/chkconfig --del blk-availability | |
6e7a47a9 | 434 | fi |
c35cea65 | 435 | %systemd_reload |
6e7a47a9 | 436 | |
c35cea65 JR |
437 | %triggerpostun -- %{name} < 2.02.94-1 |
438 | %systemd_trigger lvm2-monitor.service | |
b167057a | 439 | |
c35cea65 JR |
440 | %post -n device-mapper |
441 | /sbin/ldconfig | |
442 | %systemd_post dm-event.socket | |
9b82b6a5 | 443 | |
c35cea65 JR |
444 | %preun -n device-mapper |
445 | %systemd_preun dm-event.socket dm-event.service | |
9b82b6a5 | 446 | |
c35cea65 JR |
447 | %postun -n device-mapper |
448 | /sbin/ldconfig | |
9b82b6a5 BZ |
449 | %systemd_reload |
450 | ||
c35cea65 JR |
451 | %triggerpostun -n device-mapper -- device-mapper < 2.02.94-1 |
452 | %systemd_trigger dm-event.socket | |
453 | ||
161d6a19 JK |
454 | %post clvmd |
455 | /sbin/chkconfig --add clvmd | |
456 | # no service restart - it breaks current locks! | |
457 | export NORESTART=1 | |
458 | %systemd_post clvmd.service | |
459 | # re-exec instead | |
460 | /usr/sbin/clvmd -S 2>/dev/null || : | |
461 | ||
462 | %preun clvmd | |
463 | %systemd_preun clvmd.service | |
464 | ||
465 | %postun clvmd | |
466 | if [ "$1" = "0" ]; then | |
467 | %service clvmd stop | |
468 | /sbin/chkconfig --del clvmd | |
469 | fi | |
470 | %systemd_reload | |
471 | ||
7e72c866 JR |
472 | %files |
473 | %defattr(644,root,root,755) | |
e6ac7970 | 474 | %doc README WHATS_NEW doc/* |
4cb4934b | 475 | %attr(755,root,root) %{_sbindir}/blkdeactivate |
86418c14 JB |
476 | %attr(755,root,root) %{_sbindir}/fsadm |
477 | %attr(755,root,root) %{_sbindir}/lv* | |
478 | %attr(755,root,root) %{_sbindir}/pv* | |
479 | %attr(755,root,root) %{_sbindir}/vg* | |
86418c14 | 480 | %{_mandir}/man5/lvm.conf.5* |
a4dcdce5 | 481 | %{_mandir}/man7/lvmcache.7* |
0442bdaf | 482 | %{_mandir}/man7/lvmthin.7* |
4cb4934b | 483 | %{_mandir}/man8/blkdeactivate.8* |
86418c14 JB |
484 | %{_mandir}/man8/fsadm.8* |
485 | %{_mandir}/man8/lv*.8* | |
486 | %{_mandir}/man8/pv*.8* | |
487 | %{_mandir}/man8/vg*.8* | |
99958222 | 488 | %attr(750,root,root) %dir %{_sysconfdir}/lvm |
2316bf4d | 489 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf |
e55d5c02 | 490 | %attr(750,root,root) %dir %{_sysconfdir}/lvm/profile |
bfc9ab17 JB |
491 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile |
492 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile | |
493 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile | |
ac328eef | 494 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile |
43435358 JB |
495 | %if %{with lvmetad} |
496 | /lib/udev/rules.d/69-dm-lvm-metad.rules | |
497 | %endif | |
c35cea65 | 498 | %{_sysconfdir}/tmpfiles.d/lvm2.conf |
4cb4934b | 499 | %{systemdunitdir}/blk-availability.service |
43435358 JB |
500 | %if %{with lvmetad} |
501 | %{systemdunitdir}/lvm2-lvmetad.service | |
502 | %{systemdunitdir}/lvm2-lvmetad.socket | |
503 | %endif | |
504 | %{systemdunitdir}/lvm2-monitor.service | |
505 | %{systemdunitdir}/lvm2-pvscan@.service | |
6e7a47a9 AM |
506 | %dir %{_sysconfdir}/lvm/cache |
507 | %ghost %{_sysconfdir}/lvm/cache/.cache | |
4cb4934b | 508 | %attr(754,root,root) /etc/rc.d/init.d/blk-availability |
43435358 JB |
509 | %if %{with lvmetad} |
510 | %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmetad | |
511 | %endif | |
6e7a47a9 | 512 | %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor |
5388840f | 513 | %dir %attr(700,root,root) /var/run/lvm |
7e873dd0 JK |
514 | |
515 | %if %{with cluster} | |
516 | %files clvmd | |
517 | %defattr(644,root,root,755) | |
518 | %attr(755,root,root) %{_usrsbindir}/clvmd | |
519 | %attr(754,root,root) /etc/rc.d/init.d/clvmd | |
0d673991 | 520 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clvmd |
0442bdaf | 521 | %attr(755,root,root) /lib/systemd/lvm2-cluster-activation |
0d673991 | 522 | %{systemdunitdir}/clvmd.service |
0442bdaf JB |
523 | %{systemdunitdir}/lvm2-cluster-activation.service |
524 | %{systemdunitdir}/lvm2-clvmd.service | |
7e873dd0 JK |
525 | %{_mandir}/man8/clvmd.8* |
526 | ||
7e873dd0 JK |
527 | %files cmirrord |
528 | %defattr(644,root,root,755) | |
529 | %attr(755,root,root) %{_usrsbindir}/cmirrord | |
7e873dd0 | 530 | %attr(754,root,root) /etc/rc.d/init.d/cmirrord |
0442bdaf JB |
531 | %{systemdunitdir}/lvm2-cmirrord.service |
532 | %{_mandir}/man8/cmirrord.8* | |
7e873dd0 | 533 | %endif |
7e72c866 | 534 | |
e55d5c02 JB |
535 | %files resource-agents |
536 | %defattr(644,root,root,755) | |
537 | %dir %{_prefix}/lib/ocf/resource.d/lvm2 | |
538 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/lvm2/VolumeGroup | |
539 | ||
b167057a AM |
540 | %files -n device-mapper |
541 | %defattr(644,root,root,755) | |
542 | %doc *_DM | |
c35cea65 JR |
543 | %{systemdunitdir}/dm-event.service |
544 | %{systemdunitdir}/dm-event.socket | |
589f4db4 JR |
545 | /lib/udev/rules.d/10-dm.rules |
546 | /lib/udev/rules.d/11-dm-lvm.rules | |
547 | /lib/udev/rules.d/13-dm-disk.rules | |
548 | /lib/udev/rules.d/95-dm-notify.rules | |
b167057a AM |
549 | %attr(755,root,root) %{_sbindir}/dmeventd |
550 | %attr(755,root,root) %{_sbindir}/dmsetup | |
551 | %attr(755,root,root) /%{_lib}/libdevmapper*.so.*.* | |
6e7a47a9 | 552 | %attr(755,root,root) /%{_lib}/liblvm2app.so.*.* |
b167057a | 553 | %attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.* |
1306038e AM |
554 | %dir %{_libdir}/device-mapper |
555 | %attr(755,root,root) %{_libdir}/device-mapper/*.so | |
bece12dd | 556 | %attr(755,root,root) %{_libdir}/libdevmapper-event-*.so |
b167057a | 557 | %{_mandir}/man8/dmsetup.8* |
f0dab9f1 | 558 | %{_mandir}/man8/dmeventd.8* |
b167057a AM |
559 | |
560 | %files -n device-mapper-devel | |
561 | %defattr(644,root,root,755) | |
bece12dd JR |
562 | %attr(755,root,root) %{_libdir}/libdevmapper.so |
563 | %attr(755,root,root) %{_libdir}/libdevmapper-event.so | |
6e7a47a9 | 564 | %attr(755,root,root) %{_libdir}/liblvm2app.so |
b167057a AM |
565 | %attr(755,root,root) %{_libdir}/liblvm2cmd.so |
566 | %{_includedir}/libdevmapper*.h | |
6e7a47a9 | 567 | %{_includedir}/lvm2app.h |
b167057a AM |
568 | %{_includedir}/lvm2cmd.h |
569 | %{_pkgconfigdir}/devmapper*.pc | |
6e7a47a9 | 570 | %{_pkgconfigdir}/lvm2app.pc |
b167057a AM |
571 | |
572 | %files -n device-mapper-static | |
573 | %defattr(644,root,root,755) | |
574 | %{_libdir}/libdevmapper*.a | |
575 | ||
1306038e | 576 | %if %{with initrd} |
c70b42f6 JR |
577 | %if %{with dietlibc} |
578 | %files -n device-mapper-dietlibc | |
579 | %defattr(644,root,root,755) | |
580 | %{dietlibdir}/libdevmapper.a | |
581 | %endif | |
582 | ||
4a323c26 JR |
583 | %files -n device-mapper-initrd |
584 | %defattr(644,root,root,755) | |
88c67b5b | 585 | %attr(755,root,root) %{_libdir}/initrd/dmsetup |
4a323c26 | 586 | |
7e72c866 JR |
587 | %files initrd |
588 | %defattr(644,root,root,755) | |
88c67b5b | 589 | %attr(755,root,root) %{_libdir}/initrd/lvm |
7e72c866 | 590 | %endif |