X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=lvm2.spec;h=c761f65076a2aaeb73aff0839fd00e27338efc9b;hb=f0ac180b462502deec6bf03e480574a9be3750d0;hp=ee983944e5b212178f850dfb1654df33d98f8c76;hpb=7324b3759755630bc48b3db9bea3e6b4ee7df452;p=packages%2Flvm2.git diff --git a/lvm2.spec b/lvm2.spec index ee98394..c761f65 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -14,7 +14,8 @@ %bcond_with sanlock # sanlock support in lvmlockd %bcond_with replicator # internal replicator support %bcond_without selinux # SELinux support -%bcond_without python # Python binding +%bcond_without python2 # Python 2.x binding +%bcond_without python3 # Python 3.x binding # lvmlockd requires lvmetad and lvmpolld %if %{without lvmetad} || %{without lvmpolld} @@ -39,12 +40,12 @@ 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.132 +Version: 2.02.146 Release: 1 License: GPL v2 and LGPL v2.1 Group: Applications/System Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz -# Source0-md5: 80af5af726949bbbb2aceb15b24b7d20 +# Source0-md5: 0c922e4c450515fe2d68a946ad04e73b Source1: clvmd.sysconfig Patch0: %{name}-selinux.patch Patch1: %{name}-diet.patch @@ -54,6 +55,7 @@ Patch4: dl-dlsym.patch Patch6: %{name}-lvm_path.patch Patch7: %{name}-clvmd_cmd_timeout.patch Patch8: device-mapper-dmsetup-deps-export.patch +Patch9: %{name}-run-dir.patch URL: http://www.sourceware.org/lvm2/ BuildRequires: autoconf >= 2.61 BuildRequires: automake @@ -64,7 +66,8 @@ BuildRequires: libblkid-devel >= 2.24 %{?with_selinux:BuildRequires: libsepol-devel} BuildRequires: ncurses-devel BuildRequires: pkgconfig -%{?with_python:BuildRequires: python-devel >= 2} +%{?with_python2:BuildRequires: python-devel >= 1:2.6} +%{?with_python3:BuildRequires: python3-devel >= 1:3.2} BuildRequires: readline-devel BuildRequires: rpmbuild(macros) >= 1.647 %{?with_sanlock:BuildRequires: sanlock-devel >= 3.2.4} @@ -203,6 +206,18 @@ Python interface to LVM2. %description -n python-lvm -l pl.UTF-8 Interfejs Pythona do LVM2. +%package -n python3-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 python3-lvm +Python interface to LVM2. + +%description -n python3-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 @@ -321,6 +336,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. @@ -390,7 +406,8 @@ unset CC %endif %{?with_lvmetad:--enable-lvmetad} \ --enable-ocf \ - %{?with_python:--enable-python_bindings} \ + %{?with_python2:--enable-python2-bindings} \ + %{?with_python3:--enable-python3-bindings} \ --enable-readline \ %{!?with_selinux:--disable-selinux} \ --enable-pkgconfig \ @@ -465,16 +482,23 @@ 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 -# no service blk-availability restart -%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 @@ -488,7 +512,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 @@ -534,8 +558,8 @@ fi %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmpolld %endif %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor -%attr(700,root,root) %dir /run/lvm %attr(700,root,root) %dir /var/lock/lvm +%attr(700,root,root) %dir /var/run/lvm %if %{with cluster} %files clvmd @@ -557,13 +581,20 @@ fi %dir %{_prefix}/lib/ocf/resource.d/lvm2 %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/lvm2/VolumeGroup -%if %{with python} +%if %{with python2} %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 +%if %{with python3} +%files -n python3-lvm +%defattr(644,root,root,755) +%attr(755,root,root) %{py3_sitedir}/lvm*.so +%{py3_sitedir}/lvm-%{version}_*-py*.egg-info +%endif + %files -n device-mapper %defattr(644,root,root,755) %doc *_DM