New upstream release v2.02.174

* Add deprecation warnings
* Revert cleanup causing regressions
This commit is contained in:
Marian Csontos 2017-09-20 13:24:03 +02:00
parent 8cbc2b32b0
commit 852dd0a75c
8 changed files with 259 additions and 38 deletions

1
.gitignore vendored
View File

@ -76,3 +76,4 @@
/LVM2.2.02.171.tgz /LVM2.2.02.171.tgz
/LVM2.2.02.172.tgz /LVM2.2.02.172.tgz
/LVM2.2.02.173.tgz /LVM2.2.02.173.tgz
/LVM2.2.02.174.tgz

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAllw138ACgkQIoGRwVZ+LBcXbwCeI1gt2DZhVSuyEN784ynSzaHb
VoYAoOOY7HFlESPCTBoFKks4zY/9Ou5D
=Na9K
-----END PGP SIGNATURE-----

7
LVM2.2.02.174.tgz.asc Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlm5jGIACgkQIoGRwVZ+LBfm7gCghWAdO+3JRkl3kJP87n3DAlR8
M9YAnjEHPo2IVr138u3RaYHIUXvvQdzQ
=T829
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,78 @@
configure | 6 ++++++
configure.in | 3 +++
liblvm/lvm2app.h | 2 ++
python/liblvm.c | 2 ++
4 files changed, 13 insertions(+)
diff --git a/configure b/configure
index 2afbe6e..78c738d 100755
--- a/configure
+++ b/configure
@@ -12791,6 +12791,10 @@ $as_echo "$APPLIB" >&6; }
test "$APPLIB" = yes \
&& LVM2APP_LIB=-llvm2app \
|| LVM2APP_LIB=
+if test "$APPLIB"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python bindings are deprecated. Use D-Bus API" >&5
+$as_echo "$as_me: WARNING: Python bindings are deprecated. Use D-Bus API" >&2;}
+fi
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile liblvm2cmd.so" >&5
@@ -13868,6 +13872,8 @@ $as_echo "no" >&6; }
fi
if test "$PYTHON_BINDINGS" = yes -o "$PYTHON2_BINDINGS" = yes -o "$PYTHON3_BINDINGS" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python bindings are deprecated. Use D-Bus API" >&5
+$as_echo "$as_me: WARNING: Python bindings are deprecated. Use D-Bus API" >&2;}
test "$APPLIB" != yes && as_fn_error $? "Python_bindings require --enable-applib" "$LINENO" 5
fi
diff --git a/configure.in b/configure.in
index 43e8652..e2f448e 100644
--- a/configure.in
+++ b/configure.in
@@ -1464,6 +1464,8 @@ AC_SUBST([LVM2APP_LIB])
test "$APPLIB" = yes \
&& LVM2APP_LIB=-llvm2app \
|| LVM2APP_LIB=
+AS_IF([test "$APPLIB"],
+ [AC_MSG_WARN([Python bindings are deprecated. Use D-Bus API])])
################################################################################
dnl -- Enable cmdlib
@@ -1546,6 +1548,7 @@ if test "$BUILD_LVMDBUSD" = yes; then
fi
if test "$PYTHON_BINDINGS" = yes -o "$PYTHON2_BINDINGS" = yes -o "$PYTHON3_BINDINGS" = yes; then
+ AC_MSG_WARN([Python bindings are deprecated. Use D-Bus API])
test "$APPLIB" != yes && AC_MSG_ERROR([Python_bindings require --enable-applib])
fi
diff --git a/liblvm/lvm2app.h b/liblvm/lvm2app.h
index be53b2d..f64262d 100644
--- a/liblvm/lvm2app.h
+++ b/liblvm/lvm2app.h
@@ -18,6 +18,8 @@
#include <stdint.h>
+#warning "liblvm2app is deprecated, use D-Bus API instead."
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/python/liblvm.c b/python/liblvm.c
index 1b3534e..6d67b8b 100644
--- a/python/liblvm.c
+++ b/python/liblvm.c
@@ -2085,6 +2085,8 @@ PyMODINIT_FUNC initlvm(void)
PyModule_AddObject(m, "LibLVMError", _LibLVMError);
}
+ PyErr_Warn(PyExc_DeprecationWarning, "Python API is deprecated, use D-Bus API instead.");
+
Py_AtExit(_liblvm_cleanup);
#ifdef IS_PY3K
return m;

