summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-python/recipes-extended
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-python/recipes-extended
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-python/recipes-extended')
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch70
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch102
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch66
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0004-fix-new.roots-object-is-not-iterable.patch28
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0005-fix-incorrect-timeout-while-system-time-changed.patch48
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0006-tweak-btrfs-packages.patch45
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0007-invoking-mount-with-infinite-timeout.patch31
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0008-use-oe-variable-to-replace-hardcoded-dir.patch34
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-fsck-with-infinite-timeout.patch31
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0010-invoking-mkfs-with-infinite-timeout.patch31
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-dd-with-infinite-timeout.patch31
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch31
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch41
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_3.0.1.bb48
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui/0001-Set-_supported_filesystems-in-BlivetGUIAnaconda-init.patch39
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.8.bb28
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-cson/python-cson_git.bb21
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.47.bb17
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pyephem/python-pyephem_3.7.6.0.bb17
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch148
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch68
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch48
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch83
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.15.bb25
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc22
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb8
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb8
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem.inc48
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem_0.11.0.bb13
-rw-r--r--external/meta-openembedded/meta-python/recipes-extended/pywbem/python3-pywbem_0.11.0.bb2
30 files changed, 1232 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
new file mode 100644
index 00000000..c77b86a4
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
@@ -0,0 +1,70 @@
+From 648a18bfc447f076d48ae4147d984b8ef56e37aa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 30 Jul 2018 16:13:40 +0800
+Subject: [PATCH 01/11] comment out selinux
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/flags.py | 5 +++--
+ blivet/util.py | 6 +++++-
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/blivet/flags.py b/blivet/flags.py
+index 1840121..8789390 100644
+--- a/blivet/flags.py
++++ b/blivet/flags.py
+@@ -20,7 +20,7 @@
+ #
+
+ import shlex
+-import selinux
++#import selinux
+
+
+ class Flags(object):
+@@ -47,7 +47,8 @@ class Flags(object):
+ #
+ # enable/disable functionality
+ #
+- self.selinux = selinux.is_selinux_enabled()
++ #self.selinux = selinux.is_selinux_enabled()
++ self.selinux = False
+ self.multipath = True
+ self.dmraid = True
+ self.ibft = True
+diff --git a/blivet/util.py b/blivet/util.py
+index 7334ff6..0f2a995 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -3,7 +3,7 @@ import functools
+ import glob
+ import itertools
+ import os
+-import selinux
++#import selinux
+ import subprocess
+ import re
+ import sys
+@@ -430,6 +430,8 @@ def get_cow_sysfs_path(dev_path, dev_sysfsPath):
+ def match_path_context(path):
+ """ Return the default SELinux context for the given path. """
+ context = None
++ return context
++
+ try:
+ context = selinux.matchpathcon(os.path.normpath(path), 0)[1]
+ except OSError as e:
+@@ -454,6 +456,8 @@ def set_file_context(path, context, root=None):
+
+ True if successful, False if not.
+ """
++ return False
++
+ if root is None:
+ root = '/'
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
new file mode 100644
index 00000000..fea22540
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
@@ -0,0 +1,102 @@
+From 596979ed58109141a7fee680ab95b27296c022b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 14:39:56 +0800
+Subject: [PATCH 02/11] run_program support timeout
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 68 +++++++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 39 insertions(+), 29 deletions(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index 0f2a995..05a253c 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -157,6 +157,30 @@ class Path(str):
+ def __hash__(self):
+ return self._path.__hash__()
+
++def timeout_command(argv, timeout, *args, **kwargs):
++ """call shell-command and either return its output or kill it
++ if it doesn't normally exit within timeout seconds and return None"""
++ import subprocess, datetime, os, time, signal
++ start = datetime.datetime.now()
++
++ try:
++ proc = subprocess.Popen(argv, *args, **kwargs)
++ while proc.poll() is None:
++ time.sleep(0.1)
++ now = datetime.datetime.now()
++ if (now - start).seconds> timeout:
++ os.kill(proc.pid, signal.SIGKILL)
++ os.waitpid(-1, os.WNOHANG)
++ program_log.debug("%d seconds timeout" % timeout)
++ return (-1, None)
++
++
++ except OSError as e:
++ program_log.error("Error running %s: %s", argv[0], e.strerror)
++ raise
++
++ program_log.debug("Return code: %d", proc.returncode)
++ return (proc.returncode, proc.stdout.read())
+
+ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
+ if env_prune is None:
+@@ -179,36 +203,22 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
+ stderr_dir = subprocess.STDOUT
+ else:
+ stderr_dir = subprocess.PIPE
+- try:
+- proc = subprocess.Popen(argv,
+- stdin=stdin,
+- stdout=subprocess.PIPE,
+- stderr=stderr_dir,
+- close_fds=True,
+- preexec_fn=chroot, cwd=root, env=env)
+-
+- out, err = proc.communicate()
+- if not binary_output and six.PY3:
+- out = out.decode("utf-8")
+- if out:
+- if not stderr_to_stdout:
+- program_log.info("stdout:")
+- for line in out.splitlines():
+- program_log.info("%s", line)
+-
+- if not stderr_to_stdout and err:
+- program_log.info("stderr:")
+- for line in err.splitlines():
+- program_log.info("%s", line)
+-
+- except OSError as e:
+- program_log.error("Error running %s: %s", argv[0], e.strerror)
+- raise
+-
+- program_log.debug("Return code: %d", proc.returncode)
+-
+- return (proc.returncode, out)
+
++ res, out = timeout_command(argv, 10,
++ stdin=stdin,
++ stdout=subprocess.PIPE,
++ stderr=stderr_dir,
++ close_fds=True,
++ preexec_fn=chroot, cwd=root, env=env)
++ if not binary_output and six.PY3:
++ out = out.decode("utf-8")
++ if out:
++ if not stderr_to_stdout:
++ program_log.info("stdout:")
++ for line in out.splitlines():
++ program_log.info("%s", line)
++
++ return (res, out)
+
+ def run_program(*args, **kwargs):
+ return _run_program(*args, **kwargs)[0]
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
new file mode 100644
index 00000000..38f061ed
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
@@ -0,0 +1,66 @@
+From 325898f3f2951bbde07da47888175c427b11ddc3 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:18:02 +0800
+Subject: [PATCH 03/11] support infinit timeout
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index 05a253c..d6804be 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -157,6 +157,7 @@ class Path(str):
+ def __hash__(self):
+ return self._path.__hash__()
+
++# timeout = -1 means infinite timeout, always wait.
+ def timeout_command(argv, timeout, *args, **kwargs):
+ """call shell-command and either return its output or kill it
+ if it doesn't normally exit within timeout seconds and return None"""
+@@ -168,7 +169,7 @@ def timeout_command(argv, timeout, *args, **kwargs):
+ while proc.poll() is None:
+ time.sleep(0.1)
+ now = datetime.datetime.now()
+- if (now - start).seconds> timeout:
++ if timeout != -1 and (now - start).seconds> timeout:
+ os.kill(proc.pid, signal.SIGKILL)
+ os.waitpid(-1, os.WNOHANG)
+ program_log.debug("%d seconds timeout" % timeout)
+@@ -182,7 +183,7 @@ def timeout_command(argv, timeout, *args, **kwargs):
+ program_log.debug("Return code: %d", proc.returncode)
+ return (proc.returncode, proc.stdout.read())
+
+-def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
++def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False, timeout=10):
+ if env_prune is None:
+ env_prune = []
+
+@@ -191,7 +192,10 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
+ os.chroot(root)
+
+ with program_log_lock: # pylint: disable=not-context-manager
+- program_log.info("Running... %s", " ".join(argv))
++ if timeout != -1:
++ program_log.info("Running... %s", " ".join(argv))
++ else:
++ program_log.info("Running... %s ...infinite timeout", " ".join(argv))
+
+ env = os.environ.copy()
+ env.update({"LC_ALL": "C",
+@@ -204,7 +208,7 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
+ else:
+ stderr_dir = subprocess.PIPE
+
+- res, out = timeout_command(argv, 10,
++ res, out = timeout_command(argv, timeout,
+ stdin=stdin,
+ stdout=subprocess.PIPE,
+ stderr=stderr_dir,
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0004-fix-new.roots-object-is-not-iterable.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0004-fix-new.roots-object-is-not-iterable.patch
new file mode 100644
index 00000000..be997ac4
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0004-fix-new.roots-object-is-not-iterable.patch
@@ -0,0 +1,28 @@
+From c31df1c0f5323ddc70e0d1c6d11db2fbf7a024ad Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:30:20 +0800
+Subject: [PATCH 04/11] fix new.roots object is not iterable
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/blivet.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/blivet.py b/blivet/blivet.py
+index 3405810..f42b73b 100644
+--- a/blivet/blivet.py
++++ b/blivet/blivet.py
+@@ -1198,7 +1198,7 @@ class Blivet(object):
+ p = partition.disk.format.parted_disk.getPartitionByPath(partition.path)
+ partition.parted_partition = p
+
+- for root in new.roots:
++ for root in new.roots or []:
+ root.swaps = [new.devicetree.get_device_by_id(d.id, hidden=True) for d in root.swaps]
+ root.swaps = [s for s in root.swaps if s]
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0005-fix-incorrect-timeout-while-system-time-changed.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0005-fix-incorrect-timeout-while-system-time-changed.patch
new file mode 100644
index 00000000..ecb95039
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0005-fix-incorrect-timeout-while-system-time-changed.patch
@@ -0,0 +1,48 @@
+From b30a74671ca603e6bfd514f72d4fd7fd6fceef54 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 26 Aug 2016 02:02:49 -0400
+Subject: [PATCH 05/11] fix incorrect timeout while system time changed
+
+While system time changed by NTP, invoking timeout_command
+breaks with incorrect timeout.
+--------
+|05:40:55,872 INFO program: Running... mount -t ext2 -o
+ defaults,ro /dev/sda2 /mnt/sysimage
+|01:40:55,086 DEBUG program: 10 seconds timeout
+--------
+
+Use numbert count to replace current time count could workaround
+the issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index d6804be..bc08af5 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -162,14 +162,14 @@ def timeout_command(argv, timeout, *args, **kwargs):
+ """call shell-command and either return its output or kill it
+ if it doesn't normally exit within timeout seconds and return None"""
+ import subprocess, datetime, os, time, signal
+- start = datetime.datetime.now()
++ count = 0
+
+ try:
+ proc = subprocess.Popen(argv, *args, **kwargs)
+ while proc.poll() is None:
+ time.sleep(0.1)
+- now = datetime.datetime.now()
+- if timeout != -1 and (now - start).seconds> timeout:
++ count += 1
++ if timeout != -1 and count > timeout*10:
+ os.kill(proc.pid, signal.SIGKILL)
+ os.waitpid(-1, os.WNOHANG)
+ program_log.debug("%d seconds timeout" % timeout)
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0006-tweak-btrfs-packages.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0006-tweak-btrfs-packages.patch
new file mode 100644
index 00000000..da568a4b
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0006-tweak-btrfs-packages.patch
@@ -0,0 +1,45 @@
+From 0659d8a85bcdd76c0b23b8b5af6958783d35ac65 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:33:15 +0800
+Subject: [PATCH 06/11] tweak btrfs packages
+
+In oe-cre/yocto, we name btrfs package with btrfs-tools,
+rather than btrfs-progs.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/devices/btrfs.py | 2 +-
+ blivet/formats/fs.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
+index cada940..7e4d4b8 100644
+--- a/blivet/devices/btrfs.py
++++ b/blivet/devices/btrfs.py
+@@ -55,7 +55,7 @@ class BTRFSDevice(StorageDevice):
+
+ """ Base class for BTRFS volume and sub-volume devices. """
+ _type = "btrfs"
+- _packages = ["btrfs-progs"]
++ _packages = ["btrfs-tools"]
+ _external_dependencies = [availability.BLOCKDEV_BTRFS_PLUGIN]
+
+ def __init__(self, *args, **kwargs):
+diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
+index 81e367f..55e5d57 100644
+--- a/blivet/formats/fs.py
++++ b/blivet/formats/fs.py
+@@ -926,7 +926,7 @@ class BTRFS(FS):
+ _formattable = True
+ _linux_native = True
+ _supported = True
+- _packages = ["btrfs-progs"]
++ _packages = ["btrfs-tools"]
+ _min_size = Size("256 MiB")
+ _max_size = Size("16 EiB")
+ _mkfs_class = fsmkfs.BTRFSMkfs
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0007-invoking-mount-with-infinite-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0007-invoking-mount-with-infinite-timeout.patch
new file mode 100644
index 00000000..e3012194
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0007-invoking-mount-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From 9c7a15312259854f12137a30229e52c30fb7c770 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Aug 2016 21:30:32 -0400
+Subject: [PATCH 07/11] invoking mount with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index bc08af5..b672787 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -256,7 +256,7 @@ def mount(device, mountpoint, fstype, options=None):
+
+ argv = ["mount", "-t", fstype, "-o", options, device, mountpoint]
+ try:
+- rc = run_program(argv)
++ rc = run_program(argv, timeout=-1)
+ except OSError:
+ raise
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0008-use-oe-variable-to-replace-hardcoded-dir.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0008-use-oe-variable-to-replace-hardcoded-dir.patch
new file mode 100644
index 00000000..feb5647c
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0008-use-oe-variable-to-replace-hardcoded-dir.patch
@@ -0,0 +1,34 @@
+From 7f57b2cd145d67c20beb02d5495b502f7af012cd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 03:54:12 -0400
+Subject: [PATCH 08/11] use oe variable to replace hardcoded dir
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ setup.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 7edab2c..9be3187 100644
+--- a/setup.py
++++ b/setup.py
+@@ -61,10 +61,10 @@ class blivet_sdist(sdist):
+
+
+ data_files = [
+- ('/etc/dbus-1/system.d', ['dbus/blivet.conf']),
+- ('/usr/share/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']),
+- ('/usr/libexec', ['dbus/blivetd']),
+- ('/usr/lib/systemd/system', ['dbus/blivet.service'])
++ (os.environ.get('sysconfdir')+'/dbus-1/system.d', ['dbus/blivet.conf']),
++ (os.environ.get('datadir')+'/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']),
++ (os.environ.get('libexecdir'), ['dbus/blivetd']),
++ (os.environ.get('systemd_system_unitdir'), ['dbus/blivet.service'])
+ ]
+
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-fsck-with-infinite-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-fsck-with-infinite-timeout.patch
new file mode 100644
index 00000000..30d2d3ec
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-fsck-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From c757666f42f543baeed5df61269798c085665d9b Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Jun 2017 16:05:27 +0800
+Subject: [PATCH 09/11] invoking fsck with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/tasks/fsck.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py
+index 5274f13..6e074c4 100644
+--- a/blivet/tasks/fsck.py
++++ b/blivet/tasks/fsck.py
+@@ -77,7 +77,7 @@ class FSCK(task.BasicApplication, fstask.FSTask):
+ raise FSError("\n".join(error_msgs))
+
+ try:
+- rc = util.run_program(self._fsck_command)
++ rc = util.run_program(self._fsck_command, timeout=-1)
+ except OSError as e:
+ raise FSError("filesystem check failed: %s" % e)
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0010-invoking-mkfs-with-infinite-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0010-invoking-mkfs-with-infinite-timeout.patch
new file mode 100644
index 00000000..b2f45014
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0010-invoking-mkfs-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From 42d8e57c748951098534bf7f52c4ebc790ef66e9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 16 Jun 2017 15:43:00 +0800
+Subject: [PATCH 10/11] invoking mkfs with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/tasks/fsmkfs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/tasks/fsmkfs.py b/blivet/tasks/fsmkfs.py
+index ad166aa..7bf5075 100644
+--- a/blivet/tasks/fsmkfs.py
++++ b/blivet/tasks/fsmkfs.py
+@@ -170,7 +170,7 @@ class FSMkfs(task.BasicApplication, FSMkfsTask):
+ options = options or []
+ cmd = self._mkfs_command(options, label, set_uuid)
+ try:
+- ret = util.run_program(cmd)
++ ret = util.run_program(cmd, timeout=-1)
+ except OSError as e:
+ raise FSError(e)
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-dd-with-infinite-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-dd-with-infinite-timeout.patch
new file mode 100644
index 00000000..f24ce0a8
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-dd-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From a4753b3cbbd5aee59dc53eb16564cafd9862763e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 6 Mar 2018 17:28:56 +0800
+Subject: [PATCH 11/11] invoking dd with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/devices/partition.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
+index 47ff547..0cd1614 100644
+--- a/blivet/devices/partition.py
++++ b/blivet/devices/partition.py
+@@ -621,7 +621,7 @@ class PartitionDevice(StorageDevice):
+ cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%d" % bs,
+ "seek=%d" % start, "count=%d" % count]
+ try:
+- util.run_program(cmd)
++ util.run_program(cmd, timeout=-1)
+ except OSError as e:
+ log.error(str(e))
+ finally:
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch
new file mode 100644
index 00000000..886e3ff9
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0012-remove-dmraid-dependency-check.patch
@@ -0,0 +1,31 @@
+From 4476e846a1e64dde17df2e2370c803ce695514f9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+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 <hongxu.jia@windriver.com>
+---
+ 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
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch
new file mode 100644
index 00000000..33b5f51f
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet/0013-add-Z-y-and-y-to-lvm.pvcreate.patch
@@ -0,0 +1,41 @@
+From bddbfa499df16b108f2d892ee48d65617523c33d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+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 <hongxu.jia@windriver.com>
+---
+ 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
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_3.0.1.bb b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_3.0.1.bb
new file mode 100644
index 00000000..75f02f13
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivet_3.0.1.bb
@@ -0,0 +1,48 @@
+DESCRIPTION = "A python module for system storage configuration"
+HOMEPAGE = "http://fedoraproject.org/wiki/blivet"
+LICENSE = "LGPLv2+"
+SECTION = "devel/python"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "ddc24c71bad10208b11ea0c45853898fadd7030b"
+SRC_URI = "git://github.com/rhinstaller/blivet;branch=3.1-release \
+ file://0001-comment-out-selinux.patch \
+ file://0002-run_program-support-timeout.patch \
+ file://0003-support-infinit-timeout.patch \
+ file://0004-fix-new.roots-object-is-not-iterable.patch \
+ file://0005-fix-incorrect-timeout-while-system-time-changed.patch \
+ file://0006-tweak-btrfs-packages.patch \
+ file://0007-invoking-mount-with-infinite-timeout.patch \
+ file://0008-use-oe-variable-to-replace-hardcoded-dir.patch \
+ 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 \
+ file://0013-add-Z-y-and-y-to-lvm.pvcreate.patch \
+"
+
+UPSTREAM_CHECK_GITTAGREGEX = "blivet-(?P<pver>\d+(\.\d+)+)$"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+inherit setuptools3 python3native
+
+RDEPENDS_${PN} = "python3-pykickstart python3-pyudev \
+ parted python3-pyparted multipath-tools \
+ lsof cryptsetup libblockdev \
+ libbytesize \
+"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1/system-services \
+"
+
+inherit systemd
+
+SYSTEMD_AUTO_ENABLE = "disable"
+SYSTEMD_SERVICE_${PN} = "blivet.service"
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui/0001-Set-_supported_filesystems-in-BlivetGUIAnaconda-init.patch b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui/0001-Set-_supported_filesystems-in-BlivetGUIAnaconda-init.patch
new file mode 100644
index 00000000..25a71d4a
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui/0001-Set-_supported_filesystems-in-BlivetGUIAnaconda-init.patch
@@ -0,0 +1,39 @@
+From a7b76f783608033e449ba1e33d040c2b40c01a4d Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam@redhat.com>
+Date: Wed, 17 Jan 2018 10:38:18 -0800
+Subject: [PATCH] Set _supported_filesystems in BlivetGUIAnaconda init
+
+BlivetGUIAnaconda subclasses BlivetGUI, but doesn't call the
+parent class's __init__. c4b6e174 added supported_filesystems
+to BlivetGUI and set _supported_filesystems for caching during
+__init__, but this was not also added to BlivetGUIAnaconda, so
+when anything tries to use the supported_filesystems property
+of a BlivetGUIAnaconda instance, it will crash. This is causing
+all attempts to use blivet-gui in anaconda to crash since 2.1.8
+landed in Rawhide.
+
+Upstream-Status: Backport [https://github.com/storaged-project/blivet-gui]
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
+---
+ blivetgui/osinstall.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/blivetgui/osinstall.py b/blivetgui/osinstall.py
+index 21806ca..32ff66b 100644
+--- a/blivetgui/osinstall.py
++++ b/blivetgui/osinstall.py
+@@ -94,6 +94,9 @@ class BlivetGUIAnaconda(BlivetGUI):
+ self.builder.set_translation_domain("blivet-gui")
+ self.builder.add_from_file(locate_ui_file("blivet-gui.ui"))
+
++ # supported filesystems
++ self._supported_filesystems = []
++
+ # CSS styles
+ css_provider = Gtk.CssProvider()
+ css_provider.load_from_path(locate_css_file("rectangle.css"))
+--
+2.20.1
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.8.bb b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.8.bb
new file mode 100644
index 00000000..5f62b9e5
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.8.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "GUI tool for storage configuration using blivet library"
+HOMEPAGE = "https://github.com/rhinstaller/blivet-gui"
+LICENSE = "GPLv2+"
+SECTION = "devel/python"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "a4fd427ee2acc5a8f5fb030bf7816917cee63bd8"
+SRC_URI = "git://github.com/rhinstaller/blivet-gui;branch=master \
+ file://0001-Set-_supported_filesystems-in-BlivetGUIAnaconda-init.patch \
+"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "x11 systemd"
+
+inherit setuptools3 python3native
+
+RDEPENDS_${PN} = "python3-pygobject python3 \
+ python3-blivet gtk+3 \
+ python3-pid libreport \
+"
+
+FILES_${PN} += " \
+ ${datadir}/* \
+ "
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-cson/python-cson_git.bb b/external/meta-openembedded/meta-python/recipes-extended/python-cson/python-cson_git.bb
new file mode 100644
index 00000000..efb338cf
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-cson/python-cson_git.bb
@@ -0,0 +1,21 @@
+# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Python library for CSON (schema-compressed JSON)"
+HOMEPAGE = "https://github.com/gt3389b/python-cson/"
+LICENSE = "MIT"
+SECTION = "devel/python"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7709d2635e63ab96973055a23c2a4cac"
+
+SRCREV = "f3f2898c44bb16b951d3e9f2fbf6d1c4158edda2"
+SRC_URI = "git://github.com/gt3389b/python-cson.git"
+
+S = "${WORKDIR}/git"
+
+RDEPENDS_${PN}_class-native = ""
+DEPENDS_append_class-native = " python-native "
+
+inherit setuptools
+
+BBCLASSEXTEND = "native"
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.47.bb b/external/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.47.bb
new file mode 100644
index 00000000..95d6d183
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-meh/python3-meh_0.47.bb
@@ -0,0 +1,17 @@
+SUMMARY = "A python library for handling exceptions"
+DESCRIPTION = "The python-meh package is a python library for handling, saving, and reporting \
+exceptions."
+HOMEPAGE = "http://git.fedorahosted.org/git/?p=python-meh.git"
+LICENSE = "GPLv2+"
+
+inherit setuptools3
+
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=master \
+"
+SRCREV = "78d868d99104317ce8820f39f61d207566e61a55"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+FILES_${PN} += "${datadir}/*"
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pyephem/python-pyephem_3.7.6.0.bb b/external/meta-openembedded/meta-python/recipes-extended/python-pyephem/python-pyephem_3.7.6.0.bb
new file mode 100644
index 00000000..e28ce6cc
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pyephem/python-pyephem_3.7.6.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "PyEphem astronomical calculations"
+HOMEPAGE = "http://rhodesmill.org/pyephem/"
+
+LICENSE = "LGPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f288303760f6e5ceaafe3aaa32186ab1"
+
+SRC_URI[md5sum] = "405a109f3017251ecd8c2890d850f649"
+SRC_URI[sha256sum] = "7a4c82b1def2893e02aec0394f108d24adb17bd7b0ca6f4bc78eb7120c0212ac"
+
+PYPI_PACKAGE = "ephem"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} += "\
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-math \
+ "
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch
new file mode 100644
index 00000000..e7533f47
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch
@@ -0,0 +1,148 @@
+From f05f5fc363e2510f6943532f3e14a6423f6a2cf1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 31 Jul 2018 17:24:47 +0800
+Subject: [PATCH 1/4] support authentication for kickstart
+
+While download kickstart file from web server,
+we support basic/digest authentication.
+
+Add KickstartAuthError to report authentication failure,
+which the invoker could parse this specific error.
+
+Upstream-Status: inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ pykickstart/errors.py | 17 +++++++++++++++++
+ pykickstart/load.py | 34 ++++++++++++++++++++++++++++------
+ pykickstart/parser.py | 4 ++--
+ 3 files changed, 47 insertions(+), 8 deletions(-)
+
+diff --git a/pykickstart/errors.py b/pykickstart/errors.py
+index bf08ac5..aada7aa 100644
+--- a/pykickstart/errors.py
++++ b/pykickstart/errors.py
+@@ -32,6 +32,9 @@ This module exports several exception classes:
+ KickstartVersionError - An exception for errors relating to unsupported
+ syntax versions.
+
++ KickstartAuthError - An exception for errors relating to authentication
++ failed while downloading kickstart from web server
++
+ And some warning classes:
+
+ KickstartWarning - A generic warning class.
+@@ -131,3 +134,17 @@ class KickstartDeprecationWarning(KickstartParseWarning, DeprecationWarning):
+ commands and options.
+ """
+ pass
++
++class KickstartAuthError(KickstartError):
++ """An exception for errors relating to authentication failed while
++ downloading kickstart from web server
++ """
++ def __init__(self, msg):
++ """Create a new KickstartAuthError exception instance with the
++ descriptive message val. val should be the return value of
++ formatErrorMsg.
++ """
++ KickstartError.__init__(self, msg)
++
++ def __str__(self):
++ return self.value
+diff --git a/pykickstart/load.py b/pykickstart/load.py
+index fb935f2..41a2e9e 100644
+--- a/pykickstart/load.py
++++ b/pykickstart/load.py
+@@ -18,10 +18,13 @@
+ # with the express permission of Red Hat, Inc.
+ #
+ import requests
++from requests.auth import HTTPDigestAuth
++from requests.auth import HTTPBasicAuth
++
+ import shutil
+ import six
+
+-from pykickstart.errors import KickstartError
++from pykickstart.errors import KickstartError, KickstartAuthError
+ from pykickstart.i18n import _
+ from requests.exceptions import SSLError, RequestException
+
+@@ -29,7 +32,7 @@ _is_url = lambda location: '://' in location # RFC 3986
+
+ SSL_VERIFY = True
+
+-def load_to_str(location):
++def load_to_str(location, user=None, passwd=None):
+ '''Load a destination URL or file into a string.
+ Type of input is inferred automatically.
+
+@@ -40,7 +43,7 @@ def load_to_str(location):
+ Raises: KickstartError on error reading'''
+
+ if _is_url(location):
+- return _load_url(location)
++ return _load_url(location, user=user, passwd=passwd)
+ else:
+ return _load_file(location)
+
+@@ -70,11 +73,30 @@ def load_to_file(location, destination):
+ _copy_file(location, destination)
+ return destination
+
+-def _load_url(location):
+- '''Load a location (URL or filename) and return contents as string'''
++def _get_auth(location, user=None, passwd=None):
++
++ auth = None
++ request = requests.get(location, verify=SSL_VERIFY)
++ if request.status_code == requests.codes.unauthorized:
++ 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]
++ if auth_type == "Basic":
++ auth = HTTPBasicAuth(user, passwd)
++ elif auth_type == "Digest":
++ 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'''
++ auth = _get_auth(location, user=user, passwd=passwd)
+ try:
+- request = requests.get(location, verify=SSL_VERIFY)
++ request = requests.get(location, verify=SSL_VERIFY, auth=auth)
+ except SSLError as e:
+ raise KickstartError(_('Error securely accessing URL "%s"') % location + ': {e}'.format(e=str(e)))
+ except RequestException as e:
+diff --git a/pykickstart/parser.py b/pykickstart/parser.py
+index d8880eb..22d14cb 100644
+--- a/pykickstart/parser.py
++++ b/pykickstart/parser.py
+@@ -787,7 +787,7 @@ class KickstartParser(object):
+ i = PutBackIterator(s.splitlines(True) + [""])
+ self._stateMachine(i)
+
+- def readKickstart(self, f, reset=True):
++ def readKickstart(self, f, reset=True, username=None, password=None):
+ """Process a kickstart file, given by the filename f."""
+ if reset:
+ self._reset()
+@@ -808,7 +808,7 @@ class KickstartParser(object):
+ self.currentdir[self._includeDepth] = cd
+
+ try:
+- s = load_to_str(f)
++ s = load_to_str(f, user=username, passwd=password)
+ except KickstartError as e:
+ raise KickstartError(_("Unable to open input kickstart file: %s") % str(e), lineno=0)
+
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch
new file mode 100644
index 00000000..4a001f33
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch
@@ -0,0 +1,68 @@
+From 62fdead139edb0f29b2f222efcb8f39be15b057e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 30 Jul 2018 15:47:13 +0800
+Subject: [PATCH 2/4] pykickstart/parser.py: add lock for readKickstart and
+ support https without certification
+
+- Add lock for readKickstart to fix race issue
+
+- Support to download kickstart file through https without certification
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ pykickstart/load.py | 2 +-
+ pykickstart/parser.py | 18 ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/pykickstart/load.py b/pykickstart/load.py
+index c6f013f..7adb751 100644
+--- a/pykickstart/load.py
++++ b/pykickstart/load.py
+@@ -30,7 +30,7 @@ from requests.exceptions import SSLError, RequestException
+
+ _is_url = lambda location: '://' in location # RFC 3986
+
+-SSL_VERIFY = True
++SSL_VERIFY = False
+
+ def load_to_str(location, user=None, passwd=None):
+ '''Load a destination URL or file into a string.
+diff --git a/pykickstart/parser.py b/pykickstart/parser.py
+index e44099b..e68174d 100644
+--- a/pykickstart/parser.py
++++ b/pykickstart/parser.py
+@@ -55,6 +55,20 @@ from pykickstart.i18n import _
+ STATE_END = "end"
+ STATE_COMMANDS = "commands"
+
++import threading
++_private_ks_lock = threading.RLock()
++
++class KsLock(object):
++ def __enter__(self):
++ _private_ks_lock.acquire()
++ return _private_ks_lock
++
++ def __exit__(self, exc_type, exc_val, exc_tb):
++ _private_ks_lock.release()
++
++
++_ks_lock = KsLock()
++
+ def _preprocessStateMachine(lineIter):
+ l = None
+ lineno = 0
+@@ -788,6 +802,10 @@ class KickstartParser(object):
+ self._stateMachine(i)
+
+ def readKickstart(self, f, reset=True, username=None, password=None):
++ with _ks_lock:
++ self._readKickstart(f, reset=reset, username=username, password=password)
++
++ def _readKickstart(self, f, reset=True, username=None, password=None):
+ """Process a kickstart file, given by the filename f."""
+ if reset:
+ self._reset()
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch
new file mode 100644
index 00000000..81e351b1
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0003-comment-out-sections-shutdown-and-environment-in-gen.patch
@@ -0,0 +1,48 @@
+From 44226393812399c61de9ca9281efa002ad4f4c01 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Jun 2017 15:15:15 +0800
+Subject: [PATCH 3/4] comment out sections shutdown and environment in
+ generated kickstart file
+
+Both of them is disabled by default.
+
+Upstream-Status: Inappropriate[oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+fixup! add comments of shutdown for user
+---
+ pykickstart/commands/reboot.py | 3 +++
+ pykickstart/parser.py | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/pykickstart/commands/reboot.py b/pykickstart/commands/reboot.py
+index 2c1b1c0..b3ec717 100644
+--- a/pykickstart/commands/reboot.py
++++ b/pykickstart/commands/reboot.py
+@@ -43,6 +43,9 @@ class FC3_Reboot(KickstartCommand):
+ elif self.action == KS_SHUTDOWN:
+ retval += "# Shutdown after installation\nshutdown"
+ retval += self._getArgsAsStr() + "\n"
++ else:
++ retval += "# Shutdown after installation\n#shutdown"
++ retval += self._getArgsAsStr() + "\n"
+
+ return retval
+
+diff --git a/pykickstart/parser.py b/pykickstart/parser.py
+index e68174d..efd78a6 100644
+--- a/pykickstart/parser.py
++++ b/pykickstart/parser.py
+@@ -385,7 +385,7 @@ class Packages(KickstartObject):
+
+ if not self.default:
+ if self.environment:
+- pkgs += "@^%s\n" % self.environment
++ pkgs += "#@^%s\n" % self.environment
+
+ grps = self.groupList
+ grps.sort()
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch
new file mode 100644
index 00000000..6ed15ab0
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch
@@ -0,0 +1,83 @@
+From ffe06c6dd812b604d6482e4353d5564fad78bc90 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 30 Jul 2018 15:52:21 +0800
+Subject: [PATCH 4/4] load.py: retry to invoke request with timeout
+
+While networkless, use request to fetch kickstart file from
+network, it failed and wait 300s to break, we should retry
+to invoke request with timeout explicitly. So if it the
+network is up, the fetch works.
+
+Upstream-Status: inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ pykickstart/load.py | 31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+diff --git a/pykickstart/load.py b/pykickstart/load.py
+index ad3bad1..a5cbbc5 100644
+--- a/pykickstart/load.py
++++ b/pykickstart/load.py
+@@ -21,6 +21,7 @@ import requests
+ from requests.auth import HTTPDigestAuth
+ from requests.auth import HTTPBasicAuth
+
++import time
+ import shutil
+ import six
+
+@@ -28,6 +29,9 @@ from pykickstart.errors import KickstartError, KickstartAuthError
+ from pykickstart.i18n import _
+ from requests.exceptions import SSLError, RequestException
+
++import logging
++log = logging.getLogger("anaconda.main")
++
+ _is_url = lambda location: '://' in location # RFC 3986
+
+ SSL_VERIFY = False
+@@ -73,6 +77,29 @@ def load_to_file(location, destination):
+ _copy_file(location, destination)
+ return destination
+
++def _access_url(location):
++ status = False
++
++ # Retry 45 times, wait 45s~135s
++ i = 0
++ while i < 45:
++
++ try:
++ request = requests.get(location, verify=SSL_VERIFY, timeout=2)
++ except RequestException as e:
++ log.info("Try '%s' %d times, %s" % (location, i, str(e)))
++ status = False
++ i += 1
++ time.sleep(1)
++ continue
++
++ else:
++ status = True
++ return status
++
++ return status
++
++
+ def _get_auth(location, user=None, passwd=None):
+
+ auth = None
+@@ -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'''
++
++ if not _access_url(location):
++ raise KickstartError(_("Connection %s failed" % location))
++
+ auth = _get_auth(location, user=user, passwd=passwd)
+ try:
+ request = requests.get(location, verify=SSL_VERIFY, auth=auth)
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.15.bb b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.15.bb
new file mode 100644
index 00000000..07876a98
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.15.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "A python library for manipulating kickstart files"
+HOMEPAGE = "http://fedoraproject.org/wiki/pykickstart"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+DEPENDS = "python3"
+RDEPENDS_${PN} = "python3 \
+ python3-requests \
+ python3-six \
+"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/rhinstaller/pykickstart.git;protocol=https;branch=master \
+ file://0001-support-authentication-for-kickstart.patch \
+ file://0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch \
+ file://0003-comment-out-sections-shutdown-and-environment-in-gen.patch \
+ file://0004-load.py-retry-to-invoke-request-with-timeout.patch \
+ "
+SRCREV = "07c4d89129fa6b460acc86daf58eb5ff64cdc832"
+
+UPSTREAM_CHECK_GITTAGREGEX = "r(?P<pver>\d+(\.\d+)+(-\d+)*)"
+
+inherit setuptools3
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc b/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
new file mode 100644
index 00000000..a0ec0281
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
@@ -0,0 +1,22 @@
+DESCRIPTION = "pyparted is a set of Python modules that provide Python programmers \
+an interface to libparted, the GNU parted library for disk partitioning and \
+filesystem manipulation."
+SUMMARY = "Python bindings for libparted"
+HOMEPAGE = "https://github.com/rhinstaller/pyparted"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://src/_pedmodule.c;beginline=10;endline=22;md5=9e53304db812b80d0939e11bb69dcab2 \
+"
+DEPENDS += "parted"
+
+# upstream only publishes releases in github archives which are discouraged
+SRCREV = "1fdb15120f35f5da1dc7ec116522f0c796a8376a"
+SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+RDEPENDS_${PN}_class-target += " \
+ parted (>= 2.3) \
+"
+RDEPENDS_${PN}_class-native = ""
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb b/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb
new file mode 100644
index 00000000..32aa378c
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python-pyparted_3.11.1.bb
@@ -0,0 +1,8 @@
+require python-pyparted.inc
+
+inherit distutils
+
+RDEPENDS_${PN} += "python-stringold python-codecs python-math python-subprocess"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
diff --git a/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb b/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb
new file mode 100644
index 00000000..d83901ff
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.1.bb
@@ -0,0 +1,8 @@
+require python-pyparted.inc
+
+inherit distutils3
+
+RDEPENDS_${PN} += "python3-stringold python3-codecs python3-math"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
diff --git a/external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem.inc b/external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem.inc
new file mode 100644
index 00000000..5151c33e
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem.inc
@@ -0,0 +1,48 @@
+SUMMARY = "Python WBEM Client and Provider Interface"
+DESCRIPTION = "\
+A Python library for making CIM (Common Information Model) operations over \
+HTTP using the WBEM CIM-XML protocol. It is based on the idea that a good \
+WBEM client should be easy to use and not necessarily require a large amount \
+of programming knowledge. It is suitable for a large range of tasks from \
+simply poking around to writing web and GUI applications. \
+\
+WBEM, or Web Based Enterprise Management is a manageability protocol, like \
+SNMP, standardised by the Distributed Management Task Force (DMTF) available \
+at http://www.dmtf.org/standards/wbem. \
+\
+It also provides a Python provider interface, and is the fastest and easiest \
+way to write providers on the planet."
+HOMEPAGE = "http://pywbem.github.io"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://pywbem/LICENSE.txt;md5=fbc093901857fcd118f065f900982c24"
+SRC_URI[md5sum] = "1465dfa92e4cbe558c773838b9b00711"
+SRC_URI[sha256sum] = "2a05f2c1a6ab4b08560a6da55fdaabd0f52f4d1e6df6e288b9ed927bf5c289ed"
+
+inherit pypi
+
+DEPENDS += " \
+ ${PYTHON_PN}-ply-native \
+ ${PYTHON_PN}-pyyaml-native \
+ ${PYTHON_PN}-six-native \
+"
+
+do_install_append() {
+ mv ${D}${bindir}/wbemcli.py ${D}${bindir}/pywbemcli
+
+ rm -f ${D}${bindir}/*.bat
+}
+
+RDEPENDS_${PN}_class-target += "\
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-ply \
+ ${PYTHON_PN}-pyyaml \
+ ${PYTHON_PN}-six \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-threading \
+ ${PYTHON_PN}-unixadmin \
+ ${PYTHON_PN}-xml \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem_0.11.0.bb b/external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem_0.11.0.bb
new file mode 100644
index 00000000..74107490
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/pywbem/python-pywbem_0.11.0.bb
@@ -0,0 +1,13 @@
+require python-pywbem.inc
+inherit setuptools
+
+DEPENDS += " \
+ ${PYTHON_PN}-m2crypto-native \
+ ${PYTHON_PN}-typing-native \
+"
+
+RDEPENDS_${PN}_class-target += "\
+ ${PYTHON_PN}-argparse \
+ ${PYTHON_PN}-m2crypto \
+ ${PYTHON_PN}-subprocess \
+"
diff --git a/external/meta-openembedded/meta-python/recipes-extended/pywbem/python3-pywbem_0.11.0.bb b/external/meta-openembedded/meta-python/recipes-extended/pywbem/python3-pywbem_0.11.0.bb
new file mode 100644
index 00000000..6a35a874
--- /dev/null
+++ b/external/meta-openembedded/meta-python/recipes-extended/pywbem/python3-pywbem_0.11.0.bb
@@ -0,0 +1,2 @@
+require python-pywbem.inc
+inherit setuptools3