Backport PR#3935 to fix live installs
This commit is contained in:
parent
df673383bb
commit
692dbbdb92
@ -0,0 +1,48 @@
|
|||||||
|
From 216c1aa6684cbed2a7869d48f97bea95cb503ab6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Williamson <awilliam@redhat.com>
|
||||||
|
Date: Tue, 8 Mar 2022 16:10:30 -0800
|
||||||
|
Subject: [PATCH] network: Handle network configuration paths not existing
|
||||||
|
|
||||||
|
When installing network configuration files, we shouldn't assume
|
||||||
|
that the relevant paths (network-scripts and system-connections)
|
||||||
|
actually exist, they don't have to. NetworkManager has split
|
||||||
|
/etc/sysconfig/network-scripts off into a subpackage that is
|
||||||
|
no longer installed by default. We guarded against this in
|
||||||
|
`get_config_files_paths` already, but not in
|
||||||
|
`_copy_device_config_files`.
|
||||||
|
---
|
||||||
|
pyanaconda/modules/network/installation.py | 16 +++++++++-------
|
||||||
|
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pyanaconda/modules/network/installation.py b/pyanaconda/modules/network/installation.py
|
||||||
|
index f46574e6f6..3ac65e0df0 100644
|
||||||
|
--- a/pyanaconda/modules/network/installation.py
|
||||||
|
+++ b/pyanaconda/modules/network/installation.py
|
||||||
|
@@ -240,15 +240,17 @@ Name={}
|
||||||
|
:param root: path to the root of the target system
|
||||||
|
:type root: str
|
||||||
|
"""
|
||||||
|
- for config_file in os.listdir(self.NETWORK_SCRIPTS_DIR_PATH):
|
||||||
|
- if config_file.startswith(self.NETWORK_SCRIPTS_CONFIG_FILE_PREFIXES):
|
||||||
|
- config_file_path = os.path.join(self.NETWORK_SCRIPTS_DIR_PATH,
|
||||||
|
+ if os.path.exists(self.NETWORK_SCRIPTS_DIR_PATH):
|
||||||
|
+ for config_file in os.listdir(self.NETWORK_SCRIPTS_DIR_PATH):
|
||||||
|
+ if config_file.startswith(self.NETWORK_SCRIPTS_CONFIG_FILE_PREFIXES):
|
||||||
|
+ config_file_path = os.path.join(self.NETWORK_SCRIPTS_DIR_PATH,
|
||||||
|
+ config_file)
|
||||||
|
+ self._copy_file_to_root(root, config_file_path)
|
||||||
|
+ if os.path.exists(self.NM_SYSTEM_CONNECTIONS_DIR_PATH):
|
||||||
|
+ for config_file in os.listdir(self.NM_SYSTEM_CONNECTIONS_DIR_PATH):
|
||||||
|
+ config_file_path = os.path.join(self.NM_SYSTEM_CONNECTIONS_DIR_PATH,
|
||||||
|
config_file)
|
||||||
|
self._copy_file_to_root(root, config_file_path)
|
||||||
|
- for config_file in os.listdir(self.NM_SYSTEM_CONNECTIONS_DIR_PATH):
|
||||||
|
- config_file_path = os.path.join(self.NM_SYSTEM_CONNECTIONS_DIR_PATH,
|
||||||
|
- config_file)
|
||||||
|
- self._copy_file_to_root(root, config_file_path)
|
||||||
|
|
||||||
|
def _copy_dhclient_config_files(self, root, network_ifaces):
|
||||||
|
"""Copy dhclient configuration files to target system.
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Graphical system installer
|
Summary: Graphical system installer
|
||||||
Name: anaconda
|
Name: anaconda
|
||||||
Version: 37.2
|
Version: 37.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+ and MIT
|
License: GPLv2+ and MIT
|
||||||
URL: http://fedoraproject.org/wiki/Anaconda
|
URL: http://fedoraproject.org/wiki/Anaconda
|
||||||
|
|
||||||
@ -15,6 +15,10 @@ URL: http://fedoraproject.org/wiki/Anaconda
|
|||||||
# make dist
|
# make dist
|
||||||
Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.bz2
|
Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.bz2
|
||||||
|
|
||||||
|
# https://github.com/rhinstaller/anaconda/pull/3935
|
||||||
|
# Fix live install with NetworkManager-1.36.2-1+
|
||||||
|
Patch0: 0001-network-Handle-network-configuration-paths-not-exist.patch
|
||||||
|
|
||||||
# Versions of required components (done so we make sure the buildrequires
|
# Versions of required components (done so we make sure the buildrequires
|
||||||
# match the requires versions of things).
|
# match the requires versions of things).
|
||||||
|
|
||||||
@ -452,6 +456,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
|
|||||||
%{_prefix}/libexec/anaconda/dd_*
|
%{_prefix}/libexec/anaconda/dd_*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 08 2022 Adam Williamson <awilliam@redhat.com> - 37.2-2
|
||||||
|
- Backport PR#3935 to fix live installs
|
||||||
|
|
||||||
* Tue Mar 08 2022 Packit Service <user-cont-team+packit-service@redhat.com> - 37.2-1
|
* Tue Mar 08 2022 Packit Service <user-cont-team+packit-service@redhat.com> - 37.2-1
|
||||||
- Fix Makefile targets using L10N Makefile variables (jkonecny)
|
- Fix Makefile targets using L10N Makefile variables (jkonecny)
|
||||||
- Remove the blivet_gui_supported configuration option (vponcova)
|
- Remove the blivet_gui_supported configuration option (vponcova)
|
||||||
|
Loading…
Reference in New Issue
Block a user