Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
3f47e48523
!409 add support for sw_64 architecture
From: @yue-yuankun 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2025-04-08 09:22:27 +00:00
yueyuankun
5b38a07ddd add support for sw_64 architecture 2025-03-18 13:52:23 +08:00
openeuler-ci-bot
2a5f83de48
!403 Fix wrong dracut timeout message
From: @sun_hai_10 
Reviewed-by: @zhangqiumiao, @anonymous_z 
Signed-off-by: @zhangqiumiao, @anonymous_z
2025-01-20 06:49:59 +00:00
sun_hai_10
ff41085267 Fix wrong dracut timeout message 2025-01-17 09:17:20 +08:00
openeuler-ci-bot
5753245537
!393 图形界面安装方式下,快捷键冲突
From: @crawfordxx 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2024-12-07 06:33:04 +00:00
majianhan
3a7a64269e Merge branch 'openEuler-24.03-LTS-SP1' of https://gitee.com/src-openeuler/anaconda into bugfix 2024-12-05 09:53:33 +08:00
openeuler-ci-bot
0cfa92ac0d
!394 skip non-exitent packages continue the installion
From: @sun_hai_10 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2024-12-04 09:18:39 +00:00
majianhan
707f1af75d Fix duplicate alt-D accelerator on root account screen 2024-12-04 15:47:29 +08:00
openeuler-ci-bot
e706cb7eeb
!391 修复网络配置界面显示异常
From: @zhong-wei-shen 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2024-12-04 07:15:08 +00:00
沈仲伟
b1a7d2fddb Fix abnormal display of network configuration interface 2024-11-25 11:25:28 +08:00
sun_hai_10
752acc72dd skip non-exitent packages continue the installion 2024-11-23 19:15:33 +08:00
7 changed files with 231 additions and 129 deletions

View File

