[lvm2] New upstream release and spec file cleanup.

Peter Rajnoha prajnoha at fedoraproject.org
Tue Oct 16 10:03:17 UTC 2012


commit d4897294ded98291a1cbf3a5534fccd188140a96
Author: Peter Rajnoha <prajnoha at redhat.com>
Date:   Tue Oct 16 12:02:19 2012 +0200

    New upstream release and spec file cleanup.

 .gitignore                                         |    1 +
 LVM2.2.02.97.tgz.asc                               |    7 -
 LVM2.2.02.98.tgz.asc                               |    7 +
 ...for-udev-systemd-lvmetad-upstream-changes.patch | 2053 --------------------
 lvm2.spec                                          |  252 ++--
 sources                                            |    2 +-
 upstream                                           |    2 +-
 7 files changed, 135 insertions(+), 2189 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e1fb330..510e3f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
 /LVM2.2.02.95.tgz
 /LVM2.2.02.96.tgz
 /LVM2.2.02.97.tgz
+/LVM2.2.02.98.tgz
diff --git a/LVM2.2.02.98.tgz.asc b/LVM2.2.02.98.tgz.asc
new file mode 100644
index 0000000..b9da58e
--- /dev/null
+++ b/LVM2.2.02.98.tgz.asc
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+iEYEABECAAYFAlB8HicACgkQIoGRwVZ+LBd+mwCg2X9MFz3iFlnARwxVgNBCWgYY
+KHYAn1fgrjMIeoQaKUEDjMrhvapj9wOK
+=/QEd
+-----END PGP SIGNATURE-----
diff --git a/lvm2.spec b/lvm2.spec
index 4f97628..1804f54 100644
--- a/lvm2.spec
+++ b/lvm2.spec
@@ -1,48 +1,33 @@
-%define device_mapper_version 1.02.76
+%define device_mapper_version 1.02.77
 
 %define enable_thin 1
+%define enable_lvmetad 1
 %define enable_cluster 1
 %define enable_cmirror 1
-%define enable_udev 1
-%define enable_systemd 1
-%define udev_systemd_merge 1
-%define enable_lvmetad 1
 
-%if "%{fedora}" == "17"
-%define udev_version 176-1
-%define udev_systemd_merge 0
+%define systemd_version 189-3
+%define dracut_version 002-18
+%define util-linux_version 2.22.1
+%define bash_version 4.0
 %define corosync_version 1.99.9-1
-%define enable_lvmetad 0
-%else
+%define dlm_version 3.99.1-1
+%define libselinux_version 1.30.19-4
+%define persistent_data_version 0.1.4
+
 %if 0%{?rhel}
-  %ifarch i686 x86_64
-    %define enable_cluster 1
-    %define enable_cmirror 1
-  %else
+  %ifnarch i686 x86_64
     %define enable_cluster 0
     %define enable_cmirror 0
   %endif
-  %define udev_version 176-1
-  %define udev_systemd_merge 0
-  %define corosync_version 1.99.9-1
-%else # rawhide
-%define udev_version 183-1
-%define persistent_data_version 0.1.4
-%define corosync_version 1.99.9-1
-%endif
 %endif
 
 %if %{enable_cluster}
-%if %{enable_cmirror}
-%define configure_cmirror --enable-cmirrord
-%else
-%define configure_cmirror --disable-cmirrord
-%endif
-%define dlm_version 3.99.1-1
-%define configure_cluster --with-cluster=internal --with-clvmd=corosync
+  %define configure_cluster --with-cluster=internal --with-clvmd=corosync
+  %if %{enable_cmirror}
+    %define configure_cmirror --enable-cmirrord
+  %endif
 %else
-%define configure_cluster --with-cluster=internal --with-clvmd=none
-%define configure_cmirror --disable-cmirrord
+    %define configure_cluster --with-cluster=internal --with-clvmd=none
 %endif
 
 
@@ -51,7 +36,7 @@
 
 Summary: Userland logical volume management tools 
 Name: lvm2
-Version: 2.02.97
+Version: 2.02.98
 Release: 1%{?dist}
 License: GPLv2
 Group: System Environment/Base
@@ -59,7 +44,7 @@ URL: http://sources.redhat.com/lvm2
 Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
 Patch0: lvm2-set-default-preferred_names.patch
 
-BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
+BuildRequires: libselinux-devel >= %{libselinux_version}, libsepol-devel
 BuildRequires: ncurses-devel
 BuildRequires: readline-devel
 %if %{enable_cluster}
@@ -68,25 +53,13 @@ BuildRequires: dlm-devel >= %{dlm_version}
 %endif
 BuildRequires: module-init-tools
 BuildRequires: pkgconfig
-%if %{enable_udev}
-%if %{udev_systemd_merge}
 BuildRequires: systemd-devel
-%else
-BuildRequires: libudev-devel
-%endif
-%endif
-%if %{enable_systemd}
 BuildRequires: systemd-units
-%endif
 Requires: %{name}-libs = %{version}-%{release}
-%if %{enable_systemd}
-Requires(post): systemd-units systemd-sysv
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
-%endif
+Requires: bash >= %{bash_version}
+Requires(post): systemd-units >= %{systemd_version}, systemd-sysv
+Requires(preun): systemd-units >= %{systemd_version}
+Requires(postun): systemd-units >= %{systemd_version}
 Requires: module-init-tools
 %if %{enable_thin}
 Requires: device-mapper-persistent-data >= %{persistent_data_version}
@@ -110,15 +83,11 @@ or more physical volumes and creating one or more logical volumes
 %define _default_run_dir /run/lvm
 %define _default_locking_dir /run/lock/lvm
 
-%if %{enable_udev}
 %define _udevbasedir %{_prefix}/lib/udev
 %define _udevdir %{_udevbasedir}/rules.d
-%define configure_udev --with-udevdir=%{_udevdir} --enable-udev_sync
-%endif
-
-%if %{enable_systemd}
 %define _tmpfilesdir %{_prefix}/lib/tmpfiles.d
-%endif
+
+%define configure_udev --with-udevdir=%{_udevdir} --enable-udev_sync
 
 %if %{enable_thin}
 %define configure_thin --with-thin=internal --with-thin-check=%{_sbindir}/thin_check
@@ -136,57 +105,29 @@ make %{?_smp_mflags}
 make install DESTDIR=$RPM_BUILD_ROOT
 make install_system_dirs DESTDIR=$RPM_BUILD_ROOT
 make install_initscripts DESTDIR=$RPM_BUILD_ROOT
-%if %{enable_systemd}
 make install_systemd_units DESTDIR=$RPM_BUILD_ROOT
 make install_tmpfiles_configuration DESTDIR=$RPM_BUILD_ROOT
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/ldconfig
-%if %{enable_systemd}
-/bin/systemctl daemon-reload > /dev/null 2>&1 || :
-/bin/systemctl enable lvm2-monitor.service > /dev/null 2>&1 || :
+%systemd_post blk-availability.service lvm2-monitor.service
 %if %{enable_lvmetad}
-/bin/systemctl enable lvm2-lvmetad.socket > /dev/null 2>&1 || :
-%endif
-%else
-/sbin/chkconfig --add lvm2-monitor
-%if %{enable_lvmetad}
-/sbin/chkconfig --add lvm2-lvmetad
-%endif
+%systemd_post lvm2-lvmetad.socket
 %endif
 
 %preun
-%if %{enable_systemd}
-if [ "$1" = 0 ]; then
-	/bin/systemctl --no-reload disable lvm2-monitor.service > /dev/null 2>&1 || :
-	/bin/systemctl stop lvm2-monitor.service > /dev/null 2>&1 || :
-	%if %{enable_lvmetad}
-	/bin/systemctl --no-reload disable lvm2-lvmetad.socket > /dev/null 2>&1 || :
-	/bin/systemctl stop lvm2-lvmetad.service lvm2-lvmetad.socket > /dev/null 2>&1 || :
-	%endif
-fi
-%else
-if [ "$1" = 0 ]; then
-	/sbin/chkconfig --del lvm2-monitor
-	%if %{enable_lvmetad}
-	/sbin/chkconfig --del lvm2-lvmetad
-	%endif
-fi
+%systemd_preun blk-availability.service lvm2-monitor.service
+%if %{enable_lvmetad}
+%systemd_preun lvm2-lvmetad.service lvm2-lvmetad.socket
 %endif
 
 %postun
