Relocate anaconda to stx-integ/base/anaconda

Move content from stx-gplv3 into stx-integ

Packages will be relocated to

stx-integ:
    base/
        anaconda
        crontabs
        dnsmasq
        rsync

    database/
        python-psycopg2

    filesystem/
        parted

    grub/
        grub2

    security/
        python-keyring

Change-Id: I8144aad77357fead026f97f478690323e93cd24d
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2018-08-01 15:37:10 -04:00
parent 68ba513e4b
commit ac1f65639a
13 changed files with 767 additions and 0 deletions

View File

@ -0,0 +1 @@
TIS_PATCH_VER=5

View File

@ -0,0 +1,25 @@
From d52fda6215af4f2d51884a10c04d3c7a44d100dd Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Mon, 13 Nov 2017 16:38:15 -0500
Subject: [PATCH] Update package versioning for TIS format
---
SPECS/anaconda.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
index e2d706d..00b19c4 100644
--- a/SPECS/anaconda.spec
+++ b/SPECS/anaconda.spec
@@ -3,7 +3,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 21.48.22.121
-Release: 1%{?dist}
+Release: 1.el7.centos%{?_tis_dist}.%{tis_patch_ver}
License: GPLv2+ and MIT
Group: Applications/System
URL: http://fedoraproject.org/wiki/Anaconda
--
1.8.3.1

View File

@ -0,0 +1,38 @@
From 6bec7d96120f7eef019ab2841265bf4b74ebc64d Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Mon, 13 Nov 2017 17:22:49 -0500
Subject: [PATCH] Add TIS patches
---
SPECS/anaconda.spec | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
index 00b19c4..79e1c55 100644
--- a/SPECS/anaconda.spec
+++ b/SPECS/anaconda.spec
@@ -22,7 +22,10 @@ Patch6: anaconda-centos-help-text.patch
Patch7: anaconda-centos-skip-retry-if-not-connected.patch
Patch8: 9800-rpmostreepayload-Rework-remote-add-handling.patch
Patch1000: yumpayload-dont-verify-disabled-repos.patch
-
+
+# WRS
+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 gettextver 0.18.1
@@ -243,6 +246,9 @@ runtime on NFS/HTTP/FTP servers or local disks.
%patch8 -p1
%patch1000 -p1
+# WRS
+%patch10001 -p1
+
%build
%configure --disable-static \
--enable-introspection \
--
1.8.3.1

View File

@ -0,0 +1,32 @@
From 9ebc2f9343cc214fb1e590221e4791f10a2f87d1 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
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(+)
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
index 79e1c55..2e5ece9 100644
--- a/SPECS/anaconda.spec
+++ b/SPECS/anaconda.spec
@@ -25,6 +25,7 @@ Patch1000: yumpayload-dont-verify-disabled-repos.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).
@@ -248,6 +249,7 @@ runtime on NFS/HTTP/FTP servers or local disks.
# WRS
%patch10001 -p1
+%patch10002 -p1
%build
%configure --disable-static \
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From 709f54c6e799c23a9a374dfca6196ec08102b658 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Thu, 23 Nov 2017 16:35:13 -0500
Subject: [PATCH] Upversion rpm-devel dependency
---
SPECS/anaconda.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
index 2e5ece9..174dbee 100644
--- a/SPECS/anaconda.spec
+++ b/SPECS/anaconda.spec
@@ -48,7 +48,7 @@ Patch10002: 0002-revert-7.4-grub2-efi-handling.patch
%define isomd5sum 1.0.10
%define fcoeutilsver 1.0.12-3.20100323git
%define iscsiver 6.2.0.870-3
-%define rpmver 4.10.0
+%define rpmver 4.14.0
%define libarchivever 3.0.4
%define langtablever 0.0.31-3
%define libxklavierver 5.4
--
1.8.3.1

View File

