]> TLD Linux GIT Repositories - packages/lvm2.git/blobdiff - lvm2.spec
- more systemd leftovers
[packages/lvm2.git] / lvm2.spec
index f3d5cdd8499cf05f8960719982a617bb760673fc..2372520cd10e7a9727fef1ace74669e65348275a 100644 (file)
--- a/lvm2.spec
+++ b/lvm2.spec
@@ -1,15 +1,14 @@
 # TODO
 # - vgscan --ignorelocking failure creates /var/lock/lvm (even if /var is not yet mounted)
 # - --with-replicators (=internal/shared/none, default is none)?
 # TODO
 # - vgscan --ignorelocking failure creates /var/lock/lvm (even if /var is not yet mounted)
 # - --with-replicators (=internal/shared/none, default is none)?
-# - OCF agents?
 #
 # Conditional build:
 #
 # Conditional build:
-%bcond_without initrd          # don't build initrd version
+%bcond_with    initrd          # don't 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 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_with    lvmetad         # enable lvmetad
+%bcond_without lvmetad         # disable lvmetad
 %bcond_without selinux         # disable SELinux
 
 %ifarch sparc64 sparc
 %bcond_without selinux         # disable SELinux
 
 %ifarch sparc64 sparc
 Summary:       The new version of Logical Volume Manager for Linux
 Summary(pl.UTF-8):     Nowa wersja Logical Volume Managera dla Linuksa
 Name:          lvm2
 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.98
-Release:       3
+Version:       2.02.116
+Release:       2
 License:       GPL v2 and LGPL v2.1
 Group:         Applications/System
 Source0:       ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
 License:       GPL v2 and LGPL v2.1
 Group:         Applications/System
 Source0:       ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
-# Source0-md5: 1ce5b7f9981e1d02dfd1d3857c8d9fbe
-Source1:       %{name}-tmpfiles.conf
-Source2:       clvmd.service
-Source3:       clvmd.sysconfig
+# Source0-md5: 3a1104e3d1dc4d5e92a40228161cd660
+Source1:       clvmd.sysconfig
 Patch0:                %{name}-selinux.patch
 Patch1:                %{name}-diet.patch
 Patch2:                device-mapper-dmsetup-export.patch
 Patch0:                %{name}-selinux.patch
 Patch1:                %{name}-diet.patch
 Patch2:                device-mapper-dmsetup-export.patch
-Patch3:                %{name}-pld_init.patch
+Patch3:                %{name}-tld_init.patch
 Patch4:                dl-dlsym.patch
 Patch4:                dl-dlsym.patch
-Patch5:                %{name}-wrapper.patch
 Patch6:                %{name}-lvm_path.patch
 Patch6:                %{name}-lvm_path.patch
-Patch7:                %{name}-sd_notify.patch
-Patch8:                %{name}-clvmd_cmd_timeout.patch
-Patch9:                device-mapper-dmsetup-deps-export.patch
+Patch7:                %{name}-clvmd_cmd_timeout.patch
+Patch8:                device-mapper-dmsetup-deps-export.patch
 URL:           http://sources.redhat.com/lvm2/
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
 URL:           http://sources.redhat.com/lvm2/
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
@@ -62,7 +57,7 @@ BuildRequires:        ncurses-devel
 BuildRequires: pkgconfig
 BuildRequires: readline-devel
 BuildRequires: rpmbuild(macros) >= 1.647
 BuildRequires: pkgconfig
 BuildRequires: readline-devel
 BuildRequires: rpmbuild(macros) >= 1.647
-BuildRequires: udev-devel >= 143
+BuildRequires: udev-devel >= 1:143
 %if %{with initrd}
 %if %{with dietlibc}
 BuildRequires: dietlibc-static >= 2:0.32-7
 %if %{with initrd}
 %if %{with dietlibc}
 BuildRequires: dietlibc-static >= 2:0.32-7