-%if %{enable_systemd}
-/bin/systemctl daemon-reload > /dev/null 2>&1 || :
-if [ $1 -ge 1 ]; then
-	/bin/systemctl try-restart lvm2-monitor.service > /dev/null 2>&1 || :
-	%if %{enable_lvmetad}
-	/bin/systemctl try-restart lvm2-lvmetad.service > /dev/null 2>&1 || :
-	%endif
-fi
+%systemd_postun_with_restart lvm2-monitor.service
+%if %{enable_lvmetad}
+%systemd_postun_with_restart lvm2-lvmetad.service
 %endif
 
 %triggerun -- %{name} < 2.02.86-2
@@ -199,6 +140,7 @@ fi
 %defattr(-,root,root,-)
 %doc COPYING COPYING.LIB INSTALL README VERSION WHATS_NEW
 %doc doc/lvm_fault_handling.txt
+%{_sbindir}/blkdeactivate
 %{_sbindir}/fsadm
 %{_sbindir}/lvchange
 %{_sbindir}/lvconvert
@@ -250,6 +192,7 @@ fi
 %{_sbindir}/lvmetad
 %endif
 %{_mandir}/man5/lvm.conf.5.gz
+%{_mandir}/man8/blkdeactivate.8.gz
 %{_mandir}/man8/fsadm.8.gz
 %{_mandir}/man8/lvchange.8.gz
 %{_mandir}/man8/lvconvert.8.gz
@@ -297,13 +240,11 @@ fi
 %{_mandir}/man8/vgs.8.gz
 %{_mandir}/man8/vgscan.8.gz
 %{_mandir}/man8/vgsplit.8.gz
-%if %{enable_udev}
 %{_udevdir}/11-dm-lvm.rules
 %if %{enable_lvmetad}
 %{_mandir}/man8/lvmetad.8.gz
 %{_udevdir}/69-dm-lvm-metad.rules
 %endif
-%endif
 %dir %{_sysconfdir}/lvm
 %ghost %{_sysconfdir}/lvm/cache/.cache
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
@@ -312,19 +253,13 @@ fi
 %dir %{_sysconfdir}/lvm/archive
 %dir %{_default_locking_dir}
 %dir %{_default_run_dir}
-%if %{enable_systemd}
 %{_tmpfilesdir}/%{name}.conf
+%{_unitdir}/blk-availability.service
 %{_unitdir}/lvm2-monitor.service
 %if %{enable_lvmetad}
 %{_unitdir}/lvm2-lvmetad.socket
 %{_unitdir}/lvm2-lvmetad.service
 %endif
-%else
-%{_sysconfdir}/rc.d/init.d/lvm2-monitor
-%if %{enable_lvmetad}
-%{_sysconfdir}/rc.d/init.d/lvm2-lvmetad
-%endif
-%endif
 
 ##############################################################################
 # Library and Development subpackages
@@ -461,8 +396,6 @@ fi
 ##############################################################################
 # Legacy SysV init subpackage
 ##############################################################################
-%if %{enable_systemd}
-
 %package sysvinit
 Summary: SysV style init script for LVM2.
 Group: System Environment/Base
@@ -474,13 +407,12 @@ SysV style init script for LVM2. It needs to be installed only if systemd
 is not used as the system init process.
 
 %files sysvinit
+%{_sysconfdir}/rc.d/init.d/blk-availability
 %{_sysconfdir}/rc.d/init.d/lvm2-monitor
 %if %{enable_lvmetad}
 %{_sysconfdir}/rc.d/init.d/lvm2-lvmetad
 %endif
 
-%endif
-
 ##############################################################################
 # Device-mapper subpackages
 ##############################################################################
@@ -492,13 +424,11 @@ License: GPLv2
 Group: System Environment/Base
 URL: http://sources.redhat.com/dm
 Requires: device-mapper-libs = %{device_mapper_version}-%{release}
-Requires: util-linux >= 2.15
-%if %{enable_udev}
-Requires: udev >= %{udev_version}
+Requires: util-linux >= %{util-linux_version}
+Requires: systemd >= %{systemd_version}
 # We need dracut to install required udev rules if udev_sync
 # feature is turned on so we don't lose required notifications.
-Conflicts: dracut < 002-18
-%endif
+Conflicts: dracut < %{dracut_version}
 
 %description -n device-mapper
 This package contains the supporting userspace utility, dmsetup,
@@ -509,14 +439,12 @@ for the kernel device-mapper.
 %doc COPYING COPYING.LIB WHATS_NEW_DM VERSION_DM README INSTALL
 %attr(755,root,root) %{_sbindir}/dmsetup
 %{_mandir}/man8/dmsetup.8.gz
