X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=lvm2.spec;h=1c1283817a1d4aabf08ccd4ca878f0a5272d5698;hb=1c585277cdd121fb2c6870d085ed1ec050029590;hp=2565a569915a50b2a9fce5bf20a3e28385a30671;hpb=921d0a05773375091d62523f9691e62fb7f070b4;p=packages%2Flvm2.git diff --git a/lvm2.spec b/lvm2.spec index 2565a56..1c12838 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -3,16 +3,22 @@ # - --with-replicators (=internal/shared/none, default is none)? # # Conditional build: -%bcond_with initrd # don't build initrd version +%bcond_with initrd # build initrd version %bcond_without uClibc # link initrd version with uClibc %bcond_with dietlibc # link initrd version with dietlibc %bcond_with glibc # link initrd version with static GLIBC %bcond_without cluster # disable all cluster support (clvmd&cmirrord) -%bcond_without lvmetad # disable lvmetad -%bcond_without selinux # disable SELinux - -%ifarch sparc64 sparc -%define with_glibc 1 +%bcond_without lvmetad # disable lvmetad (and lvmlockd) +%bcond_without lvmpolld # disable lvmpolld (and lvmlockd) +%bcond_without lvmlockd # disable lvmlockd +%bcond_with sanlock # sanlock support in lvmlockd +%bcond_with replicator # internal replicator support +%bcond_without selinux # SELinux support +%bcond_without python # Python binding + +# lvmlockd requires lvmetad and lvmpolld +%if %{without lvmetad} || %{without lvmpolld} +%undefine with_lvmpolld %endif # if one of the *libc is enabled disable default dietlibc @@ -33,14 +39,13 @@ Summary: The new version of Logical Volume Manager for Linux Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa Name: lvm2 -Version: 2.02.116 +Version: 2.02.140 Release: 1 License: GPL v2 and LGPL v2.1 Group: Applications/System Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz -# Source0-md5: 3a1104e3d1dc4d5e92a40228161cd660 -Source1: %{name}-tmpfiles.conf -Source3: clvmd.sysconfig +# Source0-md5: f2191c4798c8927a6d31a96010b9f568 +Source1: clvmd.sysconfig Patch0: %{name}-selinux.patch Patch1: %{name}-diet.patch Patch2: device-mapper-dmsetup-export.patch @@ -49,16 +54,22 @@ Patch4: dl-dlsym.patch Patch6: %{name}-lvm_path.patch Patch7: %{name}-clvmd_cmd_timeout.patch Patch8: device-mapper-dmsetup-deps-export.patch -URL: http://sources.redhat.com/lvm2/ +Patch9: %{name}-run-dir.patch +URL: http://www.sourceware.org/lvm2/ BuildRequires: autoconf >= 2.61 BuildRequires: automake +# for /run detection +BuildRequires: filesystem >= 3.0-43 +BuildRequires: libblkid-devel >= 2.24 %{?with_selinux:BuildRequires: libselinux-devel >= 1.10} %{?with_selinux:BuildRequires: libsepol-devel} BuildRequires: ncurses-devel BuildRequires: pkgconfig +%{?with_python:BuildRequires: python-devel >= 2} BuildRequires: readline-devel BuildRequires: rpmbuild(macros) >= 1.647 -BuildRequires: udev-devel >= 1:143 +%{?with_sanlock:BuildRequires: sanlock-devel >= 3.2.4} +BuildRequires: udev-devel >= 1:176 %if %{with initrd} %if %{with dietlibc} BuildRequires: dietlibc-static >= 2:0.32-7 @@ -80,6 +91,7 @@ Requires: device-mapper >= %{version}-%{release} %{?with_selinux:Requires: libselinux >= 1.10} # doesn't work with 2.4 kernels Requires: uname(release) >= 2.6 +Suggests: thin-provisioning-tools >= 0.5.4 Obsoletes: lvm Obsoletes: lvm2-systemd BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -143,6 +155,7 @@ węzeł w klastrze nie ma tego demona uruchomionego. %package cmirrord Summary: Cluster mirror log daemon +Summary(pl.UTF-8): Demon śledzący log lustrzany w klastrze Group: Applications/System Requires: %{name} = %{version}-%{release} @@ -156,6 +169,16 @@ This daemon relies on the cluster infrastructure provided by the Cluster MANager (CMAN), which must be set up and running in order for cmirrord to function. +%description cmirrord +cmirrord to demon śledzący informacje logu lustrzanego w klastrze. +Jest specyficzny dla klastrów lustrzanych opartych na device-mapperze +(oraz, poprzez rozszerzenie, klastrów lustrzanych LVM). W klastrach +lustrzanych ten demon jest niezbędny. + +Ten demon polega na infrastrukturze klastra dostarczanej przez CMAN +(Cluster MANager), który musi być skonfigurowany i działający, aby +działał cmirrord. + %package resource-agents Summary: OCF Resource Agents for LVM2 processes Summary(pl.UTF-8): Agenci OCF do monitorowania procesów LVM2 @@ -169,11 +192,24 @@ OCF Resource Agents for LVM2 processes. %description resource-agents -l pl.UTF-8 Agenci OCF do monitorowania procesów LVM2. +%package -n python-lvm +Summary: Python interface to LVM2 +Summary(pl.UTF-8): Interfejs Pythona do LVM2 +Group: Libraries/Python +Requires: device-mapper-libs = %{version}-%{release} + +%description -n python-lvm +Python interface to LVM2. + +%description -n python-lvm -l pl.UTF-8 +Interfejs Pythona do LVM2. + %package -n device-mapper Summary: Userspace support for the device-mapper Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika Group: Base Requires(post,postun): /sbin/ldconfig +Requires: device-mapper-libs = %{version}-%{release} %description -n device-mapper The goal of this driver is to support volume management. The driver @@ -190,21 +226,37 @@ definiowania partycji na dysku lub logicznych wolumenów. Ten lekki składnik jądra może wspierać działające w przestrzeni użytkownika narzędzia do zarządzania logicznymi wolumenami. +%package -n device-mapper-libs +Summary: Device-mapper shared libraries +Summary(pl.UTF-8): Biblioteki współdzielone device-mappera +Group: Libraries +Conflicts: device-mapper < 2.02.119-1 +Requires: libblkid >= 2.24 +Requires: udev-libs >= 1:176 + +%description -n device-mapper-libs +Device-mapper shared libraries. + +%description -n device-mapper-libs -l pl.UTF-8 +Biblioteki współdzielone device-mappera. + %package -n device-mapper-devel -Summary: Header files and development documentation for %{name} -Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do %{name} +Summary: Header files for device-mapper libraries +Summary(pl.UTF-8): Pliki nagłówkowe bibliotek device-mappera Group: Development/Libraries -Requires: device-mapper = %{version}-%{release} +Requires: device-mapper-libs = %{version}-%{release} +Requires: libblkid-devel >= 2.24 %if %{with selinux} Requires: libselinux-devel Requires: libsepol-devel %endif +Requires: udev-devel >= 1:176 %description -n device-mapper-devel -Header files and development documentation for %{name}. +Header files for device-mapper libraries. %description -n device-mapper-devel -l pl.UTF-8 -Pliki nagłówkowe i dokumentacja do %{name}. +Pliki nagłówkowe bibliotek device-mappera. %package -n device-mapper-static Summary: Static devmapper library @@ -270,6 +322,7 @@ potrzeby initrd. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # do not force --export-symbol linker option for e.g. statically linked executables # -rdynamic compiler option drives linker in the right way. @@ -321,7 +374,6 @@ for tool in initrd-lvm initrd-dmsetup; do fi done - %{?with_dietlibc:mv -f libdm/ioctl/libdevmapper.a diet-libdevmapper.a} %{__make} clean @@ -329,19 +381,28 @@ unset CC %endif %configure \ - --disable-udev-systemd-background-jobs \ --enable-applib \ --enable-cmdlib \ %{?debug:--enable-debug} \ --enable-dmeventd \ --enable-fsadm \ +%if %{with lvmlockd} + %{?with_cluster:--enable-lockd-dlm} \ + %{?with_sanlock:--enable-lockd-sanlock} \ +%endif %{?with_lvmetad:--enable-lvmetad} \ --enable-ocf \ + %{?with_python:--enable-python_bindings} \ --enable-readline \ %{!?with_selinux:--disable-selinux} \ --enable-pkgconfig \ --enable-udev_sync \ --enable-udev_rules \ + --with-cache=internal \ + --with-cache-check=/usr/sbin/cache_check \ + --with-cache-dump=/usr/sbin/cache_dump \ + --with-cache-repair=/usr/sbin/cache_repair \ + --with-cache-restore=/usr/sbin/cache_restore \ --with-cluster=internal \ %if %{with cluster} --with-clvmd=corosync \ @@ -353,11 +414,13 @@ unset CC --with-mirrors=internal \ --with-optimisation="%{rpmcflags}" \ --with-pool=internal \ + %{?with_replicator:--with-replicators=internal} \ --with-snapshots=internal \ --with-thin=internal \ - --with-thin-check=%{_sbindir}/thin_check \ - --with-thin-dump=%{_sbindir}/thin_dump \ - --with-thin-repair=%{_sbindir}/thin_repair \ + --with-thin-check=/usr/sbin/thin_check \ + --with-thin-dump=/usr/sbin/thin_dump \ + --with-thin-repair=/usr/sbin/thin_repair \ + --with-thin-restore=/usr/sbin/thin_restore \ --with-udev-prefix=/ \ --with-usrlibdir=%{_libdir} @@ -374,11 +437,11 @@ install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig} OWNER="" \ GROUP="" -install -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d -cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf +%{__make} -C scripts \ + DESTDIR=$RPM_BUILD_ROOT \ %if %{with cluster} -cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd +cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/clvmd %endif mv $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib} @@ -404,23 +467,28 @@ cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir} rm -rf $RPM_BUILD_ROOT %post +/sbin/chkconfig --add lvm2-lvmetad +%service lvm2-lvmetad restart /sbin/chkconfig --add lvm2-monitor %service lvm2-monitor restart +/sbin/chkconfig --add lvm2-lvmpolld +%service lvm2-lvmpolld restart +# no service restart available /sbin/chkconfig --add blk-availability -%postun +%preun if [ "$1" = "0" ]; then + %service lvm2-lvmetad stop + /sbin/chkconfig --del lvm2-lvmetad + %service lvm2-lvmpolld stop + /sbin/chkconfig --del lvm2-lvmpolld %service lvm2-monitor stop /sbin/chkconfig --del lvm2-monitor - #no service blk-availability stop /sbin/chkconfig --del blk-availability fi -%post -n device-mapper -/sbin/ldconfig - -%postun -n device-mapper -/sbin/ldconfig +%post -n device-mapper-libs -p /sbin/ldconfig +%postun -n device-mapper-libs -p /sbin/ldconfig %post clvmd /sbin/chkconfig --add clvmd @@ -429,7 +497,7 @@ export NORESTART=1 # re-exec instead /usr/sbin/clvmd -S 2>/dev/null || : -%postun clvmd +%preun clvmd if [ "$1" = "0" ]; then %service clvmd stop /sbin/chkconfig --del clvmd @@ -444,6 +512,8 @@ fi %attr(755,root,root) %{_sbindir}/pv* %attr(755,root,root) %{_sbindir}/vg* %{_mandir}/man5/lvm.conf.5* +%{_mandir}/man7/lvmcache.7* +%{_mandir}/man7/lvmsystemid.7* %{_mandir}/man7/lvmthin.7* %{_mandir}/man8/blkdeactivate.8* %{_mandir}/man8/fsadm.8* @@ -452,7 +522,10 @@ fi %{_mandir}/man8/vg*.8* %attr(750,root,root) %dir %{_sysconfdir}/lvm %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf %attr(750,root,root) %dir %{_sysconfdir}/lvm/profile +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-mq.profile +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-smq.profile %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile @@ -460,15 +533,18 @@ fi %if %{with lvmetad} /lib/udev/rules.d/69-dm-lvm-metad.rules %endif -%{_sysconfdir}/tmpfiles.d/lvm2.conf %dir %{_sysconfdir}/lvm/cache %ghost %{_sysconfdir}/lvm/cache/.cache %attr(754,root,root) /etc/rc.d/init.d/blk-availability %if %{with lvmetad} %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmetad %endif +%if %{with lvmpolld} +%attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmpolld +%endif %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor -%dir %attr(700,root,root) /var/run/lvm +%attr(700,root,root) %dir /var/lock/lvm +%attr(700,root,root) %dir /var/run/lvm %if %{with cluster} %files clvmd @@ -490,6 +566,13 @@ fi %dir %{_prefix}/lib/ocf/resource.d/lvm2 %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/lvm2/VolumeGroup +%if %{with python} +%files -n python-lvm +%defattr(644,root,root,755) +%attr(755,root,root) %{py_sitedir}/lvm.so +%{py_sitedir}/lvm-%{version}_*-py*.egg-info +%endif + %files -n device-mapper %defattr(644,root,root,755) %doc *_DM @@ -499,30 +582,39 @@ fi /lib/udev/rules.d/95-dm-notify.rules %attr(755,root,root) %{_sbindir}/dmeventd %attr(755,root,root) %{_sbindir}/dmsetup -%attr(755,root,root) /%{_lib}/libdevmapper*.so.*.* -%attr(755,root,root) /%{_lib}/liblvm2app.so.*.* -%attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.* +%attr(755,root,root) %{_sbindir}/dmstats %dir %{_libdir}/device-mapper %attr(755,root,root) %{_libdir}/device-mapper/*.so %attr(755,root,root) %{_libdir}/libdevmapper-event-*.so %{_mandir}/man8/dmsetup.8* +%{_mandir}/man8/dmstats.8* %{_mandir}/man8/dmeventd.8* +%files -n device-mapper-libs +%defattr(644,root,root,755) +%attr(755,root,root) /%{_lib}/libdevmapper.so.*.* +%attr(755,root,root) /%{_lib}/libdevmapper-event.so.*.* +%attr(755,root,root) /%{_lib}/libdevmapper-event-lvm2.so.*.* +%attr(755,root,root) /%{_lib}/liblvm2app.so.*.* +%attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.* + %files -n device-mapper-devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libdevmapper.so %attr(755,root,root) %{_libdir}/libdevmapper-event.so %attr(755,root,root) %{_libdir}/liblvm2app.so %attr(755,root,root) %{_libdir}/liblvm2cmd.so -%{_includedir}/libdevmapper*.h +%{_includedir}/libdevmapper.h +%{_includedir}/libdevmapper-event.h %{_includedir}/lvm2app.h %{_includedir}/lvm2cmd.h -%{_pkgconfigdir}/devmapper*.pc +%{_pkgconfigdir}/devmapper.pc +%{_pkgconfigdir}/devmapper-event.pc %{_pkgconfigdir}/lvm2app.pc %files -n device-mapper-static %defattr(644,root,root,755) -%{_libdir}/libdevmapper*.a +%{_libdir}/libdevmapper.a %if %{with initrd} %if %{with dietlibc}