@@ -78,13 +73,10 @@ BuildConflicts:     device-mapper-dietlibc
 %if %{with cluster}
 BuildRequires: corosync-devel
 BuildRequires: dlm-devel >= 3.99.5
 %if %{with cluster}
 BuildRequires: corosync-devel
 BuildRequires: dlm-devel >= 3.99.5
-BuildRequires: systemd-devel
 %endif
 %endif
-Requires(post,preun,postun):   systemd-units >= 38
 Requires(post,postun): /sbin/chkconfig
 Requires:      device-mapper >= %{version}-%{release}
 %{?with_selinux:Requires:      libselinux >= 1.10}
 Requires(post,postun): /sbin/chkconfig
 Requires:      device-mapper >= %{version}-%{release}
 %{?with_selinux:Requires:      libselinux >= 1.10}
-Requires:      systemd-units >= 38
 # doesn't work with 2.4 kernels
 Requires:      uname(release) >= 2.6
 Obsoletes:     lvm
 # doesn't work with 2.4 kernels
 Requires:      uname(release) >= 2.6
 Obsoletes:     lvm
@@ -163,12 +155,24 @@ 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.
 
 Cluster MANager (CMAN), which must be set up and running in order for
 cmirrord to function.
 
+%package resource-agents
+Summary:       OCF Resource Agents for LVM2 processes
+Summary(pl.UTF-8):     Agenci OCF do monitorowania procesów LVM2
+Group:         Applications/System
+Requires:      %{name} = %{version}-%{release}
+Requires:      resource-agents
+
+%description resource-agents
+OCF Resource Agents for LVM2 processes.
+
+%description resource-agents -l pl.UTF-8
+Agenci OCF do monitorowania procesów 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
 %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,preun,postun):   systemd-units >= 38
-Requires:      systemd-units >= 38
+Requires(post,postun): /sbin/ldconfig
 
 %description -n device-mapper
 The goal of this driver is to support volume management. The driver
 
 %description -n device-mapper
 The goal of this driver is to support volume management. The driver
@@ -262,11 +266,9 @@ potrzeby initrd.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %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.
 
 # do not force --export-symbol linker option for e.g. statically linked executables
 # -rdynamic compiler option drives linker in the right way.
@@ -289,13 +291,12 @@ cp -f /usr/share/automake/config.sub autoconf
        ac_cv_lib_dl_dlopen=no \
        %{?with_uClibc:ac_cv_func_siginterrupt=no} \
        %{?debug:--enable-debug} \
        ac_cv_lib_dl_dlopen=no \
        %{?with_uClibc:ac_cv_func_siginterrupt=no} \
        %{?debug:--enable-debug} \
-       --with-optimisation="%{rpmcflags} -Os" \
+       --disable-nls \
+       --disable-readline \
+       --enable-selinux%{!?with_glibc:=no} \
        --enable-static_link \
        --with-lvm1=internal \
        --enable-static_link \
        --with-lvm1=internal \
-       --disable-selinux \
-       --%{?with_glibc:en}%{!?with_glibc:dis}able-selinux \
-       --disable-readline \
-       --disable-nls
+       --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
 
 # glibc version links with normal static libdevicemapper which has selinux enabled
 # and we need to keep these in sync between device-mapper and lvm2
 
@@ -327,34 +328,37 @@ unset CC
 %endif
 
 %configure \
 %endif
 
 %configure \
-       --with-usrlibdir=%{_libdir} \
-       %{?debug:--enable-debug} \
-       --with-optimisation="%{rpmcflags}" \
-       --enable-readline \
-       --enable-fsadm \
+       --disable-udev-systemd-background-jobs \
        --enable-applib \
        --enable-cmdlib \
        --enable-applib \
        --enable-cmdlib \
-       %{?with_lvmetad:--enable-lvmetad} \
+       %{?debug:--enable-debug} \
        --enable-dmeventd \
        --enable-dmeventd \
