CentOS 8: Upgrade anaconda to version 29.19.0.40
(1)Release Version Upgrade (2)Matching code changes with el7 to el8 (3)Change applying patch command Currently auto apply all patches as below %autosetup -p1 instead of applying patches commmand by command: %patchxxxx -p1 Story: 2006729 Task: 37687 Depends-On: https://review.opendev.org/#/c/696481/ Depends-On: https://review.opendev.org/#/c/696050/ Change-Id: I4a0dd93322144c13494e9ca4444f23b4b2aca0cf Signed-off-by: Long Li <lilong-neu@neusoft.com>
This commit is contained in:
parent
f00abf590a
commit
6c94857032
@ -1 +1 @@
|
||||
TIS_PATCH_VER=6
|
||||
TIS_PATCH_VER=1
|
||||
|
@ -8,18 +8,18 @@ Subject: [PATCH] Update package versioning for TIS format
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
|
||||
index e2d706d..00b19c4 100644
|
||||
index ef88921..b345630 100644
|
||||
--- a/SPECS/anaconda.spec
|
||||
+++ b/SPECS/anaconda.spec
|
||||
@@ -3,7 +3,7 @@
|
||||
@@ -7,7 +7,7 @@
|
||||
Summary: Graphical system installer
|
||||
Name: anaconda
|
||||
Version: 21.48.22.147
|
||||
Version: 29.19.0.40
|
||||
-Release: 1%{?dist}
|
||||
+Release: 1.el7.centos%{?_tis_dist}.%{tis_patch_ver}
|
||||
+Release: 1.el8%{?_tis_dist}.%{tis_patch_ver}
|
||||
License: GPLv2+ and MIT
|
||||
Group: Applications/System
|
||||
URL: http://fedoraproject.org/wiki/Anaconda
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -4,33 +4,23 @@ Date: Mon, 13 Nov 2017 17:22:49 -0500
|
||||
Subject: [PATCH] Add TIS patches
|
||||
|
||||
---
|
||||
SPECS/anaconda.spec | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
SPECS/anaconda.spec | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
|
||||
index 00b19c4..79e1c55 100644
|
||||
index b345630..41de025 100644
|
||||
--- a/SPECS/anaconda.spec
|
||||
+++ b/SPECS/anaconda.spec
|
||||
@@ -24,6 +24,9 @@ Patch8: 9800-rpmostreepayload-Rework-remote-add-handling.patch
|
||||
Patch9: yumpayload-dont-verify-disabled-repos.patch
|
||||
Patch10: anaconda-centos-armhfp-extloader.patch
|
||||
|
||||
+# WRS
|
||||
@@ -15,6 +15,9 @@ URL: http://fedoraproject.org/wiki/Anaconda
|
||||
Patch100: centos-l10n.patch
|
||||
Patch101: 0001-branding-syspurpose-doesn-t-make-sense-for-CentOS.patch
|
||||
Patch102: 0002-add-centos-background-color.patch
|
||||
+
|
||||
+Patch10001: 0001-TIS-Progress-and-error-handling.patch
|
||||
+
|
||||
# Versions of required components (done so we make sure the buildrequires
|
||||
# match the requires versions of things).
|
||||
%define dbusver 1.2.3
|
||||
@@ -250,6 +253,9 @@ runtime on NFS/HTTP/FTP servers or local disks.
|
||||
%patch10 -p1
|
||||
%endif
|
||||
|
||||
+# WRS
|
||||
+%patch10001 -p1
|
||||
+
|
||||
%build
|
||||
%configure --disable-static \
|
||||
--enable-introspection \
|
||||
# To generate Source0 do:
|
||||
# git clone https://github.com/rhinstaller/anaconda
|
||||
# git checkout -b archive-branch anaconda-%%{version}-%%{release}
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -4,29 +4,21 @@ Date: Fri, 17 Nov 2017 12:08:27 -0500
|
||||
Subject: [PATCH] revert 7.4 grub2 efi handling
|
||||
|
||||
---
|
||||
SPECS/anaconda.spec | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
SPECS/anaconda.spec | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
|
||||
index 79e1c55..2e5ece9 100644
|
||||
index 41de025..0c22aa0 100644
|
||||
--- a/SPECS/anaconda.spec
|
||||
+++ b/SPECS/anaconda.spec
|
||||
@@ -26,6 +26,7 @@ Patch10: anaconda-centos-armhfp-extloader.patch
|
||||
@@ -17,6 +17,7 @@ Patch101: 0001-branding-syspurpose-doesn-t-make-sense-for-CentOS.patch
|
||||
Patch102: 0002-add-centos-background-color.patch
|
||||
|
||||
# WRS
|
||||
Patch10001: 0001-TIS-Progress-and-error-handling.patch
|
||||
+Patch10002: 0002-revert-7.4-grub2-efi-handling.patch
|
||||
|
||||
# Versions of required components (done so we make sure the buildrequires
|
||||
# match the requires versions of things).
|
||||
@@ -255,6 +256,7 @@ runtime on NFS/HTTP/FTP servers or local disks.
|
||||
|
||||
# WRS
|
||||
%patch10001 -p1
|
||||
+%patch10002 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
# To generate Source0 do:
|
||||
# git clone https://github.com/rhinstaller/anaconda
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -8,18 +8,18 @@ Subject: [PATCH] Upversion rpm-devel dependency
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
|
||||
index 2e5ece9..174dbee 100644
|
||||
index 0c22aa0..0153e82 100644
|
||||
--- a/SPECS/anaconda.spec
|
||||
+++ b/SPECS/anaconda.spec
|
||||
@@ -51,7 +51,7 @@ Patch10002: 0002-revert-7.4-grub2-efi-handling.patch
|
||||
@@ -46,7 +46,7 @@ Source0: %{name}-%{version}.tar.bz2
|
||||
%define nmver 1.0
|
||||
%define pykickstartver 3.16.2-1
|
||||
%define pypartedver 2.5-2
|
||||
%define pythonpyblockver 0.45
|
||||
%define pythonurlgrabberver 3.9.1-5
|
||||
-%define rpmver 4.10.0
|
||||
+%define rpmver 4.14.0
|
||||
%define sckeyboardver 1.3.1
|
||||
%define simplelinever 1.1-1
|
||||
%define utillinuxver 2.15.1
|
||||
%define yumutilsver 1.1.11-3
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -4,34 +4,25 @@ Date: Thu, 23 Nov 2017 16:50:10 -0500
|
||||
Subject: [PATCH] Add TIS patches for host lookup
|
||||
|
||||
---
|
||||
SPECS/anaconda.spec | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
SPECS/anaconda.spec | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
|
||||
index 174dbee..8541334 100644
|
||||
index 0153e82..3a045f0 100644
|
||||
--- a/SPECS/anaconda.spec
|
||||
+++ b/SPECS/anaconda.spec
|
||||
@@ -27,6 +27,8 @@ Patch10: anaconda-centos-armhfp-extloader.patch
|
||||
# WRS
|
||||
@@ -18,6 +18,8 @@ Patch102: 0002-add-centos-background-color.patch
|
||||
|
||||
Patch10001: 0001-TIS-Progress-and-error-handling.patch
|
||||
Patch10002: 0002-revert-7.4-grub2-efi-handling.patch
|
||||
+Patch10003: 0003-Set-default-hostname-to-localhost.patch
|
||||
+Patch10004: 0004-Cache-server-ip-in-etc-hosts.patch
|
||||
|
||||
# Versions of required components (done so we make sure the buildrequires
|
||||
# match the requires versions of things).
|
||||
@@ -257,6 +259,8 @@ runtime on NFS/HTTP/FTP servers or local disks.
|
||||
# WRS
|
||||
%patch10001 -p1
|
||||
%patch10002 -p1
|
||||
+%patch10003 -p1
|
||||
+%patch10004 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
@@ -275,6 +279,10 @@ desktop-file-install ---dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_
|
||||
mkdir -p %{buildroot}%{_datadir}/anaconda/site-python
|
||||
install -m 0644 pyanaconda/sitecustomize.py %{buildroot}%{_datadir}/anaconda/site-python/
|
||||
# To generate Source0 do:
|
||||
# git clone https://github.com/rhinstaller/anaconda
|
||||
@@ -266,6 +268,10 @@ mkdir %{buildroot}%{_datadir}/anaconda/addons
|
||||
%ifarch %livearches
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/liveinst.desktop
|
||||
%endif
|
||||
+
|
||||
+# Add anaconda-preexec script
|
||||
@ -40,14 +31,14 @@ index 174dbee..8541334 100644
|
||||
# NOTE: If you see "error: Installed (but unpackaged) file(s) found" that include liveinst files,
|
||||
# check the IS_LIVEINST_ARCH in configure.ac to make sure your architecture is properly defined
|
||||
|
||||
@@ -323,6 +331,7 @@ update-desktop-database &> /dev/null || :
|
||||
%{_sysconfdir}/X11/xinit/xinitrc.d/*
|
||||
@@ -323,6 +329,7 @@ update-desktop-database &> /dev/null || :
|
||||
%{_datadir}/applications/*.desktop
|
||||
%{_sysconfdir}/xdg/autostart/*.desktop
|
||||
%endif
|
||||
+%{_sbindir}/anaconda-preexec
|
||||
|
||||
%files gui
|
||||
%{_libdir}/python*/site-packages/pyanaconda/ui/gui/*
|
||||
%{python3_sitearch}/pyanaconda/ui/gui/*
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -4,21 +4,21 @@ Date: Mon, 13 Nov 2017 17:21:05 -0500
|
||||
Subject: [PATCH] TIS Progress and error handling
|
||||
|
||||
---
|
||||
data/tmux.conf | 3 +-
|
||||
pyanaconda/errors.py | 24 +++++++--
|
||||
pyanaconda/flags.py | 1 +
|
||||
pyanaconda/install.py | 4 ++
|
||||
pyanaconda/kickstart.py | 3 ++
|
||||
pyanaconda/packaging/rpmostreepayload.py | 5 ++
|
||||
pyanaconda/packaging/yumpayload.py | 15 +++++-
|
||||
pyanaconda/tisnotify.py | 91 ++++++++++++++++++++++++++++++++
|
||||
pyanaconda/ui/gui/hubs/progress.py | 4 ++
|
||||
pyanaconda/ui/tui/spokes/progress.py | 4 ++
|
||||
10 files changed, 147 insertions(+), 7 deletions(-)
|
||||
data/tmux.conf | 3 +-
|
||||
pyanaconda/errors.py | 19 ++++-
|
||||
pyanaconda/flags.py | 1 +
|
||||
pyanaconda/installation.py | 4 +
|
||||
pyanaconda/kickstart.py | 3 +
|
||||
pyanaconda/payload/dnfpayload.py | 6 ++
|
||||
pyanaconda/payload/rpmostreepayload.py | 5 ++
|
||||
pyanaconda/tisnotify.py | 91 +++++++++++++++++++++++
|
||||
pyanaconda/ui/gui/hubs/progress.py | 4 +
|
||||
pyanaconda/ui/tui/spokes/installation_progress.py | 4 +
|
||||
10 files changed, 138 insertions(+), 2 deletions(-)
|
||||
create mode 100644 pyanaconda/tisnotify.py
|
||||
|
||||
diff --git a/data/tmux.conf b/data/tmux.conf
|
||||
index 89f788b..7903b06 100644
|
||||
index c909aca..7632f8f 100644
|
||||
--- a/data/tmux.conf
|
||||
+++ b/data/tmux.conf
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -29,9 +29,9 @@ index 89f788b..7903b06 100644
|
||||
bind -n F1 list-keys
|
||||
|
||||
set-option -s exit-unattached off
|
||||
@@ -10,7 +11,7 @@ set-option -g history-limit 10000
|
||||
|
||||
new-session -s anaconda -n main "anaconda"
|
||||
@@ -20,7 +21,7 @@ set-option -g history-limit 10000
|
||||
# then re-attach to it in the tmux service run on the console tty.
|
||||
new-session -d -s anaconda -n main "anaconda"
|
||||
|
||||
-set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab | Help: F1 ")'
|
||||
+set-option status-right '#[fg=blue]#(echo -n "Switch: Alt+Tab or Ctrl-o ")'
|
||||
@ -39,23 +39,23 @@ index 89f788b..7903b06 100644
|
||||
new-window -d -n shell "bash --login"
|
||||
new-window -d -n log "tail -F /tmp/anaconda.log"
|
||||
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
|
||||
index 860b228..1d1d34b 100644
|
||||
index aec9602..fd0610b 100644
|
||||
--- a/pyanaconda/errors.py
|
||||
+++ b/pyanaconda/errors.py
|
||||
@@ -19,6 +19,7 @@
|
||||
# Author(s): Chris Lumens <clumens@redhat.com>
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
from pyanaconda.i18n import _
|
||||
from pyanaconda.core.i18n import _, C_
|
||||
from pyanaconda.flags import flags
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
|
||||
__all__ = ["ERROR_RAISE", "ERROR_CONTINUE", "ERROR_RETRY",
|
||||
"InvalidImageSizeError", "MissingImageError", "MediaUnmountError",
|
||||
@@ -81,6 +82,19 @@ ERROR_RAISE = 0
|
||||
__all__ = ["ERROR_RAISE", "ERROR_CONTINUE", "ERROR_RETRY", "errorHandler", "InvalidImageSizeError",
|
||||
"MissingImageError", "ScriptError", "NonInteractiveError", "CmdlineError", "ExitError"]
|
||||
@@ -83,6 +84,18 @@ ERROR_RAISE = 0
|
||||
ERROR_CONTINUE = 1
|
||||
ERROR_RETRY = 2
|
||||
|
||||
+#
|
||||
+# WRS: If a fatal error occurs in a %pre, anaconda hasn't setup the UI yet,
|
||||
+# If a fatal error occurs in a %pre, anaconda hasn't setup the UI yet,
|
||||
+# and an exception occurs in the error handler. This is a basic dummy UI
|
||||
+# to avoid this exception and print the error message.
|
||||
+#
|
||||
@ -64,115 +64,162 @@ index 860b228..1d1d34b 100644
|
||||
+ pass
|
||||
+
|
||||
+ def showError(self, msg):
|
||||
+ print "\n\n", msg
|
||||
+
|
||||
+ print("\n\n", msg)
|
||||
+
|
||||
|
||||
###
|
||||
### TOP-LEVEL ERROR HANDLING OBJECT
|
||||
###
|
||||
@@ -304,12 +318,12 @@ class ErrorHandler(object):
|
||||
@@ -322,8 +335,12 @@ class ErrorHandler(object):
|
||||
"""
|
||||
rc = ERROR_RAISE
|
||||
|
||||
+ # WRS: Notify the controller installation has failed
|
||||
+ # Notify the controller installation has failed
|
||||
+ tisnotify.failed()
|
||||
+
|
||||
if not self.ui:
|
||||
- # While Pylint thinks something else, this should be likely OK
|
||||
- # for an exception handler.
|
||||
- #
|
||||
- # pylint: disable=misplaced-bare-raise
|
||||
- raise
|
||||
+ # WRS: Use the basic UI
|
||||
- raise exn
|
||||
+ # Use the basic UI
|
||||
+ self.ui = DefaultUI()
|
||||
|
||||
_map = {"PartitioningError": self._partitionErrorHandler,
|
||||
"FSResizeError": self._fsResizeHandler,
|
||||
if not flags.ksprompt:
|
||||
raise NonInteractiveError("Non interactive installation failed: %s" % exn)
|
||||
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
|
||||
index 8a97f95..3d0d2da 100644
|
||||
index 17325a1..d3d3d97 100644
|
||||
--- a/pyanaconda/flags.py
|
||||
+++ b/pyanaconda/flags.py
|
||||
@@ -71,6 +71,7 @@ class Flags(object):
|
||||
self.ksprompt = True
|
||||
@@ -73,6 +73,7 @@ class Flags(object):
|
||||
self.rescue_mode = False
|
||||
self.noefi = False
|
||||
self.kexec = False
|
||||
+ self.tisNotifyPort = "0"
|
||||
# nosave options
|
||||
self.nosave_input_ks = False
|
||||
self.nosave_output_ks = False
|
||||
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
|
||||
index 26e1b26..bd8f85b 100644
|
||||
--- a/pyanaconda/install.py
|
||||
+++ b/pyanaconda/install.py
|
||||
@@ -35,6 +35,9 @@ from pyanaconda.ui.lib.entropy import wait_for_entropy
|
||||
from pyanaconda.kexec import setup_kexec
|
||||
from pyanaconda.kickstart import runPostScripts, runPreInstallScripts
|
||||
diff --git a/pyanaconda/installation.py b/pyanaconda/installation.py
|
||||
index babdf0c..2c61b5e 100644
|
||||
--- a/pyanaconda/installation.py
|
||||
+++ b/pyanaconda/installation.py
|
||||
@@ -43,6 +43,9 @@ from pyanaconda.installation_tasks import Task, TaskQueue
|
||||
from pykickstart.constants import SNAPSHOT_WHEN_POST_INSTALL
|
||||
|
||||
from pyanaconda.anaconda_loggers import get_module_logger
|
||||
+
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
+
|
||||
import logging
|
||||
import blivet
|
||||
log = logging.getLogger("anaconda")
|
||||
@@ -139,6 +142,7 @@ def doConfiguration(storage, payload, ksdata, instClass):
|
||||
with progress_report(N_("Creating snapshots")):
|
||||
ksdata.snapshot.execute(storage, ksdata, instClass)
|
||||
log = get_module_logger(__name__)
|
||||
|
||||
class WriteResolvConfTask(Task):
|
||||
@@ -209,6 +212,7 @@ def doConfiguration(storage, payload, ksdata, instClass):
|
||||
# start the task queue
|
||||
configuration_queue.start()
|
||||
# done
|
||||
+ tisnotify.installed()
|
||||
progress_complete()
|
||||
|
||||
def doInstall(storage, payload, ksdata, instClass):
|
||||
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
|
||||
index 50515c8..d95b2df 100644
|
||||
index 4a88620..ac7b1f7 100644
|
||||
--- a/pyanaconda/kickstart.py
|
||||
+++ b/pyanaconda/kickstart.py
|
||||
@@ -90,6 +90,8 @@ from pykickstart.sections import NullSection, PackageSection, PostScriptSection,
|
||||
from pykickstart.version import returnClassForVersion, RHEL7
|
||||
from pykickstart.options import KSOptionParser
|
||||
@@ -96,6 +96,8 @@ from pyanaconda import anaconda_logging
|
||||
from pyanaconda.anaconda_loggers import get_module_logger, get_stdout_logger, get_blivet_logger,\
|
||||
get_anaconda_root_logger
|
||||
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
+
|
||||
import logging
|
||||
log = logging.getLogger("anaconda")
|
||||
stderrLog = logging.getLogger("anaconda.stderr")
|
||||
@@ -2481,6 +2483,7 @@ def runPreScripts(scripts):
|
||||
log = get_module_logger(__name__)
|
||||
|
||||
stdoutLog = get_stdout_logger()
|
||||
@@ -2796,6 +2798,7 @@ def runPreScripts(scripts):
|
||||
if len(preScripts) == 0:
|
||||
return
|
||||
|
||||
+ tisnotify.preinstall()
|
||||
log.info("Running kickstart %%pre script(s)")
|
||||
script_log.info("Running kickstart %%pre script(s)")
|
||||
stdoutLog.info(_("Running pre-installation scripts"))
|
||||
|
||||
diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py
|
||||
index 7cf59d7..8896ba1 100644
|
||||
--- a/pyanaconda/packaging/rpmostreepayload.py
|
||||
+++ b/pyanaconda/packaging/rpmostreepayload.py
|
||||
@@ -36,6 +36,8 @@ from gi.repository import Gio
|
||||
diff --git a/pyanaconda/payload/dnfpayload.py b/pyanaconda/payload/dnfpayload.py
|
||||
index 267f91e..b2a048d 100644
|
||||
--- a/pyanaconda/payload/dnfpayload.py
|
||||
+++ b/pyanaconda/payload/dnfpayload.py
|
||||
@@ -62,6 +62,7 @@ import dnf.conf.substitutions
|
||||
import rpm
|
||||
|
||||
from blivet.size import Size
|
||||
from dnf.const import GROUP_PACKAGE_TYPES
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
|
||||
DNF_CACHE_DIR = '/tmp/dnf.cache'
|
||||
DNF_PLUGINCONF_DIR = '/tmp/dnf.pluginconf'
|
||||
@@ -92,6 +93,7 @@ BONUS_SIZE_ON_FILE = Size("6 KiB")
|
||||
|
||||
|
||||
def _failure_limbo():
|
||||
+ tisnotify.failed()
|
||||
progressQ.send_quit(1)
|
||||
while True:
|
||||
time.sleep(10000)
|
||||
@@ -309,6 +311,7 @@ class DNFPayload(payload.PackagePayload):
|
||||
|
||||
# save repomd metadata
|
||||
self._repoMD_list = []
|
||||
+ self.tisNotifyPort = flags.cmdline.get("tisNotifyPort")
|
||||
|
||||
self._req_groups = set()
|
||||
self._req_packages = set()
|
||||
@@ -718,6 +721,7 @@ class DNFPayload(payload.PackagePayload):
|
||||
|
||||
def _payload_setup_error(self, exn):
|
||||
log.error('Payload setup error: %r', exn)
|
||||
+ tisnotify.failed()
|
||||
if errors.errorHandler.cb(exn) == errors.ERROR_RAISE:
|
||||
# The progress bar polls kind of slowly, thus installation could
|
||||
# still continue for a bit before the quit message is processed.
|
||||
@@ -1048,6 +1052,7 @@ class DNFPayload(payload.PackagePayload):
|
||||
if token == 'install':
|
||||
msg = _("Installing %s") % msg
|
||||
progressQ.send_message(msg)
|
||||
+ tisnotify.installing(msg)
|
||||
elif token == 'configure':
|
||||
msg = _("Configuring %s") % msg
|
||||
progressQ.send_message(msg)
|
||||
@@ -1059,6 +1064,7 @@ class DNFPayload(payload.PackagePayload):
|
||||
elif token == 'post':
|
||||
msg = (N_("Performing post-installation setup tasks"))
|
||||
progressQ.send_message(msg)
|
||||
+ tisnotify.postinstall()
|
||||
elif token == 'done':
|
||||
break # Installation finished successfully
|
||||
elif token == 'quit':
|
||||
diff --git a/pyanaconda/payload/rpmostreepayload.py b/pyanaconda/payload/rpmostreepayload.py
|
||||
index 0ec736b..8bacda2 100644
|
||||
--- a/pyanaconda/payload/rpmostreepayload.py
|
||||
+++ b/pyanaconda/payload/rpmostreepayload.py
|
||||
@@ -43,6 +43,8 @@ from pyanaconda.bootloader import EFIBase
|
||||
from pyanaconda.core.glib import format_size_full, create_new_context, Variant, GError
|
||||
import pyanaconda.errors as errors
|
||||
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
+
|
||||
import logging
|
||||
log = logging.getLogger("anaconda")
|
||||
|
||||
@@ -69,6 +71,7 @@ class RPMOSTreePayload(ArchivePayload):
|
||||
"""Like iutil.execWithRedirect, but treat errors as fatal"""
|
||||
rc = iutil.execWithRedirect(cmd, argv, **kwargs)
|
||||
class RPMOSTreePayload(ArchivePayload):
|
||||
""" A RPMOSTreePayload deploys a tree (possibly with layered packages) onto the target system. """
|
||||
def __init__(self, data):
|
||||
@@ -73,6 +75,7 @@ class RPMOSTreePayload(ArchivePayload):
|
||||
"""Like util.execWithRedirect, but treat errors as fatal"""
|
||||
rc = util.execWithRedirect(cmd, argv, **kwargs)
|
||||
if rc != 0:
|
||||
+ tisnotify.failed()
|
||||
exn = PayloadInstallError("%s %s exited with code %d" % (cmd, argv, rc))
|
||||
if errors.errorHandler.cb(exn) == errors.ERROR_RAISE:
|
||||
raise exn
|
||||
@@ -183,6 +186,7 @@ class RPMOSTreePayload(ArchivePayload):
|
||||
GLib.Variant('a{sv}', pull_opts),
|
||||
@@ -208,6 +211,7 @@ class RPMOSTreePayload(ArchivePayload):
|
||||
Variant('a{sv}', pull_opts),
|
||||
progress, cancellable)
|
||||
except GLib.GError as e:
|
||||
except GError as e:
|
||||
+ tisnotify.failed()
|
||||
exn = PayloadInstallError("Failed to pull from repository: %s" % e)
|
||||
log.error(str(exn))
|
||||
if errors.errorHandler.cb(exn) == errors.ERROR_RAISE:
|
||||
@@ -227,6 +231,7 @@ class RPMOSTreePayload(ArchivePayload):
|
||||
@@ -252,6 +256,7 @@ class RPMOSTreePayload(ArchivePayload):
|
||||
try:
|
||||
self._copyBootloaderData()
|
||||
except (OSError, RuntimeError) as e:
|
||||
@ -180,77 +227,9 @@ index 7cf59d7..8896ba1 100644
|
||||
exn = PayloadInstallError("Failed to copy bootloader data: %s" % e)
|
||||
log.error(str(exn))
|
||||
if errors.errorHandler.cb(exn) == errors.ERROR_RAISE:
|
||||
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
|
||||
index c6aa234..a0497e0 100644
|
||||
--- a/pyanaconda/packaging/yumpayload.py
|
||||
+++ b/pyanaconda/packaging/yumpayload.py
|
||||
@@ -46,6 +46,8 @@ from pyanaconda.simpleconfig import simple_replace
|
||||
from functools import wraps
|
||||
from urlgrabber.grabber import URLGrabber, URLGrabError
|
||||
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
+
|
||||
import logging
|
||||
log = logging.getLogger("packaging")
|
||||
|
||||
@@ -181,6 +183,8 @@ class YumPayload(PackagePayload):
|
||||
# save repomd metadata
|
||||
self._repoMD_list = []
|
||||
|
||||
+ self.tisNotifyPort = flags.cmdline.get("tisNotifyPort")
|
||||
+
|
||||
self.reset()
|
||||
|
||||
def reset(self, root=None, releasever=None):
|
||||
@@ -1347,6 +1351,8 @@ reposdir=%s
|
||||
if self.data.packages.handleMissing == KS_MISSING_IGNORE:
|
||||
return
|
||||
|
||||
+ tisnotify.failed()
|
||||
+
|
||||
# If we're doing non-interactive ks install, raise CmdlineError,
|
||||
# otherwise the system will just reboot automatically
|
||||
if flags.automatedInstall and not flags.ksprompt:
|
||||
@@ -1524,6 +1530,7 @@ reposdir=%s
|
||||
try:
|
||||
self.checkSoftwareSelection()
|
||||
except DependencyError as e:
|
||||
+ tisnotify.failed()
|
||||
if errorHandler.cb(e) == ERROR_RAISE:
|
||||
progressQ.send_quit(1)
|
||||
while True:
|
||||
@@ -1578,6 +1585,10 @@ reposdir=%s
|
||||
key, text = line.split(":", 1)
|
||||
msg = progress_map[key] + text
|
||||
progressQ.send_message(msg)
|
||||
+ if line.startswith("PROGRESS_POST"):
|
||||
+ tisnotify.postinstall()
|
||||
+ elif not text.startswith(" error "):
|
||||
+ tisnotify.installing(text)
|
||||
log.debug(msg)
|
||||
elif line.startswith("DEBUG:"):
|
||||
log.debug(line[6:])
|
||||
@@ -1590,7 +1601,8 @@ reposdir=%s
|
||||
install_errors.append(line[6:])
|
||||
else:
|
||||
log.debug(line)
|
||||
- except IOError as e:
|
||||
+ except (IOError, OSError) as e:
|
||||
+ tisnotify.failed()
|
||||
log.error("Error running anaconda-yum: %s", e)
|
||||
exn = PayloadInstallError(str(e))
|
||||
if errorHandler.cb(exn) == ERROR_RAISE:
|
||||
@@ -1612,6 +1624,7 @@ reposdir=%s
|
||||
shutil.rmtree(iutil.getSysroot()+"/var/tmp/yum.cache")
|
||||
|
||||
if install_errors:
|
||||
+ tisnotify.failed()
|
||||
exn = PayloadInstallError("\n".join(install_errors))
|
||||
if errorHandler.cb(exn) == ERROR_RAISE:
|
||||
progressQ.send_quit(1)
|
||||
diff --git a/pyanaconda/tisnotify.py b/pyanaconda/tisnotify.py
|
||||
new file mode 100644
|
||||
index 0000000..bf5d9bd
|
||||
index 0000000..33fc79b
|
||||
--- /dev/null
|
||||
+++ b/pyanaconda/tisnotify.py
|
||||
@@ -0,0 +1,91 @@
|
||||
@ -346,19 +325,19 @@ index 0000000..bf5d9bd
|
||||
+tisnotify = TisNotify()
|
||||
+
|
||||
diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py
|
||||
index 0e4dbed..b342bd5 100644
|
||||
index 5b904bc..e49c134 100644
|
||||
--- a/pyanaconda/ui/gui/hubs/progress.py
|
||||
+++ b/pyanaconda/ui/gui/hubs/progress.py
|
||||
@@ -44,6 +44,8 @@ from pykickstart.constants import KS_SHUTDOWN, KS_REBOOT
|
||||
from pyanaconda.ui.gui.hubs import Hub
|
||||
from pyanaconda.ui.gui.utils import gtk_action_nowait, gtk_call_once
|
||||
@@ -41,6 +41,8 @@ from pyanaconda.ui.gui.hubs import Hub
|
||||
from pyanaconda.ui.gui.utils import gtk_call_once
|
||||
from pyanaconda.core.async_utils import async_action_nowait
|
||||
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
+
|
||||
__all__ = ["ProgressHub"]
|
||||
|
||||
class ProgressHub(Hub):
|
||||
@@ -124,6 +126,8 @@ class ProgressHub(Hub):
|
||||
@@ -126,6 +128,8 @@ class ProgressHub(Hub):
|
||||
# to indicate this method should be removed from the idle loop.
|
||||
return False
|
||||
elif code == progressQ.PROGRESS_CODE_QUIT:
|
||||
@ -367,20 +346,20 @@ index 0e4dbed..b342bd5 100644
|
||||
sys.exit(args[0])
|
||||
|
||||
q.task_done()
|
||||
diff --git a/pyanaconda/ui/tui/spokes/progress.py b/pyanaconda/ui/tui/spokes/progress.py
|
||||
index 1feeb08..8221e31 100644
|
||||
--- a/pyanaconda/ui/tui/spokes/progress.py
|
||||
+++ b/pyanaconda/ui/tui/spokes/progress.py
|
||||
@@ -31,6 +31,8 @@ from pyanaconda.ui.tui.spokes import StandaloneTUISpoke
|
||||
from pyanaconda.ui.tui.hubs.summary import SummaryHub
|
||||
from pyanaconda.ui.tui.simpleline.base import ExitAllMainLoops
|
||||
diff --git a/pyanaconda/ui/tui/spokes/installation_progress.py b/pyanaconda/ui/tui/spokes/installation_progress.py
|
||||
index f89b022..3d47790 100644
|
||||
--- a/pyanaconda/ui/tui/spokes/installation_progress.py
|
||||
+++ b/pyanaconda/ui/tui/spokes/installation_progress.py
|
||||
@@ -33,6 +33,8 @@ from simpleline.event_loop import ExitMainLoop
|
||||
|
||||
from pykickstart.constants import KS_SHUTDOWN, KS_REBOOT
|
||||
|
||||
+from pyanaconda.tisnotify import tisnotify
|
||||
+
|
||||
__all__ = ["ProgressSpoke"]
|
||||
|
||||
class ProgressSpoke(StandaloneTUISpoke):
|
||||
@@ -101,6 +103,8 @@ class ProgressSpoke(StandaloneTUISpoke):
|
||||
|
||||
@@ -107,6 +109,8 @@ class ProgressSpoke(StandaloneTUISpoke):
|
||||
print('')
|
||||
return True
|
||||
elif code == progressQ.PROGRESS_CODE_QUIT:
|
||||
@ -390,5 +369,5 @@ index 1feeb08..8221e31 100644
|
||||
|
||||
q.task_done()
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] revert 7.4 grub2 efi handling
|
||||
1 file changed, 3 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
|
||||
index 9db9cf3..24e8b56 100644
|
||||
index d2c772d..0d40711 100644
|
||||
--- a/pyanaconda/bootloader.py
|
||||
+++ b/pyanaconda/bootloader.py
|
||||
@@ -1404,9 +1404,7 @@ class GRUB2(GRUB):
|
||||
@@ -1457,9 +1457,7 @@ class GRUB2(GRUB):
|
||||
|
||||
"""
|
||||
name = "GRUB2"
|
||||
@ -22,19 +22,30 @@ index 9db9cf3..24e8b56 100644
|
||||
_config_file = "grub.cfg"
|
||||
_config_dir = "grub2"
|
||||
_passwd_file = "user.cfg"
|
||||
@@ -1680,28 +1678,12 @@ class GRUB2(GRUB):
|
||||
return ret
|
||||
@@ -1888,8 +1886,7 @@ class EFIGRUB1(EFIBase, GRUB):
|
||||
|
||||
class EFIGRUB(GRUB2):
|
||||
- _packages32 = ["grub2-efi-ia32", "shim-ia32"]
|
||||
- _packages64 = ["grub2-efi-x64", "shim-x64"]
|
||||
- _packages_common = ["efibootmgr"]
|
||||
|
||||
class EFIGRUB(EFIBase, GRUB2):
|
||||
- _packages32 = [ "grub2-efi-ia32", "shim-ia32" ]
|
||||
- _packages_common = [ "efibootmgr" ]
|
||||
+ packages = ["grub2-efi", "efibootmgr", "shim"]
|
||||
can_dual_boot = False
|
||||
stage2_is_valid_stage1 = False
|
||||
stage2_bootable = False
|
||||
|
||||
- _is_32bit_firmware = False
|
||||
@@ -1899,38 +1896,13 @@ class EFIGRUB(EFIBase, GRUB2):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.efi_dir = 'BOOT'
|
||||
- self._packages64 = [ "grub2-efi-x64", "shim-x64" ]
|
||||
-
|
||||
- try:
|
||||
- f = open("/sys/firmware/efi/fw_platform_size", "r")
|
||||
- value = f.readline().strip()
|
||||
- except IOError:
|
||||
- log.info("Reading /sys/firmware/efi/fw_platform_size failed, defaulting to 64-bit install.")
|
||||
- value = '64'
|
||||
- if value == '32':
|
||||
- self._is_32bit_firmware = True
|
||||
-
|
||||
- @property
|
||||
- def _efi_binary(self):
|
||||
@ -46,42 +57,34 @@ index 9db9cf3..24e8b56 100644
|
||||
- def packages(self):
|
||||
- if self._is_32bit_firmware:
|
||||
- return self._packages32 + self._packages_common + \
|
||||
- super(EFIGRUB, self).packages
|
||||
- super().packages
|
||||
- return self._packages64 + self._packages_common + \
|
||||
- super(EFIGRUB, self).packages
|
||||
- super().packages
|
||||
+ _efi_binary = "\\shim.efi"
|
||||
|
||||
@property
|
||||
def _config_dir(self):
|
||||
@@ -1711,15 +1693,6 @@ class EFIGRUB(GRUB2):
|
||||
super(EFIGRUB, self).__init__()
|
||||
self.efi_dir = 'BOOT'
|
||||
|
||||
- try:
|
||||
- f = open("/sys/firmware/efi/fw_platform_size", "r")
|
||||
- value = f.readline().strip()
|
||||
- except IOError:
|
||||
- log.info("Reading /sys/firmware/efi/fw_platform_size failed, defaulting to 64-bit install.")
|
||||
- value = '64'
|
||||
- if value == '32':
|
||||
- self._is_32bit_firmware = True
|
||||
-
|
||||
def efibootmgr(self, *args, **kwargs):
|
||||
if flags.imageInstall or flags.dirInstall:
|
||||
log.info("Skipping efibootmgr for image/directory install.")
|
||||
@@ -1812,12 +1785,9 @@ class EFIGRUB(GRUB2):
|
||||
return True
|
||||
|
||||
class Aarch64EFIGRUB(EFIGRUB):
|
||||
- _packages64 = ["grub2-efi-aa64", "shim-aa64"]
|
||||
_serial_consoles = ["ttyAMA", "ttyS"]
|
||||
- _efi_binary = "\\shimaa64.efi"
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
- self._packages64 = ["grub2-efi-aa64", "shim-aa64"]
|
||||
|
||||
class ArmEFIGRUB(EFIGRUB):
|
||||
_serial_consoles = ["ttyAMA", "ttyS"]
|
||||
@@ -1938,12 +1910,10 @@ class ArmEFIGRUB(EFIGRUB):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
- self._packages64 = ["grub2-efi-arm"]
|
||||
|
||||
class MacEFIGRUB(EFIGRUB):
|
||||
- packages = [ "grub2-tools-efi", "mactel-boot" ]
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
- self._packages64.extend(["grub2-tools-efi", "mactel-boot"])
|
||||
|
||||
def mactel_config(self):
|
||||
if os.path.exists(iutil.getSysroot() + "/usr/libexec/mactel-boot-setup"):
|
||||
rc = iutil.execInSysroot("/usr/libexec/mactel-boot-setup", [])
|
||||
if os.path.exists(util.getSysroot() + "/usr/libexec/mactel-boot-setup"):
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] Set default hostname to localhost
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
|
||||
index c6f7bb7..26c24a3 100644
|
||||
index a0de470..47fda0c 100644
|
||||
--- a/pyanaconda/network.py
|
||||
+++ b/pyanaconda/network.py
|
||||
@@ -65,7 +65,7 @@ networkConfFile = "%s/network" % (sysconfigDir)
|
||||
@@ -57,7 +57,7 @@ networkConfFile = "%s/network" % (sysconfigDir)
|
||||
hostnameFile = "/etc/hostname"
|
||||
ipv6ConfFile = "/etc/sysctl.d/anaconda.conf"
|
||||
ifcfgLogFile = "/tmp/ifcfg.log"
|
||||
@ -21,5 +21,5 @@ index c6f7bb7..26c24a3 100644
|
||||
ifcfglog = None
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -21,7 +21,7 @@ index a80c6bb..8966258 100644
|
||||
ExecStart=/usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start
|
||||
diff --git a/scripts/anaconda-preexec b/scripts/anaconda-preexec
|
||||
new file mode 100644
|
||||
index 0000000..e3f79a4
|
||||
index 0000000..d491173
|
||||
--- /dev/null
|
||||
+++ b/scripts/anaconda-preexec
|
||||
@@ -0,0 +1,50 @@
|
||||
@ -76,5 +76,5 @@ index 0000000..e3f79a4
|
||||
+
|
||||
+exit 0
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
@ -1 +1 @@
|
||||
mirror:Source/anaconda-21.48.22.147-1.el7.centos.src.rpm
|
||||
mirror:Source/anaconda-29.19.0.40-1.el8.src.rpm
|
||||
|
Loading…
Reference in New Issue
Block a user