diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2017-08-13 21:46:01 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-28 11:04:11 +0200 |
commit | e311a05d2a507d6376dc4f234a64b0d0181ef5b0 (patch) | |
tree | acfe10431f872f8630c9ec03baf4ea09f734bb9b | |
parent | 66cce63d507ee71a405a8b0c3b87b63c034bb5dc (diff) | |
download | meta-openembedded-e311a05d2a507d6376dc4f234a64b0d0181ef5b0.tar.gz |
python3-blivet: add recipe 2.2.0
Remove provides of `pykickstart' in python3-pykickstart
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
15 files changed, 653 insertions, 3 deletions
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch new file mode 100644 index 000000000..0ee32057c --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 7d483c27ac0a23ca3bba7f320918afc40013bd8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 14:25:52 +0800 | ||
4 | Subject: [PATCH 01/13] comment out selinux | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
9 | --- | ||
10 | blivet/flags.py | 5 +++-- | ||
11 | blivet/util.py | 6 +++++- | ||
12 | 2 files changed, 8 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/blivet/flags.py b/blivet/flags.py | ||
15 | index 06822db..b55a93f 100644 | ||
16 | --- a/blivet/flags.py | ||
17 | +++ b/blivet/flags.py | ||
18 | @@ -20,7 +20,7 @@ | ||
19 | # | ||
20 | |||
21 | import shlex | ||
22 | -import selinux | ||
23 | +#import selinux | ||
24 | |||
25 | |||
26 | class Flags(object): | ||
27 | @@ -49,7 +49,8 @@ class Flags(object): | ||
28 | # | ||
29 | # enable/disable functionality | ||
30 | # | ||
31 | - self.selinux = selinux.is_selinux_enabled() | ||
32 | + #self.selinux = selinux.is_selinux_enabled() | ||
33 | + self.selinux = False | ||
34 | self.multipath = True | ||
35 | self.dmraid = True | ||
36 | self.ibft = True | ||
37 | diff --git a/blivet/util.py b/blivet/util.py | ||
38 | index e3e71ce..0cf5188 100644 | ||
39 | --- a/blivet/util.py | ||
40 | +++ b/blivet/util.py | ||
41 | @@ -4,7 +4,7 @@ import glob | ||
42 | import itertools | ||
43 | import os | ||
44 | import shutil | ||
45 | -import selinux | ||
46 | +#import selinux | ||
47 | import subprocess | ||
48 | import re | ||
49 | import sys | ||
50 | @@ -431,6 +431,8 @@ def get_cow_sysfs_path(dev_path, dev_sysfsPath): | ||
51 | def match_path_context(path): | ||
52 | """ Return the default SELinux context for the given path. """ | ||
53 | context = None | ||
54 | + return context | ||
55 | + | ||
56 | try: | ||
57 | context = selinux.matchpathcon(os.path.normpath(path), 0)[1] | ||
58 | except OSError as e: | ||
59 | @@ -455,6 +457,8 @@ def set_file_context(path, context, root=None): | ||
60 | |||
61 | True if successful, False if not. | ||
62 | """ | ||
63 | + return False | ||
64 | + | ||
65 | if root is None: | ||
66 | root = '/' | ||
67 | |||
68 | -- | ||
69 | 2.7.4 | ||
70 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch new file mode 100644 index 000000000..01e71be30 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From 86744d408b91acdcb086a03d7779fcda152f2ac3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 14:39:56 +0800 | ||
4 | Subject: [PATCH 02/13] run_program support timeout | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
9 | --- | ||
10 | blivet/util.py | 68 +++++++++++++++++++++++++++++++++------------------------- | ||
11 | 1 file changed, 39 insertions(+), 29 deletions(-) | ||
12 | |||
13 | diff --git a/blivet/util.py b/blivet/util.py | ||
14 | index 0cf5188..d4bd9bb 100644 | ||
15 | --- a/blivet/util.py | ||
16 | +++ b/blivet/util.py | ||
17 | @@ -158,6 +158,30 @@ class Path(str): | ||
18 | def __hash__(self): | ||
19 | return self._path.__hash__() | ||
20 | |||
21 | +def timeout_command(argv, timeout, *args, **kwargs): | ||
22 | + """call shell-command and either return its output or kill it | ||
23 | + if it doesn't normally exit within timeout seconds and return None""" | ||
24 | + import subprocess, datetime, os, time, signal | ||
25 | + start = datetime.datetime.now() | ||
26 | + | ||
27 | + try: | ||
28 | + proc = subprocess.Popen(argv, *args, **kwargs) | ||
29 | + while proc.poll() is None: | ||
30 | + time.sleep(0.1) | ||
31 | + now = datetime.datetime.now() | ||
32 | + if (now - start).seconds> timeout: | ||
33 | + os.kill(proc.pid, signal.SIGKILL) | ||
34 | + os.waitpid(-1, os.WNOHANG) | ||
35 | + program_log.debug("%d seconds timeout" % timeout) | ||
36 | + return (-1, None) | ||
37 | + | ||
38 | + | ||
39 | + except OSError as e: | ||
40 | + program_log.error("Error running %s: %s", argv[0], e.strerror) | ||
41 | + raise | ||
42 | + | ||
43 | + program_log.debug("Return code: %d", proc.returncode) | ||
44 | + return (proc.returncode, proc.stdout.read()) | ||
45 | |||
46 | def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False): | ||
47 | if env_prune is None: | ||
48 | @@ -180,36 +204,22 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa | ||
49 | stderr_dir = subprocess.STDOUT | ||
50 | else: | ||
51 | stderr_dir = subprocess.PIPE | ||
52 | - try: | ||
53 | - proc = subprocess.Popen(argv, | ||
54 | - stdin=stdin, | ||
55 | - stdout=subprocess.PIPE, | ||
56 | - stderr=stderr_dir, | ||
57 | - close_fds=True, | ||
58 | - preexec_fn=chroot, cwd=root, env=env) | ||
59 | - | ||
60 | - out, err = proc.communicate() | ||
61 | - if not binary_output and six.PY3: | ||
62 | - out = out.decode("utf-8") | ||
63 | - if out: | ||
64 | - if not stderr_to_stdout: | ||
65 | - program_log.info("stdout:") | ||
66 | - for line in out.splitlines(): | ||
67 | - program_log.info("%s", line) | ||
68 | - | ||
69 | - if not stderr_to_stdout and err: | ||
70 | - program_log.info("stderr:") | ||
71 | - for line in err.splitlines(): | ||
72 | - program_log.info("%s", line) | ||
73 | - | ||
74 | - except OSError as e: | ||
75 | - program_log.error("Error running %s: %s", argv[0], e.strerror) | ||
76 | - raise | ||
77 | - | ||
78 | - program_log.debug("Return code: %d", proc.returncode) | ||
79 | - | ||
80 | - return (proc.returncode, out) | ||
81 | |||
82 | + res, out = timeout_command(argv, 10, | ||
83 | + stdin=stdin, | ||
84 | + stdout=subprocess.PIPE, | ||
85 | + stderr=stderr_dir, | ||
86 | + close_fds=True, | ||
87 | + preexec_fn=chroot, cwd=root, env=env) | ||
88 | + if not binary_output and six.PY3: | ||
89 | + out = out.decode("utf-8") | ||
90 | + if out: | ||
91 | + if not stderr_to_stdout: | ||
92 | + program_log.info("stdout:") | ||
93 | + for line in out.splitlines(): | ||
94 | + program_log.info("%s", line) | ||
95 | + | ||
96 | + return (res, out) | ||
97 | |||
98 | def run_program(*args, **kwargs): | ||
99 | return _run_program(*args, **kwargs)[0] | ||
100 | -- | ||
101 | 2.7.4 | ||
102 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch new file mode 100644 index 000000000..489fb56bb --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 923265e04df5920fc99393aa05f584032aa1b383 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 16:18:02 +0800 | ||
4 | Subject: [PATCH 03/13] support infinit timeout | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
9 | --- | ||
10 | blivet/util.py | 12 ++++++++---- | ||
11 | 1 file changed, 8 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/blivet/util.py b/blivet/util.py | ||
14 | index d4bd9bb..44a2da5 100644 | ||
15 | --- a/blivet/util.py | ||
16 | +++ b/blivet/util.py | ||
17 | @@ -158,6 +158,7 @@ class Path(str): | ||
18 | def __hash__(self): | ||
19 | return self._path.__hash__() | ||
20 | |||
21 | +# timeout = -1 means infinite timeout, always wait. | ||
22 | def timeout_command(argv, timeout, *args, **kwargs): | ||
23 | """call shell-command and either return its output or kill it | ||
24 | if it doesn't normally exit within timeout seconds and return None""" | ||
25 | @@ -169,7 +170,7 @@ def timeout_command(argv, timeout, *args, **kwargs): | ||
26 | while proc.poll() is None: | ||
27 | time.sleep(0.1) | ||
28 | now = datetime.datetime.now() | ||
29 | - if (now - start).seconds> timeout: | ||
30 | + if timeout != -1 and (now - start).seconds> timeout: | ||
31 | os.kill(proc.pid, signal.SIGKILL) | ||
32 | os.waitpid(-1, os.WNOHANG) | ||
33 | program_log.debug("%d seconds timeout" % timeout) | ||
34 | @@ -183,7 +184,7 @@ def timeout_command(argv, timeout, *args, **kwargs): | ||
35 | program_log.debug("Return code: %d", proc.returncode) | ||
36 | return (proc.returncode, proc.stdout.read()) | ||
37 | |||
38 | -def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False): | ||
39 | +def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False, timeout=10): | ||
40 | if env_prune is None: | ||
41 | env_prune = [] | ||
42 | |||
43 | @@ -192,7 +193,10 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa | ||
44 | os.chroot(root) | ||
45 | |||
46 | with program_log_lock: # pylint: disable=not-context-manager | ||
47 | - program_log.info("Running... %s", " ".join(argv)) | ||
48 | + if timeout != -1: | ||
49 | + program_log.info("Running... %s", " ".join(argv)) | ||
50 | + else: | ||
51 | + program_log.info("Running... %s ...infinite timeout", " ".join(argv)) | ||
52 | |||
53 | env = os.environ.copy() | ||
54 | env.update({"LC_ALL": "C", | ||
55 | @@ -205,7 +209,7 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa | ||
56 | else: | ||
57 | stderr_dir = subprocess.PIPE | ||
58 | |||
59 | - res, out = timeout_command(argv, 10, | ||
60 | + res, out = timeout_command(argv, timeout, | ||
61 | stdin=stdin, | ||
62 | stdout=subprocess.PIPE, | ||
63 | stderr=stderr_dir, | ||
64 | -- | ||
65 | 2.7.4 | ||
66 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch new file mode 100644 index 000000000..cb837e286 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From c3959bd00665e24a955bbdbea1ef555e76372f12 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 16:25:16 +0800 | ||
4 | Subject: [PATCH 04/13] Mount /var/volatile during install | ||
5 | |||
6 | The installed system needs /var/volatile clean, otherwise it | ||
7 | caused systemd's journalctl failed to record boot log. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe specific] | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | blivet/osinstall.py | 9 +++++++++ | ||
14 | 1 file changed, 9 insertions(+) | ||
15 | |||
16 | diff --git a/blivet/osinstall.py b/blivet/osinstall.py | ||
17 | index a4f9535..61819c2 100644 | ||
18 | --- a/blivet/osinstall.py | ||
19 | +++ b/blivet/osinstall.py | ||
20 | @@ -294,6 +294,7 @@ class FSSet(object): | ||
21 | self._sysfs = None | ||
22 | self._proc = None | ||
23 | self._devshm = None | ||
24 | + self._volatile = None | ||
25 | self._usb = None | ||
26 | self._selinux = None | ||
27 | self._run = None | ||
28 | @@ -335,6 +336,12 @@ class FSSet(object): | ||
29 | return self._devshm | ||
30 | |||
31 | @property | ||
32 | + def volatile(self): | ||
33 | + if not self._volatile: | ||
34 | + self._volatile = NoDevice(fmt=get_format("tmpfs", device="tmpfs", mountpoint="/var/volatile")) | ||
35 | + return self._volatile | ||
36 | + | ||
37 | + @property | ||
38 | def usb(self): | ||
39 | if not self._usb: | ||
40 | self._usb = NoDevice(fmt=get_format("usbfs", device="usbfs", mountpoint="/proc/bus/usb")) | ||
41 | @@ -591,6 +598,7 @@ class FSSet(object): | ||
42 | |||
43 | devices = list(self.mountpoints.values()) + self.swap_devices | ||
44 | devices.extend([self.dev, self.devshm, self.devpts, self.sysfs, | ||
45 | + self.volatile, | ||
46 | self.proc, self.selinux, self.usb, self.run]) | ||
47 | if isinstance(_platform, EFI): | ||
48 | devices.append(self.efivars) | ||
49 | @@ -650,6 +658,7 @@ class FSSet(object): | ||
50 | """ unmount filesystems, except swap if swapoff == False """ | ||
51 | devices = list(self.mountpoints.values()) + self.swap_devices | ||
52 | devices.extend([self.dev, self.devshm, self.devpts, self.sysfs, | ||
53 | + self.volatile, | ||
54 | self.proc, self.usb, self.selinux, self.run]) | ||
55 | if isinstance(_platform, EFI): | ||
56 | devices.append(self.efivars) | ||
57 | -- | ||
58 | 2.7.4 | ||
59 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch new file mode 100644 index 000000000..4f343b7d8 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 386ff899763f8473eb93a7a1578fb7cc4f86f66d Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 16:28:12 +0800 | ||
4 | Subject: [PATCH 05/13] update fstab by appending | ||
5 | |||
6 | The 'storage.write()' has updated fstab by overwriting | ||
7 | the original one, we should update fstab by appending | ||
8 | to keep original tmpfs partitions. | ||
9 | |||
10 | Upstream-Status: Inappropriate [oe specific] | ||
11 | |||
12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
13 | --- | ||
14 | blivet/osinstall.py | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/blivet/osinstall.py b/blivet/osinstall.py | ||
18 | index 61819c2..afa82db 100644 | ||
19 | --- a/blivet/osinstall.py | ||
20 | +++ b/blivet/osinstall.py | ||
21 | @@ -728,7 +728,7 @@ class FSSet(object): | ||
22 | # /etc/fstab | ||
23 | fstab_path = os.path.normpath("%s/etc/fstab" % get_sysroot()) | ||
24 | fstab = self.fstab() | ||
25 | - open(fstab_path, "w").write(fstab) | ||
26 | + open(fstab_path, "a").write(fstab) | ||
27 | |||
28 | # /etc/crypttab | ||
29 | crypttab_path = os.path.normpath("%s/etc/crypttab" % get_sysroot()) | ||
30 | -- | ||
31 | 2.7.4 | ||
32 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch new file mode 100644 index 000000000..f5ff754d8 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From cd92eea8fab37ba6b0c7f03daa5255343dc75716 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 16:30:20 +0800 | ||
4 | Subject: [PATCH 06/13] fix new.roots object is not iterable | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
9 | --- | ||
10 | blivet/blivet.py | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/blivet/blivet.py b/blivet/blivet.py | ||
14 | index 6a33e9c..79ae91a 100644 | ||
15 | --- a/blivet/blivet.py | ||
16 | +++ b/blivet/blivet.py | ||
17 | @@ -1761,7 +1761,7 @@ class Blivet(object): | ||
18 | p = partition.disk.format.parted_disk.getPartitionByPath(partition.path) | ||
19 | partition.parted_partition = p | ||
20 | |||
21 | - for root in new.roots: | ||
22 | + for root in new.roots or []: | ||
23 | root.swaps = [new.devicetree.get_device_by_id(d.id, hidden=True) for d in root.swaps] | ||
24 | root.swaps = [s for s in root.swaps if s] | ||
25 | |||
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch new file mode 100644 index 000000000..6512d8642 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 78ee2b9090f9400ccc4f730e674f5ae972740ccb Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 26 Aug 2016 02:02:49 -0400 | ||
4 | Subject: [PATCH 07/13] fix incorrect timeout while system time changed | ||
5 | |||
6 | While system time changed by NTP, invoking timeout_command | ||
7 | breaks with incorrect timeout. | ||
8 | -------- | ||
9 | |05:40:55,872 INFO program: Running... mount -t ext2 -o | ||
10 | defaults,ro /dev/sda2 /mnt/sysimage | ||
11 | |01:40:55,086 DEBUG program: 10 seconds timeout | ||
12 | -------- | ||
13 | |||
14 | Use numbert count to replace current time count could workaround | ||
15 | the issue. | ||
16 | |||
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
20 | --- | ||
21 | blivet/util.py | 6 +++--- | ||
22 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
23 | |||
24 | diff --git a/blivet/util.py b/blivet/util.py | ||
25 | index 44a2da5..b3c45ac 100644 | ||
26 | --- a/blivet/util.py | ||
27 | +++ b/blivet/util.py | ||
28 | @@ -163,14 +163,14 @@ def timeout_command(argv, timeout, *args, **kwargs): | ||
29 | """call shell-command and either return its output or kill it | ||
30 | if it doesn't normally exit within timeout seconds and return None""" | ||
31 | import subprocess, datetime, os, time, signal | ||
32 | - start = datetime.datetime.now() | ||
33 | + count = 0 | ||
34 | |||
35 | try: | ||
36 | proc = subprocess.Popen(argv, *args, **kwargs) | ||
37 | while proc.poll() is None: | ||
38 | time.sleep(0.1) | ||
39 | - now = datetime.datetime.now() | ||
40 | - if timeout != -1 and (now - start).seconds> timeout: | ||
41 | + count += 1 | ||
42 | + if timeout != -1 and count > timeout*10: | ||
43 | os.kill(proc.pid, signal.SIGKILL) | ||
44 | os.waitpid(-1, os.WNOHANG) | ||
45 | program_log.debug("%d seconds timeout" % timeout) | ||
46 | -- | ||
47 | 2.7.4 | ||
48 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch new file mode 100644 index 000000000..121336e4c --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 6f661a511eea096c073888c7adb836a9a880b476 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 16:33:15 +0800 | ||
4 | Subject: [PATCH 08/13] tweak btrfs packages | ||
5 | |||
6 | In oe-cre/yocto, we name btrfs package with btrfs-tools, | ||
7 | rather than btrfs-progs. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe specific] | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | blivet/devices/btrfs.py | 2 +- | ||
14 | blivet/formats/fs.py | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py | ||
18 | index c5cb21f..9d417b2 100644 | ||
19 | --- a/blivet/devices/btrfs.py | ||
20 | +++ b/blivet/devices/btrfs.py | ||
21 | @@ -55,7 +55,7 @@ class BTRFSDevice(StorageDevice): | ||
22 | |||
23 | """ Base class for BTRFS volume and sub-volume devices. """ | ||
24 | _type = "btrfs" | ||
25 | - _packages = ["btrfs-progs"] | ||
26 | + _packages = ["btrfs-tools"] | ||
27 | _external_dependencies = [availability.BLOCKDEV_BTRFS_PLUGIN] | ||
28 | |||
29 | def __init__(self, *args, **kwargs): | ||
30 | diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py | ||
31 | index a49826f..e8f216d 100644 | ||
32 | --- a/blivet/formats/fs.py | ||
33 | +++ b/blivet/formats/fs.py | ||
34 | @@ -918,7 +918,7 @@ class BTRFS(FS): | ||
35 | _formattable = True | ||
36 | _linux_native = True | ||
37 | _supported = True | ||
38 | - _packages = ["btrfs-progs"] | ||
39 | + _packages = ["btrfs-tools"] | ||
40 | _min_size = Size("256 MiB") | ||
41 | _max_size = Size("16 EiB") | ||
42 | _mkfs_class = fsmkfs.BTRFSMkfs | ||
43 | -- | ||
44 | 2.7.4 | ||
45 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch new file mode 100644 index 000000000..fc084b129 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From a6ac2157ee6793302e23ddbc5e3b249fa7da5b7e Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 31 Aug 2016 21:30:32 -0400 | ||
4 | Subject: [PATCH 09/13] invoking mount with infinite timeout | ||
5 | |||
6 | This large timeout is needed when running on machines with | ||
7 | lots of disks, or with slow disks. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | blivet/util.py | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/blivet/util.py b/blivet/util.py | ||
17 | index b3c45ac..9f02b18 100644 | ||
18 | --- a/blivet/util.py | ||
19 | +++ b/blivet/util.py | ||
20 | @@ -257,7 +257,7 @@ def mount(device, mountpoint, fstype, options=None): | ||
21 | |||
22 | argv = ["mount", "-t", fstype, "-o", options, device, mountpoint] | ||
23 | try: | ||
24 | - rc = run_program(argv) | ||
25 | + rc = run_program(argv, timeout=-1) | ||
26 | except OSError: | ||
27 | raise | ||
28 | |||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch new file mode 100644 index 000000000..45d8fabba --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From e07133dbcf3c52e1ddd2f12797dcd16145269273 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 8 May 2017 03:54:12 -0400 | ||
4 | Subject: [PATCH 10/13] use oe variable to replace hardcoded dir | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
9 | --- | ||
10 | setup.py | 8 ++++---- | ||
11 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/setup.py b/setup.py | ||
14 | index 4d06a33..a994d06 100644 | ||
15 | --- a/setup.py | ||
16 | +++ b/setup.py | ||
17 | @@ -61,10 +61,10 @@ class blivet_sdist(sdist): | ||
18 | |||
19 | |||
20 | data_files = [ | ||
21 | - ('/etc/dbus-1/system.d', ['dbus/blivet.conf']), | ||
22 | - ('/usr/share/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']), | ||
23 | - ('/usr/libexec', ['dbus/blivetd']), | ||
24 | - ('/usr/lib/systemd/system', ['dbus/blivet.service']) | ||
25 | + (os.environ.get('sysconfdir')+'/dbus-1/system.d', ['dbus/blivet.conf']), | ||
26 | + (os.environ.get('datadir')+'/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']), | ||
27 | + (os.environ.get('libexecdir'), ['dbus/blivetd']), | ||
28 | + (os.environ.get('systemd_system_unitdir'), ['dbus/blivet.service']) | ||
29 | ] | ||
30 | |||
31 | |||
32 | -- | ||
33 | 2.7.4 | ||
34 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch new file mode 100644 index 000000000..c61fe01b9 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From e9ab4376a18cc1bd413c000b036320833eec80d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Thu, 1 Jun 2017 16:05:27 +0800 | ||
4 | Subject: [PATCH 11/13] invoking fsck with infinite timeout | ||
5 | |||
6 | This large timeout is needed when running on machines with | ||
7 | lots of disks, or with slow disks. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | blivet/tasks/fsck.py | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py | ||
17 | index c4214dc..e13ac6b 100644 | ||
18 | --- a/blivet/tasks/fsck.py | ||
19 | +++ b/blivet/tasks/fsck.py | ||
20 | @@ -77,7 +77,7 @@ class FSCK(task.BasicApplication, fstask.FSTask): | ||
21 | raise FSError("\n".join(error_msgs)) | ||
22 | |||
23 | try: | ||
24 | - rc = util.run_program(self._fsck_command) | ||
25 | + rc = util.run_program(self._fsck_command, timeout=-1) | ||
26 | except OSError as e: | ||
27 | raise FSError("filesystem check failed: %s" % e) | ||
28 | |||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch new file mode 100644 index 000000000..33bdbe812 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 9f5a048181cf29d241d96814e736b8235b3d42b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 16 Jun 2017 15:43:00 +0800 | ||
4 | Subject: [PATCH 12/13] invoking mkfs with infinite timeout | ||
5 | |||
6 | This large timeout is needed when running on machines with | ||
7 | lots of disks, or with slow disks. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | blivet/tasks/fsmkfs.py | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/blivet/tasks/fsmkfs.py b/blivet/tasks/fsmkfs.py | ||
17 | index ad166aa..7bf5075 100644 | ||
18 | --- a/blivet/tasks/fsmkfs.py | ||
19 | +++ b/blivet/tasks/fsmkfs.py | ||
20 | @@ -170,7 +170,7 @@ class FSMkfs(task.BasicApplication, FSMkfsTask): | ||
21 | options = options or [] | ||
22 | cmd = self._mkfs_command(options, label, set_uuid) | ||
23 | try: | ||
24 | - ret = util.run_program(cmd) | ||
25 | + ret = util.run_program(cmd, timeout=-1) | ||
26 | except OSError as e: | ||
27 | raise FSError(e) | ||
28 | |||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch new file mode 100644 index 000000000..6bdf4ce94 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From bfdaf79a2109ac6aed408f0c94f69766991e60e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Thu, 27 Jul 2017 14:34:30 +0800 | ||
4 | Subject: [PATCH 13/13] Revert "Adapt to logging module name change" | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific, sync with anaconda f26-release] | ||
7 | |||
8 | This reverts commit c367d62a516e541ad28636c8259321f1c53417ce. | ||
9 | |||
10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
11 | --- | ||
12 | blivet/__init__.py | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/blivet/__init__.py b/blivet/__init__.py | ||
16 | index 49277cb..a01e487 100644 | ||
17 | --- a/blivet/__init__.py | ||
18 | +++ b/blivet/__init__.py | ||
19 | @@ -124,7 +124,7 @@ def enable_installer_mode(): | ||
20 | from pyanaconda.constants import ROOT_PATH # pylint: disable=redefined-outer-name,no-name-in-module | ||
21 | _storage_root = _sysroot = ROOT_PATH | ||
22 | |||
23 | - from pyanaconda.anaconda_logging import program_log_lock | ||
24 | + from pyanaconda.anaconda_log import program_log_lock | ||
25 | util.program_log_lock = program_log_lock | ||
26 | |||
27 | flags.installer_mode = True | ||
28 | -- | ||
29 | 2.7.4 | ||
30 | |||
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb new file mode 100644 index 000000000..cacca67e2 --- /dev/null +++ b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | DESCRIPTION = "A python module for system storage configuration" | ||
2 | HOMEPAGE = "http://fedoraproject.org/wiki/blivet" | ||
3 | LICENSE = "LGPLv2+" | ||
4 | SECTION = "devel/python" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
7 | |||
8 | S = "${WORKDIR}/git" | ||
9 | B = "${S}" | ||
10 | |||
11 | SRCREV = "39db82f20d8d4904c0c4dc8912e595177c59e091" | ||
12 | SRC_URI = "git://github.com/rhinstaller/blivet;branch=2.2-devel \ | ||
13 | file://0001-comment-out-selinux.patch \ | ||
14 | file://0002-run_program-support-timeout.patch\ | ||
15 | file://0003-support-infinit-timeout.patch \ | ||
16 | file://0004-Mount-var-volatile-during-install.patch \ | ||
17 | file://0005-update-fstab-by-appending.patch \ | ||
18 | file://0006-fix-new.roots-object-is-not-iterable.patch \ | ||
19 | file://0007-fix-incorrect-timeout-while-system-time-changed.patch \ | ||
20 | file://0008-tweak-btrfs-packages.patch \ | ||
21 | file://0009-invoking-mount-with-infinite-timeout.patch \ | ||
22 | file://0010-use-oe-variable-to-replace-hardcoded-dir.patch \ | ||
23 | file://0011-invoking-fsck-with-infinite-timeout.patch \ | ||
24 | file://0012-invoking-mkfs-with-infinite-timeout.patch \ | ||
25 | file://0013-Revert-Adapt-to-logging-module-name-change.patch \ | ||
26 | " | ||
27 | |||
28 | inherit distro_features_check | ||
29 | REQUIRED_DISTRO_FEATURES = "systemd" | ||
30 | |||
31 | inherit setuptools3 python3native | ||
32 | |||
33 | RDEPENDS_${PN} = "python3-pykickstart python3-pyudev \ | ||
34 | parted python3-pyparted multipath-tools \ | ||
35 | lsof cryptsetup libblockdev \ | ||
36 | libbytesize \ | ||
37 | " | ||
38 | |||
39 | FILES_${PN} += " \ | ||
40 | ${datadir}/dbus-1/system-services \ | ||
41 | " | ||
42 | |||
43 | inherit systemd | ||
44 | |||
45 | SYSTEMD_AUTO_ENABLE = "disable" | ||
46 | SYSTEMD_SERVICE_${PN} = "blivet.service" | ||
diff --git a/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_2.35.bb b/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_2.35.bb index e96af4391..fd5513f5c 100644 --- a/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_2.35.bb +++ b/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_2.35.bb | |||
@@ -21,6 +21,3 @@ SRC_URI = "git://github.com/rhinstaller/pykickstart.git;protocol=https;branch=py | |||
21 | SRCREV = "b2787a818540e678c2f9c5dca0c6bbd65b8b55e5" | 21 | SRCREV = "b2787a818540e678c2f9c5dca0c6bbd65b8b55e5" |
22 | 22 | ||
23 | inherit setuptools3 | 23 | inherit setuptools3 |
24 | |||
25 | PROVIDES = "pykickstart" | ||
26 | RPROVIDES_${PN} = "pykickstart" | ||