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