From e764a6d92ccc439874f099847aa6e25d06a747ee Mon Sep 17 00:00:00 2001 From: sun_hai_10 Date: Tue, 15 Nov 2022 16:54:17 +0800 Subject: [PATCH] fix install with tui and gui (cherry picked from commit b7195d0a74b5be05e3d51145eef702b5ba316631) --- anaconda.spec | 8 +++++- ...x-change-gnome-kiosk-to-use-metacity.patch | 28 +++++++++++++++++++ disable-ssh-login-checkbox.patch | 9 +++--- euleros.conf | 23 +++++++++++---- hce.conf | 23 +++++++++++---- openeuler.conf | 21 +++++++++++--- support-use-sm3-crypt-user-password.patch | 2 +- 7 files changed, 93 insertions(+), 21 deletions(-) create mode 100644 bugfix-change-gnome-kiosk-to-use-metacity.patch diff --git a/anaconda.spec b/anaconda.spec index c204f6b..3fec80a 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 36.16.5 -Release: 2 +Release: 3 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -25,6 +25,7 @@ Patch9011: remove-vender-issue-in-netdev.patch Patch9012: Support-configuration-of-additional-boot-arguments.patch Patch9013: support-use-sm3-crypt-user-password.patch Patch9014: bugfix-with-use-local-kickstart-version.patch +Patch9015: bugfix-change-gnome-kiosk-to-use-metacity.patch %define dasbusver 1.3 %define dbusver 1.2.3 @@ -263,6 +264,11 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Tue Nov 15 2022 sunhai - 36.16.5-3 +- ID:NA +- SUG:NA +- DESC: fix install with tui and gui + * Fri Nov 11 2022 sunhai - 36.16.5-2 - ID:NA - SUG:NA diff --git a/bugfix-change-gnome-kiosk-to-use-metacity.patch b/bugfix-change-gnome-kiosk-to-use-metacity.patch new file mode 100644 index 0000000..55dfea1 --- /dev/null +++ b/bugfix-change-gnome-kiosk-to-use-metacity.patch @@ -0,0 +1,28 @@ +From 4de5376d5b1b88d1190476b8d179b677a08fe03c Mon Sep 17 00:00:00 2001 +From: sun_hai_10 +Date: Tue, 15 Nov 2022 15:46:38 +0800 +Subject: [PATCH] change 'gnome-kiosk' to use 'metacity' + +--- + pyanaconda/display.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pyanaconda/display.py b/pyanaconda/display.py +index 880af9c..ddf24fb 100644 +--- a/pyanaconda/display.py ++++ b/pyanaconda/display.py +@@ -192,9 +192,9 @@ def do_startup_x11_actions(): + else: + xdg_data_dirs = datadir + '/window-manager:/usr/share' + +- childproc = util.startProgram(["gnome-kiosk", "--display", ":1", "--sm-disable", "--x11"], ++ childproc = util.startProgram(["metacity", "--display", ":1", "--sm-disable"], + env_add={'XDG_DATA_DIRS': xdg_data_dirs}) +- WatchProcesses.watch_process(childproc, "gnome-kiosk") ++ WatchProcesses.watch_process(childproc, "metacity") + + + def set_x_resolution(runres): +-- +2.23.0 + diff --git a/disable-ssh-login-checkbox.patch b/disable-ssh-login-checkbox.patch index 54227f0..5cbf801 100644 --- a/disable-ssh-login-checkbox.patch +++ b/disable-ssh-login-checkbox.patch @@ -4,18 +4,17 @@ Date: Wed, 1 Jul 2020 18:08:35 +0800 Subject: [PATCH] disable ssh login checkbox --- - pyanaconda/ui/gui/spokes/root_password.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + pyanaconda/ui/gui/spokes/root_password.py | 7 ++++---- + 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py index 1d19380..f2e389d 100644 --- a/pyanaconda/ui/gui/spokes/root_password.py +++ b/pyanaconda/ui/gui/spokes/root_password.py -@@ -79,7 +79,8 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler) - self._password_label = self.builder.get_object("password_label") +@@ -80,6 +80,8 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler) self._enable_root_radio = self.builder.get_object("enable_root_radio") self._disable_root_radio = self.builder.get_object("disable_root_radio") -- self._root_password_ssh_login_override = self.builder.get_object("root_password_ssh_login_override") + self._root_password_ssh_login_override = self.builder.get_object("root_password_ssh_login_override") + self._root_password_ssh_login_override.set_visible(False) + self._root_password_ssh_login_override.set_no_show_all(True) self._revealer = self.builder.get_object("password_revealer") diff --git a/euleros.conf b/euleros.conf index a263f86..1e4c0b7 100644 --- a/euleros.conf +++ b/euleros.conf @@ -1,8 +1,16 @@ -# Anaconda configuration file for EulerOS +# Anaconda configuration file for EulerOS. -[Product] -product_name = EulerOS -variant_name = Server +[Profile] +# Define the profile. +profile_id = EulerOS + +[Profile Detection] +# Match os-release values. +os_id = EulerOS +variant_id = server + +[Installation System] +can_detect_enabled_smt = True [Network] default_on_boot = FIRST_WIRED_WITH_LINK @@ -14,8 +22,13 @@ additional_arguments = crash_kexec_post_notifiers softlockup_panic=1 reserve_kbo [Payload] enable_closest_mirror = True +[Storage] + +[Storage Constraints] +swap_is_recommended = True + [User Interface] blivet_gui_supported = False [License] -eula = "/usr/share/euleros-release/EULA" +eula = /usr/share/euleros-release/EULA diff --git a/hce.conf b/hce.conf index 0ee54ca..d6113b7 100644 --- a/hce.conf +++ b/hce.conf @@ -1,8 +1,16 @@ -# Anaconda configuration file for HCE +# Anaconda configuration file for HCE. -[Product] -product_name = HCE -variant_name = Server +[Profile] +# Define the profile. +profile_id = HCE + +[Profile Detection] +# Match os-release values. +os_id = HCE +variant_id = server + +[Installation System] +can_detect_enabled_smt = True [Network] default_on_boot = FIRST_WIRED_WITH_LINK @@ -14,8 +22,13 @@ additional_arguments = crash_kexec_post_notifiers softlockup_panic=1 reserve_kbo [Payload] enable_closest_mirror = True +[Storage] + +[Storage Constraints] +swap_is_recommended = True + [User Interface] blivet_gui_supported = False [License] -eula = "/usr/share/hce-release/EULA" +eula = /usr/share/hce-release/EULA diff --git a/openeuler.conf b/openeuler.conf index 508d8bc..d3503f9 100644 --- a/openeuler.conf +++ b/openeuler.conf @@ -1,7 +1,15 @@ -# Anaconda configuration file for openEuler +# Anaconda configuration file for openEuler. -[Product] -product_name = openEuler +[Profile] +# Define the profile. +profile_id = openEuler + +[Profile Detection] +# Match os-release values. +os_id = openEuler + +[Installation System] +can_detect_enabled_smt = True [Network] default_on_boot = FIRST_WIRED_WITH_LINK @@ -13,8 +21,13 @@ additional_arguments = [Payload] enable_closest_mirror = True +[Storage] + +[Storage Constraints] +swap_is_recommended = True + [User Interface] blivet_gui_supported = False [License] -eula = "/usr/share/openEuler-release/EULA" +eula = /usr/share/openEuler-release/EULA diff --git a/support-use-sm3-crypt-user-password.patch b/support-use-sm3-crypt-user-password.patch index 5cf4299..9fc3cbe 100644 --- a/support-use-sm3-crypt-user-password.patch +++ b/support-use-sm3-crypt-user-password.patch @@ -112,7 +112,7 @@ index f2e389d..062f59d 100644 if self.root_enabled and self.password: # Set the root password. - self._users_module.SetCryptedRootPassword(crypt_password(self.password)) -+ self._users_module.SetCryptedRootPassword(crypt_password(self.password), algo) ++ self._users_module.SetCryptedRootPassword(crypt_password(self.password, algo)) # Unlock the root account. self._users_module.SetRootAccountLocked(False)