From 24c5cb5165879f3e7d049480f83b5c52c11459d4 Mon Sep 17 00:00:00 2001 From: sun_hai_10 Date: Sat, 23 Dec 2023 15:30:14 +0800 Subject: [PATCH 1/2] merge upstream patches (cherry picked from commit f1906fbbe61510ae6bf00dabc87d2b4db52b2a50) --- anaconda.spec | 14 ++++++- ...network-device-link-with-wireless-de.patch | 35 ++++++++++++++++ ...t-modify-boot-order-on-UEFI-if-asked.patch | 33 +++++++++++++++ ...-t-set-LC_ALL-for-live-installations.patch | 40 +++++++++++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 backport-Do-not-crash-on-network-device-link-with-wireless-de.patch create mode 100644 backport-Do-not-modify-boot-order-on-UEFI-if-asked.patch create mode 100644 backport-Don-t-set-LC_ALL-for-live-installations.patch diff --git a/anaconda.spec b/anaconda.spec index 90b5c6e..dc6377b 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -4,7 +4,7 @@ %endif Name: anaconda Version: 33.19 -Release: 39 +Release: 40 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -135,6 +135,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 +351,14 @@ update-desktop-database &> /dev/null || : %{_datadir}/gtk-doc %changelog +* Sat Dec 23 2023 sunhai - 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 - 33.19-39 - Type:bugfix - ID:NA diff --git a/backport-Do-not-crash-on-network-device-link-with-wireless-de.patch b/backport-Do-not-crash-on-network-device-link-with-wireless-de.patch new file mode 100644 index 0000000..52b67f4 --- /dev/null +++ b/backport-Do-not-crash-on-network-device-link-with-wireless-de.patch @@ -0,0 +1,35 @@ +From 8a77e3403cbd70f47c466612d6e130e0a79bd51b Mon Sep 17 00:00:00 2001 +From: Radek Vykydal +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 + diff --git a/backport-Do-not-modify-boot-order-on-UEFI-if-asked.patch b/backport-Do-not-modify-boot-order-on-UEFI-if-asked.patch new file mode 100644 index 0000000..e9ec22c --- /dev/null +++ b/backport-Do-not-modify-boot-order-on-UEFI-if-asked.patch @@ -0,0 +1,33 @@ +From 602d83aed82282c77c742f18341b6e70c5882322 Mon Sep 17 00:00:00 2001 +From: Vladimir Slavik +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 + diff --git a/backport-Don-t-set-LC_ALL-for-live-installations.patch b/backport-Don-t-set-LC_ALL-for-live-installations.patch new file mode 100644 index 0000000..8635c01 --- /dev/null +++ b/backport-Don-t-set-LC_ALL-for-live-installations.patch @@ -0,0 +1,40 @@ +From 20d86c58e1a678116b5f9d7573d096a954d76505 Mon Sep 17 00:00:00 2001 +From: Vendula Poncova +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 + From 8084562a4967416305200b9987cf5b0138f1aea7 Mon Sep 17 00:00:00 2001 From: sun_hai_10 Date: Sat, 23 Dec 2023 16:05:18 +0800 Subject: [PATCH 2/2] fix src rpmbuild no patch (cherry picked from commit 95fa945a7978a52eff2009fce9bec8ec8acf692a) --- anaconda.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/anaconda.spec b/anaconda.spec index dc6377b..456eb93 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -4,12 +4,13 @@ %endif Name: anaconda Version: 33.19 -Release: 40 +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 @@ -351,6 +352,12 @@ update-desktop-database &> /dev/null || : %{_datadir}/gtk-doc %changelog +* Sat Dec 23 2023 sunhai - 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 - 33.19-40 - Type:bugfix - ID:NA