@ -1,124 +0,0 @@
diff -Nuar anaconda-33.19.org/pyanaconda/modules/storage/bootloader/factory.py anaconda-33.19.sw/pyanaconda/modules/storage/bootloader/factory.py
--- anaconda-33.19.org/pyanaconda/modules/storage/bootloader/factory.py 2022-09-07 14:50:46.860000000 +0800
+++ anaconda-33.19.sw/pyanaconda/modules/storage/bootloader/factory.py 2022-09-07 14:50:57.380000000 +0800
@@ -106,6 +106,10 @@
platform_class = platform.platform.__class__
# Get the type of the bootloader.
+ if platform_class is platform.Sw_64:
+ from pyanaconda.modules.storage.bootloader.grub2 import GRUB2
+ return GRUB2
+
if platform_class is platform.X86:
from pyanaconda.modules.storage.bootloader.grub2 import GRUB2
return GRUB2
diff -Nuar anaconda-33.19.org/pyanaconda/modules/storage/bootloader/grub2.py anaconda-33.19.sw/pyanaconda/modules/storage/bootloader/grub2.py
--- anaconda-33.19.org/pyanaconda/modules/storage/bootloader/grub2.py 2022-09-07 14:50:46.860000000 +0800
+++ anaconda-33.19.sw/pyanaconda/modules/storage/bootloader/grub2.py 2022-09-07 14:56:42.550000000 +0800
@@ -101,7 +101,7 @@
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-common", "grub2-tools"]
_config_file = "grub.cfg"
_config_dir = "grub2"
_passwd_file = "user.cfg"
@@ -453,16 +453,47 @@
return
try:
- self.write_device_map()
- self.stage2_device.format.sync(root=conf.target.physical_root)
- os.sync()
- self.install()
- os.sync()
- self.stage2_device.format.sync(root=conf.target.physical_root)
+ if os.path.exists("/mnt/sysroot/boot/grub"):
+ FileName="/mnt/sysroot/boot/grub/grub.cfg"
+ f=open(FileName,"w+")
+ f.write("# SW_64 Grub default configurations\n")
+ f.write("set default=0\n")
+ f.write("set timeout=10\n")
+ f.write("\n")
+ f.write("set menu_color_normal=white/black\n")
+ f.write("set menu_color_highlight=light-red/black\n")
+ f.write("\n")
+ f.write("loadfont ${prefix}/fonts/unicode.pf2\n")
+ f.write("insmod efi_gop\n")
+ f.write("set lang=zh_CN\n")
+ f.write("set gfxmode=800x600\n")
+ f.write("set gfxplayload=auto\n")
+ f.write("terminal_output gfxterm\n")
+ f.write("background_color 64,0,64\n")
+ f.write("\n")
+ f.write("menuentry 'openEuler 22.03 LTS SP1' --class gnu-linux --class gnu --class os{\n")
+ f.write("echo \"Loading, please wait for a moment......\"\n")
+ f.write ("set boot=(${root})\n")
+ f.write("echo \"Loading boot\"\n")
+ f.write ("linux.boot ${boot}/initramfs-5.10.0-39.0.0.21.sw_64.img\n")
+ f.write("echo \"Loading vmlinuz\"\n")
+ f.write("linux.vmlinux ${boot}/vmlinuz-5.10.0-39.0.0.21.sw_64 root=/dev/mapper/openeuler-root rootdelay=60 net.ifnames=0 loglevel=0 vga=current rd.systemd.show_status=false rd.udev.log-priority=3 quiet splash video=sm750fb:1280x1024@60 cgroup.memory=nokmem notc\n")
+ f.write("echo \"Booting......\"\n")
+ f.write("boot\n")
+ f.write("}")
+ f.close()
+ else:
+ self.write_device_map()
+ self.stage2_device.format.sync(root=conf.target.physical_root)
+ os.sync()
+ self.install()
+ os.sync()
+ self.stage2_device.format.sync(root=conf.target.physical_root)
finally:
- self.write_config()
- os.sync()
- self.stage2_device.format.sync(root=conf.target.physical_root)
+ pass
+ #self.write_config()
+ #os.sync()
+ #self.stage2_device.format.sync(root=conf.target.physical_root)
def check(self):
"""When installing to the mbr of a disk grub2 needs enough space
diff -Nuar anaconda-33.19.org/pyanaconda/modules/storage/platform.py anaconda-33.19.sw/pyanaconda/modules/storage/platform.py
--- anaconda-33.19.org/pyanaconda/modules/storage/platform.py 2022-09-07 14:50:46.850000000 +0800
+++ anaconda-33.19.sw/pyanaconda/modules/storage/platform.py 2022-09-07 14:50:57.380000000 +0800
@@ -116,6 +116,17 @@
selection fails."""
return self._boot_stage1_missing_error
+class Sw_64(Platform):
+ _boot_stage1_device_types = ["disk"]
+ _boot_mbr_description = N_("Master Boot Record")
+ _boot_descriptions = {"disk": _boot_mbr_description,
+ "partition": Platform._boot_partition_description,
+ "mdarray": Platform._boot_raid_description}
+
+ # XXX hpfs, if reported by blkid/udev, will end up with a type of None
+ _non_linux_format_types = ["vfat", "ntfs", "hpfs"]
+ _boot_stage1_missing_error = N_("You must include at least one MBR- or "
+ "GPT-formatted disk as an install target.")
class X86(Platform):
_boot_stage1_device_types = ["disk"]
@@ -281,6 +292,8 @@
raise SystemError("Unsupported PPC machine type: %s" % ppc_machine)
elif arch.is_s390():
return S390()
+ elif arch.is_sw_64():
+ return Sw_64()
elif arch.is_efi():
if arch.is_mactel():
return MacEFI()
diff -Nuar anaconda-33.19.org/tests/nosetests/pyanaconda_tests/module_bootloader_test.py anaconda-33.19.sw/tests/nosetests/pyanaconda_tests/module_bootloader_test.py
--- anaconda-33.19.org/tests/nosetests/pyanaconda_tests/module_bootloader_test.py 2022-09-07 14:50:46.610000000 +0800
+++ anaconda-33.19.sw/tests/nosetests/pyanaconda_tests/module_bootloader_test.py 2022-09-07 14:50:57.130000000 +0800
@@ -393,6 +393,7 @@
# Test known platforms.
boot_loader_by_platform = {
platform.X86: GRUB2,
+ platform.Sw_64: GRUB2,
platform.EFI: EFIGRUB,
platform.MacEFI: MacEFIGRUB,
platform.PPC: GRUB2,

View File

@ -0,0 +1,99 @@
From 71d07ee8db5f48baad5d1f9cee46bfc194683f43 Mon Sep 17 00:00:00 2001
From: yueyuankun <yueyuankun@kylinoscn>
Date: Thu, 27 Feb 2025 06:20:17 +0000
Subject: [PATCH] add support for sw_64 architecture
---
pyanaconda/modules/storage/bootloader/efi.py | 25 ++++++++++++++++++-
.../modules/storage/bootloader/factory.py | 4 +++
pyanaconda/modules/storage/platform.py | 9 +++++++
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
index 919bb1a..324e2db 100644
--- a/pyanaconda/modules/storage/bootloader/efi.py
+++ b/pyanaconda/modules/storage/bootloader/efi.py
@@ -28,7 +28,7 @@ from pyanaconda.product import productName
from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)
-__all__ = ["EFIBase", "EFIGRUB", "Aarch64EFIGRUB", "ArmEFIGRUB", "MacEFIGRUB", "LOONGARCHEFIGRUB"]
+__all__ = ["EFIBase", "EFIGRUB", "Aarch64EFIGRUB", "ArmEFIGRUB", "MacEFIGRUB", "LOONGARCHEFIGRUB", "SW64EFIGRUB"]
class EFIBase(object):
@@ -194,6 +194,29 @@ class LOONGARCHEFIGRUB(EFIGRUB):
self._add_single_efi_boot_target(parent)
+class SW64EFIGRUB(EFIGRUB):
+ _efi_binary = "grubsw64.efi"
+ stage2_is_valid_stage1 = False
+ stage2_bootable = False
+
+ def __init__(self):
+ super().__init__()
+ self._packages64 = ["grub2-efi-sw64"]
+
+ def remove_efi_boot_target(self):
+ return
+
+ def _add_single_efi_boot_target(self, partition):
+ boot_disk = partition.disk
+ boot_part_num = str(partition.parted_partition.number)
+
+ def add_efi_boot_target(self):
+ if self.stage1_device.type == "partition": # pylint: disable=no-member
+ self._add_single_efi_boot_target(self.stage1_device) # pylint: disable=no-member
+ elif self.stage1_device.type == "mdarray": # pylint: disable=no-member
+ for parent in self.stage1_device.parents: # pylint: disable=no-member
+ self._add_single_efi_boot_target(parent)
+
class ArmEFIGRUB(EFIGRUB):
_serial_consoles = ["ttyAMA", "ttyS"]
_efi_binary = "\\grubarm.efi"
diff --git a/pyanaconda/modules/storage/bootloader/factory.py b/pyanaconda/modules/storage/bootloader/factory.py
index 643f633..be92494 100644
--- a/pyanaconda/modules/storage/bootloader/factory.py
+++ b/pyanaconda/modules/storage/bootloader/factory.py
@@ -118,6 +118,10 @@ class BootLoaderFactory(object):
from pyanaconda.modules.storage.bootloader.efi import LOONGARCHEFIGRUB
return LOONGARCHEFIGRUB
+ if platform_class is platform.SW64EFI:
+ from pyanaconda.modules.storage.bootloader.efi import SW64EFIGRUB
+ return SW64EFIGRUB
+
if platform_class is platform.MacEFI:
from pyanaconda.modules.storage.bootloader.efi import MacEFIGRUB
return MacEFIGRUB
diff --git a/pyanaconda/modules/storage/platform.py b/pyanaconda/modules/storage/platform.py
index 2bb8e41..0b433f8 100644
--- a/pyanaconda/modules/storage/platform.py
+++ b/pyanaconda/modules/storage/platform.py
@@ -295,6 +295,13 @@ class LOONGARCHEFI(EFI):
return ["vfat", "ntfs"]
+class SW64EFI(EFI):
+
+ @property
+ def non_linux_format_types(self):
+ """Format types of devices with non-linux operating systems."""
+ return ["vfat", "ntfs"]
+
class ArmEFI(EFI):
@property
@@ -532,6 +539,8 @@ def get_platform():
return RISCV64EFI()
elif arch.is_loongarch():
return LOONGARCHEFI()
+ elif arch.is_sw_64():
+ return SW64EFI()
else:
return EFI()
elif arch.is_x86():
--
2.43.0

