]> TLD Linux GIT Repositories - packages/lvm2.git/commitdiff
- PLD merge
authorMarcin Krol <hawk@tld-linux.org>
Mon, 3 Feb 2014 11:08:38 +0000 (11:08 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 3 Feb 2014 11:08:38 +0000 (11:08 +0000)
lvm2-diet.patch
lvm2-pld_init.patch
lvm2.spec

index bd90a36e308fe30b5e4dd0c894f76c30b178f8cf..be3c96b719674eda513999e69cac0a4bbeef2d10 100644 (file)
  /* FIXME Unused so far */
  #undef HAVE_SYS_STATVFS_H
 
---- LVM2.2.02.65/tools/Makefile.in~    2010-05-18 13:18:54.344217166 +0200
-+++ LVM2.2.02.65/tools/Makefile.in     2010-05-18 13:21:19.303172002 +0200
-@@ -122,18 +122,18 @@
device-mapper: $(TARGETS_DM)
+--- LVM2.2.02.105/tools/Makefile.in.orig       2014-01-26 18:33:51.531497416 +0100
++++ LVM2.2.02.105/tools/Makefile.in    2014-01-26 19:14:42.264728615 +0100
+@@ -127,19 +127,19 @@
CFLAGS_dmsetup.o += $(EXTRA_EXEC_CFLAGS)
  
  dmsetup: dmsetup.o $(top_builddir)/libdm/libdevmapper.$(LIB_SUFFIX)
--      $(CC) $(CFLAGS) $(LDFLAGS) -L$(top_builddir)/libdm \
-+      $(CC) $(CFLAGS) -L$(interfacedir) -L$(top_builddir)/libdm $(LDFLAGS) \
+-      $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) -L$(top_builddir)/libdm \
++      $(CC) $(CFLAGS) -L$(interfacebuilddir) -L$(top_builddir)/libdm $(EXTRA_EXEC_LDFLAGS) $(LDFLAGS) \
              -o $@ dmsetup.o -ldevmapper $(LIBS)
  
  dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
 -      $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
 -            -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
 +      $(CC) $(CFLAGS) -static -L$(interfacebuilddir) $(LDFLAGS) \
-+            -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS) $(DIETLIBC_LIBS)
++            -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS) $(PTHREAD_LIBS) $(DIETLIBC_LIBS)
  
  all: device-mapper
  
+ CFLAGS_lvm.o += $(EXTRA_EXEC_CFLAGS)
  lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a
--      $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
-+      $(CC) $(CFLAGS) -L$(interfacedir) $(LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
+-      $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
++      $(CC) $(CFLAGS) -L$(interfacebuilddir) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
                $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
  
- lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a  $(interfacebuilddir)/libdevmapper.a
-
---- LVM2.2.02.65/tools/Makefile.in~    2010-05-18 13:39:46.797633173 +0200
-+++ LVM2.2.02.65/tools/Makefile.in     2010-05-18 13:46:01.629690313 +0200
-@@ -137,7 +137,7 @@
+ ifeq ("@BUILD_LVMETAD@", "yes")
+@@ -148,7 +148,7 @@
  
  lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a  $(interfacebuilddir)/libdevmapper.a
        $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
 -            $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
-+            $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) $(DIETLIBC_LIBS)
++            $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) $(PTHREAD_LIBS) $(DIETLIBC_LIBS)
  
  liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
        cat $(top_builddir)/lib/liblvm-internal.a > $@
index 35c0b59092764779cb618824b4283b42f0624439..bf1b4759e60d82759745ddc5300514fc3bc77869 100644 (file)
@@ -160,18 +160,6 @@ diff -dur LVM2.2.02.98.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.02.98
        done
        return $ret
  }
-diff -dur LVM2.2.02.98.orig/scripts/lvm2_monitoring_systemd_red_hat.service.in LVM2.2.02.98/scripts/lvm2_monitoring_systemd_red_hat.service.in
---- LVM2.2.02.98.orig/scripts/lvm2_monitoring_systemd_red_hat.service.in       2012-10-15 16:24:58.000000000 +0200
-+++ LVM2.2.02.98/scripts/lvm2_monitoring_systemd_red_hat.service.in    2012-10-25 11:57:52.000000000 +0200
-@@ -2,7 +2,7 @@
- Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
- Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
- Requires=dm-event.socket
--After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service
-+After=dm-event.socket pld-storage-init.service pld-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service
- Before=local-fs.target
- DefaultDependencies=no
- Conflicts=shutdown.target
 diff -dur LVM2.2.02.98.orig/scripts/blk_availability_systemd_red_hat.service.in LVM2.2.02.98/scripts/blk_availability_systemd_red_hat.service.in
 --- LVM2.2.02.98.orig/scripts/blk_availability_systemd_red_hat.service.in      2012-10-15 16:24:58.000000000 +0200
 +++ LVM2.2.02.98/scripts/blk_availability_systemd_red_hat.service.in   2012-10-29 15:38:31.000000000 +0100