-       --with-dmeventd-path=%{_sbindir}/dmeventd \
+       --enable-fsadm \
+       %{?with_lvmetad:--enable-lvmetad} \
+       --enable-ocf \
+       --enable-readline \
+       %{!?with_selinux:--disable-selinux} \
        --enable-pkgconfig \
        --enable-udev_sync \
        --enable-udev_rules \
        --enable-pkgconfig \
        --enable-udev_sync \
        --enable-udev_rules \
+       --with-cluster=internal \
 %if %{with cluster}
        --with-clvmd=corosync \
        --enable-cmirrord \
 %endif
 %if %{with cluster}
        --with-clvmd=corosync \
        --enable-cmirrord \
 %endif
+       --with-dmeventd-path=%{_sbindir}/dmeventd \
+       --with-interface=ioctl \
        --with-lvm1=internal \
        --with-lvm1=internal \
+       --with-mirrors=internal \
+       --with-optimisation="%{rpmcflags}" \
        --with-pool=internal \
        --with-pool=internal \
-       --with-cluster=internal \
        --with-snapshots=internal \
        --with-snapshots=internal \
-       --with-mirrors=internal \
        --with-thin=internal \
        --with-thin=internal \
-       --with-thin-check="" \
-       --with-interface=ioctl \
+       --with-thin-check=%{_sbindir}/thin_check \
+       --with-thin-dump=%{_sbindir}/thin_dump \
+       --with-thin-repair=%{_sbindir}/thin_repair \
        --with-udev-prefix=/ \
        --with-udev-prefix=/ \
-       --with-systemd_dir=%{systemdunitdir} \
-       %{!?with_selinux:--disable-selinux}
+       --with-usrlibdir=%{_libdir}
 
 %{__make} -j1
 %{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a
 
 %{__make} -j1
 %{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a
@@ -364,17 +368,13 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig}
 %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
 
 install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig}
 %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
 
-%{__make} install install_system_dirs install_systemd_units install_initscripts \
+%{__make} install install_system_dirs install_initscripts \
        DESTDIR=$RPM_BUILD_ROOT \
        OWNER="" \
        GROUP=""
 
        DESTDIR=$RPM_BUILD_ROOT \
        OWNER="" \
        GROUP=""
 
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf
-
 %if %{with cluster}
 %if %{with cluster}
-install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/clvmd.service
-install %{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}
 %endif
 
 mv $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
@@ -402,14 +402,7 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add lvm2-monitor
 %service lvm2-monitor restart
 %post
 /sbin/chkconfig --add lvm2-monitor
 %service lvm2-monitor restart
-%systemd_post lvm2-monitor.service
 /sbin/chkconfig --add blk-availability
 /sbin/chkconfig --add blk-availability
-# no service blk-availability restart
-%systemd_post blk-availability.service
-
-%preun
-%systemd_preun lvm2-monitor.service
-%systemd_preun blk-availability.service
 
 %postun
 if [ "$1" = "0" ]; then
 
 %postun
 if [ "$1" = "0" ]; then
@@ -418,42 +411,25 @@ if [ "$1" = "0" ]; then
        #no service blk-availability stop
        /sbin/chkconfig --del blk-availability
 fi
        #no service blk-availability stop
        /sbin/chkconfig --del blk-availability
 fi
-%systemd_reload
-
-%triggerpostun -- %{name} < 2.02.94-1
-%systemd_trigger lvm2-monitor.service
 
 %post -n device-mapper
 /sbin/ldconfig
 
 %post -n device-mapper
 /sbin/ldconfig
-%systemd_post dm-event.socket
-
-%preun -n device-mapper
-%systemd_preun dm-event.socket dm-event.service
 
 %postun -n device-mapper
 /sbin/ldconfig
 
 %postun -n device-mapper
 /sbin/ldconfig
-%systemd_reload
-
-%triggerpostun -n device-mapper -- device-mapper < 2.02.94-1
-%systemd_trigger dm-event.socket
 
 %post clvmd
 /sbin/chkconfig --add clvmd
 # no service restart - it breaks current locks!
 export NORESTART=1
 
 %post clvmd
 /sbin/chkconfig --add clvmd
 # no service restart - it breaks current locks!
 export NORESTART=1