View File

@ -1,7 +1,7 @@
%define _empty_manifest_terminate_build 0
Name: anaconda
Version: 36.16.5
Release: 42
Release: 47
Summary: Graphical system installer
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -12,9 +12,6 @@ Source3: hce.conf
Source4: disable-disk-encryption.patch
Source5: nestos.conf
%ifarch sw_64
Patch6001: anaconda-33.19.sw.patch
%endif
Patch9000: add-passwd-policy.patch
Patch9001: bugfix-GUI-nfs-unknown-error.patch
@ -65,11 +62,17 @@ Patch10000: 0001-add-loongarch-support-for-anaconda.patch
# https://github.com/rhinstaller/anaconda/pull/4235
Patch10001: 0001-check-that-the-password-contains-the-username.patch
Patch10002: anaconda-36.16.5-add-support-for-sw_64.patch
%if ! 0%{?openEuler}
Patch9027: disable-disk-encryption.patch
%endif
Patch9028: bugfix-set-metacity-with-LIBGL_KOPPER_DISABLE-as-yes.patch
Patch9029: bugfix-Fix-abnormal-display-of-network-configuration-interface.patch
Patch9030: bugfix-fix-duplicate-alt-D-accelerator-on-root-account-screen.patch
Patch9031: backport-Fix-wrong-dracut-timeout-message.patch
%define dasbusver 1.3
%define dbusver 1.2.3
@ -326,6 +329,36 @@ update-desktop-database &> /dev/null || :
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Sun Mar 16 2025 yueyuankun <yueyuankun@kylinos.cn> - 36.16.5-47
- Type:update
- ID:NA
- SUG:NA
- DESC: add support for sw_64 architecture
* Thu Jan 16 2025 sunhai <sunhai10@huawei.com> - 36.16.5-46
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Fix wrong dracut timeout message
* Thu Dec 05 2024 majianhan <majianhan@kylinos.cn> - 36.16.5-45
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Fix duplicate alt-D accelerator on root account screen
* Wed Dec 05 2024 sunhai <sunhai10@huawei.com> - 36.16.5-44
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: skip non-exitent packages continue the installion
* Mon Nov 25 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 36.16.5-43
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Fix abnormal display of network configuration interface
* Sat Nov 23 2024 sunhai <sunhai10@huawei.com> - 36.16.5-42
- Type:bugfix
- ID:NA

