diff --git a/add-openEuler-password-policy.patch b/add-openEuler-password-policy.patch new file mode 100644 index 0000000..3be8541 --- /dev/null +++ b/add-openEuler-password-policy.patch @@ -0,0 +1,24 @@ +diff -Nur anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/root_password.py anaconda-29.24.7/pyanaconda/ui/gui/spokes/root_password.py +--- anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/root_password.py 2019-01-30 20:34:33.200096820 -0500 ++++ anaconda-29.24.7/pyanaconda/ui/gui/spokes/root_password.py 2019-01-31 02:41:53.530096820 -0500 +@@ -274,7 +274,7 @@ + self.needs_waiver = False + else: + if not self._validity_check.result.success: +- self.can_go_back = True ++ self.can_go_back = False + self.needs_waiver = True + elif not self._ascii_check.result.success: + self.can_go_back = True +diff -Nur anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/user.py anaconda-29.24.7/pyanaconda/ui/gui/spokes/user.py +--- anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/user.py 2019-01-30 20:34:33.200096820 -0500 ++++ anaconda-29.24.7/pyanaconda/ui/gui/spokes/user.py 2019-01-31 02:42:17.751096820 -0500 +@@ -640,7 +640,7 @@ + if not self._confirm_check.result.success: + self.can_go_back = False + if not self._validity_check.result.success: +- self.can_go_back = True ++ self.can_go_back = False + self.needs_waiver = True + elif not self._ascii_check.result.success: + self.can_go_back = True diff --git a/add-password-policy.patch b/add-password-policy.patch new file mode 100644 index 0000000..ff748b3 --- /dev/null +++ b/add-password-policy.patch @@ -0,0 +1,16 @@ +diff -Naur anaconda-21.48.22.134-old/data/interactive-defaults.ks anaconda-21.48.22.134/data/interactive-defaults.ks +--- anaconda-21.48.22.134-old/data/interactive-defaults.ks 2018-11-03 09:06:09.893000000 -0400 ++++ anaconda-21.48.22.134/data/interactive-defaults.ks 2018-11-03 09:07:25.449000000 -0400 +@@ -5,9 +5,9 @@ + + %anaconda + # Default password policies +-pwpolicy root --notstrict --minlen=6 --minquality=1 --nochanges --notempty +-pwpolicy user --notstrict --minlen=6 --minquality=1 --nochanges --emptyok +-pwpolicy luks --notstrict --minlen=6 --minquality=1 --nochanges --notempty ++pwpolicy root --notstrict --minlen=8 --minquality=1 --nochanges --notempty ++pwpolicy user --notstrict --minlen=8 --minquality=1 --nochanges --emptyok ++pwpolicy luks --notstrict --minlen=8 --minquality=1 --nochanges --notempty + # NOTE: This applies only to *fully* interactive installations, partial kickstart + # installations use defaults specified in pyanaconda/pwpolicy.py. + # Automated kickstart installs simply ignore the password policy as the policy diff --git a/anaconda-29.24.7.tar.bz2 b/anaconda-29.24.7.tar.bz2 new file mode 100644 index 0000000..41ca2d1 Binary files /dev/null and b/anaconda-29.24.7.tar.bz2 differ diff --git a/anaconda-add-moreos-install-class.patch b/anaconda-add-moreos-install-class.patch new file mode 100644 index 0000000..233ef94 --- /dev/null +++ b/anaconda-add-moreos-install-class.patch @@ -0,0 +1,63 @@ +diff -uNrp a/pyanaconda/installclasses/more_os_name.py b/pyanaconda/installclasses/more_os_name.py +--- a/pyanaconda/installclasses/more_os_name.py 1970-01-01 08:00:00.000000000 +0800 ++++ b/pyanaconda/installclasses/more_os_name.py 2019-08-23 16:42:14.208000000 +0800 +@@ -0,0 +1,59 @@ ++# ++# more_os_name.py ++# ++# Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License version 2 and ++# only version 2 as published by the Free Software Foundation. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++ ++from pyanaconda.installclass import BaseInstallClass ++from pyanaconda.product import productName ++from pyanaconda import network ++from pyanaconda import nm ++ ++__all__ = ["more_os_nameBaseInstallClass"] ++ ++ ++class more_os_nameBaseInstallClass(BaseInstallClass): ++ name = "more_os_name Linux" ++ sortPriority = 10000 ++ if not productName.startswith("more_os_name"): # pylint: disable=no-member ++ hidden = True ++ defaultFS = "ext4" ++ ++ bootloaderTimeoutDefault = 5 ++ ++ ignoredPackages = ["ntfsprogs"] ++ ++ installUpdates = False ++ ++ _l10n_domain = "comps" ++ ++ efi_dir = "more_os_name" ++ ++ help_placeholder = "" ++ help_placeholder_with_links = "" ++ ++ eula_path = "/usr/share/more_os_name-release/EULA" ++ ++ blivet_gui_supported = False ++ ++ def setNetworkOnbootDefault(self, ksdata): ++ if any(nd.onboot for nd in ksdata.network.network if nd.device): ++ return ++ # choose the device used during installation ++ # (ie for majority of cases the one having the default route) ++ dev = network.default_route_device() or network.default_route_device(family="inet6") ++ if not dev: ++ return ++ # ignore wireless (its ifcfgs would need to be handled differently) ++ if nm.nm_device_type_is_wifi(dev): ++ return ++ network.update_onboot_value(dev, True, ksdata=ksdata) diff --git a/anaconda-add-quiet-cmdline-args-for-x86.patch b/anaconda-add-quiet-cmdline-args-for-x86.patch new file mode 100644 index 0000000..837c0ca --- /dev/null +++ b/anaconda-add-quiet-cmdline-args-for-x86.patch @@ -0,0 +1,25 @@ +From 2cae8055f3d38e071969039ae96ae4696bf5832d Mon Sep 17 00:00:00 2001 +From: root +Date: Thu, 12 Dec 2019 04:21:48 -0500 +Subject: [PATCH] add quiet cmdline args for x86 + +--- + pyanaconda/bootloader.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py +index 4d69e31..e0e93d5 100644 +--- a/pyanaconda/bootloader.py ++++ b/pyanaconda/bootloader.py +@@ -1537,6 +1537,8 @@ class GRUB2(GRUB): + if blivet.arch.is_aarch64(): + log.info("check boot args:%s",arg_str) + arg_str=re.sub("console=[a-zA-Z0-9,]*","",arg_str) ++ else: ++ arg_str+=" quiet" + + log.info("bootloader.py: used boot args: %s ", arg_str) + defaults.write("GRUB_CMDLINE_LINUX=\"%s\"\n" % arg_str) +-- +2.19.1 + diff --git a/anaconda-change-log-localtime-to-gmtime.patch b/anaconda-change-log-localtime-to-gmtime.patch new file mode 100644 index 0000000..5f4b8a9 --- /dev/null +++ b/anaconda-change-log-localtime-to-gmtime.patch @@ -0,0 +1,17 @@ +diff -Nur anaconda-19.31.123-orig/pyanaconda/anaconda_logging.py anaconda-19.31.123/pyanaconda/anaconda_logging.py +--- anaconda-19.31.123-orig/pyanaconda/anaconda_logging.py 2017-10-12 21:46:46.936000000 -0400 ++++ anaconda-19.31.123/pyanaconda/anaconda_logging.py 2017-10-12 21:49:15.310000000 -0400 +@@ -28,4 +28,5 @@ + import sys + import warnings ++import time + + from pyanaconda.flags import flags +@@ -187,6 +187,7 @@ + def __init__(self): + self.loglevel = DEFAULT_LEVEL + self.remote_syslog = None ++ logging.Formatter.converter = time.gmtime + # Rename the loglevels so they are the same as in syslog. + logging.addLevelName(logging.CRITICAL, "CRT") + logging.addLevelName(logging.ERROR, "ERR") diff --git a/anaconda-change-topbar-background-size.patch b/anaconda-change-topbar-background-size.patch new file mode 100644 index 0000000..2318532 --- /dev/null +++ b/anaconda-change-topbar-background-size.patch @@ -0,0 +1,13 @@ +diff -uNrp a/data/anaconda-gtk.css b/data/anaconda-gtk.css +--- a/data/anaconda-gtk.css 2019-08-21 18:50:27.188000000 +0800 ++++ b/data/anaconda-gtk.css 2019-08-21 18:52:23.172000000 +0800 +@@ -112,7 +112,8 @@ levelbar.discrete trough block.filled.hi + AnacondaSpokeWindow #nav-box { + background-color: @fedora; + background-image: url('/usr/share/anaconda/pixmaps/topbar-bg.png'); +- background-repeat: repeat; ++ background-repeat: no-repeat; ++ background-size: 100% 100%; + color: white; + } + diff --git a/anaconda-fix-GUI-nfs-unknown-error.patch b/anaconda-fix-GUI-nfs-unknown-error.patch new file mode 100644 index 0000000..3e9c323 --- /dev/null +++ b/anaconda-fix-GUI-nfs-unknown-error.patch @@ -0,0 +1,13 @@ +--- anaconda-29.24.7/pyanaconda/ui/gui/spokes/installation_source.py ++++ anaconda-29.24.7/pyanaconda/ui/gui/spokes/installation_source.py +@@ -1134,6 +1134,9 @@ + else: + return _("Remote directory is required") + ++ if ":" not in url_string or len(url_string.split(":")) != 2: ++ return _("Server must be specified as SERVER:/PATH") ++ + return InputCheck.CHECK_OK + + def _checkURLEntry(self, inputcheck): + diff --git a/anaconda-fix-hostname-info.patch b/anaconda-fix-hostname-info.patch new file mode 100644 index 0000000..ed3bb8b --- /dev/null +++ b/anaconda-fix-hostname-info.patch @@ -0,0 +1,30 @@ +diff -Nur anaconda-29.24.7.old/po/zh_CN.po anaconda-29.24.7/po/zh_CN.po +--- anaconda-29.24.7.old/po/zh_CN.po 2019-01-31 04:13:38.275096820 -0500 ++++ anaconda-29.24.7/po/zh_CN.po 2019-01-31 04:17:46.997096820 -0500 +@@ -3795,10 +3795,10 @@ + #: pyanaconda/network.py:121 + msgid "" + "Host names can only contain the characters 'a-z', 'A-Z', '0-9', '-', or '.'," +-" parts between periods must contain something and cannot start or end with " +-"'-'." ++" parts between periods must contain something being 63 or fewer " ++"characters and cannot start or end with '-'." + msgstr "" +-"主机名只能包含 'a-z', 'A-Z', '0-9', '-'(英文减号), 或者 '.'(英文点号),其中两个点号中不能为空且不能以'-'开头或结尾" ++"主机名只能包含 'a-z', 'A-Z', '0-9', '-'(英文减号), 或者 '.'(英文点号),其中两个点号中不能为空,必须少于64个字符且不能以'-'开头或结尾" + + #: pyanaconda/network.py:1664 + msgid "Connecting..." +diff -Nur anaconda-29.24.7.old/pyanaconda/network.py anaconda-29.24.7/pyanaconda/network.py +--- anaconda-29.24.7.old/pyanaconda/network.py 2019-01-31 04:13:38.276096820 -0500 ++++ anaconda-29.24.7/pyanaconda/network.py 2019-01-31 04:19:17.918096820 -0500 +@@ -120,8 +120,8 @@ + if not (re.match('^' + HOSTNAME_PATTERN_WITHOUT_ANCHORS + '$', hostname)): + return (False, _("Host names can only contain the characters 'a-z', " + "'A-Z', '0-9', '-', or '.', parts between periods " +- "must contain something and cannot start or end with " +- "'-'.")) ++ "must contain something being 63 or fewer " ++ "characters and cannot start or end with '-'.")) + + return (True, "") diff --git a/anaconda-fix-logo-display-in-low-screen-resolution.patch b/anaconda-fix-logo-display-in-low-screen-resolution.patch new file mode 100644 index 0000000..910b5dd --- /dev/null +++ b/anaconda-fix-logo-display-in-low-screen-resolution.patch @@ -0,0 +1,11 @@ +diff -uNrp a/data/anaconda-gtk.css b/data/anaconda-gtk.css +--- a/data/anaconda-gtk.css 2018-06-08 05:31:59.000000000 +0800 ++++ b/data/anaconda-gtk.css 2019-08-12 20:37:52.544000000 +0800 +@@ -98,6 +98,7 @@ levelbar.discrete trough block.filled.hi + .logo { + background-image: url('/usr/share/anaconda/pixmaps/sidebar-logo.png'); + background-position: 50% 20px; ++ background-size: 90%; + background-repeat: no-repeat; + background-color: transparent; + } diff --git a/anaconda-fix-password-expired.patch b/anaconda-fix-password-expired.patch new file mode 100644 index 0000000..b573a6b --- /dev/null +++ b/anaconda-fix-password-expired.patch @@ -0,0 +1,12 @@ +--- anaconda-29.24.7/pyanaconda/users.py ++++ anaconda-29.24.7/pyanaconda/users.py +@@ -397,7 +397,7 @@ + # Reset sp_lstchg to an empty string. On systems with no rtc, this + # field can be set to 0, which has a special meaning that the password + # must be reset on the next login. +- util.execWithRedirect("chage", ["-R", root, "-d", "", username]) ++ #util.execWithRedirect("chage", ["-R", root, "-d", "", username]) + + def setRootPassword(self, password, isCrypted=False, isLocked=False, algo=None, root="/"): + return self.setUserPassword("root", password, isCrypted, isLocked, algo, root) + diff --git a/anaconda-fix-rnotes-display-in-low-screen-resolution.patch b/anaconda-fix-rnotes-display-in-low-screen-resolution.patch new file mode 100644 index 0000000..f96b646 --- /dev/null +++ b/anaconda-fix-rnotes-display-in-low-screen-resolution.patch @@ -0,0 +1,47 @@ +diff -uNrp a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py +--- a/pyanaconda/ui/gui/hubs/progress.py 2018-07-25 21:58:20.000000000 +0800 ++++ b/pyanaconda/ui/gui/hubs/progress.py 2019-08-12 21:14:11.720000000 +0800 +@@ -21,8 +21,9 @@ import gi + from pyanaconda.core.timer import Timer + + gi.require_version("Gtk", "3.0") ++gi.require_version("GdkPixbuf", "2.0") + +-from gi.repository import Gtk ++from gi.repository import Gtk, GdkPixbuf + + import itertools + import os +@@ -251,6 +252,11 @@ class ProgressHub(Hub): + # An infinite list of the page numbers containing ransom notes images. + self._rnotesPages = itertools.cycle(range(rnotes_start, + self._progressNotebook.get_n_pages())) ++ ++ #resize image when in low resolution ++ self._progressNotebook_width = -1 ++ self._progressNotebook.connect('size_allocate', self.on_allocate, range(rnotes_start, ++ self._progressNotebook.get_n_pages())) + else: + # Add a blank page to the notebook and we'll just cycle to that + # over and over again. +@@ -295,6 +301,20 @@ class ProgressHub(Hub): + + gtk_call_once(self._progressLabel.set_text, message) + ++ def on_allocate(self, notebook, allocation, page_range): ++ request = notebook.get_size_request() ++ if allocation.width >= request.width or allocation.width >= self._progressNotebook_width and self._progressNotebook_width != -1: ++ return ++ self._progressNotebook_width = allocation.width ++ for i in page_range: ++ widget = notebook.get_nth_page(i) ++ image_allocation = widget.get_allocation() ++ pixbuf = widget.get_pixbuf() ++ if pixbuf.get_width() > image_allocation.width: ++ resize_height = image_allocation.width / pixbuf.get_width() * image_allocation.height ++ pixbuf = pixbuf.scale_simple(image_allocation.width, resize_height, GdkPixbuf.InterpType.BILINEAR) ++ widget.set_from_pixbuf(pixbuf) ++ + @async_action_nowait + def _restart_spinner(self): + self._spinner.show() diff --git a/anaconda-hide-help-button.patch b/anaconda-hide-help-button.patch new file mode 100644 index 0000000..ae8a45b --- /dev/null +++ b/anaconda-hide-help-button.patch @@ -0,0 +1,114 @@ +diff -uNrp a/data/tmux.conf b/data/tmux.conf +--- a/data/tmux.conf 2018-06-08 05:31:59.000000000 +0800 ++++ b/data/tmux.conf 2019-09-17 15:05:42.068000000 +0800 +@@ -1,7 +1,6 @@ + # tmux.conf for the anaconda environment + + bind -n M-tab next +-bind -n F1 list-keys + + set-option -s exit-unattached off + set-option -g base-index 1 +@@ -20,7 +19,7 @@ set-option -g history-limit 10000 + # then re-attach to it in the tmux service run on the console tty. + new-session -d -s anaconda -n main "anaconda" + +-set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab | Help: F1 ")' ++set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab ")' + + new-window -d -n shell "bash --login" + new-window -d -n log "tail -F /tmp/anaconda.log" +diff -uNrp a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py +--- a/pyanaconda/ui/gui/__init__.py 2019-09-17 14:58:04.272000000 +0800 ++++ b/pyanaconda/ui/gui/__init__.py 2019-09-17 15:05:42.068000000 +0800 +@@ -438,20 +438,6 @@ class MainWindow(Gtk.Window): + # Return False to indicate that the child allocation is not yet set + return False + +- def _on_mnemonics_visible_changed(self, window, property_type, obj): +- # mnemonics display has been activated or deactivated, +- # add or remove the F1 mnemonics display from the help button +- help_button = obj.window.get_help_button() +- if window.props.mnemonics_visible: +- # save current label +- old_label = help_button.get_label() +- self._saved_help_button_label = old_label +- # add the (F1) "mnemonics" to the help button +- help_button.set_label("%s (F1)" % old_label) +- else: +- # restore the old label +- help_button.set_label(self._saved_help_button_label) +- + def _on_child_added(self, widget, user_data): + # If this is GtkLabel, apply the language attribute + if isinstance(widget, Gtk.Label): +@@ -475,8 +461,6 @@ class MainWindow(Gtk.Window): + old_screen = self._stack.get_visible_child() + if old_screen: + old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F12, 0) +- old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F1, 0) +- old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK) + + # Check if the widget is already on the stack + if child not in self._stack_contents: +@@ -493,17 +477,6 @@ class MainWindow(Gtk.Window): + child.window.add_accelerator("button-clicked", self._accel_group, + Gdk.KEY_F12, 0, 0) + +- # Configure the help button +- child.window.add_accelerator("help-button-clicked", self._accel_group, +- Gdk.KEY_F1, 0, 0) +- child.window.add_accelerator("help-button-clicked", self._accel_group, +- Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK, 0) +- +- # Connect to mnemonics-visible to add the (F1) mnemonic to the button label +- if self._mnemonic_signal: +- self.disconnect(self._mnemonic_signal) +- self._mnemonic_signal = self.connect("notify::mnemonics-visible", self._on_mnemonics_visible_changed, child) +- + self._stack.set_visible_child(child.window) + + if child.focusWidgetName: +diff -uNrp a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c +--- a/widgets/src/BaseWindow.c 2018-06-08 05:31:59.000000000 +0800 ++++ b/widgets/src/BaseWindow.c 2019-09-17 15:08:23.324000000 +0800 +@@ -393,30 +393,11 @@ G_GNUC_END_IGNORE_DEPRECATIONS + gtk_widget_set_margin_top(win->priv->layout_indicator, 6); + gtk_widget_set_margin_bottom(win->priv->layout_indicator, 6); + +- /* Create the help button. */ +- win->priv->help_button = gtk_button_new_with_label(_(HELP_BUTTON_LABEL)); +- gtk_widget_set_halign(win->priv->help_button, GTK_ALIGN_END); +- gtk_widget_set_vexpand(win->priv->help_button, FALSE); +- gtk_widget_set_valign(win->priv->help_button, GTK_ALIGN_END); +- gtk_widget_set_margin_bottom(win->priv->help_button, 6); +- gtk_widget_set_name(win->priv->help_button, "anaconda-help-button"); +- +- atk = gtk_widget_get_accessible(win->priv->help_button); +- atk_object_set_name(atk, _(HELP_BUTTON_LABEL)); +- +- /* Hook up some signals for that button. The signal handlers here will +- * just raise our own custom signals for the whole window. +- */ +- g_signal_connect(win->priv->help_button, "clicked", +- G_CALLBACK(anaconda_base_window_help_button_clicked), win); +- +- + /* Add everything to the nav area. */ + gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->name_label, 0, 0, 1, 1); + gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->distro_label, 1, 0, 2, 1); + gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->beta_label, 1, 1, 1, 1); + gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->layout_indicator, 1, 2, 1, 1); +- gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->help_button, 2, 1, 1, 2); + + /* Last thing for the main_box is a revealer for the info bar */ + win->priv->info_revealer = gtk_revealer_new(); +@@ -832,8 +813,6 @@ void anaconda_base_window_retranslate(An + + gtk_label_set_text(GTK_LABEL(win->priv->beta_label), _(win->priv->orig_beta)); + +- gtk_button_set_label(GTK_BUTTON(win->priv->help_button), _(HELP_BUTTON_LABEL)); +- + /* retranslate the layout indicator */ + anaconda_layout_indicator_retranslate(ANACONDA_LAYOUT_INDICATOR(win->priv->layout_indicator)); + } diff --git a/anaconda-make-name-not-force-to-uppercase.patch b/anaconda-make-name-not-force-to-uppercase.patch new file mode 100644 index 0000000..75bdc33 --- /dev/null +++ b/anaconda-make-name-not-force-to-uppercase.patch @@ -0,0 +1,45 @@ +diff -uNrp a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py +--- a/pyanaconda/ui/gui/hubs/__init__.py 2018-07-25 21:58:20.000000000 +0800 ++++ b/pyanaconda/ui/gui/hubs/__init__.py 2019-08-12 21:24:15.856000000 +0800 +@@ -148,7 +148,7 @@ class Hub(GUIObject, common.Hub): + # From here on, this Spoke will always exist. + spoke = spokeClass(self.data, self.storage, self.payload, self.instclass) + spoke.window.set_beta(self.window.get_beta()) +- spoke.window.set_property("distribution", distributionText().upper()) ++ spoke.window.set_property("distribution", distributionText()) + + # If a spoke is not showable, it is unreachable in the UI. We + # might as well get rid of it. +diff -uNrp a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py +--- a/pyanaconda/ui/gui/__init__.py 2018-06-08 05:31:59.000000000 +0800 ++++ b/pyanaconda/ui/gui/__init__.py 2019-08-12 21:22:19.776000000 +0800 +@@ -829,7 +829,7 @@ class GraphicalUserInterface(UserInterfa + self._currentAction.refresh() + + self._currentAction.window.set_beta(not self._isFinal) +- self._currentAction.window.set_property("distribution", self._distributionText().upper()) ++ self._currentAction.window.set_property("distribution", self._distributionText()) + + # Set some program-wide settings. + settings = Gtk.Settings.get_default() +@@ -995,7 +995,7 @@ class GraphicalUserInterface(UserInterfa + + nextAction.initialize() + nextAction.window.set_beta(self._currentAction.window.get_beta()) +- nextAction.window.set_property("distribution", self._distributionText().upper()) ++ nextAction.window.set_property("distribution", self._distributionText()) + + if not nextAction.showable: + self._currentAction.window.hide() +diff -uNrp a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py +--- a/pyanaconda/ui/gui/spokes/welcome.py 2018-10-09 03:00:59.000000000 +0800 ++++ b/pyanaconda/ui/gui/spokes/welcome.py 2019-08-12 21:23:46.248000000 +0800 +@@ -238,7 +238,7 @@ class WelcomeLanguageSpoke(LangLocaleHan + welcomeLabel = self.builder.get_object("welcomeLabel") + + welcomeLabel.set_text(_("WELCOME TO %(name)s %(version)s.") % +- {"name" : productName.upper(), "version" : productVersion}) # pylint: disable=no-member ++ {"name" : productName, "version" : productVersion}) # pylint: disable=no-member + + # Retranslate the language (filtering) entry's placeholder text + languageEntry = self.builder.get_object("languageEntry") diff --git a/anaconda-modify-interface-is-extended-in-Chinese-mod.patch b/anaconda-modify-interface-is-extended-in-Chinese-mod.patch new file mode 100644 index 0000000..70d6f37 --- /dev/null +++ b/anaconda-modify-interface-is-extended-in-Chinese-mod.patch @@ -0,0 +1,27 @@ +From 463d8440f5e0bdf626be5b652fbe8826924e759b Mon Sep 17 00:00:00 2001 +Date: Mon, 16 Dec 2019 16:20:27 +0800 +Subject: [PATCH] anaconda: modify interface is extended in Chinese mode + +reason:modify interface is extended in Chinese mode + +Change-Id: I037a91028fc14792909efcc8c2946b0cacc78125 +--- + anaconda-29.24.7/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 9b1da8c..c492042 100644 +--- a/po/zh_CN.po ++++ b/po/zh_CN.po +@@ -6062,7 +6062,7 @@ msgstr "搜索方式(_B):" + + #: pyanaconda/ui/gui/spokes/advanced_storage.glade:153 + msgid "Port / Target / LUN #" +-msgstr "端口 / 目标 / 逻辑单位数标示符 (LUN #) " ++msgstr "端口/目标/LUN# " + + #: pyanaconda/ui/gui/spokes/advanced_storage.glade:154 + msgid "Target WWID" +-- +2.19.1 + diff --git a/anaconda-not-acquire-the-lock-of-imp.patch b/anaconda-not-acquire-the-lock-of-imp.patch new file mode 100644 index 0000000..3a4f4bf --- /dev/null +++ b/anaconda-not-acquire-the-lock-of-imp.patch @@ -0,0 +1,20 @@ +diff -uNrp a/pyanaconda/core/util.py b/pyanaconda/core/util.py +--- a/pyanaconda/core/util.py 2018-10-09 03:00:59.000000000 +0800 ++++ b/pyanaconda/core/util.py 2019-09-26 11:09:49.580000000 +0800 +@@ -1354,7 +1354,6 @@ def collect(module_pattern, path, pred): + module_path = None + + try: +- imp.acquire_lock() + (fo, module_path, module_flags) = imp.find_module(mod_name, [path]) + module = sys.modules.get(module_pattern % mod_name) + +@@ -1427,8 +1426,6 @@ def collect(module_pattern, path, pred): + log.error("Failed to import module %s from path %s in collect: %s", mod_name, module_path, imperr) + continue + finally: +- imp.release_lock() +- + if mod_info and mod_info[0]: # pylint: disable=unsubscriptable-object + mod_info[0].close() # pylint: disable=unsubscriptable-object + diff --git a/anaconda-prohibit-press-done-twice.patch b/anaconda-prohibit-press-done-twice.patch new file mode 100644 index 0000000..ddac63d --- /dev/null +++ b/anaconda-prohibit-press-done-twice.patch @@ -0,0 +1,26 @@ +diff -Nur anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/root_password.py anaconda-29.24.7/pyanaconda/ui/gui/spokes/root_password.py +--- anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/root_password.py 2019-01-30 20:34:33.200096820 -0500 ++++ anaconda-29.24.7/pyanaconda/ui/gui/spokes/root_password.py 2019-01-31 01:49:17.967096820 -0500 +@@ -229,8 +229,7 @@ + self.show_warning_message(error_message) + else: + # add suffix for the click twice logic +- self.show_warning_message("{} {}".format(error_message, +- _(constants.PASSWORD_DONE_TWICE))) ++ self.show_warning_message(error_message) + + # check if the spoke can be exited after the latest round of checks + self._check_spoke_exit_conditions(unwaivable_check_failed) +diff -Nur anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/user.py anaconda-29.24.7/pyanaconda/ui/gui/spokes/user.py +--- anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/user.py 2019-01-30 20:34:33.200096820 -0500 ++++ anaconda-29.24.7/pyanaconda/ui/gui/spokes/user.py 2019-01-31 01:48:23.643096820 -0500 +@@ -593,8 +593,7 @@ + self.show_warning_message(error_message) + else: + # add suffix for the click twice logic +- self.show_warning_message("{} {}".format(error_message, +- _(constants.PASSWORD_DONE_TWICE))) ++ self.show_warning_message(error_message) + + # check if the spoke can be exited after the latest round of checks + self._check_spoke_exit_conditions(unwaivable_check_failed) diff --git a/anaconda.spec b/anaconda.spec new file mode 100644 index 0000000..bd6cea2 --- /dev/null +++ b/anaconda.spec @@ -0,0 +1,243 @@ +%define livearches %{ix86} x86_64 +%define _empty_manifest_terminate_build 0 + +Name: anaconda +Version: 29.24.7 +Release: 14 +Summary: Graphical system installer +License: GPLv2+ and MIT +URL: https://fedoraproject.org/wiki/Anaconda +Source0: %{name}-%{version}.tar.bz2 + +Patch6000: anaconda-change-log-localtime-to-gmtime.patch +Patch6001: bugfix-Increase-network-timeout-constant.patch +Patch6002: bugfix-Set-timeout-for-all-session.get-calls.patch +Patch6003: anaconda-not-acquire-the-lock-of-imp.patch + +Patch9000: bugfix-update-network-and-hostname-translation.patch +Patch9001: add-password-policy.patch +Patch9002: bugfix-add-check-url-while-no-network.patch +Patch9003: anaconda-fix-hostname-info.patch +Patch9004: add-openEuler-password-policy.patch +Patch9005: anaconda-prohibit-press-done-twice.patch +Patch9006: change_passwd_min_length_to_8.patch +Patch9007: bugfix-fix-data-encrypt-weak-passphrase-save.patch +Patch9008: bugfix-disable-set-password-without-confirmation.patch +Patch9009: bugfix-set-right-eula-location.patch +Patch9010: bugfix-aarch64-anaconda-do-not-use-console.patch +Patch9011: bugfix-x86-bootloader-install-fail.patch +Patch9012: force-set-root-password.patch +Patch9013: anaconda-fix-logo-display-in-low-screen-resolution.patch +Patch9014: anaconda-fix-rnotes-display-in-low-screen-resolution.patch +Patch9015: anaconda-make-name-not-force-to-uppercase.patch +Patch9016: anaconda-add-moreos-install-class.patch +Patch9017: anaconda-fix-password-expired.patch +Patch9018: anaconda-fix-GUI-nfs-unknown-error.patch +Patch9019: anaconda-change-topbar-background-size.patch +Patch9020: anaconda-hide-help-button.patch +Patch9021: anaconda-add-quiet-cmdline-args-for-x86.patch +Patch9022: anaconda-modify-interface-is-extended-in-Chinese-mod.patch + +BuildRequires: audit-libs-devel libtool gettext-devel >= 0.19.8 gtk3-devel >= 3.22.17 +BuildRequires: gtk-doc gtk3-devel-docs >= 3.22.17 glib2-doc gobject-introspection-devel +BuildRequires: glade-devel libgnomekbd-devel libxklavier-devel >= 5.4 pango-devel +BuildRequires: python3-kickstart >= 3.16-1 python3-devel python3-nose systemd +BuildRequires: rpm-devel >= 4.10.0 libarchive-devel >= 3.0.4 gdk-pixbuf2-devel +BuildRequires: libtimezonemap-devel >= 0.4.1-2 libxml2 + +Requires: anaconda-core = %{version}-%{release} +Requires: anaconda-tui = %{version}-%{release} +Requires: udisks2-iscsi libblockdev-plugins-all realmd isomd5sum kexec-tools +Requires: createrepo_c tmux gdb rsync python3-meh-gui adwaita-icon-theme dracut-live +Requires: tigervnc-server-minimal libxklavier libgnomekbd libtimezonemap xz +Requires: nm-connection-editor keybinder3 anaconda-user-help yelp system-logos +Requires: blivet-gui-runtime python3 dracut dracut-network python3-kickstart + +%ifarch %livearches +BuildRequires: desktop-file-utils +Requires: zenity fcoe-utils +%endif + +Provides: anaconda-gui = %{version}-%{release} +Obsoletes: anaconda-gui < %{version}-%{release} + +Provides: anaconda-widgets = %{version}-%{release} +Obsoletes: anaconda-widgets < %{version}-%{release} + +Provides: anaconda-dracut = %{version}-%{release} +Obsoletes: anaconda-dracut < %{version}-%{release} + +Provides: anaconda-install-env-deps = %{version}-%{release} +Obsoletes: anaconda-install-env-deps < %{version}-%{release} + +%description +The 'anaconda' dracut module handles installer-specific boot tasks and +options. This includes driver disks, kickstarts, and finding the anaconda +runtime on NFS/HTTP/FTP servers or local disks. + +%package core +Summary: Core of the Anaconda installer +Requires: python3-libs python3-dnf >= 3.6.0 python3-blivet >= 1:3.1.0-1 +Requires: python3-blockdev >= 2.1 rpm-python3 >= 4.10.0 python3-productmd +Requires: libreport-anaconda >= 2.0.21-1 libselinux-python3 python3-meh >= 0.23-1 +Requires: python3-pyparted >= 2.5-2 python3-requests python3-requests-file +Requires: python3-requests-ftp python3-kickstart langtable-data >= 0.0.34 +Requires: langtable-python3 >= 0.0.34 util-linux >= 2.15.1 python3-gobject-base +Requires: python3-dbus python3-pwquality python3-systemd python3-pydbus +Requires: cracklib-dicts python3-pytz teamd NetworkManager NetworkManager-libnm +Requires: dhclient kbd chrony python3-ntplib systemd python3-pid +Requires: python3-ordered-set >= 2.0.0 python3-coverage glibc-langpack-en +Requires: anaconda-tui = %{version}-%{release} + +Provides: anaconda-images = %{version}-%{release} +Obsoletes: anaconda-images < %{version}-%{release} + +Provides: anaconda-runtime = %{version}-%{release} +Obsoletes: anaconda-runtime < %{version}-%{release} +Obsoletes: booty <= 0.107-1 + +%ifarch %livearches +Requires: usermode +%endif + +%description core +The anaconda-core package contains the program which was used to install your +system. + +%package tui +Summary: Textual user interface for the Anaconda installer +Requires: anaconda-core = %{version}-%{release} python3-simpleline + +%description tui +This package contains textual user interface for the Anaconda installer. + +%package devel +Summary: Header files for anaconda +Requires: glade %{name} = %{version}-%{release} +Provides: anaconda-widgets-devel = %{version}-%{release} +Obsoletes: anaconda-widgets-devel < %{version}-%{release} + +%description devel +Header files for anaconda + +%prep +%autosetup -n %{name}-%{version} -p1 + +cd pyanaconda/installclasses +sed -i "s/more_os_name/%{efi_vendor}/g" more_os_name.py +mv more_os_name.py %{efi_vendor}.py + +%build +%configure ANACONDA_RELEASE=%{release} +%make_build + +%install +%make_install +%delete_la + +install -d -m 0755 %{buildroot}%{_datadir}/anaconda/addons + +%ifarch %livearches +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/liveinst.desktop +%endif + +%ldconfig_scriptlets + +%ifarch %livearches +%post +update-desktop-database &> /dev/null || : + +%postun +update-desktop-database &> /dev/null || : +%endif + +%files +%defattr(-,root,root) +%doc README +%license COPYING +%{_libdir}/libAnacondaWidgets.so.* +%{_libdir}/girepository*/AnacondaWidgets*typelib +%{python3_sitearch}/gi/overrides/* +%{python3_sitearch}/pyanaconda/ui/gui/* +%{_prefix}/libexec/anaconda/dd_* +%{_prefix}/lib/dracut/modules.d/80%{name}/* + +%files core +%defattr(-,root,root) +%doc README +%license COPYING +%{_sbindir}/anaconda +%{_sbindir}/handle-sshpw +%{_bindir}/instperf +%{_bindir}/analog +%{_bindir}/anaconda-cleanup +%{_bindir}/anaconda-disable-nm-ibft-plugin +%{_libdir}/libAnacondaWidgets.so +%{_prefix}/libexec/anaconda +%{_prefix}/lib/systemd/system-generators/* +%{_unitdir}/* +%{_datadir}/anaconda +%{_datadir}/locale/* +%{python3_sitearch}/pyanaconda +%exclude %{_prefix}/libexec/anaconda/dd_* +%exclude %{_libdir}/libAnacondaWidgets.so +%exclude %{_datadir}/gtk-doc +%exclude %{_datadir}/glade/catalogs/AnacondaWidgets.xml +%exclude %{python3_sitearch}/pyanaconda/rescue.py* +%exclude %{python3_sitearch}/pyanaconda/__pycache__/rescue.* +%exclude %{python3_sitearch}/pyanaconda/ui/gui/* +%exclude %{python3_sitearch}/pyanaconda/ui/tui/* +%ifarch %livearches +%{_sbindir}/liveinst +%{_bindir}/liveinst +%{_libexecdir}/liveinst-setup.sh +%{_datadir}/applications/*.desktop +%{_sysconfdir}/xdg/autostart/*.desktop +%config(noreplace) %{_sysconfdir}/pam.d/* +%config(noreplace) %{_sysconfdir}/security/console.apps/* +%endif + +%files tui +%{python3_sitearch}/pyanaconda/rescue.py +%{python3_sitearch}/pyanaconda/__pycache__/rescue.* +%{python3_sitearch}/pyanaconda/ui/tui/* + +%files devel +%{_libdir}/libAnacondaWidgets.so +%{_includedir}/* +%{_datadir}/glade/catalogs/AnacondaWidgets.xml +%{_datadir}/gtk-doc + +%changelog +* Mon Dec 23 2019 openEuler Buildteam - 29.24.7-14 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:modify the patches + +* Mon Dec 16 2019 openEuler Buildteam - 29.24.7-13 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:modify interface is extended in Chinese mode + +* Thu Dec 12 2019 openEuler Buildteam - 29.24.7-12 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:add quiet cmdline args for x86 + +* Tue Oct 22 2019 openEuler Buildteam - 29.24.7-11 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:add dracut-live packages as requires + +* Mon Oct 21 2019 openEuler Buildteam - 29.24.7-10 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:add anaconda-core and anaconda-tui package + +* Sun Oct 13 2019 openEuler Buildteam - 29.24.7-9 +- Package init diff --git a/bugfix-Increase-network-timeout-constant.patch b/bugfix-Increase-network-timeout-constant.patch new file mode 100644 index 0000000..0b80d0e --- /dev/null +++ b/bugfix-Increase-network-timeout-constant.patch @@ -0,0 +1,39 @@ +From 141c186c027a3a7b21321901bba024cd3a3dc3b7 Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Mon, 12 Aug 2019 10:31:31 +0200 +Subject: [PATCH] Increase network timeout constant + +The original value (45) is not recommended for the use in as timeout for +the requests connection because it's multiple of 3. + +See requests documentation: + +https://3.python-requests.org/user/advanced/#timeouts + +Increase to 46 to make the situation better. + +This unfortunately change also three timeouts in the network.py which +is a side effect but I'm not convinced we want to create a new constant +for just 1 second difference. +--- + pyanaconda/core/constants.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py +index ebc803e6cb..68f7fcb1c0 100644 +--- a/pyanaconda/core/constants.py ++++ b/pyanaconda/core/constants.py +@@ -103,7 +103,11 @@ + GRAPHICAL_TARGET = 'graphical.target' + + # Network +-NETWORK_CONNECTION_TIMEOUT = 45 # in seconds ++ ++# Requests package (where this constant is used) recommends to have timeout slightly ++# above multiple of 3 because of it is default packet re-transmission window. ++# See: https://3.python-requests.org/user/advanced/#timeouts ++NETWORK_CONNECTION_TIMEOUT = 46 # in seconds + NETWORK_CONNECTED_CHECK_INTERVAL = 0.1 # in seconds + + # DBus + diff --git a/bugfix-Set-timeout-for-all-session.get-calls.patch b/bugfix-Set-timeout-for-all-session.get-calls.patch new file mode 100644 index 0000000..a0980b0 --- /dev/null +++ b/bugfix-Set-timeout-for-all-session.get-calls.patch @@ -0,0 +1,90 @@ +From 5ba4ed1d0fb6c8d5109cf2fcc44841ddd485a979 Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Mon, 12 Aug 2019 10:28:37 +0200 +Subject: [PATCH] Set timeout for all session.get calls + +Based on the documentation for python requests library we should always +specify the timeout command to avoid long timeouts. + +See: +https://3.python-requests.org/user/advanced/#timeouts + +Set the timeout parameter to all the calls. + +Reported-by: HangyuTian (github) +--- + pyanaconda/payload/dnfpayload.py | 3 ++- + pyanaconda/payload/__init__.py | 3 ++- + pyanaconda/payload/livepayload.py | 8 +++++--- + 3 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/pyanaconda/payload/dnfpayload.py b/pyanaconda/payload/dnfpayload.py +index 477538e6c6..663387b4e1 100644 +--- a/pyanaconda/payload/dnfpayload.py ++++ b/pyanaconda/payload/dnfpayload.py +@@ -1450,7 +1450,8 @@ def _download_repoMD(self, method): + for url in self._urls: + try: + result = session.get("%s/repodata/repomd.xml" % url, headers=headers, +- proxies=proxies, verify=sslverify) ++ proxies=proxies, verify=sslverify, ++ timeout=constants.NETWORK_CONNECTION_TIMEOUT) + if result.ok: + repomd = result.text + break +--- a/pyanaconda/payload/__init__.py 2018-09-13 23:26:54.000000000 +0800 ++++ b/pyanaconda/payload/__init__.py 2019-08-14 16:41:01.134000000 +0800 +@@ -45,7 +45,7 @@ + + from pyanaconda.core.constants import DRACUT_ISODIR, DRACUT_REPODIR, DD_ALL, DD_FIRMWARE, \ + DD_RPMS, INSTALL_TREE, ISO_DIR, THREAD_STORAGE, THREAD_PAYLOAD, THREAD_PAYLOAD_RESTART, \ +- THREAD_WAIT_FOR_CONNECTING_NM, PayloadRequirementType, GRAPHICAL_TARGET, TEXT_ONLY_TARGET ++ THREAD_WAIT_FOR_CONNECTING_NM, PayloadRequirementType, GRAPHICAL_TARGET, TEXT_ONLY_TARGET, NETWORK_CONNECTION_TIMEOUT + from pyanaconda.modules.common.constants.services import SERVICES + from pykickstart.constants import GROUP_ALL, GROUP_DEFAULT, GROUP_REQUIRED + from pyanaconda.flags import flags +@@ -734,7 +734,8 @@ + def _download_treeinfo_file(self, url, file_name, headers, proxies, verify): + try: + result = self._session.get("%s/%s" % (url, file_name), headers=headers, +- proxies=proxies, verify=verify) ++ proxies=proxies, verify=verify, ++ timeout=NETWORK_CONNECTION_TIMEOUT) + # Server returned HTTP 4XX or 5XX codes + if result.status_code >= 400 and result.status_code < 600: + log.info("Server returned %i code", result.status_code) +diff --git a/pyanaconda/payload/livepayload.py b/pyanaconda/payload/livepayload.py +index 79ad6b4d69..a96e8e7948 100644 +--- a/pyanaconda/payload/livepayload.py ++++ b/pyanaconda/payload/livepayload.py +@@ -47,7 +47,7 @@ + from pyanaconda.payload import ImagePayload, PayloadSetupError, PayloadInstallError + + from pyanaconda.core.constants import INSTALL_TREE, THREAD_LIVE_PROGRESS +-from pyanaconda.core.constants import IMAGE_DIR, TAR_SUFFIX ++from pyanaconda.core.constants import IMAGE_DIR, TAR_SUFFIX, NETWORK_CONNECTION_TIMEOUT + + from pyanaconda.core import util + +@@ -309,7 +309,8 @@ def _setup_url_image(self): + + error = None + try: +- response = self._session.get(self.data.method.url, proxies=self._proxies, verify=True) ++ response = self._session.get(self.data.method.url, proxies=self._proxies, verify=True, ++ timeout=NETWORK_CONNECTION_TIMEOUT) + + # At this point we know we can get the image and what its size is + # Make a guess as to minimum size needed: +@@ -328,7 +328,9 @@ + log.info("Starting image download") + with open(self.image_path, "wb") as f: + ssl_verify = not self.data.method.noverifyssl +- response = self._session.get(self.data.method.url, proxies=self._proxies, verify=ssl_verify, stream=True) ++ response = self._session.get(self.data.method.url, proxies=self._proxies, ++ verify=ssl_verify, stream=True, ++ timeout=NETWORK_CONNECTION_TIMEOUT) + total_length = response.headers.get('content-length') + if total_length is None: # no content length header + # just download the file in one go and fake the progress reporting once done + diff --git a/bugfix-aarch64-anaconda-do-not-use-console.patch b/bugfix-aarch64-anaconda-do-not-use-console.patch new file mode 100644 index 0000000..db5fd55 --- /dev/null +++ b/bugfix-aarch64-anaconda-do-not-use-console.patch @@ -0,0 +1,20 @@ +--- a/pyanaconda/bootloader.py 2019-05-23 19:35:56.260000000 +0800 ++++ b/pyanaconda/bootloader.py 2019-05-23 21:37:08.028000000 +0800 +@@ -1531,8 +1531,15 @@ + # this is going to cause problems for systems containing multiple + # linux installations or even multiple boot entries with different + # boot arguments +- log.info("bootloader.py: used boot args: %s ", self.boot_args) +- defaults.write("GRUB_CMDLINE_LINUX=\"%s\"\n" % self.boot_args) ++ ++ #on aarch64 do not set console=xxx ++ if blivet.arch.is_aarch64(): ++ arg_str = "%s" % self.boot_args ++ log.info("check boot args:%s",arg_str) ++ arg_str=re.sub("console=[a-zA-Z0-9,]*","",arg_str) ++ ++ log.info("bootloader.py: used boot args: %s ", arg_str) ++ defaults.write("GRUB_CMDLINE_LINUX=\"%s\"\n" % arg_str) + defaults.write("GRUB_DISABLE_RECOVERY=\"true\"\n") + #defaults.write("GRUB_THEME=\"/boot/grub2/themes/system/theme.txt\"\n") + defaults.close() diff --git a/bugfix-add-check-url-while-no-network.patch b/bugfix-add-check-url-while-no-network.patch new file mode 100644 index 0000000..0ecb764 --- /dev/null +++ b/bugfix-add-check-url-while-no-network.patch @@ -0,0 +1,13 @@ +diff -Nur anaconda-21.48.22.134.old/pyanaconda/ui/gui/spokes/installation_source.py anaconda-21.48.22.134/pyanaconda/ui/gui/spokes/installation_source.py +--- anaconda-21.48.22.134.old/pyanaconda/ui/gui/spokes/installation_source.py 2018-12-10 08:21:57.762000000 -0500 ++++ anaconda-21.48.22.134/pyanaconda/ui/gui/spokes/installation_source.py 2018-12-10 08:22:51.126000000 -0500 +@@ -1069,9 +1069,6 @@ + + # This method is shared by the checks on urlEntry and repoUrlEntry + def _checkURL(self, inputcheck, combo): +- # Network is not up, don't check urls. +- if not self._network_module.proxy.Connected: +- return InputCheck.CHECK_OK + + # If combo is not set inputcheck holds repo + is_additional_repo = combo is None diff --git a/bugfix-disable-set-password-without-confirmation.patch b/bugfix-disable-set-password-without-confirmation.patch new file mode 100644 index 0000000..404db5f --- /dev/null +++ b/bugfix-disable-set-password-without-confirmation.patch @@ -0,0 +1,14 @@ +diff -Nur anaconda-29.24.7-old/pyanaconda/input_checking.py anaconda-29.24.7/pyanaconda/input_checking.py +--- anaconda-29.24.7-old/pyanaconda/input_checking.py 2018-06-07 17:31:59.000000000 -0400 ++++ anaconda-29.24.7/pyanaconda/input_checking.py 2019-02-25 07:31:26.287338526 -0500 +@@ -472,6 +472,10 @@ + else: + pw_score = 4 + status_text = _(constants.SecretStatus.STRONG.value) ++ ++ #disable set password without confirnation ++ if not error_message and not check_request.password_confirmation: ++ error_message = _(constants.SECRET_CONFIRM_ERROR_GUI[check_request.secret_type]) + + # the policy influences the overall success of the check + # - score 0 & strict == True -> success = False diff --git a/bugfix-fix-data-encrypt-weak-passphrase-save.patch b/bugfix-fix-data-encrypt-weak-passphrase-save.patch new file mode 100644 index 0000000..1dc624e --- /dev/null +++ b/bugfix-fix-data-encrypt-weak-passphrase-save.patch @@ -0,0 +1,12 @@ +diff -Nur anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/lib/passphrase.py anaconda-29.24.7/pyanaconda/ui/gui/spokes/lib/passphrase.py +--- anaconda-29.24.7.old/pyanaconda/ui/gui/spokes/lib/passphrase.py 2019-01-30 20:34:33.204096820 -0500 ++++ anaconda-29.24.7/pyanaconda/ui/gui/spokes/lib/passphrase.py 2019-01-30 21:12:10.449096820 -0500 +@@ -167,7 +167,7 @@ + self._passphrase_good_enough = True + elif len(self._checker.failed_checks) == 1 and self._validity_check in self._checker._failed_checks: + # only the password validity check failed +- if self._checker.policy.strict: ++ if self._checker.policy.strict or self._strength_bar.get_value() < 2: + # this is not fine for the strict password policy + self._passphrase_good_enough = False + else: diff --git a/bugfix-set-right-eula-location.patch b/bugfix-set-right-eula-location.patch new file mode 100644 index 0000000..9eb979d --- /dev/null +++ b/bugfix-set-right-eula-location.patch @@ -0,0 +1,25 @@ +From 22e65d85d4e49ba25cc8f65eb9f74c899ece47ff Mon Sep 17 00:00:00 2001 +From: luochunsheng +Date: Tue, 9 Apr 2019 17:14:23 +0800 +Subject: [PATCH] Subject: [PATCH] set right eula location + +--- + pyanaconda/installclasses/rhel.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py +index 40de99f..e31f909 100644 +--- a/pyanaconda/installclasses/rhel.py ++++ b/pyanaconda/installclasses/rhel.py +@@ -48,7 +48,7 @@ class RHELBaseInstallClass(BaseInstallClass): + help_placeholder_with_links = "rhel_help_placeholder.xml" + help_placeholder_plain_text = "rhel_help_placeholder.txt" + +- eula_path="/usr/share/redhat-release/EULA" ++ eula_path="/usr/share/openEuler-release/EULA" + + mirrors_available = False + +-- +1.8.3.1 + diff --git a/bugfix-update-network-and-hostname-translation.patch b/bugfix-update-network-and-hostname-translation.patch new file mode 100644 index 0000000..47a3ecf --- /dev/null +++ b/bugfix-update-network-and-hostname-translation.patch @@ -0,0 +1,21 @@ +diff -Nuar anaconda-21.48.22.134.bak/po/zh_CN.po anaconda-21.48.22.134/po/zh_CN.po +--- anaconda-21.48.22.134.bak/po/zh_CN.po 2018-11-03 17:59:45.609576566 +0800 ++++ anaconda-21.48.22.134/po/zh_CN.po 2018-11-03 18:00:47.868576566 +0800 +#@@ -788,7 +788,7 @@ +# #: pyanaconda/ui/gui/spokes/network.py:1536 +# msgctxt "GUI|Spoke" +# msgid "_Network & Host Name" +#-msgstr "网络和主机名(_N)" +#+msgstr "网络和主机名" +# +# #: pyanaconda/ui/gui/spokes/network.py:1640 +# #: pyanaconda/ui/gui/spokes/network.py:1658 +@@ -5585,7 +5585,7 @@ + #: pyanaconda/ui/gui/spokes/network.glade:165 + #: pyanaconda/ui/gui/spokes/network.glade:2277 + msgid "NETWORK & HOST NAME" +-msgstr "网络和主机名(_N)" ++msgstr "网络和主机名" + + #: pyanaconda/ui/gui/spokes/network.glade:204 + msgid "" diff --git a/bugfix-x86-bootloader-install-fail.patch b/bugfix-x86-bootloader-install-fail.patch new file mode 100644 index 0000000..ff67cea --- /dev/null +++ b/bugfix-x86-bootloader-install-fail.patch @@ -0,0 +1,13 @@ +diff -Nur anaconda-29.24.7-old/pyanaconda/bootloader.py anaconda-29.24.7/pyanaconda/bootloader.py +--- anaconda-29.24.7-old/pyanaconda/bootloader.py 2019-07-09 22:14:24.800000000 -0400 ++++ anaconda-29.24.7/pyanaconda/bootloader.py 2019-07-09 22:15:17.936000000 -0400 +@@ -1533,8 +1533,8 @@ + # boot arguments + + #on aarch64 do not set console=xxx ++ arg_str = "%s" % self.boot_args + if blivet.arch.is_aarch64(): +- arg_str = "%s" % self.boot_args + log.info("check boot args:%s",arg_str) + arg_str=re.sub("console=[a-zA-Z0-9,]*","",arg_str) + diff --git a/change_passwd_min_length_to_8.patch b/change_passwd_min_length_to_8.patch new file mode 100644 index 0000000..d77866e --- /dev/null +++ b/change_passwd_min_length_to_8.patch @@ -0,0 +1,12 @@ +diff -Nur anaconda-29.24.7.old/pyanaconda/core/constants.py anaconda-29.24.7/pyanaconda/core/constants.py +--- anaconda-29.24.7.old/pyanaconda/core/constants.py 2019-01-30 20:34:33.221096820 -0500 ++++ anaconda-29.24.7/pyanaconda/core/constants.py 2019-01-31 03:37:25.427096820 -0500 +@@ -156,7 +156,7 @@ + PASSPHRASE = "passphrase" + + # Password validation +-SECRET_MIN_LEN = 6 ++SECRET_MIN_LEN = 8 + SECRET_EMPTY_ERROR = { + SecretType.PASSWORD : N_("The password is empty."), + SecretType.PASSPHRASE : N_("The passphrase is empty.") diff --git a/force-set-root-password.patch b/force-set-root-password.patch new file mode 100644 index 0000000..29388a4 --- /dev/null +++ b/force-set-root-password.patch @@ -0,0 +1,27 @@ +diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py +index c2a99fe..d61ae9b 100644 +--- a/pyanaconda/ui/gui/spokes/root_password.py ++++ b/pyanaconda/ui/gui/spokes/root_password.py +@@ -166,7 +166,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler) + + @property + def mandatory(self): +- return not any(user for user in self.data.user.userList if "wheel" in user.groups) ++ return True + + def apply(self): + pw = self.password +diff --git a/pyanaconda/ui/tui/spokes/root_password.py b/pyanaconda/ui/tui/spokes/root_password.py +index 5f3e157..7a83c99 100644 +--- a/pyanaconda/ui/tui/spokes/root_password.py ++++ b/pyanaconda/ui/tui/spokes/root_password.py +@@ -64,8 +64,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalTUISpoke): + + @property + def mandatory(self): +- return not any(user for user in self.data.user.userList +- if "wheel" in user.groups) ++ return True + + @property + def status(self):