-%systemd_post clvmd.service
 # re-exec instead
 /usr/sbin/clvmd -S 2>/dev/null || :
 
 # re-exec instead
 /usr/sbin/clvmd -S 2>/dev/null || :
 
-%preun clvmd
-%systemd_preun clvmd.service
-
 %postun clvmd
 if [ "$1" = "0" ]; then
        %service clvmd stop
        /sbin/chkconfig --del clvmd
 fi
 %postun clvmd
 if [ "$1" = "0" ]; then
        %service clvmd stop
        /sbin/chkconfig --del clvmd
 fi
-%systemd_reload
 
 %files
 %defattr(644,root,root,755)
 
 %files
 %defattr(644,root,root,755)
@@ -464,6 +440,7 @@ fi
 %attr(755,root,root) %{_sbindir}/pv*
 %attr(755,root,root) %{_sbindir}/vg*
 %{_mandir}/man5/lvm.conf.5*
 %attr(755,root,root) %{_sbindir}/pv*
 %attr(755,root,root) %{_sbindir}/vg*
 %{_mandir}/man5/lvm.conf.5*
+%{_mandir}/man7/lvmthin.7*
 %{_mandir}/man8/blkdeactivate.8*
 %{_mandir}/man8/fsadm.8*
 %{_mandir}/man8/lv*.8*
 %{_mandir}/man8/blkdeactivate.8*
 %{_mandir}/man8/fsadm.8*
 %{_mandir}/man8/lv*.8*
@@ -471,12 +448,20 @@ fi
 %{_mandir}/man8/vg*.8*
 %attr(750,root,root) %dir %{_sysconfdir}/lvm
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
 %{_mandir}/man8/vg*.8*
 %attr(750,root,root) %dir %{_sysconfdir}/lvm
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
-%{_sysconfdir}/tmpfiles.d/lvm2.conf
-%{systemdunitdir}/lvm2-monitor.service
-%{systemdunitdir}/blk-availability.service
+%attr(750,root,root) %dir %{_sysconfdir}/lvm/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
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
+%if %{with lvmetad}
+/lib/udev/rules.d/69-dm-lvm-metad.rules
+%endif
 %dir %{_sysconfdir}/lvm/cache
 %ghost %{_sysconfdir}/lvm/cache/.cache
 %attr(754,root,root) /etc/rc.d/init.d/blk-availability
 %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
 %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor
 %dir %attr(700,root,root) /var/run/lvm
 
 %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor
 %dir %attr(700,root,root) /var/run/lvm
 
@@ -486,21 +471,23 @@ fi
 %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
 %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
-%{systemdunitdir}/clvmd.service
 %{_mandir}/man8/clvmd.8*
 
 %files cmirrord
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_usrsbindir}/cmirrord
 %{_mandir}/man8/clvmd.8*
 
 %files cmirrord
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_usrsbindir}/cmirrord
-%{_mandir}/man8/cmirrord.8*
 %attr(754,root,root) /etc/rc.d/init.d/cmirrord
 %attr(754,root,root) /etc/rc.d/init.d/cmirrord
+%{_mandir}/man8/cmirrord.8*
 %endif
 
 %endif
 
+%files resource-agents
+%defattr(644,root,root,755)
+%dir %{_prefix}/lib/ocf/resource.d/lvm2
+%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/lvm2/VolumeGroup
+
 %files -n device-mapper
 %defattr(644,root,root,755)
 %doc *_DM
 %files -n device-mapper
 %defattr(644,root,root,755)
 %doc *_DM
-%{systemdunitdir}/dm-event.service
-%{systemdunitdir}/dm-event.socket
 /lib/udev/rules.d/10-dm.rules
 /lib/udev/rules.d/11-dm-lvm.rules
 /lib/udev/rules.d/13-dm-disk.rules
 /lib/udev/rules.d/10-dm.rules
 /lib/udev/rules.d/11-dm-lvm.rules
 /lib/udev/rules.d/13-dm-disk.rules