index 30fccefa0c97ae42394e0cad0c91ff4d324b79a6..3e02e4471a65b7a8214d638e258ae68f41a16ffb 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)?
-# - OCF agents?
 #
 # 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_with    lvmetad         # enable lvmetad
+%bcond_without lvmetad         # disable lvmetad
 %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
-Version:       2.02.98
-Release:       3
+Version:       2.02.105
+Release:       1
 License:       GPL v2 and LGPL v2.1
 Group:         Applications/System
 Source0:       ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
-# Source0-md5: 1ce5b7f9981e1d02dfd1d3857c8d9fbe
+# Source0-md5: b5b3540661fc70bf329b526c1cfbcf3a
 Source1:       %{name}-tmpfiles.conf
 Source2:       clvmd.service
 Source3:       clvmd.sysconfig
@@ -62,7 +61,7 @@ BuildRequires:        ncurses-devel
 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
@@ -163,11 +162,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.
 
+%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
-Requires(post,preun,postun):   systemd-units >= 38
+Requires(post,postun): /sbin/ldconfig
 Requires:      systemd-units >= 38
 
 %description -n device-mapper
@@ -289,13 +301,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} \
-       --with-optimisation="%{rpmcflags} -Os" \
+       --disable-nls \
+       --disable-readline \
+       --enable-selinux%{!?with_glibc:=no} \
        --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
 
@@ -310,6 +321,16 @@ cp -f /usr/share/automake/config.sub autoconf
 mv -f tools/lvm.static initrd-lvm
 mv -f 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 -f libdm/ioctl/libdevmapper.a diet-libdevmapper.a}
 %{__make} clean
 
@@ -317,34 +338,37 @@ unset CC
 %endif
 
 %configure \
-       --with-usrlibdir=%{_libdir} \
-       %{?debug:--enable-debug} \
-       --with-optimisation="%{rpmcflags}" \
-       --enable-readline \
-       --enable-fsadm \
        --enable-applib \
        --enable-cmdlib \
-       %{?with_lvmetad:--enable-lvmetad} \
+       %{?debug:--enable-debug} \
        --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 \
+       --with-cluster=internal \
 %if %{with cluster}
        --with-clvmd=corosync \
        --enable-cmirrord \
 %endif
+       --with-dmeventd-path=%{_sbindir}/dmeventd \
+       --with-interface=ioctl \
        --with-lvm1=internal \
+       --with-mirrors=internal \
+       --with-optimisation="%{rpmcflags}" \
        --with-pool=internal \
-       --with-cluster=internal \
        --with-snapshots=internal \
-       --with-mirrors=internal \
+       --with-systemdsystemunitdir=%{systemdunitdir} \
        --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-systemd_dir=%{systemdunitdir} \
-       %{!?with_selinux:--disable-selinux}
+       --with-usrlibdir=%{_libdir}
 
 %{__make} -j1
 %{__make} -j1 -C libdm LIB_STATIC=libdevmapper.a
@@ -461,12 +485,26 @@ fi
 %{_mandir}/man8/vg*.8*
 %attr(750,root,root) %dir %{_sysconfdir}/lvm
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
+%attr(750,root,root) %dir %{_sysconfdir}/lvm/profile
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/default.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
 %{_sysconfdir}/tmpfiles.d/lvm2.conf
-%{systemdunitdir}/lvm2-monitor.service
 %{systemdunitdir}/blk-availability.service
+%if %{with lvmetad}
+%{systemdunitdir}/lvm2-lvmetad.service
+%{systemdunitdir}/lvm2-lvmetad.socket
+%endif
+%{systemdunitdir}/lvm2-monitor.service
+%{systemdunitdir}/lvm2-pvscan@.service
 %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
 
@@ -486,6 +524,11 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/cmirrord
 %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