View File

@ -0,0 +1,44 @@
From 87780c8ba530f10cc4e489c387fc34084f98afee Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Fri, 31 Mar 2023 10:20:27 +0200
Subject: [PATCH] Fix wrong dracut timeout message
We added Anaconda error reporting when Dracut timeout during boot. If
the reason is known issue we will print that to a user. However, in case
it is not known the code failed with message:
... /run/anaconda/initrd_errors.txt: No such file or directory
To fix this just print "Reason unknown" and not execute rest of the
code.
Reference:https://github.com/rhinstaller/anaconda/commit/87780c8ba530f10cc4e489c387fc34084f98afee
Conflict:NA
---
dracut/anaconda-error-reporting.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dracut/anaconda-error-reporting.sh b/dracut/anaconda-error-reporting.sh
index c9cca5cea2e..b410cd667e5 100755
--- a/dracut/anaconda-error-reporting.sh
+++ b/dracut/anaconda-error-reporting.sh
@@ -14,9 +14,13 @@ warn "Please also note that the 'inst.' prefix is now mandatory."
warn "# #"
warn "#### Installer errors encountered during boot: ####"
warn "# #"
-while read -r line; do
- warn "$line"
-done < /run/anaconda/initrd_errors.txt
+if ! [ -e /run/anaconda/initrd_errors.txt ]; then
+ warn "Reason unknown"
+else
+ while read -r line; do
+ warn "$line"
+ done < /run/anaconda/initrd_errors.txt
+fi
warn "# #"
warn "############# Anaconda installer errors end ###############"
--
2.43.0

View File

@ -0,0 +1,25 @@
From 4d58c41562052f4658deaabe45cb2d5b4010613f Mon Sep 17 00:00:00 2001
From: shenzhongwei <shenzhongwei@kylinos.cn>
Date: Tue, 5 Nov 2024 15:06:29 +0800
Subject: [PATCH] Fix abnormal display of network configuration interface
---
po/zh_CN.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 630a6bf..7a73893 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -6243,7 +6243,7 @@ msgstr "我们需要访问网络来获取有关您位置的信息,并向您提
#: pyanaconda/ui/gui/spokes/network.glade:449
#: pyanaconda/ui/gui/spokes/network.glade:2587
msgid "NETWORK & HOST NAME"
-msgstr "网络和主机名(_N)"
+msgstr "网络和主机名"
#: pyanaconda/ui/gui/spokes/network.glade:488
msgid ""
--
2.27.0

View File

@ -111,7 +111,7 @@ index b1f452c..c73f3d9 100644
+ g_include_list,
+ g_exclude_list,
+ self._ignore_broken_packages,
+ self._ignore_missing_packages))
+ True))
# Start the transaction.
log.debug("Starting the transaction process...")

View File

@ -0,0 +1,25 @@
From 92bb076a9f9e5bdfb8d1c2691ef6009bba4fbbe4 Mon Sep 17 00:00:00 2001
From: majianhan <majianhan@kylinos.cn>
Date: Mon, 25 Nov 2024 11:12:04 +0800
Subject: [PATCH] Fix duplicate alt-D accelerator on root account screen
---
pyanaconda/ui/gui/spokes/root_password.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/root_password.glade b/pyanaconda/ui/gui/spokes/root_password.glade
index 53bc90c..e90f301 100644
--- a/pyanaconda/ui/gui/spokes/root_password.glade
+++ b/pyanaconda/ui/gui/spokes/root_password.glade
@@ -94,7 +94,7 @@ The root user (also known as super user) has complete access to the entire syste
<object class="GtkAccelLabel" id="lbDisableBold">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="GUI|Password">_Disable root account</property>
+ <property name="label" translatable="yes" context="GUI|Password">D_isable root account</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="accel_widget">disable_root_radio</property>
--
2.43.0