@ -0,0 +1,53 @@
From e54422230c27e53436fe94a639a04aaf65f787e1 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
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(+)
diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec
index 174dbee..8541334 100644
--- a/SPECS/anaconda.spec
+++ b/SPECS/anaconda.spec
@@ -26,6 +26,8 @@ Patch1000: yumpayload-dont-verify-disabled-repos.patch
# WRS
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).
@@ -250,6 +252,8 @@ runtime on NFS/HTTP/FTP servers or local disks.
# WRS
%patch10001 -p1
%patch10002 -p1
+%patch10003 -p1
+%patch10004 -p1
%build
%configure --disable-static \
@@ -268,6 +272,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/
%endif
+
+# Add anaconda-preexec script
+install -m 0755 scripts/anaconda-preexec %{buildroot}%{_sbindir}/anaconda-preexec
+
# 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
@@ -316,6 +324,7 @@ update-desktop-database &> /dev/null || :
%{_sysconfdir}/X11/xinit/xinitrc.d/*
%{_datadir}/applications/*.desktop
%endif
+%{_sbindir}/anaconda-preexec
%files gui
%{_libdir}/python*/site-packages/pyanaconda/ui/gui/*
--
1.8.3.1

View File

@ -0,0 +1,5 @@
0001-Update-package-versioning-for-TIS-format.patch
0002-Add-TIS-patches.patch
0003-revert-7.4-grub2-efi-handling.patch
0004-Upversion-rpm-devel-dependency.patch
0005-Add-TIS-patches-for-host-lookup.patch

View File

@ -0,0 +1,394 @@
From fa37cfcf560506f49bb00b9d216b1e7646a6905b Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
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(-)
create mode 100644 pyanaconda/tisnotify.py
diff --git a/data/tmux.conf b/data/tmux.conf
index 89f788b..7903b06 100644
--- a/data/tmux.conf
+++ b/data/tmux.conf
@@ -1,6 +1,7 @@
# tmux.conf for the anaconda environment
bind -n M-tab next
+bind -n C-o next
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"
-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 ")'
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
--- a/pyanaconda/errors.py
+++ b/pyanaconda/errors.py
@@ -19,6 +19,7 @@
# Author(s): Chris Lumens <clumens@redhat.com>
from pyanaconda.i18n import _
+from pyanaconda.tisnotify import tisnotify
__all__ = ["ERROR_RAISE", "ERROR_CONTINUE", "ERROR_RETRY",
"InvalidImageSizeError", "MissingImageError", "MediaUnmountError",
@@ -81,6 +82,19 @@ 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,
+# and an exception occurs in the error handler. This is a basic dummy UI
+# to avoid this exception and print the error message.
+#
+class DefaultUI(object):
+ def __init__(self):
+ pass
+
+ def showError(self, msg):
+ print "\n\n", msg
+
+
###
### TOP-LEVEL ERROR HANDLING OBJECT
###
@@ -304,12 +318,12 @@ class ErrorHandler(object):
"""
rc = ERROR_RAISE
+ # WRS: 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
+ self.ui = DefaultUI()
_map = {"PartitioningError": self._partitionErrorHandler,
"FSResizeError": self._fsResizeHandler,
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 8a97f95..3d0d2da 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -70,6 +70,7 @@ class Flags(object):
self.ksprompt = True
self.rescue_mode = 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
from pykickstart.constants import SNAPSHOT_WHEN_POST_INSTALL
+
+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)
+ tisnotify.installed()
progress_complete()
def doInstall(storage, payload, ksdata, instClass):
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 50515c8..d95b2df 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -81,6 +81,8 @@ from pykickstart.sections import NullSection, PackageSection, PostScriptSection,
from pykickstart.sections import Section
from pykickstart.version import returnClassForVersion, RHEL7
+from pyanaconda.tisnotify import tisnotify
+
import logging
log = logging.getLogger("anaconda")
stderrLog = logging.getLogger("anaconda.stderr")
@@ -2342,6 +2344,7 @@ def runPreScripts(scripts):
if len(preScripts) == 0:
return
+ tisnotify.preinstall()
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
from blivet.size import Size
+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)
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
@@ -170,6 +173,7 @@ class RPMOSTreePayload(ArchivePayload):
try:
repo.pull(ostreesetup.remote, [ostreesetup.ref], 0, progress, cancellable)
except GLib.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:
@@ -213,6 +217,7 @@ class RPMOSTreePayload(ArchivePayload):
try:
self._copyBootloaderData()
except (OSError, RuntimeError) as e:
+ tisnotify.failed()
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):
@@ -1338,6 +1342,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:
@@ -1515,6 +1521,7 @@ reposdir=%s
try:
self.checkSoftwareSelection()
except DependencyError as e:
+ tisnotify.failed()
if errorHandler.cb(e) == ERROR_RAISE:
progressQ.send_quit(1)
while True:
@@ -1569,6 +1576,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:])
@@ -1581,7 +1592,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:
@@ -1603,6 +1615,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
--- /dev/null
+++ b/pyanaconda/tisnotify.py
@@ -0,0 +1,91 @@
+"""
+Copyright (c) 2016-2017 Wind River Systems, Inc.
+ SPDX-License-Identifier: Apache-2.0
+
+
+
+"""
+
+import os
+import re
+import subprocess
+import time
+
+from pyanaconda.flags import flags
+
+class TisNotify():
+
+ def __init__(self):
+ self.tisnotify = flags.cmdline.get("tisnotify")
+ self.regex = re.compile(r'\(([\d\/]*)\)$')
+ self.DEVNULL = open(os.devnull, "w")
+ self.last_installing = 0
+
+ def sendNotification(self, data):
+ try:
+ subprocess.call(['/usr/bin/curl',
+ '--data', data,
+ self.tisnotify],
+ stdout=self.DEVNULL,
+ stderr=self.DEVNULL)
+ except:
+ pass
+
+ def preinstall(self):
+ if self.tisnotify is None:
+ return
+
+ data = "install_state=preinstall"
+ self.sendNotification(data)
+
+ def installing(self, text):
+ if self.tisnotify is None:
+ return
+
+ match = self.regex.search(text)
+ if match is None:
+ return
+
+ if (time.time() - self.last_installing) >= 5:
+ self.last_installing = time.time()
+ data = "install_state=installing&install_state_info=%s" % match.groups()[0]
+ self.sendNotification(data)
+
+ def postinstall(self):
+ if self.tisnotify is None:
+ return
+
+ data = "install_state=postinstall"
+ self.sendNotification(data)
+
+ def installed(self):
+ if self.tisnotify is None:
+ return
+
+ data = "install_state=installed"
+ self.sendNotification(data)
+
+ def failed(self):
+ if self.tisnotify is None:
+ return
+
+ data = "install_state=failed"
+ self.sendNotification(data)
+
+ etc_dir = '/mnt/sysimage/etc'
+ platform_dir = etc_dir + '/platform'
+ failed_flag = platform_dir + '/platform/installation_failed'
+ motd_file = etc_dir + '/motd'
+
+ # Set installation_failed flag, if possible and not already done
+ if os.path.exists(platform_dir) and not os.path.exists(failed_flag):
+ try:
+ subprocess.call(['touch', '/mnt/sysimage/etc/platform/installation_failed'])
+ with open(motd_file, 'a') as f:
+ f.write('Installation failure. Please check logs or reinstall.\n\n')
+ except:
+ pass
+
+
+tisnotify = TisNotify()
+
diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py
index 0e4dbed..b342bd5 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
+from pyanaconda.tisnotify import tisnotify
+
__all__ = ["ProgressHub"]
class ProgressHub(Hub):
@@ -124,6 +126,8 @@ class ProgressHub(Hub):
# to indicate this method should be removed from the idle loop.
return False
elif code == progressQ.PROGRESS_CODE_QUIT:
+ if args[0] != 0:
+ tisnotify.failed()
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
+from pyanaconda.tisnotify import tisnotify
+
__all__ = ["ProgressSpoke"]
class ProgressSpoke(StandaloneTUISpoke):
@@ -101,6 +103,8 @@ class ProgressSpoke(StandaloneTUISpoke):
print('')
return True
elif code == progressQ.PROGRESS_CODE_QUIT:
+ if args[0] != 0:
+ tisnotify.failed()
sys.exit(args[0])
q.task_done()
--
1.8.3.1

View File

@ -0,0 +1,87 @@
From 76cd2b90fd4e550e162bc8fc7e247ed2f4e6e310 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Fri, 17 Nov 2017 12:06:39 -0500
Subject: [PATCH] revert 7.4 grub2 efi handling
---
pyanaconda/bootloader.py | 36 +++---------------------------------
1 file changed, 3 insertions(+), 33 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 9db9cf3..24e8b56 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1388,9 +1388,7 @@ class GRUB2(GRUB):
"""
name = "GRUB2"
- # grub2 is a virtual provides that's provided by grub2-pc, grub2-ppc64le,
- # and all of the primary grub components that aren't grub2-efi-${EFIARCH}
- packages = ["grub2", "grub2-tools"]
+ packages = ["grub2"]
_config_file = "grub.cfg"
_config_dir = "grub2"
_passwd_file = "user.cfg"
@@ -1664,28 +1662,12 @@ class GRUB2(GRUB):
return ret
class EFIGRUB(GRUB2):
- _packages32 = ["grub2-efi-ia32", "shim-ia32"]
- _packages64 = ["grub2-efi-x64", "shim-x64"]
- _packages_common = ["efibootmgr"]
+ packages = ["grub2-efi", "efibootmgr", "shim"]
can_dual_boot = False
stage2_is_valid_stage1 = False
stage2_bootable = False
- _is_32bit_firmware = False
-
- @property
- def _efi_binary(self):
- if self._is_32bit_firmware:
- return "\\shimia32.efi"
- return "\\shimx64.efi"
-
- @property
- def packages(self):
- if self._is_32bit_firmware:
- return self._packages32 + self._packages_common + \
- super(EFIGRUB, self).packages
- return self._packages64 + self._packages_common + \
- super(EFIGRUB, self).packages
+ _efi_binary = "\\shim.efi"
@property
def _config_dir(self):
@@ -1695,15 +1677,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.")
@@ -1796,12 +1769,9 @@ class EFIGRUB(GRUB2):
return True
class Aarch64EFIGRUB(EFIGRUB):
- _packages64 = ["grub2-efi-aa64", "shim-aa64"]
_serial_consoles = ["ttyAMA", "ttyS"]
- _efi_binary = "\\shimaa64.efi"
class MacEFIGRUB(EFIGRUB):
- packages = [ "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", [])
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From d14b48ec201b4f90042f6292d537d5af5d78c6a6 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Thu, 23 Nov 2017 16:43:58 -0500
Subject: [PATCH] Set default hostname to localhost
---
pyanaconda/network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index c6f7bb7..26c24a3 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -63,7 +63,7 @@ networkConfFile = "%s/network" % (sysconfigDir)
hostnameFile = "/etc/hostname"
ipv6ConfFile = "/etc/sysctl.d/anaconda.conf"
ifcfgLogFile = "/tmp/ifcfg.log"
-DEFAULT_HOSTNAME = "localhost.localdomain"
+DEFAULT_HOSTNAME = "localhost"
ifcfglog = None
--
1.8.3.1

View File

@ -0,0 +1,80 @@
From 0b9c332f7101c890c5bb1c65f9c89d82bd759a04 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Thu, 23 Nov 2017 16:46:31 -0500
Subject: [PATCH] Cache server ip in /etc/hosts
---
data/systemd/anaconda.service | 1 +
scripts/anaconda-preexec | 50 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 scripts/anaconda-preexec
diff --git a/data/systemd/anaconda.service b/data/systemd/anaconda.service
index a80c6bb..8966258 100644
--- a/data/systemd/anaconda.service
+++ b/data/systemd/anaconda.service
@@ -7,4 +7,5 @@ Wants=anaconda-noshell.service
Type=forking
Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8 GDK_BACKEND=x11 XDG_RUNTIME_DIR=/tmp GIO_USE_VFS=local
WorkingDirectory=/root
+ExecStartPre=/usr/sbin/anaconda-preexec
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
--- /dev/null
+++ b/scripts/anaconda-preexec
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Copyright (c) 2017 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
+
+exec >>/tmp/anaconda-preexec.log
+exec 2>>/tmp/anaconda-preexec.log
+set -x
+
+function get_ip()
+{
+ local host=$1
+
+ # Try the DNS query
+ host -t A $host | awk '{print $4}' | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' | head -1
+}
+
+# If the kickstart is net-based, wait for connectivity to server
+cat /proc/cmdline | grep -q 'inst\.ks=http://'
+if [ $? -eq 0 ]
+then
+ server=$(cat /proc/cmdline | sed -r 's#.*inst\.ks=http://([^/]*)/.*#\1#')
+ if [ -n "$server" ]
+ then
+ echo "Testing connectivity to server: $server"
+ let -i ping_count=0
+ ping -c 1 -w 60 $server
+ while [ $? -ne 0 -a $ping_count -lt 600 ]
+ do
+ echo "Waiting for connectivity to server: $server"
+ sleep 1
+ let -i ping_count++
+ ping -c 1 -w 60 $server
+ done
+
+ # Cache the host IP
+ ipaddr=$(get_ip $server)
+ if [ -n "$ipaddr" -a "$ipaddr" != "$server" ]
+ then
+ echo "$ipaddr $server" >> /etc/hosts
+ fi
+
+ fi
+fi
+
+exit 0
--
1.8.3.1

View File

@ -0,0 +1 @@
mirror:Source/anaconda-21.48.22.121-1.el7.centos.src.rpm

View File

@ -1 +1,2 @@
base/rpm base/rpm
base/anaconda