Compare commits
10 Commits
7c12285446
...
086b8ea66d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
086b8ea66d | ||
|
|
fc29aad6c5 | ||
|
|
2f263b386d | ||
|
|
607ed5fb8c | ||
|
|
3ea98d1c2b | ||
|
|
38f31603b3 | ||
|
|
5334daf514 | ||
|
|
6d976f1dd1 | ||
|
|
0913963722 | ||
|
|
3ee298c70c |
@ -3,13 +3,14 @@ From: Huang Yang <huangyang@loongson.cn>
|
||||
Date: Thu, 25 Apr 2024 12:14:01 +0000
|
||||
Subject: [PATCH] add loongarch support for anaconda
|
||||
|
||||
Signed-off-by: yueyuankun <yueyuankun@kylinos.cn>
|
||||
---
|
||||
pyanaconda/modules/storage/bootloader/base.py | 9 +++--
|
||||
pyanaconda/modules/storage/bootloader/efi.py | 33 ++++++++++++++++++-
|
||||
pyanaconda/modules/storage/bootloader/efi.py | 35 ++++++++++++++++++-
|
||||
.../modules/storage/bootloader/factory.py | 4 +++
|
||||
.../modules/storage/devicetree/fsset.py | 6 +++-
|
||||
pyanaconda/modules/storage/platform.py | 10 ++++++
|
||||
5 files changed, 57 insertions(+), 5 deletions(-)
|
||||
5 files changed, 59 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/pyanaconda/modules/storage/bootloader/base.py b/pyanaconda/modules/storage/bootloader/base.py
|
||||
index d40086d..191b8af 100644
|
||||
@ -34,7 +35,7 @@ index d40086d..191b8af 100644
|
||||
# Does /usr have its own device? If so, we need to tell dracut
|
||||
usr_device = storage.mountpoints.get("/usr")
|
||||
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
|
||||
index 6135699..96450dc 100644
|
||||
index 5a28676..d2fffd2 100644
|
||||
--- a/pyanaconda/modules/storage/bootloader/efi.py
|
||||
+++ b/pyanaconda/modules/storage/bootloader/efi.py
|
||||
@@ -28,7 +28,7 @@ from pyanaconda.product import productName
|
||||
@ -46,10 +47,10 @@ index 6135699..96450dc 100644
|
||||
|
||||
|
||||
class EFIBase(object):
|
||||
@@ -169,6 +169,37 @@ class Aarch64EFIGRUB(EFIGRUB):
|
||||
super().__init__()
|
||||
@@ -170,6 +170,39 @@ class Aarch64EFIGRUB(EFIGRUB):
|
||||
self._packages64 = ["grub2-efi-aa64", "shim-aa64"]
|
||||
|
||||
|
||||
+class LOONGARCHEFIGRUB(EFIGRUB):
|
||||
+ _efi_binary = "grubloongarch64.efi"
|
||||
+ stage2_is_valid_stage1 = False
|
||||
@ -81,11 +82,13 @@ index 6135699..96450dc 100644
|
||||
+ 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 8aa3afb..2fb9993 100644
|
||||
index 4815685..643f633 100644
|
||||
--- a/pyanaconda/modules/storage/bootloader/factory.py
|
||||
+++ b/pyanaconda/modules/storage/bootloader/factory.py
|
||||
@@ -114,6 +114,10 @@ class BootLoaderFactory(object):
|
||||
@ -124,7 +127,7 @@ index 4db3759..6f85a37 100644
|
||||
if device.format.check and mountpoint == "/":
|
||||
passno = 1
|
||||
diff --git a/pyanaconda/modules/storage/platform.py b/pyanaconda/modules/storage/platform.py
|
||||
index d0aa7ca..3a238f9 100644
|
||||
index 20f2c4d..2bb8e41 100644
|
||||
--- a/pyanaconda/modules/storage/platform.py
|
||||
+++ b/pyanaconda/modules/storage/platform.py
|
||||
@@ -287,6 +287,14 @@ class Aarch64EFI(EFI):
|
||||
@ -142,10 +145,10 @@ index d0aa7ca..3a238f9 100644
|
||||
class ArmEFI(EFI):
|
||||
|
||||
@property
|
||||
@@ -486,6 +494,8 @@ def get_platform():
|
||||
return Aarch64EFI()
|
||||
elif arch.is_arm():
|
||||
@@ -522,6 +530,8 @@ def get_platform():
|
||||
return ArmEFI()
|
||||
elif arch.is_riscv64():
|
||||
return RISCV64EFI()
|
||||
+ elif arch.is_loongarch():
|
||||
+ return LOONGARCHEFI()
|
||||
else:
|
||||
|
||||
81
0001-check-that-the-password-contains-the-username.patch
Normal file
81
0001-check-that-the-password-contains-the-username.patch
Normal file
@ -0,0 +1,81 @@
|
||||
From f5882812416bf30f840b1c683ad8f4bac459a82d Mon Sep 17 00:00:00 2001
|
||||
From: songmingliang <songmingliang@uniontech.com>
|
||||
Date: Tue, 20 Aug 2024 16:04:58 +0800
|
||||
Subject: [PATCH] check that the password contains the username
|
||||
|
||||
---
|
||||
pyanaconda/ui/gui/spokes/root_password.py | 2 ++
|
||||
pyanaconda/ui/tui/spokes/root_password.py | 1 +
|
||||
pyanaconda/ui/tui/spokes/user.py | 1 +
|
||||
pyanaconda/ui/tui/tuiobject.py | 11 +++++++++++
|
||||
4 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py
|
||||
index a9157ab..90eda48 100644
|
||||
--- a/pyanaconda/ui/gui/spokes/root_password.py
|
||||
+++ b/pyanaconda/ui/gui/spokes/root_password.py
|
||||
@@ -101,6 +101,8 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
|
||||
initial_password_confirmation_content=self.password_confirmation,
|
||||
policy_name=PASSWORD_POLICY_ROOT
|
||||
)
|
||||
+ # configure root username for checking
|
||||
+ self.checker.username = "root"
|
||||
# configure the checker for password checking
|
||||
self.checker.secret_type = constants.SecretType.PASSWORD
|
||||
# remove any placeholder texts if either password or confirmation field changes content from initial state
|
||||
diff --git a/pyanaconda/ui/tui/spokes/root_password.py b/pyanaconda/ui/tui/spokes/root_password.py
|
||||
index dfaca4e..2dc39c0 100644
|
||||
--- a/pyanaconda/ui/tui/spokes/root_password.py
|
||||
+++ b/pyanaconda/ui/tui/spokes/root_password.py
|
||||
@@ -151,6 +151,7 @@ class RootPasswordSpoke(NormalTUISpoke):
|
||||
func_args=(algo,)
|
||||
)
|
||||
password_dialog.no_separator = True
|
||||
+ password_dialog.username = "root"
|
||||
self._password = password_dialog.run()
|
||||
|
||||
if self._password is None:
|
||||
diff --git a/pyanaconda/ui/tui/spokes/user.py b/pyanaconda/ui/tui/spokes/user.py
|
||||
index a107063..e914c1c 100644
|
||||
--- a/pyanaconda/ui/tui/spokes/user.py
|
||||
+++ b/pyanaconda/ui/tui/spokes/user.py
|
||||
@@ -148,6 +148,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
|
||||
title=_("Password"),
|
||||
policy_name=PASSWORD_POLICY_USER
|
||||
)
|
||||
+ password_dialog.username = self.user.name
|
||||
if self.user.password:
|
||||
entry = EntryWidget(password_dialog.title, _(PASSWORD_SET))
|
||||
else:
|
||||
diff --git a/pyanaconda/ui/tui/tuiobject.py b/pyanaconda/ui/tui/tuiobject.py
|
||||
index c642931..5a7f9a0 100644
|
||||
--- a/pyanaconda/ui/tui/tuiobject.py
|
||||
+++ b/pyanaconda/ui/tui/tuiobject.py
|
||||
@@ -218,6 +218,15 @@ class PasswordDialog(Dialog):
|
||||
self._process_password = process_func
|
||||
self._func_args = func_args
|
||||
self._dialog_message = message
|
||||
+ self._username = ""
|
||||
+
|
||||
+ @property
|
||||
+ def username(self):
|
||||
+ return self._username
|
||||
+
|
||||
+ @username.setter
|
||||
+ def username(self, new_username):
|
||||
+ self._username = new_username
|
||||
|
||||
def run(self):
|
||||
"""Get password input from user and call setter callback at the end.
|
||||
@@ -259,6 +268,8 @@ class PasswordDialog(Dialog):
|
||||
password_check_request.password = password
|
||||
password_check_request.password_confirmation = ""
|
||||
password_check_request.policy = self._policy
|
||||
+ # configure username for checking
|
||||
+ password_check_request.username = self.username
|
||||
|
||||
# validate the password
|
||||
password_check = input_checking.PasswordValidityCheck()
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%define _empty_manifest_terminate_build 0
|
||||
Name: anaconda
|
||||
Version: 36.16.5
|
||||
Release: 33
|
||||
Release: 38
|
||||
Summary: Graphical system installer
|
||||
License: GPLv2+ and MIT
|
||||
URL: http://fedoraproject.org/wiki/Anaconda
|
||||
@ -52,15 +52,17 @@ Patch6008: backport-module-setup.sh-Don-t-ignore-errors-unbound-variable-and-
|
||||
Patch6009: backport-Fix-the-systemd-generator-for-systemd-253-2165433.patch
|
||||
# https://github.com/rhinstaller/anaconda/pull/5198
|
||||
Patch6010: backport-a-riscv64-enablement-patch-from-upstream.patch
|
||||
# https://github.com/rhinstaller/anaconda/pull/3984
|
||||
Patch6011: backport-Don-t-unnecessarily-use-cat-and-use-grep-E.patch
|
||||
|
||||
Patch9023: bugfix-change-root-and-storage-interface-shows.patch
|
||||
Patch9024: bugfix-revert-Set-default-entry-to-the-BLS-id-instead-of-the-entry-index.patch
|
||||
Patch9025: bugfix-import-new-BlockDev.patch
|
||||
Patch9026: bugfix-fix-custom-storage-chinese-tip.patch
|
||||
|
||||
%ifarch loongarch64
|
||||
Patch10000: 0001-add-loongarch-support-for-anaconda.patch
|
||||
%endif
|
||||
# https://github.com/rhinstaller/anaconda/pull/4235
|
||||
Patch10001: 0001-check-that-the-password-contains-the-username.patch
|
||||
|
||||
|
||||
%define dasbusver 1.3
|
||||
@ -96,7 +98,7 @@ BuildRequires: gsettings-desktop-schemas metacity
|
||||
Requires: anaconda-core = %{version}-%{release}
|
||||
Requires: anaconda-tui = %{version}-%{release}
|
||||
Requires: libblockdev-plugins-all >= %{libblockdevver} realmd isomd5sum >= %{isomd5sumver}
|
||||
Requires: kexec-tools createrepo_c tmux gdb rsync python3-meh-gui >= %{mehver}
|
||||
Requires: kexec-tools createrepo_c tmux rsync python3-meh-gui >= %{mehver}
|
||||
Requires: adwaita-icon-theme python3-kickstart
|
||||
Requires: tigervnc-server-minimal libxklavier >= %{libxklavierver} libgnomekbd
|
||||
Requires: nm-connection-editor keybinder3 system-logos
|
||||
@ -126,11 +128,10 @@ Requires: python3-pyparted >= %{pypartedver} python3-requests python3-requests-f
|
||||
Requires: python3-requests-ftp python3-kickstart >= %{pykickstartver}
|
||||
Requires: python3-langtable >= %{langtablever} util-linux >= %{utillinuxver} python3-gobject-base
|
||||
Requires: python3-dbus python3-pwquality python3-systemd python3-dasbus >= %{dasbusver}
|
||||
Requires: python3-packaging
|
||||
Requires: cracklib-dicts python3-pytz teamd NetworkManager >= %{nmver} NetworkManager-libnm >= %{nmver}
|
||||
Requires: NetworkManager-team kbd chrony systemd python3-pid
|
||||
Requires: kbd chrony systemd python3-pid
|
||||
Requires: python3-ordered-set >= 2.0.0 glibc-langpack-en dbus-daemon
|
||||
Requires: systemd-resolved
|
||||
Recommends: python3-packaging NetworkManager-team systemd-resolved
|
||||
# Required by the systemd service anaconda-fips.
|
||||
Requires: crypto-policies
|
||||
Requires: /usr/bin/update-crypto-policies
|
||||
@ -206,8 +207,8 @@ cp %{SOURCE5} %{SOURCE5}_tmp
|
||||
# install openEuler conf for anaconda
|
||||
%ifarch x86_64
|
||||
sed -i "/^additional_arguments =*/ s/$/ crashkernel=512M/" %{SOURCE1}
|
||||
sed -i "/^additional_arguments =*/ s/$/ panic=3 nmi_watchdog=1/" %{SOURCE2}
|
||||
sed -i "/^additional_arguments =*/ s/$/ panic=3 nmi_watchdog=1/" %{SOURCE3}
|
||||
sed -i "/^additional_arguments =*/ s/$/ panic=3 nmi_watchdog=1 quiet/" %{SOURCE2}
|
||||
sed -i "/^additional_arguments =*/ s/$/ panic=3 nmi_watchdog=1 quiet/" %{SOURCE3}
|
||||
sed -i "/^additional_arguments =*/ s/$/ crashkernel=512M/" %{SOURCE5}
|
||||
%endif
|
||||
|
||||
@ -317,6 +318,39 @@ update-desktop-database &> /dev/null || :
|
||||
%{_prefix}/libexec/anaconda/dd_*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 20 2024 songmingliang <songmingliang@uniontech.com> - 36.16.5-38
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: Fix the root user creation GTK GUI not checking if a password
|
||||
contains the user name.
|
||||
Fix the non-root user creation Text UI not checking if a password
|
||||
contains the user name.
|
||||
|
||||
* Wed Jun 26 2024 sunhai <sunhai10@huawei.com> - 36.16.5-37
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: fix encypt shield
|
||||
|
||||
* Sat Jun 22 2024 sunhai <sunhai10@huawei.com> - 36.16.5-36
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: adjust some requires and config for derived os
|
||||
|
||||
* Wed Jun 19 2024 yueyuankun <yueyuankun@kylinos.cn> - 36.16.5-35
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: fix(anaconda-pre-log-gen): don't unnecessarily use cat and use grep -E
|
||||
|
||||
* Thu May 23 2024 yueyuankun <yueyuankun@kylinos.cn> - 36.16.5-34
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: fix patch10000 cannot be applied on loongarch64
|
||||
|
||||
* Thu May 09 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 36.16.5-33
|
||||
- Type:feature
|
||||
- ID:NA
|
||||
|
||||
30
backport-Don-t-unnecessarily-use-cat-and-use-grep-E.patch
Normal file
30
backport-Don-t-unnecessarily-use-cat-and-use-grep-E.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From ab9b2f98134d99325ac468a7c01ed0e659464f3d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= <oguz@ersen.moe>
|
||||
Date: Sat, 26 Mar 2022 18:32:17 +0000
|
||||
Subject: [PATCH] Don't unnecessarily use cat and use grep -E
|
||||
|
||||
---
|
||||
scripts/anaconda-pre-log-gen | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/scripts/anaconda-pre-log-gen b/scripts/anaconda-pre-log-gen
|
||||
index 30eacc8a3c..0012e076db 100755
|
||||
--- a/scripts/anaconda-pre-log-gen
|
||||
+++ b/scripts/anaconda-pre-log-gen
|
||||
@@ -5,12 +5,8 @@
|
||||
# where the resulting logs will be stored
|
||||
TARGET_DIRECTORY=/tmp/pre-anaconda-logs
|
||||
|
||||
-BOOT_OPTIONS_FILE=/proc/cmdline
|
||||
-
|
||||
-DEBUG_ENABLED=`cat $BOOT_OPTIONS_FILE | egrep -c "\<debug\>|\<inst\.debug\>"`
|
||||
-
|
||||
# do not produce any logs unless debug is enabled
|
||||
-[ $DEBUG_ENABLED == '0' ] && exit 0
|
||||
+grep -E -q "\<debug\>|\<inst\.debug\>" /proc/cmdline || exit 0
|
||||
|
||||
mkdir ${TARGET_DIRECTORY}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -113,8 +113,8 @@ index 3a75565..b9344da 100644
|
||||
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
|
||||
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
|
||||
@@ -544,7 +544,7 @@ class CreateNewPage(BasePage):
|
||||
use_underline=True
|
||||
)
|
||||
self._createBox.attach(label, 0, 6, 2, 1)
|
||||
|
||||
- checkbox = Gtk.CheckButton(label="Encrypt my data.")
|
||||
+ checkbox = Gtk.CheckButton(label=_("Encrypt my data."))
|
||||
|
||||
@ -4,15 +4,16 @@ Date: Wed, 16 Sep 2020 15:28:39 +0800
|
||||
Subject: [PATCH] disable disk encryption
|
||||
|
||||
---
|
||||
pyanaconda/ui/gui/spokes/custom_storage.py | 8 ++++----
|
||||
pyanaconda/ui/gui/spokes/custom_storage.py | 9 +++++----
|
||||
pyanaconda/ui/gui/spokes/lib/accordion.py | 2 --
|
||||
pyanaconda/ui/gui/spokes/storage.py | 7 ++++---
|
||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/pyanaconda/ui/gui/spokes/custom_storage.py b/pyanaconda/ui/gui/spokes/custom_storage.py
|
||||
index 347a0e0..d72e315 100644
|
||||
--- a/pyanaconda/ui/gui/spokes/custom_storage.py
|
||||
+++ b/pyanaconda/ui/gui/spokes/custom_storage.py
|
||||
@@ -796,8 +796,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
|
||||
@@ -796,8 +796,9 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
|
||||
fancy_set_sensitive(self._reformatCheckbox, self._permissions.reformat)
|
||||
|
||||
# Set up the encryption.
|
||||
@ -20,6 +21,7 @@ index 347a0e0..d72e315 100644
|
||||
- fancy_set_sensitive(self._encryptCheckbox, self._permissions.device_encrypted)
|
||||
+ self._encryptCheckbox.set_active(False)
|
||||
+ fancy_set_sensitive(self._encryptCheckbox, False)
|
||||
+ self._encryptCheckbox.set_visible(False)
|
||||
|
||||
self._encryptCheckbox.set_inconsistent(self._request.container_encrypted)
|
||||
text = _("The container is encrypted.") if self._request.container_encrypted else ""
|
||||
@ -41,6 +43,25 @@ index 347a0e0..d72e315 100644
|
||||
self._update_luks_combo()
|
||||
fancy_set_sensitive(self._fsCombo, self._permissions.format_type)
|
||||
self.on_value_changed()
|
||||
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
|
||||
index b9344da..235890f 100644
|
||||
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
|
||||
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
|
||||
@@ -542,7 +542,6 @@ class CreateNewPage(BasePage):
|
||||
wrap=True,
|
||||
use_underline=True
|
||||
)
|
||||
- self._createBox.attach(label, 0, 6, 2, 1)
|
||||
|
||||
checkbox = Gtk.CheckButton(label="Encrypt my data.")
|
||||
checkbox.connect("toggled", encrypted_changed_cb)
|
||||
@@ -552,6 +551,5 @@ class CreateNewPage(BasePage):
|
||||
checkbox.set_hexpand(False)
|
||||
|
||||
label.set_mnemonic_widget(checkbox)
|
||||
- self._createBox.attach(checkbox, 0, 7, 2, 1)
|
||||
|
||||
self.add(self._createBox)
|
||||
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
|
||||
index 9494d6a..b2c0d3e 100644
|
||||
--- a/pyanaconda/ui/gui/spokes/storage.py
|
||||
@ -67,5 +88,5 @@ index 9494d6a..b2c0d3e 100644
|
||||
# Hide the reclaim space checkbox if automatic storage configuration is not used.
|
||||
self._reclaim_revealer.set_reveal_child(
|
||||
--
|
||||
1.8.3.1
|
||||
2.27.0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user