From cb9df8ecfbc3c5a7eec7c01baac9dce3e1ba6ef1 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 17 Dec 2020 06:58:55 +0800 Subject: [PATCH 1/5] [patch tracking] 20201217065849742361 - https://github.com/weldr/lorax/commit/6400515880e59ab7d0d68a848e2f57052faa0d30 --- ...515880e59ab7d0d68a848e2f57052faa0d30.patch | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 6400515880e59ab7d0d68a848e2f57052faa0d30.patch diff --git a/6400515880e59ab7d0d68a848e2f57052faa0d30.patch b/6400515880e59ab7d0d68a848e2f57052faa0d30.patch new file mode 100644 index 0000000..33a0e42 --- /dev/null +++ b/6400515880e59ab7d0d68a848e2f57052faa0d30.patch @@ -0,0 +1,135 @@ +diff --git a/lorax.spec b/lorax.spec +index 40506b076..52cda648c 100644 +--- a/lorax.spec ++++ b/lorax.spec +@@ -118,6 +118,7 @@ Requires: anaconda-core + Requires: anaconda-tui + Requires: anaconda-install-env-deps + Requires: system-logos ++Requires: python3-psutil + + %description lmc-novirt + Additional dependencies required by livemedia-creator when using it with --no-virt +diff --git a/src/pylorax/executils.py b/src/pylorax/executils.py +index da5df60c9..ffb26b68a 100644 +--- a/src/pylorax/executils.py ++++ b/src/pylorax/executils.py +@@ -19,9 +19,11 @@ + # + + import os ++import select + import subprocess + from subprocess import TimeoutExpired + import signal ++import time + + import logging + log = logging.getLogger("pylorax") +@@ -288,6 +290,7 @@ def __init__(self, proc, argv, callback): + self._proc = proc + self._argv = argv + self._callback = callback ++ self._data = "" + + def __iter__(self): + return self +@@ -302,22 +305,43 @@ def __del__(self): + pass + + def __next__(self): +- # Read the next line, blocking if a line is not yet available +- line = self._proc.stdout.readline().decode("utf-8") +- if line == '' or not self._callback(self._proc): +- # Output finished, wait for the process to end +- self._proc.communicate() +- +- # Check for successful exit +- if self._proc.returncode < 0: +- raise OSError("process '%s' was killed by signal %s" % +- (self._argv, -self._proc.returncode)) +- elif self._proc.returncode > 0: +- raise OSError("process '%s' exited with status %s" % +- (self._argv, self._proc.returncode)) +- raise StopIteration +- +- return line.strip() ++ # Return lines from stdout while also calling _callback ++ while True: ++ # Check for input without blocking ++ if select.select([self._proc.stdout], [], [], 0)[0]: ++ size = len(self._proc.stdout.peek(1)) ++ if size > 0: ++ self._data += self._proc.stdout.read(size).decode("utf-8") ++ ++ if self._data.find("\n") >= 0: ++ line = self._data.split("\n", 1) ++ self._data = line[1] ++ return line[0] ++ ++ if self._proc.poll() is not None or not self._callback(self._proc): ++ # Output finished, wait 60s for the process to end ++ try: ++ self._proc.communicate(timeout=60) ++ except subprocess.TimeoutExpired: ++ # Did not exit in 60s, kill it and wait 30s more ++ self._proc.kill() ++ try: ++ self._proc.communicate(timeout=30) ++ except subprocess.TimeoutExpired: ++ pass ++ ++ if self._proc.returncode is None: ++ raise OSError("process '%s' failed to be killed" % self._argv) ++ elif self._proc.returncode < 0: ++ raise OSError("process '%s' was killed by signal %s" % ++ (self._argv, -self._proc.returncode)) ++ elif self._proc.returncode > 0: ++ raise OSError("process '%s' exited with status %s" % ++ (self._argv, self._proc.returncode)) ++ raise StopIteration ++ ++ # Don't loop too fast with no input to read ++ time.sleep(0.5) + + argv = [command] + argv + +diff --git a/src/pylorax/installer.py b/src/pylorax/installer.py +index 9d0a8527b..152847488 100644 +--- a/src/pylorax/installer.py ++++ b/src/pylorax/installer.py +@@ -291,7 +291,12 @@ def novirt_cancel_check(cancel_funcs, proc): + """ + for f in cancel_funcs: + if f(): +- proc.terminate() ++ # Anaconda runs from unshare, anaconda doesn't exit correctly so try to ++ # send TERM to all of them directly ++ import psutil ++ for p in psutil.Process(proc.pid).children(recursive=True): ++ p.terminate() ++ psutil.Process(proc.pid).terminate() + return True + return False + +@@ -401,7 +406,7 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None): + # Preload libgomp.so.1 to workaround rhbz#1722181 + log.info("Running anaconda.") + try: +- unshare_args = [ "--pid", "--kill-child", "--mount", "--propagation", "unchanged", "anaconda" ] + args ++ unshare_args = ["--pid", "--kill-child", "--mount", "--propagation", "unchanged", "anaconda"] + args + for line in execReadlines("unshare", unshare_args, reset_lang=False, + env_add={"ANACONDA_PRODUCTNAME": opts.project, + "ANACONDA_PRODUCTVERSION": opts.releasever, +diff --git a/test-packages b/test-packages +index bc5bf20fa..77583c7a5 100644 +--- a/test-packages ++++ b/test-packages +@@ -12,6 +12,7 @@ python3-librepo + python3-magic + python3-mako + python3-pocketlint ++python3-psutil + python3-pycdlib + python3-pylint + python3-pyparted -- Gitee From 28681cb73fb771f4a994aac3e0d33f97b0a92ee6 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 17 Dec 2020 06:58:56 +0800 Subject: [PATCH 2/5] [patch tracking] 20201217065849742361 - https://github.com/weldr/lorax/commit/a33efe7c517737f9849673f1f2d2ce2fedc04014 --- a33efe7c517737f9849673f1f2d2ce2fedc04014.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 a33efe7c517737f9849673f1f2d2ce2fedc04014.patch diff --git a/a33efe7c517737f9849673f1f2d2ce2fedc04014.patch b/a33efe7c517737f9849673f1f2d2ce2fedc04014.patch new file mode 100644 index 0000000..b1561c4 --- /dev/null +++ b/a33efe7c517737f9849673f1f2d2ce2fedc04014.patch @@ -0,0 +1,14 @@ +diff --git a/src/pylorax/monitor.py b/src/pylorax/monitor.py +index 9de1ccb12..e0d2ed1a4 100644 +--- a/src/pylorax/monitor.py ++++ b/src/pylorax/monitor.py +@@ -46,7 +46,8 @@ class LogRequestHandler(socketserver.BaseRequestHandler): + "crashed on signal", + "packaging: Missed: NoSuchPackage", + "packaging: Installation failed", +- "The following error occurred while installing. This is a fatal error" ++ "The following error occurred while installing. This is a fatal error", ++ "Error in POSTIN scriptlet in rpm package" + ] + + re_tests = [ -- Gitee From 2b5ebd68226ec59416f6c83f72f8ce774955ce68 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 17 Dec 2020 06:58:56 +0800 Subject: [PATCH 3/5] [patch tracking] 20201217065849742361 - https://github.com/weldr/lorax/commit/b0318efeadfe186dbd4958f58ba18ce17d75d3e1 --- ...8efeadfe186dbd4958f58ba18ce17d75d3e1.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 b0318efeadfe186dbd4958f58ba18ce17d75d3e1.patch diff --git a/b0318efeadfe186dbd4958f58ba18ce17d75d3e1.patch b/b0318efeadfe186dbd4958f58ba18ce17d75d3e1.patch new file mode 100644 index 0000000..beb30db --- /dev/null +++ b/b0318efeadfe186dbd4958f58ba18ce17d75d3e1.patch @@ -0,0 +1,20 @@ +diff --git a/src/pylorax/installer.py b/src/pylorax/installer.py +index 152847488..e11c16b5e 100644 +--- a/src/pylorax/installer.py ++++ b/src/pylorax/installer.py +@@ -403,14 +403,12 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None): + cancel_funcs.append(cancel_func) + + # Make sure anaconda has the right product and release +- # Preload libgomp.so.1 to workaround rhbz#1722181 + log.info("Running anaconda.") + try: + unshare_args = ["--pid", "--kill-child", "--mount", "--propagation", "unchanged", "anaconda"] + args + for line in execReadlines("unshare", unshare_args, reset_lang=False, + env_add={"ANACONDA_PRODUCTNAME": opts.project, +- "ANACONDA_PRODUCTVERSION": opts.releasever, +- "LD_PRELOAD": "libgomp.so.1"}, ++ "ANACONDA_PRODUCTVERSION": opts.releasever}, + callback=lambda p: not novirt_cancel_check(cancel_funcs, p)): + log.info(line) + -- Gitee From 0105645e214a49b70dd6b532dc52e6849080c59f Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 17 Dec 2020 06:58:56 +0800 Subject: [PATCH 4/5] [patch tracking] 20201217065849742361 - https://github.com/weldr/lorax/commit/f6924f8f1f7f1cbdaedeb3c9844145553d4a4fe1 --- ...4f8f1f7f1cbdaedeb3c9844145553d4a4fe1.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 f6924f8f1f7f1cbdaedeb3c9844145553d4a4fe1.patch diff --git a/f6924f8f1f7f1cbdaedeb3c9844145553d4a4fe1.patch b/f6924f8f1f7f1cbdaedeb3c9844145553d4a4fe1.patch new file mode 100644 index 0000000..0a353e7 --- /dev/null +++ b/f6924f8f1f7f1cbdaedeb3c9844145553d4a4fe1.patch @@ -0,0 +1,33 @@ +diff --git a/lorax.spec b/lorax.spec +index 52cda648c..9a3cfb32f 100644 +--- a/lorax.spec ++++ b/lorax.spec +@@ -3,7 +3,7 @@ + %define debug_package %{nil} + + Name: lorax +-Version: 34.5 ++Version: 34.6 + Release: 1%{?dist} + Summary: Tool for creating the anaconda install images + +@@ -193,6 +193,12 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install + %{_mandir}/man1/composer-cli.1* + + %changelog ++* Wed Dec 16 2020 Brian C. Lane 34.6-1 ++- Remove LD_PRELOAD libgomp.so.1 from lmc --no-virt (bcl@redhat.com) ++- Add POSTIN scriptlet error to the log monitor list (bcl@redhat.com) ++- Improve lmc no-virt error handling (bcl@redhat.com) ++- lorax.spec: Drop GConf2 requirement (bcl@redhat.com) ++ + * Mon Nov 30 2020 Brian C. Lane 34.5-1 + - Don't remove libldap_r libraries during runtime-cleanup.tmpl (spichugi@redhat.com) + - Do not use '--loglevel' option when running Anaconda (vtrefny@redhat.com) +diff --git a/rel-eng/packages/lorax b/rel-eng/packages/lorax +index cfcd73465..1fe13fefd 100644 +--- a/rel-eng/packages/lorax ++++ b/rel-eng/packages/lorax +@@ -1 +1 @@ +-34.5-1 ./ ++34.6-1 ./ -- Gitee From a0bd8900e6f202a00b72402a00063eb2edb93def Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Thu, 17 Dec 2020 06:58:57 +0800 Subject: [PATCH 5/5] [patch tracking] 20201217065849742361 - update spec file --- lorax.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lorax.spec b/lorax.spec index 3ed4224..1de7084 100644 --- a/lorax.spec +++ b/lorax.spec @@ -3,7 +3,7 @@ Name: lorax Version: 33.6 -Release: 2 +Release: 3 Summary: A set of tools used to create bootable images License: GPLv2+ URL: https://github.com/weldr/lorax @@ -20,6 +20,10 @@ Patch9007: eliminate-difference.patch Patch9008: lorax-enable-GUI-installation.patch Patch9009: lorax-enable-anaconda-KdumpSpoke.patch Patch9010: lorax-delete-udisk2-iscsi.patch +Patch9011: 6400515880e59ab7d0d68a848e2f57052faa0d30.patch +Patch9012: a33efe7c517737f9849673f1f2d2ce2fedc04014.patch +Patch9013: b0318efeadfe186dbd4958f58ba18ce17d75d3e1.patch +Patch9014: f6924f8f1f7f1cbdaedeb3c9844145553d4a4fe1.patch BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic @@ -203,6 +207,9 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin %{_mandir}/man1/*.1* %changelog +* 20201217065849742361 patch-tracking 33.6-3 +- append patch file of upstream repository from <6400515880e59ab7d0d68a848e2f57052faa0d30> to + * Feb Oct 13 2020 yuboyun - 33.6-2 - add yaml file @@ -304,4 +311,3 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin ignore the dir that without kernel version add text mode in aarch64 installation - -- Gitee