From 225e240c2d5a452dbab56638305129058833df73 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Aug 23 2017 09:18:48 +0000 Subject: added in new source patches --- diff --git a/SOURCES/9800-rpmostreepayload-Rework-remote-add-handling.patch b/SOURCES/9800-rpmostreepayload-Rework-remote-add-handling.patch new file mode 100644 index 0000000..59f7edf --- /dev/null +++ b/SOURCES/9800-rpmostreepayload-Rework-remote-add-handling.patch @@ -0,0 +1,98 @@ +diff -uNrp anaconda-21.48.22.121.orig/pyanaconda/packaging/rpmostreepayload.py anaconda-21.48.22.121/pyanaconda/packaging/rpmostreepayload.py +--- anaconda-21.48.22.121.orig/pyanaconda/packaging/rpmostreepayload.py 2017-06-21 12:44:34.000000000 +0000 ++++ anaconda-21.48.22.121/pyanaconda/packaging/rpmostreepayload.py 2017-08-23 02:28:23.121006339 +0000 +@@ -142,24 +142,25 @@ class RPMOSTreePayload(ArchivePayload): + ["admin", "--sysroot=" + iutil.getTargetPhysicalRoot(), + "init-fs", iutil.getTargetPhysicalRoot()]) + +- repo_arg = "--repo=" + iutil.getTargetPhysicalRoot() + '/ostree/repo' ++ self._sysroot_path = Gio.File.new_for_path(iutil.getTargetPhysicalRoot()) ++ sysroot = OSTree.Sysroot.new(self._sysroot_path) ++ sysroot.load(cancellable) ++ repo = sysroot.get_repo(None)[1] ++ # We don't support resuming from interrupted installs ++ repo.set_disable_fsync(True) ++ ++ self._remoteOptions = {} + +- # Store this for use in postInstall too, where we need to +- # undo/redo this step. +- self._base_remote_args = ["remote", "add"] ++ # Handle variations in pykickstart + if ((hasattr(ostreesetup, 'noGpg') and ostreesetup.noGpg) or + (hasattr(ostreesetup, 'nogpg') and ostreesetup.nogpg)): +- self._base_remote_args.append("--set=gpg-verify=false") +- self._base_remote_args.extend([ostreesetup.remote, +- ostreesetup.url]) +- self._safeExecWithRedirect("ostree", [repo_arg] + self._base_remote_args) ++ self._remoteOptions['gpg-verify'] = GLib.Variant('b', False) + +- self._sysroot_path = sysroot_path = Gio.File.new_for_path(iutil.getTargetPhysicalRoot()) +- sysroot = OSTree.Sysroot.new(sysroot_path) +- sysroot.load(cancellable) ++ repo.remote_change(None, OSTree.RepoRemoteChange.ADD_IF_NOT_EXISTS, ++ ostreesetup.remote, ostreesetup.url, ++ GLib.Variant('a{sv}', self._remoteOptions), ++ cancellable) + +- repo = sysroot.get_repo(None)[1] +- repo.set_disable_fsync(True) + progressQ.send_message(_("Starting pull of %(branchName)s from %(source)s") % \ + {"branchName": ostreesetup.ref, "source": ostreesetup.remote}) + +@@ -178,6 +179,14 @@ class RPMOSTreePayload(ArchivePayload): + + progressQ.send_message(_("Preparing deployment of %s") % (ostreesetup.ref, )) + ++ # Now that we have the data pulled, delete the remote for now. ++ # This will allow a remote configuration defined in the tree ++ # (if any) to override what's in the kickstart. Otherwise, ++ # we'll re-add it in post. Ideally, ostree would support a ++ # pull without adding a remote, but that would get quite ++ # complex. ++ repo.remote_delete(self.data.ostreesetup.remote, None) ++ + self._safeExecWithRedirect("ostree", + ["admin", "--sysroot=" + iutil.getTargetPhysicalRoot(), + "os-init", ostreesetup.osname]) +@@ -257,20 +266,30 @@ class RPMOSTreePayload(ArchivePayload): + from gi.repository import OSTree + cancellable = None + +- # Reload this data - we couldn't keep it open across +- # the remounts happening. + sysroot = OSTree.Sysroot.new(self._sysroot_path) + sysroot.load(cancellable) + repo = sysroot.get_repo(None)[1] + +- # This is an ugly hack - we didn't have /etc/ostree/remotes.d, +- # so the remote went into /ostree/repo/config. But we want it +- # in /etc, so delete that remote, then re-add it to +- # /etc/ostree/remotes.d, executing ostree inside the sysroot +- # so that it understands it's a "system repository" and should +- # modify /etc. +- repo.remote_delete(self.data.ostreesetup.remote, None) +- self._safeExecWithRedirect("ostree", self._base_remote_args, root=iutil.getSysroot()) ++ # CentOS specific patch (for now) - pull the remote config from usr/etc if it exists. ++ # The OSTree handling here was buggy in that it wasn't looking in the sysroot ++ # for existing remotes. ++ default_remote_path = iutil.getSysroot() + '/usr/etc/ostree/remotes.d/' + self.data.ostreesetup.osname + '.conf' ++ if os.path.isfile(default_remote_path): ++ destpath = iutil.getSysroot() + '/etc/ostree/remotes.d/' + os.path.basename(default_remote_path) ++ self._safeExecWithRedirect('cp', ['-r', '-p', default_remote_path, destpath]) ++ else: ++ # Following up on the "remote delete" above, we removed the ++ # remote from /ostree/repo/config. But we want it in /etc, so ++ # re-add it to /etc/ostree/remotes.d, using the sysroot path. ++ # ++ # However, we ignore the case where the remote already exists, ++ # which occurs when the content itself provides the remote ++ # config file. ++ repo.remote_change(Gio.File.new_for_path(iutil.getSysroot()), ++ OSTree.RepoRemoteChange.ADD_IF_NOT_EXISTS, ++ self.data.ostreesetup.remote, self.data.ostreesetup.url, ++ GLib.Variant('a{sv}', self._remoteOptions), ++ cancellable) + + boot = iutil.getSysroot() + '/boot' + diff --git a/SOURCES/anaconda-centos-help-text.patch b/SOURCES/anaconda-centos-help-text.patch new file mode 100644 index 0000000..329bfe9 --- /dev/null +++ b/SOURCES/anaconda-centos-help-text.patch @@ -0,0 +1,18 @@ +diff -uNr anaconda-21.48.22.56__orig/data/help/en-US/CentOSPlaceholder.html anaconda-21.48.22.56/data/help/en-US/CentOSPlaceholder.html +--- anaconda-21.48.22.56__orig/data/help/en-US/CentOSPlaceholder.html 1970-01-01 01:00:00.000000000 +0100 ++++ anaconda-21.48.22.56/data/help/en-US/CentOSPlaceholder.html 2015-12-07 17:07:05.017000000 +0000 +@@ -0,0 +1,5 @@ ++ ++

