!325 [sync] PR-321: merge upstream patches

From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2023-12-23 11:57:09 +00:00 committed by Gitee
commit 845fa1b479
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 128 additions and 1 deletions

View File

@ -4,12 +4,13 @@
%endif
Name: anaconda
Version: 33.19
Release: 39
Release: 41
Summary: Graphical system installer
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
Source0: https://github.com/rhinstaller/anaconda/archive/%{name}-%{version}.tar.bz2
Source1: openeuler.conf
Source2: disable-disk-encryption.patch
Patch6000: Fix-hiding-of-network-device-activation-switch.patch
@ -135,6 +136,10 @@ Patch9029: bugfix-translate-the-tips-about-expected-capacity-into-Chin.patch
Patch9030: bugfix-change-root-and-storage-interface-shows.patch
Patch6081: backport-Do-not-modify-boot-order-on-UEFI-if-asked.patch
Patch6082: backport-Do-not-crash-on-network-device-link-with-wireless-de.patch
Patch6083: backport-Don-t-set-LC_ALL-for-live-installations.patch
%define dbusver 1.2.3
%define dnfver 3.6.0
%define dracutver 034-7
@ -347,6 +352,20 @@ update-desktop-database &> /dev/null || :
%{_datadir}/gtk-doc
%changelog
* Sat Dec 23 2023 sunhai <sunhai10@huaqei.com> - 33.19-41
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix src rpmbuild with no patch of disable-disk-encryption
* Sat Dec 23 2023 sunhai <sunhai10@huaqei.com> - 33.19-40
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Don't set LC_ALL for live installations
Do not crash on network --device link with wireless device
Do not modify boot order on UEFI if asked
* Wed Nov 15 2023 sunhai <sunhai10@huaqei.com> - 33.19-39
- Type:bugfix
- ID:NA

View File

@ -0,0 +1,35 @@
From 8a77e3403cbd70f47c466612d6e130e0a79bd51b Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Wed, 9 Mar 2022 12:51:43 +0100
Subject: [PATCH] Do not crash on network --device link with wireless device
(#2051235)
Conflict: NA
Reference: https://github.com/rhinstaller/anaconda/commit/8a77e3403cbd70f47c466612d6e130e0a79bd51b
---
pyanaconda/modules/network/nm_client.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/modules/network/nm_client.py b/pyanaconda/modules/network/nm_client.py
index c2384cb5d5..3cc28ec48e 100644
--- a/pyanaconda/modules/network/nm_client.py
+++ b/pyanaconda/modules/network/nm_client.py
@@ -995,8 +995,13 @@ def get_first_iface_with_link(nm_client, ifaces):
"""Find first iface having link (in lexicographical order)."""
for iface in sorted(ifaces):
device = nm_client.get_device_by_iface(iface)
- if device and device.get_carrier():
- return device.get_iface()
+ if device:
+ try:
+ carrier = device.get_carrier()
+ except AttributeError:
+ carrier = None
+ if carrier:
+ return device.get_iface()
return None
--
2.27.0

View File

@ -0,0 +1,33 @@
From 602d83aed82282c77c742f18341b6e70c5882322 Mon Sep 17 00:00:00 2001
From: Vladimir Slavik <vslavik@redhat.com>
Date: Fri, 26 Nov 2021 14:49:15 +0100
Subject: [PATCH] Do not modify boot order on UEFI if asked
Resolves: rhbz#2025953
(cherry picked from commit 6b62cd084ee7aa1da14d94f97aaa22af376b16ee)
Conflict: NA
Reference: https://github.com/rhinstaller/anaconda/commit/602d83aed82282c77c742f18341b6e70c5882322
---
pyanaconda/modules/storage/bootloader/efi.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
index 9729b800d5..1b47e247cd 100644
--- a/pyanaconda/modules/storage/bootloader/efi.py
+++ b/pyanaconda/modules/storage/bootloader/efi.py
@@ -69,8 +69,10 @@ class EFIBase(object):
boot_disk = partition.disk
boot_part_num = str(partition.parted_partition.number)
+ create_method = "-C" if self.keep_boot_order else "-c" # pylint: disable=no-member
+
rc = self.efibootmgr(
- "-c", "-w", "-L", productName.split("-")[0], # pylint: disable=no-member
+ create_method, "-w", "-L", productName.split("-")[0], # pylint: disable=no-member
"-d", boot_disk.path, "-p", boot_part_num,
"-l", self.efi_dir_as_efifs_dir + self._efi_binary, # pylint: disable=no-member
root=conf.target.system_root
--
2.27.0

View File

@ -0,0 +1,40 @@
From 20d86c58e1a678116b5f9d7573d096a954d76505 Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Wed, 6 Apr 2022 12:15:16 +0200
Subject: [PATCH] Don't set LC_ALL for live installations
The commit 4d686f1 was created as a fix for the bug 1169019. However, the fix
was rejected and the commit was supposed to be reverted (see the comment 37).
LC_ALL takes precedence over LANG during translations. Anaconda eventually
removes LC_ALL from its environment to get the expected translations, but
it might still affect processes started before that (see the bug 2071098).
Related: rhbz#2071098
Conflict: Modify "$LC_ALL" to $LC_ALL ,export PATH=/tmp/updates:$PATH,if [ ! -z "$UPDATES" ]; then
Reference: https://github.com/rhinstaller/anaconda/commit/20d86c58e1a678116b5f9d7573d096a954d76505
---
data/liveinst/liveinst | 6 ------
1 file changed, 6 deletions(-)
diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index 4e3a670..64a7a61 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -174,12 +174,6 @@ if [ ! -z "$UPDATES" ]; then
export PATH=/tmp/updates:$PATH
fi
-if [ -z $LC_ALL ]; then
- # LC_ALL not set, set it to $LANG to make Python's default encoding
- # detection work
- export LC_ALL=$LANG
-fi
-
# Force the X11 backend since sudo and wayland do not mix
export GDK_BACKEND=x11
--
2.27.0