misc fixes
cover misc fixes
The following changes since commit 30bbde3d09ebdf1ad2eac7764abeae0990f4cea2:
oprofile: upgrade 1.2.0 -> 1.3.0 (2018-08-11 20:16:53 -0700)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib hongxu/misc-fixes
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/misc-fixes
Hongxu Jia (5):
python3-pydbus: cherry-pick patches from fedora
python-pykickstart: fix typo
python3-blivet: remove dmraid from dependency check
libblockdev: drop obsolete patch
python3-blivet: add -Z y' and -y' to lvm.pvcreate
.../0001-fix-configure-and-compile-failures.patch | 87 --------- .../libblockdev/libblockdev_2.18.bb | 1 - .../0001-Support-asynchronous-calls-58.patch | 93 ++++++++++ ...nsformation-between-D-Bus-errors-and-exce.patch | 203 +++++++++++++++++++++ .../python/python3-pydbus_0.6.0.bb | 4 + .../0012-remove-dmraid-dependency-check.patch | 31 ++++ .../0013-add-Z-y-and-y-to-lvm.pvcreate.patch | 41 +++++ .../python-blivet/python3-blivet_3.0.1.bb | 2 + ...0001-support-authentication-for-kickstart.patch | 10 +- ...d.py-retry-to-invoke-request-with-timeout.patch | 6 +- 10 files changed, 382 insertions(+), 96 deletions(-) delete mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch create mode 100644 meta-python/recipes-devtools/python/python3-pydbus/0001-Support-asynchronous-calls-58.patch create mode 100644 meta-python/recipes-devtools/python/python3-pydbus/0002-Support-transformation-between-D-Bus-errors-and-exce.patch create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch
Signature · 1 line
2.7.4
PATCH 1/5 python3-pydbus: cherry-pick patches from fedora
Fedora enhanced python3-pydbus:
- Support asynchronous calls
- Support transformation between D-Bus errors and
exceptions.
https://src.fedoraproject.org/cgit/rpms/python-pydbus.git/
--- .../0001-Support-asynchronous-calls-58.patch | 93 ++++++++++ ...nsformation-between-D-Bus-errors-and-exce.patch | 203 +++++++++++++++++++++ .../python/python3-pydbus_0.6.0.bb | 4 + 3 files changed, 300 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pydbus/0001-Support-asynchronous-calls-58.patch create mode 100644 meta-python/recipes-devtools/python/python3-pydbus/0002-Support-transformation-between-D-Bus-errors-and-exce.patch
meta-python/recipes-devtools/python/python3-pydbus/0001-Support-asynchronous-calls-58.patch new file +93 -0
@@ -0,0 +1,93 @@ +From 39a7d79ee6c548902fbac8b95c934af7e4c69260 Mon Sep 17 00:00:00 2001 +From: Vendula Poncova <[email protected]> +Date: Thu, 2 Aug 2018 15:30:45 +0800 +Subject: [PATCH 1/2] Support asynchronous calls (#58) + +Added support for asynchronous calls of methods. A method is called +synchronously unless its callback parameter is specified. A callback +is a function f(*args, returned=None, error=None), where args is +callback_args specified in the method call, returned is a return +value of the method and error is an exception raised by the method. + +Example of an asynchronous call: + +def func(x, y, returned=None, error=None): + pass + +proxy.Method(a, b, callback=func, callback_args=(x, y)) + +Upstream-Status: Cherry-pick [https://src.fedoraproject.org/cgit/rpms/python-pydbus.git/] + +Signed-off-by: Hongxu Jia <[email protected]> +--- + pydbus/proxy_method.py | 44 ++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 38 insertions(+), 6 deletions(-) + +diff --git a/pydbus/proxy_method.py b/pydbus/proxy_method.py +index 8798edd..4ea4304 100644 +--- a/pydbus/proxy_method.py ++++ b/pydbus/proxy_method.py +@@ -65,15 +65,34 @@ class ProxyMethod(object): + + # Python 2 sux + for kwarg in kwargs: +- if kwarg not in ("timeout",): ++ if kwarg not in ("timeout", "callback", "callback_args"): + raise TypeError(self.__qualname__ + " got an unexpected keyword argument '{}'".format(kwarg)) + timeout = kwargs.get("timeout", None) ++ callback = kwargs.get("callback", None) ++ callback_args = kwargs.get("callback_args", tuple()) ++ ++ call_args = ( ++ instance._bus_name, ++ instance._path, ++ self._iface_name, ++ self.__name__, ++ GLib.Variant(self._sinargs, args), ++ GLib.VariantType.new(self._soutargs), ++ 0, ++ timeout_to_glib(timeout), ++ None ++ ) ++ ++ if callback: ++ call_args += (self._finish_async_call, (callback, callback_args)) ++ instance._bus.con.call(*call_args) ++ return None ++ else: ++ ret = instance._bus.con.call_sync(*call_args) ++ return self._unpack_return(ret) + +- ret = instance._bus.con.call_sync( +- instance._bus_name, instance._path, +- self._iface_name, self.__name__, GLib.Variant(self._sinargs, args), GLib.VariantType.new(self._soutargs), +- 0, timeout_to_glib(timeout), None).unpack() +- ++ def _unpack_return(self, values): ++ ret = values.unpack() + if len(self._outargs) == 0: + return None + elif len(self._outargs) == 1: +@@ -81,6 +100,19 @@ class ProxyMethod(object): + else: + return ret + ++ def _finish_async_call(self, source, result, user_data): ++ error = None ++ return_args = None ++ ++ try: ++ ret = source.call_finish(result) ++ return_args = self._unpack_return(ret) ++ except Exception as err: ++ error = err ++ ++ callback, callback_args = user_data ++ callback(*callback_args, returned=return_args, error=error) ++ + def __get__(self, instance, owner): + if instance is None: + return self +-- +2.7.4 +
meta-python/recipes-devtools/python/python3-pydbus/0002-Support-transformation-between-D-Bus-errors-and-exce.patch new file +203 -0
203 lines not on this page · raw message
meta-python/recipes-devtools/python/python3-pydbus_0.6.0.bb +4 -0
@@ -1,2 +1,6 @@ require python-pydbus.inc inherit pypi setuptools3 + +SRC_URI += "file://0001-Support-asynchronous-calls-58.patch \ + file://0002-Support-transformation-between-D-Bus-errors-and-exce.patch \ +"
Signature · 1 line
2.7.4
PATCH 2/5 python-pykickstart: fix typo
In reply to Hongxu Jia--- .../files/0001-support-authentication-for-kickstart.patch | 10 +++++----- .../0004-load.py-retry-to-invoke-request-with-timeout.patch | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-)
meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch +5 -5
@@ -1,4 +1,4 @@ -From b7070a79432b790dffa82401364e4fd8d906eb2b Mon Sep 17 00:00:00 2001 +From f05f5fc363e2510f6943532f3e14a6423f6a2cf1 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Tue, 31 Jul 2018 17:24:47 +0800 Subject: [PATCH 1/4] support authentication for kickstart
@@ -51,7 +51,7 @@ index bf08ac5..aada7aa 100644 + def __str__(self): + return self.value diff --git a/pykickstart/load.py b/pykickstart/load.py -index fb935f2..c6f013f 100644 +index fb935f2..41a2e9e 100644 --- a/pykickstart/load.py +++ b/pykickstart/load.py @@ -18,10 +18,13 @@
@@ -101,7 +101,7 @@ index fb935f2..c6f013f 100644 + if user is None or passwd is None: + log.info("Require Authentication") + raise KickstartAuthError("Require Authentication.\nAppend 'ksuser=<username> kspasswd=<password>' to boot command") -+ + + reasons = request.headers.get("WWW-Authenticate", "").split() + if reasons: + auth_type = reasons[0]
@@ -111,9 +111,9 @@ index fb935f2..c6f013f 100644 + auth=HTTPDigestAuth(user, passwd) + + return auth - ++ +def _load_url(location, user=None, passwd=None): -+ '''Load a location (URL or filename) and return contents as string''' ++ '''Load a location (URL or filename) and return contents as string''' + auth = _get_auth(location, user=user, passwd=passwd) try: - request = requests.get(location, verify=SSL_VERIFY)
meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch +3 -3
@@ -1,4 +1,4 @@ -From a86ba22d7133199d850ef3d893571f27d6b0faed Mon Sep 17 00:00:00 2001 +From ffe06c6dd812b604d6482e4353d5564fad78bc90 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 30 Jul 2018 15:52:21 +0800 Subject: [PATCH 4/4] load.py: retry to invoke request with timeout
@@ -16,7 +16,7 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 31 insertions(+) diff --git a/pykickstart/load.py b/pykickstart/load.py -index 7adb751..b62245e 100644 +index ad3bad1..a5cbbc5 100644 --- a/pykickstart/load.py +++ b/pykickstart/load.py @@ -21,6 +21,7 @@ import requests
@@ -70,7 +70,7 @@ index 7adb751..b62245e 100644 @@ -94,6 +121,10 @@ def _get_auth(location, user=None, passwd=None): def _load_url(location, user=None, passwd=None): - '''Load a location (URL or filename) and return contents as string''' + '''Load a location (URL or filename) and return contents as string''' + + if not _access_url(location): + raise KickstartError(_("Connection %s failed" % location))
Signature · 1 line
2.7.4
PATCH 3/5 python3-blivet: remove dmraid from dependency check
In reply to Hongxu JiaOE does not have dmraid recipe, so remove it from dependency check.
--- .../0012-remove-dmraid-dependency-check.patch | 31 ++++++++++++++++++++++ .../python-blivet/python3-blivet_3.0.1.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch
meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 4476e846a1e64dde17df2e2370c803ce695514f9 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Mon, 6 Aug 2018 17:18:27 +0800 +Subject: [PATCH] remove dmraid dependency check + +OE does not support dmraid, remove it from dependency check + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <[email protected]> +--- + blivet/tasks/availability.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/blivet/tasks/availability.py b/blivet/tasks/availability.py +index 9a87cfd..843cf6a 100644 +--- a/blivet/tasks/availability.py ++++ b/blivet/tasks/availability.py +@@ -316,8 +316,7 @@ BLOCKDEV_DM_ALL_MODES = (blockdev.DMTechMode.CREATE_ACTIVATE | + blockdev.DMTechMode.QUERY) + BLOCKDEV_DM = BlockDevTechInfo(plugin_name="dm", + check_fn=blockdev.dm_is_tech_avail, +- technologies={blockdev.DMTech.MAP: BLOCKDEV_DM_ALL_MODES, +- blockdev.DMTech.RAID: BLOCKDEV_DM_ALL_MODES}) ++ technologies={blockdev.DMTech.MAP: BLOCKDEV_DM_ALL_MODES}) + BLOCKDEV_DM_TECH = BlockDevMethod(BLOCKDEV_DM) + + # libblockdev loop plugin required technologies and modes +-- +2.7.4 +
meta-python/recipes-extended/python-blivet/python3-blivet_3.0.1.bb +1 -0
@@ -21,6 +21,7 @@ SRC_URI = "git://github.com/rhinstaller/blivet;branch=3.1-release \ file://0009-invoking-fsck-with-infinite-timeout.patch \ file://0010-invoking-mkfs-with-infinite-timeout.patch \ file://0011-invoking-dd-with-infinite-timeout.patch \ + file://0012-remove-dmraid-dependency-check.patch \ " UPSTREAM_CHECK_GITTAGREGEX = "blivet-(?P<pver>\d+(\.\d+)+)$"
Signature · 1 line
2.7.4
PATCH 4/5 libblockdev: drop obsolete patch
In reply to Hongxu JiaSince libblockdev is upgraded to 2.18, the local patch is obsolete.
--- .../0001-fix-configure-and-compile-failures.patch | 87 ---------------------- .../libblockdev/libblockdev_2.18.bb | 1 - 2 files changed, 88 deletions(-) delete mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch deleted +0 -87
@@ -1,87 +0,0 @@ -From 21654e3719e0a289e735918b234f7aae6766e3a1 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <[email protected]> -Date: Wed, 18 Jul 2018 11:26:28 +0800 -Subject: [PATCH] fix configure and compile failures - -1. Fix do_configure failure ---------------------------- -|Checking header volume_key/libvolume_key.h existence and usability. -../tmp/6tvtK.c:1:38: fatal error: volume_key/libvolume_key.h: -No such file or directory -| #include <volume_key/libvolume_key.h> ---------------------------- -We explictly add volume_key and dmraid to DEPENDS, do not need -configure to test. - -2. Fix config.h not found -Add it to configure.ac - -3. Correct AC_DEFINE -... -autoheader: warning: missing template: LIBMOUNT_NEW_ERR_API -autoheader: Use AC_DEFINE([LIBMOUNT_NEW_ERR_API], [], [Description]) -... - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <[email protected]> - -Checking header dmraid/dmraid.h existence and usability.../tmp/ -ktVJ6.c:1:27: fatal error: dmraid/dmraid.h: No such file or directory -| #include <dmraid/dmraid.h> - -fix this by add --disable-dmraid - -Signed-off-by: Changqing Li <[email protected]> ---- - configure.ac | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index a37f337..a8cfe2f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -9,6 +9,8 @@ AC_DISABLE_STATIC - AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-syntax -Wno-portability]) - AC_CONFIG_MACRO_DIR([m4]) - -+AC_CONFIG_HEADERS([config.h]) -+ - AM_PATH_PYTHON - - AM_PROG_AR -@@ -194,10 +196,9 @@ LIBBLOCKDEV_PKG_CHECK_MODULES([KMOD], [libkmod >= 19]) - AS_IF([test "x$with_crypto" != "xno"], - [LIBBLOCKDEV_PKG_CHECK_MODULES([CRYPTSETUP], [libcryptsetup >= 1.6.7]) - AS_IF([$PKG_CONFIG --atleast-version=2.0 libcryptsetup], -- [AC_DEFINE([LIBCRYPTSETUP_2])], []) -+ [AC_DEFINE([LIBCRYPTSETUP_2], [1], [new version of libcryptsetup])]) - AS_IF([test "x$with_escrow" != "xno"], -- [LIBBLOCKDEV_PKG_CHECK_MODULES([NSS], [nss >= 3.18.0]) -- LIBBLOCKDEV_CHECK_HEADER([volume_key/libvolume_key.h], [$GLIB_CFLAGS $NSS_CFLAGS], [libvolume_key.h not available])], -+ [LIBBLOCKDEV_PKG_CHECK_MODULES([NSS], [nss >= 3.18.0])], - []) - ], - []) -@@ -218,7 +219,8 @@ AS_IF([test "x$with_fs" != "xno"], - [LIBBLOCKDEV_PKG_CHECK_MODULES([MOUNT], [mount >= 2.23.0]) - # new versions of libmount has some new functions we can use - AS_IF([$PKG_CONFIG --atleast-version=2.30.0 mount], -- [AC_DEFINE([LIBMOUNT_NEW_ERR_API])], []) -+ [AC_DEFINE([LIBMOUNT_NEW_ERR_API], [1], [new versions of libmount has some new functions we can use])], -+ []) - - LIBBLOCKDEV_PKG_CHECK_MODULES([BLKID], [blkid >= 2.23.0]) - # older versions of libblkid don't support BLKID_SUBLKS_BADCSUM so let's just -@@ -243,7 +245,7 @@ AS_IF([test "x$with_nvdimm" != "xno"], - LIBBLOCKDEV_PKG_CHECK_MODULES([NDCTL], [libndctl >= 58.4]) - # new versions of libndctl new modes - AS_IF([$PKG_CONFIG --atleast-version=60 libndctl], -- [AC_DEFINE([LIBNDCTL_NEW_MODES])], [])] -+ [AC_DEFINE([LIBNDCTL_NEW_MODES], [1], [new version of libndctl new modes])], [])] - []) - - AS_IF([test "x$with_vdo" != "xno"], --- -2.7.4 -
meta-oe/recipes-extended/libblockdev/libblockdev_2.18.bb +0 -1
@@ -19,7 +19,6 @@ DEPENDS += " \ SRCREV = "0debeb45562ac3d8f6f43f6f942b238abab55be9" SRC_URI = " \ git://github.com/rhinstaller/libblockdev;branch=master \ - file://0001-fix-configure-and-compile-failures.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
2.7.4
PATCH 5/5 python3-blivet: add `-Z y' and `-y' to lvm.pvcreate
In reply to Hongxu JiaWhile reinstall a crypt fs, it occasionally failed [snip]
|gi.overrides.BlockDev.LVMError: Process reported exit code 5:
WARNING: atari signature detected on /dev/mapper/luks-0e5f891c -7701-48bc-a41e-8d626b6ef953 at offset 466. Wipe it? [y/n]:
[snip]
Add -Z y' and -y' to lvm.pvcreate
--- .../0013-add-Z-y-and-y-to-lvm.pvcreate.patch | 41 ++++++++++++++++++++++ .../python-blivet/python3-blivet_3.0.1.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch
meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch new file +41 -0
@@ -0,0 +1,41 @@ +From bddbfa499df16b108f2d892ee48d65617523c33d Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Thu, 9 Aug 2018 11:00:39 +0800 +Subject: [PATCH] add `-Z y' and `-y' to lvm.pvcreate + +While reinstall a crypt fs, it occasionally failed +[snip] +|gi.overrides.BlockDev.LVMError: Process reported exit code 5: +WARNING: atari signature detected on /dev/mapper/luks-0e5f891c +-7701-48bc-a41e-8d626b6ef953 at offset 466. Wipe it? [y/n]: +[snip] + +Add `-Z y' and `-y' to lvm.pvcreate + +Upstream-Status: Submitted [https://github.com/storaged-project/blivet/pull/714] + +Signed-off-by: Hongxu Jia <[email protected]> +--- + blivet/formats/lvmpv.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py +index 260cc0b..4bbb46f 100644 +--- a/blivet/formats/lvmpv.py ++++ b/blivet/formats/lvmpv.py +@@ -120,9 +120,9 @@ class LVMPhysicalVolume(DeviceFormat): + log_method_call(self, device=self.device, + type=self.type, status=self.status) + +- # Consider use of -Z|--zero +- # -f|--force or -y|--yes may be required +- blockdev.lvm.pvcreate(self.device, data_alignment=self.data_alignment) ++ ea_zero = blockdev.ExtraArg.new("-Z", "y") ++ ea_yes = blockdev.ExtraArg.new("-y", "") ++ blockdev.lvm.pvcreate(self.device, data_alignment=self.data_alignment, extra=[ea_zero, ea_yes]) + + def _destroy(self, **kwargs): + log_method_call(self, device=self.device, +-- +2.7.4 +
meta-python/recipes-extended/python-blivet/python3-blivet_3.0.1.bb +1 -0
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/rhinstaller/blivet;branch=3.1-release \ file://0010-invoking-mkfs-with-infinite-timeout.patch \ file://0011-invoking-dd-with-infinite-timeout.patch \ file://0012-remove-dmraid-dependency-check.patch \ + file://0013-add-Z-y-and-y-to-lvm.pvcreate.patch \ " UPSTREAM_CHECK_GITTAGREGEX = "blivet-(?P<pver>\d+(\.\d+)+)$"
Signature · 1 line
2.7.4