The Anaconda built-in help

++

...is not yet available for this screen.

++

You can check out the CentOS Linux resouces online at https://wiki.centos.org/InstallerHelp.

++ +diff -uNr anaconda-21.48.22.56__orig/data/help/en-US/CentOSPlaceholderWithLinks.html anaconda-21.48.22.56/data/help/en-US/CentOSPlaceholderWithLinks.html +--- anaconda-21.48.22.56__orig/data/help/en-US/CentOSPlaceholderWithLinks.html 1970-01-01 01:00:00.000000000 +0100 ++++ anaconda-21.48.22.56/data/help/en-US/CentOSPlaceholderWithLinks.html 2015-12-07 17:09:47.845000000 +0000 +@@ -0,0 +1,5 @@ ++ ++

The Anaconda built-in help

++

...is not yet available for this screen.

++

You can check out the CentOS Linux resouces online at https://wiki.centos.org/InstallerHelp.

++ diff --git a/SOURCES/anaconda-centos-skip-retry-if-not-connected.patch b/SOURCES/anaconda-centos-skip-retry-if-not-connected.patch new file mode 100644 index 0000000..2e51bc2 --- /dev/null +++ b/SOURCES/anaconda-centos-skip-retry-if-not-connected.patch @@ -0,0 +1,14 @@ +diff -uNr anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py +--- anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py 2015-12-08 14:36:52.533000000 +0000 ++++ anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py 2015-12-08 14:38:51.464000000 +0000 +@@ -648,6 +648,10 @@ + # so that unattended installations on unreliable networks have + # a higher chance of finishing successfully + xdelay = xprogressive_delay() ++ if not nm_is_connected(): ++ MAX_METADATA_DOWNLOAD_RETRIES = 1 ++ else: ++ MAX_METADATA_DOWNLOAD_RETRIES = 10 + for retry_count in xrange(0, MAX_METADATA_DOWNLOAD_RETRIES + 1): + if retry_count > 0: + # introduce a retry delay