View File

@ -0,0 +1,117 @@
From d93a2bb74177397430ec21d6062987cb7da91217 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Thu, 14 Sep 2017 12:15:59 -0500
Subject: [PATCH] revert tidy: prefer not using else after return
Revert the lvmlockd.c changes from:
commit 0bf836aa14f98eb83969a6e81695a024f56a5eb5
"tidy: prefer not using else after return"
The commit introduced at least one regression, which broke
lvcreate of a thin pool in a shared VG.
---
lib/locking/lvmlockd.c | 43 ++++++++++++++++++++-----------------------
1 file changed, 20 insertions(+), 23 deletions(-)
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index a0e3f03..f4047d9 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -1646,15 +1646,15 @@ int lockd_gl(struct cmd_context *cmd, const char *def_mode, uint32_t flags)
*/
log_error("Global lock failed: held by other host.");
return 0;
+ } else {
+ /*
+ * We don't intend to reach this. We should check
+ * any known/possible error specifically and print
+ * a more helpful message. This is for completeness.
+ */
+ log_error("Global lock failed: error %d.", result);
+ return 0;
}
-
- /*
- * We don't intend to reach this. We should check
- * any known/possible error specifically and print
- * a more helpful message. This is for completeness.
- */
- log_error("Global lock failed: error %d.", result);
- return 0;
}
allow:
@@ -2380,16 +2380,15 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
if (!_lvmlockd_connected)
return 0;
- if (!lp->needs_lockd_init)
+ if (!lp->needs_lockd_init) {
/* needs_lock_init is set for LVs that need a lockd lock. */
return 1;
- if (seg_is_cache(lp) || seg_is_cache_pool(lp)) {
+ } else if (seg_is_cache(lp) || seg_is_cache_pool(lp)) {
log_error("Use lvconvert for cache with lock type %s", vg->lock_type);
return 0;
- }
- if (!seg_is_thin_volume(lp) && lp->snapshot) {
+ } else if (!seg_is_thin_volume(lp) && lp->snapshot) {
struct logical_volume *origin_lv;
/*
@@ -2414,9 +2413,8 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
}
lv->lock_args = NULL;
return 1;
- }
- if (seg_is_thin(lp)) {
+ } else if (seg_is_thin(lp)) {
if ((seg_is_thin_volume(lp) && !lp->create_pool) ||
(!seg_is_thin_volume(lp) && lp->snapshot)) {
struct lv_list *lvl;
@@ -2437,9 +2435,8 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
}
lv->lock_args = NULL;
return 1;
- }
- if (seg_is_thin_volume(lp) && lp->create_pool) {
+ } else if (seg_is_thin_volume(lp) && lp->create_pool) {
/*
* Creating a thin pool and a thin lv in it. We could
* probably make this work.
@@ -2447,21 +2444,21 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
log_error("Create thin pool and thin LV separately with lock type %s",
vg->lock_type);
return 0;
- }
- if (!seg_is_thin_volume(lp) && lp->create_pool) {
+ } else if (!seg_is_thin_volume(lp) && lp->create_pool) {
/* Creating a thin pool only. */
/* lv_name_lock = lp->pool_name; */
+ } else {
+ log_error("Unknown thin options for lock init.");
+ return 0;
}
- log_error("Unknown thin options for lock init.");
- return 0;
+ } else {
+ /* Creating a normal lv. */
+ /* lv_name_lock = lv_name; */
}
- /* Creating a normal lv. */
- /* lv_name_lock = lv_name; */
-
/*
* The LV gets its own lock, so set lock_args to non-NULL.
*
--
1.8.3.1

View File

@ -1,4 +1,4 @@
%global device_mapper_version 1.02.142 %global device_mapper_version 1.02.143
%global enable_cache 1 %global enable_cache 1
%global enable_cluster 1 %global enable_cluster 1
@ -53,14 +53,16 @@
Summary: Userland logical volume management tools Summary: Userland logical volume management tools
Name: lvm2 Name: lvm2
Version: 2.02.173 Version: 2.02.174
Release: 4%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Base Group: System Environment/Base
URL: http://sources.redhat.com/lvm2 URL: http://sources.redhat.com/lvm2
Source0: ftp://sources.redhat.com/pub/lvm2/releases/LVM2.%{version}.tgz Source0: ftp://sources.redhat.com/pub/lvm2/releases/LVM2.%{version}.tgz
Patch0: lvm2-set-default-preferred_names.patch Patch0: lvm2-set-default-preferred_names.patch
Patch1: lvm2-lvmetad-timeout.patch Patch1: lvm2-lvmetad-timeout.patch
Patch2: lvm2-2_02_175-revert-tidy-prefer-not-using-else-after-return.patch
Patch3: lvm2-2_02_175-liblvm-Deprecate-library-and-bindings.patch
BuildRequires: libselinux-devel >= %{libselinux_version}, libsepol-devel BuildRequires: libselinux-devel >= %{libselinux_version}, libsepol-devel
BuildRequires: libblkid-devel >= %{util_linux_version} BuildRequires: libblkid-devel >= %{util_linux_version}
@ -116,6 +118,8 @@ or more physical volumes and creating one or more logical volumes
%setup -q -n LVM2.%{version} %setup -q -n LVM2.%{version}
%patch0 -p1 -b .preferred_names %patch0 -p1 -b .preferred_names
%patch1 -p1 -b .lvmetad_timeout %patch1 -p1 -b .lvmetad_timeout
%patch2 -p1 -b .revert_tidy
%patch3 -p1 -b .deprecate_liblvm
%build %build
%global _default_pid_dir /run %global _default_pid_dir /run
@ -408,6 +412,9 @@ Requires: pkgconfig
This package contains files needed to develop applications that use This package contains files needed to develop applications that use
the lvm2 libraries. the lvm2 libraries.
NOTE: lvm2app is deprectaed. Migration to DBus API provided by
%{name}-dbusd is recommended.
%files devel %files devel
%defattr(444,root,root,-) %defattr(444,root,root,-)
%{_libdir}/liblvm2app.so %{_libdir}/liblvm2app.so
@ -453,46 +460,45 @@ This package contains shared lvm2 libraries for applications.
%if %{enable_python} %if %{enable_python}
# TODO: rename to python2-lvm2: use %%package -n python2-lvm2 ? %package -n python2-lvm-deprecated
%package python2-libs Summary: Python module to access LVM (Deprecated)
Summary: Python module to access LVM
License: LGPLv2 License: LGPLv2
Group: Development/Libraries Group: Development/Libraries
# TODO: Why python2-lvm? Why not python2-lvm2? %{?python_provide:%python_provide python2-lvm}
Provides: python2-lvm = %{version}-%{release} Obsoletes: python-lvm
#%{?python_provide:%python_provide python2-lvm2} # For compatibility with old name:
#%{?python_provide:%python_provide python2-lvm} Provides: %{name}-python-libs = %{version}-%{release}
Obsoletes: python-lvm < 2.02.98-2
Obsoletes: python2-lvm < 2.02.98-2
# TODO: Remove before python
Provides: %{name}-python-libs = %{version}-%{release} # for compatibility with old name
Obsoletes: %{name}-python-libs < %{version}-%{release} Obsoletes: %{name}-python-libs < %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%description python2-libs %description -n python2-lvm-deprecated
Python module to allow the creation and use of LVM Deprecated python module to allow the creation and
logical volumes, physical volumes, and volume groups. use of LVM logical volumes, physical volumes, and
volume groups.
%files python2-libs Migration to DBus API provided by %{name}-dbusd is recommended.
%files -n python2-lvm-deprecated
%{python2_sitearch}/* %{python2_sitearch}/*
# TODO: rename to python3-lvm2: use %%package -n python3-lvm2 ? %package -n python3-lvm-deprecated
%package python3-libs Summary: Python 3 module to access LVM (Deprecated)
Summary: Python 3 module to access LVM
License: LGPLv2 License: LGPLv2
Group: Development/Libraries Group: Development/Libraries
#%{?python_provide:%python_provide python3-lvm2}
#%{?python_provide:%python_provide python3-lvm} #%{?python_provide:%python_provide python3-lvm}
# Why python3-lvm and not python3-lvm2? # For compatibility with old name:
Provides: python3-lvm = %{version}-%{release} Provides: %{name}-python3-libs = %{version}-%{release}
Obsoletes: python3-lvm < 2.02.98-2 Obsoletes: %{name}-python3-libs < %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%description python3-libs %description -n python3-lvm-deprecated
Python 3 module to allow the creation and use of LVM Deprecated python 3 module to allow the creation and
logical volumes, physical volumes, and volume groups. use of LVM logical volumes, physical volumes, and
volume groups.
%files python3-libs Migration to DBus API provided by %{name}-dbusd is recommended.
%files -n python3-lvm-deprecated
%{python3_sitearch}/*.so %{python3_sitearch}/*.so
%{python3_sitearch}/*.egg-info %{python3_sitearch}/*.egg-info
@ -860,6 +866,25 @@ the device-mapper event library.
%{_libdir}/pkgconfig/devmapper-event.pc %{_libdir}/pkgconfig/devmapper-event.pc
%changelog %changelog
* Wed Sep 20 2017 Marian Csontos <mcsontos@redhat.com> - 2.02.174-1.f28
- NOTE: Deprecating python bindings and liblvm2app.
- Prevent raid1 split with trackchanges in a shared VG.
- Avoid double unlocking of client & lockspace mutexes in lvmlockd.
- Fix leaking of file descriptor for non-blocking filebased locking.
- Fix check for 2nd mda at end of disk fits if using pvcreate --restorefile.
- Use maximum metadataarea size that fits with pvcreate --restorefile.
- Always clear cached bootloaderarea when wiping label e.g. in pvcreate.
- Disallow --bootloaderareasize with pvcreate --restorefile.
- Fix lvmlockd check for running lock managers during lock adoption.
- Add --withgeneralpreamble and --withlocalpreamble to lvmconfig.
- Add warning when creating thin-pool with zeroing and chunk size >= 512KiB.
- Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails.
- Add synchronization points with udev during reshape of raid LVs.
- Restore umask when creation of node fails.
- Add --concise to dmsetup create for many devices with tables in one command.
- Accept minor number without major in library when it knows dm major number.
- Introduce single-line concise table output format: dmsetup table --concise.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.02.173-4 * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.02.173-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (LVM2.2.02.173.tgz) = c2ea8beafe006abf9282f51ec98600fd0ebff816d53c10ecbb19bbf336ada4825135cf9c92ccd364afb18f8b1d7e163eff5bdec8dfdd70dfb9ba45db2f6bdd5e SHA512 (LVM2.2.02.174.tgz) = dcf5c919e937583e0d0afbcedb011689d944a3c321aac049741f6564a48e07eb3ce49c5ef245e6b71686b5cfee3eca1969b7e0ebe90f084e2be391b805d3f588

View File

@ -1 +1 @@
LVM2.2.02.173.tgz LVM2.2.02.174.tgz