-%if %{enable_udev}
 %doc udev/12-dm-permissions.rules
 %dir %{_udevbasedir}
 %dir %{_udevdir}
 %{_udevdir}/10-dm.rules
 %{_udevdir}/13-dm-disk.rules
 %{_udevdir}/95-dm-notify.rules
-%endif
 
 %package -n device-mapper-devel
 Summary: Development libraries and headers for device-mapper
@@ -562,46 +490,32 @@ Version: %{device_mapper_version}
 Release: %{release}
 Requires: device-mapper = %{device_mapper_version}-%{release}
 Requires: device-mapper-event-libs = %{device_mapper_version}-%{release}
-%if %{enable_systemd}
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
-%endif
 
 %description -n device-mapper-event
 This package contains the dmeventd daemon for monitoring the state
 of device-mapper devices.
 
 %post -n device-mapper-event
-%if %{enable_systemd}
-/bin/systemctl daemon-reload > /dev/null 2>&1 || :
-/bin/systemctl enable dm-event.socket > /dev/null 2>&1 || :
-%endif
+%systemd_post dm-event.socket
 
 %preun -n device-mapper-event
-%if %{enable_systemd}
-if [ "$1" = 0 ]; then
-	/bin/systemctl --no-reload disable dm-event.service dm-event.socket > /dev/null 2>&1 || :
-	/bin/systemctl stop dm-event.service dm-event.socket> /dev/null 2>&1 || :
-fi
-%endif
+%systemd_preun dm-event.service dm-event.socket
 
 %postun -n device-mapper-event
-%if %{enable_systemd}
 /bin/systemctl daemon-reload > /dev/null 2>&1 || :
 if [ $1 -ge 1 ]; then
 	/bin/systemctl reload dm-event.service > /dev/null 2>&1 || :
 fi
-%endif
 
 %files -n device-mapper-event
 %defattr(-,root,root,-)
 %{_sbindir}/dmeventd
 %{_mandir}/man8/dmeventd.8.gz
-%if %{enable_systemd}
 %{_unitdir}/dm-event.socket
 %{_unitdir}/dm-event.service
-%endif
 
 %package -n device-mapper-event-libs
 Summary: Device-mapper event daemon shared library
@@ -641,6 +555,90 @@ the device-mapper event library.
 %{_libdir}/pkgconfig/devmapper-event.pc
 
 %changelog
