X-Git-Url: https://git.tld-linux.org/?p=packages%2Flvm2.git;a=blobdiff_plain;f=lvm2.spec;h=968de4d8e6218d262e7a76696f3018afa2593943;hp=ff787b375cdd9c875d3eebed652e44c353b0cf18;hb=25f4ed9f9eee36f5989dfec5b5ad8ea3594b0f51;hpb=8780299f67c78624188b5a2a8d85e69e6724be4a diff --git a/lvm2.spec b/lvm2.spec index ff787b3..968de4d 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -5,14 +5,8 @@ # note: dmeventd requires mirrors=internal) # # Conditional build: -# - initrd stuff -%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 # - functionality -%bcond_without cluster # disable all cluster support (clvmd&cmirrord) -%bcond_without lvmetad # lvmetad (and lvmlockd) +%bcond_without cluster # disable all cluster support (cmirrord) %bcond_without lvmdbusd # lvmdbusd %bcond_without lvmpolld # lvmpolld (and lvmlockd) %bcond_without lvmlockd # lvmlockd @@ -25,27 +19,6 @@ %bcond_without python2 # Python 2 binding %bcond_without python3 # Python 3 binding and lvmdbusd -# lvmlockd requires lvmetad and lvmpolld -%if %{without lvmetad} || %{without lvmpolld} -%undefine with_lvmpolld -%endif - -# only glibc possible on SPARC -%ifarch sparc sparcv9 sparc64 -%define with_glibc 1 -%endif -# if one of the *libc is enabled disable default dietlibc -%if %{with dietlibc} && %{with uClibc} -%undefine with_dietlibc -%endif -# with glibc disables default dietlibc -%if %{with glibc} && %{with dietlibc} -%undefine with_dietlibc -%endif -# fallback is glibc if neither alternatives are enabled -%if %{without dietlibc} && %{without uClibc} -%define with_glibc 1 -%endif # for convenience %if %{without python} %undefine with_python2 @@ -58,21 +31,20 @@ 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.177 -Release: 1 +Version: 2.03.00 +Release: 1.1 License: GPL v2 and LGPL v2.1 Group: Applications/System Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz -# Source0-md5: ee6cfbc5a0c5696ffae79dac04ee7a2b -Source3: clvmd.sysconfig +# Source0-md5: f63cc5feaadd3000138e73f7143ed370 Patch0: %{name}-selinux.patch -Patch1: %{name}-diet.patch -Patch2: device-mapper-dmsetup-export.patch -Patch3: %{name}-tld_init.patch -Patch4: dl-dlsym.patch -Patch8: %{name}-clvmd_cmd_timeout.patch -Patch9: device-mapper-dmsetup-deps-export.patch -Patch11: %{name}-thin.patch +Patch1: device-mapper-dmsetup-export.patch +Patch2: %{name}-tld_init.patch +Patch3: dl-dlsym.patch +Patch4: %{name}-run-dir.patch +Patch5: device-mapper-dmsetup-deps-export.patch +Patch6: %{name}-thin.patch +Patch7: %{name}-no-systemd.patch URL: http://www.sourceware.org/lvm2/ BuildRequires: autoconf >= 2.69 BuildRequires: automake @@ -93,18 +65,6 @@ BuildRequires: readline-devel BuildRequires: rpmbuild(macros) >= 1.647 %{?with_sanlock:BuildRequires: sanlock-devel >= 3.3.0} BuildRequires: udev-devel >= 1:176 -%if %{with initrd} -%if %{with dietlibc} -BuildRequires: dietlibc-static >= 2:0.32-7 -BuildConflicts: device-mapper-dietlibc -%endif -%if %{with glibc} -%{?with_selinux:BuildRequires: libselinux-static} -%{?with_selinux:BuildRequires: libsepol-static} -%endif -%{?with_glibc:BuildRequires: glibc-static} -%{?with_uClibc:BuildRequires: uClibc-static >= 2:0.9.29} -%endif %if %{with cluster} BuildRequires: corosync-devel BuildRequires: dlm-devel >= 3.99.5 @@ -116,6 +76,7 @@ Requires: device-mapper >= %{version}-%{release} Requires: uname(release) >= 2.6 Suggests: thin-provisioning-tools >= 0.5.4 Obsoletes: lvm +Obsoletes: lvm2-clvmd Obsoletes: lvm2-systemd BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -131,11 +92,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # causes: undefined reference to `__stack_chk_fail_local' %define filterout_c -fstack-protector -# for some reason known only to rpm there must be "\\|" not "\|" here -%define dietarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/') -%define dietlibdir %{_prefix}/lib/dietlibc/lib-%{dietarch} - -%define skip_post_check_so '.*libdevmapper-event-lvm2.so.*' +%define skip_post_check_so '.*(libdevmapper-event.so|libdevmapper-event-lvm2.so).*' %description This package includes a number of utilities for creating, checking, @@ -145,37 +102,6 @@ and repairing logical volumes. Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania logicznych wolumenów dyskowych (LVM2). -%package initrd -Summary: The new version of Logical Volume Manager for Linux - initrd version -Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - wersja dla initrd -Group: Base -Conflicts: geninitrd < 10000.18 - -%description initrd -This package includes a number of utilities for creating, checking, -and repairing logical volumes - staticaly linked for initrd. - -%description initrd -l pl.UTF-8 -Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania -logicznych wolumenów dyskowych (LVM2) - statycznie skonsolidowane na -potrzeby initrd. - -%package clvmd -Summary: Cluster LVM daemon -Summary(pl.UTF-8): Demon clustra LVM -Group: Applications/System -Requires: %{name} = %{version}-%{release} - -%description clvmd -clvmd is the daemon that distributes LVM metadata updates around a -cluster. It must be running on all nodes in the cluster and will give -an error if a node in the cluster does not have this daemon running. - -%description clvmd -l pl.UTF-8 -clvmd to demon który rozprowadza zmiany meta-danych LVM po klastrze. -Mysi działać na wszystkich węzłach klastra i zgłosi błąd gdy jakiś -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 @@ -350,101 +276,25 @@ Static devmapper library built with dietlibc. %description -n device-mapper-dietlibc -l pl.UTF-8 Statyczna biblioteka devmapper zbudowana z dietlibc. -%package -n device-mapper-initrd -Summary: Userspace support for the device-mapper - initrd version -Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - wersja dla initrd -Group: Base -Obsoletes: device-mapper-initrd-devel -Conflicts: geninitrd < 10000.10 - -%description -n device-mapper-initrd -The goal of this driver is to support volume management. The driver -enables the definition of new block devices composed of ranges of -sectors of existing devices. This can be used to define disk -partitions - or logical volumes. This light-weight kernel component -can support user-space tools for logical volume management. - -This package contains dmsetup program linked staticaly for use in -initrd. - -%description -n device-mapper-initrd -l pl.UTF-8 -Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik -włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów -sektorów na istniejących urządzeniach. Może to być wykorzystane do -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. - -Ten pakiet zawiera program dmsetup skonsolidowany statycznie na -potrzeby initrd. - %prep %setup -q -n LVM2.%{version} %{?with_selinux:%patch0 -p1} %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch8 -p1 -%patch9 -p1 -%patch11 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 # do not force --export-symbol linker option for e.g. statically linked executables # -rdynamic compiler option drives linker in the right way. -%{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.in +%{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.ac %build -%if %{with initrd} -echo Using %{?with_glibc:GLIBC} %{?with_uClibc:uClibc} %{?with_dietlibc:diet} for initrd -%endif cp -f /usr/share/automake/config.sub autoconf %{__aclocal} %{__autoconf} -%if %{with initrd} -%{?with_glibc:export CC="%{__cc}"} -%{?with_uClibc:export CC="%{_target_cpu}-uclibc-gcc"} -%{?with_dietlibc:cc="%{__cc}"; export CC="diet ${cc#ccache }"} - -%configure \ - ac_cv_lib_dl_dlopen=no \ - %{?with_uClibc:ac_cv_func_siginterrupt=no} \ - %{?debug:--enable-debug} \ - --disable-nls \ - --disable-readline \ - --enable-selinux%{!?with_glibc:=no} \ - --enable-static_link \ - --with-lvm1=internal \ - --with-optimisation="%{rpmcflags} -Os" -# glibc version links with normal static libdevicemapper which has selinux enabled -# and we need to keep these in sync between device-mapper and lvm2 - -%{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h -%{__sed} -i -e 's#rpl_realloc#realloc#g' lib/misc/configure.h - -%{__make} -j1 -C include -%{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB= -%{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB= -%{__make} -j1 -C libdaemon/client LIB_SHARED= VERSIONED_SHLIB= -%{__make} -j1 -C tools dmsetup.static lvm.static %{?with_dietlibc:DIETLIBC_LIBS="-lcompat"} -%{__mv} tools/lvm.static initrd-lvm -%{__mv} tools/dmsetup.static initrd-dmsetup - -# check if tools works -for tool in initrd-lvm initrd-dmsetup; do - LVM_SYSTEM_DIR=$(pwd) ./$tool help && rc=$? || rc=$? - if [ $rc -gt 127 ]; then - echo >&2 "Unexpected failure (exit status: $rc) from $tool. Does this tool work?!" - exit 1 - fi -done - -%{?with_dietlibc:%{__mv} libdm/ioctl/libdevmapper.a diet-libdevmapper.a} -%{__make} clean - -unset CC -%endif - %configure \ --enable-applib \ --enable-cache_check_needs_check \ @@ -458,7 +308,6 @@ unset CC %{?with_cluster:--enable-lvmlockd-dlm} \ %{?with_sanlock:--enable-lvmlockd-sanlock} \ %endif - %{?with_lvmetad:--enable-lvmetad} \ --enable-lvmpolld \ --enable-ocf \ %{?with_python2:--enable-python2_bindings} \ @@ -469,6 +318,7 @@ unset CC --enable-thin_check_needs_check \ --enable-udev_sync \ --enable-udev_rules \ + --disable-udev-systemd-background-jobs \ --with-cache=internal \ --with-cache-check=/usr/sbin/cache_check \ --with-cache-dump=/usr/sbin/cache_dump \ @@ -476,7 +326,6 @@ unset CC --with-cache-restore=/usr/sbin/cache_restore \ --with-cluster=internal \ %if %{with cluster} - --with-clvmd=corosync \ --enable-cmirrord \ %endif --with-dmeventd-path=%{_sbindir}/dmeventd \ @@ -494,7 +343,6 @@ unset CC --with-thin-restore=/usr/sbin/thin_restore \ --with-udev-prefix=/ \ --with-usrlibdir=%{_libdir} - # use bash because of "set -o pipefail" %{__make} -j1 \ SHELL=/bin/bash @@ -504,7 +352,6 @@ unset CC %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig} -%{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}} %{__make} install install_system_dirs install_initscripts \ DESTDIR=$RPM_BUILD_ROOT \ @@ -512,10 +359,6 @@ install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig} GROUP="" \ python3dir=%{py3_sitescriptdir} -%if %{with cluster} -cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd -%endif - %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib} for lib in $RPM_BUILD_ROOT/%{_lib}/lib*.so.*; do lib=$(echo $lib | sed -e "s#$RPM_BUILD_ROOT##g") @@ -525,27 +368,32 @@ done touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf -%if %{with initrd} -install -d $RPM_BUILD_ROOT%{_libdir}/initrd -install -p initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm -install -p initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup - -%{?with_dietlibc:cp -a diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a} -%endif - cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir} %clean rm -rf $RPM_BUILD_ROOT +%triggerin -- lvm2 < 2.03.00 +%service lvm2-lvmetad stop +/sbin/chkconfig --del lvm2-lvmetad + +%triggerin -- lvm2-clvmd +%service clvmd stop +/sbin/chkconfig --del clvmd + %post /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-lvmpolld stop + /sbin/chkconfig --del lvm2-lvmpolld %service lvm2-monitor stop /sbin/chkconfig --del lvm2-monitor #no service blk-availability stop @@ -555,19 +403,6 @@ fi %post -n device-mapper-libs -p /sbin/ldconfig %postun -n device-mapper-libs -p /sbin/ldconfig -%post clvmd -/sbin/chkconfig --add clvmd -# no service restart - it breaks current locks! -export NORESTART=1 -# re-exec instead -/usr/sbin/clvmd -S 2>/dev/null || : - -%preun clvmd -if [ "$1" = "0" ]; then - %service clvmd stop - /sbin/chkconfig --del clvmd -fi - %files %defattr(644,root,root,755) %doc README WHATS_NEW doc/* @@ -579,7 +414,6 @@ fi %attr(755,root,root) %{_sbindir}/lvdisplay %attr(755,root,root) %{_sbindir}/lvextend %attr(755,root,root) %{_sbindir}/lvm -%attr(755,root,root) %{_sbindir}/lvmconf %attr(755,root,root) %{_sbindir}/lvmconfig %attr(755,root,root) %{_sbindir}/lvmdiskscan %attr(755,root,root) %{_sbindir}/lvmdump @@ -637,7 +471,6 @@ fi %{_mandir}/man8/lvm-fullreport.8* %{_mandir}/man8/lvm-lvpoll.8* %{_mandir}/man8/lvm.8* -%{_mandir}/man8/lvmconf.8* %{_mandir}/man8/lvmconfig.8* %{_mandir}/man8/lvmdiskscan.8* %{_mandir}/man8/lvmdump.8* @@ -687,18 +520,12 @@ fi %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 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/vdo-small.profile %dir %{_sysconfdir}/lvm/cache %ghost %{_sysconfdir}/lvm/cache/.cache %attr(754,root,root) /etc/rc.d/init.d/blk-availability %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 -%if %{with lvmetad} -%attr(755,root,root) %{_sbindir}/lvmetad -/lib/udev/rules.d/69-dm-lvm-metad.rules -%attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmetad -%{_mandir}/man8/lvmetad.8* -%endif %if %{with lvmlockd} %attr(755,root,root) %{_sbindir}/lvmlockctl %attr(755,root,root) %{_sbindir}/lvmlockd @@ -712,13 +539,6 @@ fi %endif %if %{with cluster} -%files clvmd -%defattr(644,root,root,755) -%attr(755,root,root) %{_usrsbindir}/clvmd -%attr(754,root,root) /etc/rc.d/init.d/clvmd -%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clvmd -%{_mandir}/man8/clvmd.8* - %files cmirrord %defattr(644,root,root,755) %attr(755,root,root) %{_usrsbindir}/cmirrord @@ -732,8 +552,6 @@ fi %attr(755,root,root) %{_sbindir}/lvmdbusd %{py3_sitescriptdir}/lvmdbusd %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/lvmdbusd.profile -#%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf -#%{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service %{_mandir}/man8/lvmdbusd.8* %endif @@ -745,15 +563,15 @@ fi %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 +#%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.cpython-*.so -%{py3_sitedir}/lvm-%{version}_*-py*.egg-info +#%attr(755,root,root) %{py3_sitedir}/lvm.cpython-*.so +#%{py3_sitedir}/lvm-%{version}_*-py*.egg-info %endif %files -n device-mapper @@ -770,11 +588,13 @@ fi %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2raid.so %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2snapshot.so %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2thin.so +%attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2vdo.so %dir %{_libdir}/device-mapper %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2mirror.so %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2raid.so %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2snapshot.so %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2thin.so +%attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2vdo.so %{_mandir}/man8/dmsetup.8* %{_mandir}/man8/dmstats.8* %{_mandir}/man8/dmeventd.8* @@ -784,7 +604,6 @@ fi %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 @@ -792,32 +611,13 @@ fi %attr(755,root,root) %{_libdir}/libdevmapper.so %attr(755,root,root) %{_libdir}/libdevmapper-event.so %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2.so -%attr(755,root,root) %{_libdir}/liblvm2app.so %attr(755,root,root) %{_libdir}/liblvm2cmd.so %{_includedir}/libdevmapper.h %{_includedir}/libdevmapper-event.h -%{_includedir}/lvm2app.h %{_includedir}/lvm2cmd.h %{_pkgconfigdir}/devmapper.pc %{_pkgconfigdir}/devmapper-event.pc -%{_pkgconfigdir}/lvm2app.pc %files -n device-mapper-static %defattr(644,root,root,755) %{_libdir}/libdevmapper.a - -%if %{with initrd} -%if %{with dietlibc} -%files -n device-mapper-dietlibc -%defattr(644,root,root,755) -%{dietlibdir}/libdevmapper.a -%endif - -%files -n device-mapper-initrd -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/initrd/dmsetup - -%files initrd -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/initrd/lvm -%endif