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