+* Tue Aug 07 2012 Alasdair Kergon <agk at redhat.com> - 2.02.98-1
+- Don't try to issue discards to a missing PV to avoid segfault.
+- Fix vgchange -aay not to activate non-matching LVs that follow a matching LV.
+- Fix lvchange --resync for RAID LVs which had no effect.
+- Add RAID10 support (--type raid10).
+- Introduce blkdeactivate script to deactivate block devs with dependencies.
+- Apply 'dmsetup mangle' for dm UUIDs besides dm names.
+- Use -q as short form of --quiet.
+- Suppress non-essential stdout with -qq.
+- Add log/silent to lvm.conf equivalent to -qq.
+- Add (p)artial attribute to lvs.
+- Implement devices/global_filter to hide devices from lvmetad.
+- Add lvmdump -l, to collect a state dump from lvmetad.
+- Add --discards to lvconvert.
+- Add support for lvcreate --discards.
+- Add --poolmetadata to lvconvert and support thin meta/data dev stacking.
+- Support creation of read-only thin volumes (lvcreate -p r).
+- Support changes of permissions for thin snapshot volumes.
+- Make lvremove ask before discarding data areas.
+- Prohibit not yet supported change of thin-pool to read-only.
+- Using autoextend percent 0 for thin pool fails 'lvextend --use-policies'.
+- Make vgscan --cache an alias for pvscan --cache.
+- Clear lvmetad metadata/PV cache before a rescan.
+- Fix a segmentation fault upon receiving a corrupt lvmetad response.
+- Give inconsistent metadata warnings in pvscan --cache.
+- Avoid overlapping locks that could cause a deadlock in lvmetad.
+- Fix memory leaks in libdaemon and lvmetad.
+- Optimize libdaemon logging for a fast no-output path.
+- Only create lvmetad pidfile when running as a daemon (no -f).
+- Warn if lvmetad is running but disabled.
+- Warn about running lvmetad with use_lvmetad = 0 in example.conf.
+- Update lvmetad help output (flags and their meaning).
+- Make pvscan --cache read metadata from LVM1 PVs.
+- Make libdaemon buffer handling asymptotically more efficient.
+- Make --sysinit suppress lvmetad connection failure warnings.
+- Prohibit usage of lvcreate --thinpool with --mirrors.
+- Fix lvm2api origin reporting for thin snapshot volume.
+- Add implementation of lvm2api function lvm_percent_to_float.
+- Allow non power of 2 thin chunk sizes if thin pool driver supports that.
+- Allow limited metadata changes when PVs are missing via [vg|lv]change.
+- Do not start dmeventd for lvchange --resync when monitoring is off.
+- Remove pvscan --cache from lvm2-lvmetad init script.
+- Remove ExecStartPost with pvscan --cache from lvm2-lvmetad.service.
+- Report invalid percentage for property snap_percent of non-snaphot LVs.
+- Disallow conversion of thin LVs to mirrors.
+- Fix lvm2api data_percent reporting for thin volumes.
+- Do not allow RAID LVs in a clustered volume group.
+- Enhance insert_layer_for_lv() with recursive rename for _tdata LVs.
+- Skip building dm tree for thin pool when called with origin_only flag.
+- Ensure descriptors 0,1,2 are always available, using /dev/null if necessary.
+- Use /proc/self/fd when available for closing opened descriptors efficiently.
+- Fix inability to create, extend or convert to a large (> 1TiB) RAID LV.
+- Update lvmetad communications to cope with clients using different filters.
+- Clear LV_NOSYNCED flag when a RAID1 LV is converted to a linear LV.
+- Disallow RAID1 upconvert if the LV was created with --nosync.
+- Depend on systemd-udev-settle in units generated by activation generator.
+- Disallow addition of RAID images until the array is in-sync.
+- Fix RAID LV creation with '--test' so valid commands do not fail.
+- Add lvm_lv_rename() to lvm2api.
+- Fix setvbuf code by closing and reopening stream before changing buffer.
+- Disable private buffering when using liblvm.
+- When private stdin/stdout buffering is not used always use silent mode.
+- Fix 32-bit device size arithmetic needing 64-bit casting throughout tree.
+- Fix dereference of NULL in lvmetad error path logging.
+- Fix buffer memory leak in lvmetad logging.
+- Correct the discards field in the lvs manpage (2.02.97).
+- Use proper condition to check for discards settings unsupported by kernel.
+- Reinstate correct default to ignore discards for thin metadata from old tools.
+- Issue error message when -i and -m args do not match specified RAID type.
+- Change lvmetad logging syntax from -ddd to -l {all|wire|debug}.
+- Add new libdaemon logging infrastructure.
+- Support unmount of thin volumes from pool above thin pool threshold.
+- Update man page to reflect that dm UUIDs are being mangled as well.
+- Add 'mangled_uuid' and 'unmangled_uuid' fields to dmsetup info -c -o.
+- Mangle device UUID on dm_task_set_uuid/newuuid call if necessary.
+- Add dm_task_get_uuid_mangled/unmangled to libdevmapper.
+- Always reset delay_resume_if_new flag when stacking thin pool over anything.
+- Don't create value for dm_config_node and require dm_config_create_value call.
+- Check for existing new_name for dmsetup rename.
+- Fix memory leak in dmsetup _get_split_name() error path.
+- Clean up spec file and keep support only for Fedora 18 upwards.
+- Use systemd macros in rpm scriptlets to set up systemd units.
+- Add Requires: bash >= 4.0 for blkdeactivate script.
+
 * Tue Aug 07 2012 Alasdair Kergon <agk at redhat.com> - 2.02.97-1
 - Improve documention of allocation policies in lvm.8.
 - Increase limit for major:minor to 4095:1048575 when using -My option.
diff --git a/sources b/sources
index 2ed2676..9ac0417 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d18bd01334309db1c422b9bf6b181057  LVM2.2.02.97.tgz
+1ce5b7f9981e1d02dfd1d3857c8d9fbe  LVM2.2.02.98.tgz
diff --git a/upstream b/upstream
index 0a89a80..d3455b4 100644
--- a/upstream
+++ b/upstream
@@ -1 +1 @@
-LVM2.2.02.97.tgz
+LVM2.2.02.98.tgz


More information about the scm-commits mailing list