Compare commits

..

10 commits

Author SHA1 Message Date
Adam Williamson
f9ee78e7d4 Backport PR #4125 to fix icon theme problems on KDE 2022-05-19 12:59:34 -07:00
Martin Kolman
206192c576 Fix Packit induced breakage
Looks like the issue plaguing our previous release attempt has not yet
been fixed.
2022-04-12 03:42:23 +02:00
Packit
13da1dcc95 [packit] 36.16.5 upstream release
Upstream tag: anaconda-36.16.5-1
Upstream commit: 9d19c0f0

Signed-off-by: Packit <hello@packit.dev>
2022-04-12 00:45:41 +00:00
Martin Kolman
c825f7c499 36.16.4 upstream release
Upstream tag: anaconda-36.16.4-1
Upstream commit: a760a706

Signed-off-by: Packit <hello@packit.dev>
2022-03-31 14:16:24 +02:00
Martin Kolman
ffe86346f5 36.16.3 upstream release
Upstream tag: anaconda-36.16.3-1
Upstream commit: 56a10d48

Signed-off-by: Packit <hello@packit.dev>
2022-03-30 13:24:09 +02:00
Adam Williamson
72193ddcc0 Add xisxwayland dependency required for keyboard changes 2022-03-16 14:54:51 -07:00
Martin Kolman
9e2a93b5d3 [mkolman] 36.16.2-3 bugfix release
- network: Handle network configuration paths not existing (adamw)
- Don't configure the keyboard in Live environments with XWayland (jkonecny)
- Disable layout_indicator in Anaconda (jkonecny)
- Increase version of the anaconda-widgets (jkonecny)
2022-03-15 17:48:10 +01:00
Martin Kolman
c1f8d22416 [mkolman] 36.16.2-2 bugfix release
- Do not copy resolv.conf to target system at the end of installation (rvykydal)
- Do not copy /etc/resolv.conf to chroot before installation (rvykydal)
2022-03-03 03:16:02 +01:00
Packit Service
c9fa4e0fb2 [packit] 36.16.2 upstream release
Upstream tag: anaconda-36.16.2-1
Upstream commit: de211be8

Signed-off-by: Packit Service <user-cont-team+packit-service@redhat.com>
2022-02-21 20:30:53 +00:00
Packit Service
8687390ab3 [packit] 36.16.1 upstream release
Upstream tag: anaconda-36.16.1-1
Upstream commit: c6e3ba69

Signed-off-by: Packit Service <user-cont-team+packit-service@redhat.com>
2022-02-16 17:12:17 +00:00
20 changed files with 966 additions and 3599 deletions

181
.gitignore vendored
View file

@ -311,179 +311,8 @@
/anaconda-36.14.tar.bz2
/anaconda-36.15.tar.bz2
/anaconda-36.16.tar.bz2
/anaconda-37.1.tar.bz2
/anaconda-37.2.tar.bz2
/anaconda-37.3.tar.bz2
/anaconda-37.4.tar.bz2
/anaconda-37.5.tar.bz2
/anaconda-37.6.tar.bz2
/anaconda-37.7.tar.bz2
/anaconda-37.8.tar.bz2
/anaconda-37.9.tar.bz2
/anaconda-37.10.tar.bz2
/anaconda-37.11.tar.bz2
/anaconda-37.12.tar.bz2
/anaconda-38.1.tar.bz2
/anaconda-38.2.tar.bz2
/anaconda-38.3.tar.bz2
/anaconda-38.4.tar.bz2
/anaconda-38.5.tar.bz2
/anaconda-38.6.tar.bz2
/anaconda-38.7.tar.bz2
/anaconda-38.8.tar.bz2
/anaconda-38.9.tar.bz2
/anaconda-38.10.tar.bz2
/anaconda-38.11.tar.bz2
/anaconda-38.12.tar.bz2
/anaconda-38.13.tar.bz2
/anaconda-38.14.tar.bz2
/anaconda-38.15.tar.bz2
/anaconda-38.17.tar.bz2
/anaconda-38.18.tar.bz2
/anaconda-38.19.tar.bz2
/anaconda-38.20.tar.bz2
/anaconda-38.21.tar.bz2
/anaconda-38.22.tar.bz2
/anaconda-38.23.tar.bz2
/anaconda-39.1.tar.bz2
/anaconda-39.2.tar.bz2
/anaconda-39.3.tar.bz2
/anaconda-39.4.tar.bz2
/anaconda-39.5.tar.bz2
/anaconda-39.6.tar.bz2
/anaconda-39.7.tar.bz2
/anaconda-39.8.tar.bz2
/anaconda-39.9.tar.bz2
/anaconda-39.10.tar.bz2
/anaconda-39.11.tar.bz2
/anaconda-39.12.tar.bz2
/anaconda-39.13.tar.bz2
/anaconda-39.14.tar.bz2
/anaconda-39.15.tar.bz2
/anaconda-39.16.tar.bz2
/anaconda-39.17.tar.bz2
/anaconda-39.18.tar.bz2
/anaconda-39.19.tar.bz2
/anaconda-39.20.tar.bz2
/anaconda-39.21.tar.bz2
/anaconda-39.22.tar.bz2
/anaconda-39.23.tar.bz2
/anaconda-39.24.tar.bz2
/anaconda-39.25.tar.bz2
/anaconda-39.26.tar.bz2
/anaconda-39.27.tar.bz2
/anaconda-39.28.tar.bz2
/anaconda-39.29.tar.bz2
/anaconda-39.30.tar.bz2
/anaconda-39.31.tar.bz2
/anaconda-39.32.tar.bz2
/anaconda-39.33.tar.bz2
/anaconda-40.1.tar.bz2
/anaconda-40.2.tar.bz2
/anaconda-40.3.tar.bz2
/anaconda-40.4.tar.bz2
/anaconda-40.5.tar.bz2
/anaconda-40.6.tar.bz2
/anaconda-40.7.tar.bz2
/anaconda-40.8.tar.bz2
/anaconda-40.9.tar.bz2
/anaconda-40.10.tar.bz2
/anaconda-40.11.tar.bz2
/anaconda-40.12.tar.bz2
/anaconda-40.13.tar.bz2
/anaconda-40.15.tar.bz2
/anaconda-40.17.tar.bz2
/anaconda-40.18.tar.bz2
/anaconda-40.20.tar.bz2
/anaconda-40.21.tar.bz2
/anaconda-41.1.tar.bz2
/anaconda-41.2.tar.bz2
/anaconda-41.6.tar.bz2
/anaconda-41.7.tar.bz2
/anaconda-41.9.tar.bz2
/anaconda-41.13.tar.bz2
/anaconda-41.14.tar.bz2
/anaconda-41.15.tar.bz2
/anaconda-41.17.tar.bz2
/anaconda-41.18.tar.bz2
/anaconda-41.19.tar.bz2
/anaconda-41.20.tar.bz2
/anaconda-41.22.tar.bz2
/anaconda-41.23.tar.bz2
/anaconda-41.24.tar.bz2
/anaconda-41.25.tar.bz2
/anaconda-41.26.tar.bz2
/anaconda-41.27.tar.bz2
/anaconda-41.28.tar.bz2
/anaconda-41.29.tar.bz2
/anaconda-41.30.tar.bz2
/anaconda-41.31.tar.bz2
/anaconda-41.32.tar.bz2
/anaconda-42.1.tar.bz2
/anaconda-42.2.tar.bz2
/anaconda-42.3.tar.bz2
/anaconda-42.4.tar.bz2
/anaconda-42.5.tar.bz2
/anaconda-42.6.tar.bz2
/anaconda-42.7.tar.bz2
/anaconda-42.8.tar.bz2
/anaconda-42.9.tar.bz2
/anaconda-42.10.tar.bz2
/anaconda-42.11.tar.bz2
/anaconda-42.12.tar.bz2
/anaconda-42.13.tar.bz2
/anaconda-42.14.tar.bz2
/anaconda-42.15.tar.bz2
/anaconda-42.16.tar.bz2
/anaconda-42.18.tar.bz2
/anaconda-42.20.tar.bz2
/anaconda-42.21.tar.bz2
/anaconda-42.23.tar.bz2
/anaconda-42.24.tar.bz2
/anaconda-42.26.tar.bz2
/anaconda-43.1.tar.bz2
/anaconda-43.5.tar.bz2
/anaconda-43.6.tar.bz2
/anaconda-43.7.tar.bz2
/anaconda-43.8.tar.bz2
/anaconda-43.9.tar.bz2
/anaconda-43.10.tar.bz2
/anaconda-43.11.tar.bz2
/anaconda-43.12.tar.bz2
/anaconda-43.13.tar.bz2
/anaconda-43.14.tar.bz2
/anaconda-43.15.tar.bz2
/anaconda-43.16.tar.bz2
/anaconda-43.17.tar.bz2
/anaconda-43.18.tar.bz2
/anaconda-43.20.tar.bz2
/anaconda-43.21.tar.bz2
/anaconda-43.22.tar.bz2
/anaconda-43.24.tar.bz2
/anaconda-43.25.tar.bz2
/anaconda-43.28.tar.bz2
/anaconda-43.29.tar.bz2
/anaconda-43.30.tar.bz2
/anaconda-43.31.tar.bz2
/anaconda-43.32.tar.bz2
/anaconda-43.33.tar.bz2
/anaconda-43.34.tar.bz2
/anaconda-43.35.tar.bz2
/anaconda-43.36.tar.bz2
/anaconda-43.37.tar.bz2
/anaconda-43.38.tar.bz2
/anaconda-43.39.tar.bz2
/anaconda-43.40.tar.bz2
/anaconda-43.41.tar.bz2
/anaconda-43.44.tar.bz2
/anaconda-43.46.tar.bz2
/anaconda-44.1.tar.bz2
/anaconda-44.2.tar.bz2
/anaconda-44.4.tar.bz2
/anaconda-44.5.tar.bz2
/anaconda-44.6.tar.bz2
/anaconda-44.7.tar.bz2
/anaconda-44.8.tar.bz2
/anaconda-44.9.tar.bz2
/anaconda-44.10.tar.bz2
/anaconda-44.11.tar.bz2
/anaconda-36.16.1.tar.bz2
/anaconda-36.16.2.tar.bz2
/anaconda-36.16.3.tar.bz2
/anaconda-36.16.4.tar.bz2
/anaconda-36.16.5.tar.bz2

View file

@ -1,20 +1,7 @@
# ======================================
# WARNING!
# THIS FILE IS GENERATED FROM A TEMPLATE
# DO NOT EDIT THIS FILE MANUALLY!
# ======================================
# The template is located in: .packit.yml.j2
specfile_path: anaconda.spec
upstream_package_name: anaconda
upstream_tag_template: anaconda-{version}
upstream_tag_template: anaconda-{version}-1
copy_upstream_release_description: true
downstream_package_name: anaconda
files_to_sync:
- rpmlint.toml
- .packit.yml
srpm_build_deps:
- automake
- autoconf
@ -27,89 +14,53 @@ srpm_build_deps:
- libxklavier-devel
- libarchive-devel
- rpm-devel
- audit-libs-devel
- nss_wrapper
- nodejs-npm
packages:
anaconda-fedora:
specfile_path: anaconda.spec
anaconda-centos:
specfile_path: anaconda.spec
pkg_tool: centpkg
- npm
actions:
post-upstream-clone:
- ./autogen.sh
- ./configure
- sed -i 's/use_cockpit\ 1/use_cockpit 0/g' anaconda.spec
create-archive:
- "make release"
- 'bash -c "ls -1 anaconda-*.tar.bz2"'
jobs:
# Propose downstream (Fedora)
- job: propose_downstream
trigger: release
packages: [anaconda-fedora]
dist_git_branches:
- main
metadata:
dist_git_branches: f36
# Tests on PR (Fedora)
- job: tests
trigger: pull_request
packages: [anaconda-fedora]
targets:
- fedora-rawhide
metadata:
targets:
- f36
# COPR builds on PR (Fedora)
- job: copr_build
trigger: pull_request
packages: [anaconda-fedora]
targets:
- fedora-rawhide
- fedora-eln
metadata:
targets:
- f36
# COPR builds on commit (Fedora): single job with multiple targets (add ELN on main)
- job: copr_build
trigger: commit
packages: [anaconda-fedora]
targets:
- fedora-rawhide
- fedora-eln
branch: main
owner: "@rhinstaller"
project: Anaconda
preserve_project: True
metadata:
targets:
- f36
branch: f36-devel
owner: "@rhinstaller"
project: Anaconda
preserve_project: True
- job: koji_build
- job: copr_build
trigger: commit
packages: [anaconda-fedora]
sidetag_group: anaconda-releases
dist_git_branches:
- fedora-development
allowed_committers:
- m4rtink
- kkoukiou
- rvykydal
- jkonecny
- packit
allowed_pr_authors:
- m4rtink
- kkoukiou
- rvykydal
- jkonecny
- packit
- job: bodhi_update
trigger: koji_build
packages: [anaconda-fedora]
sidetag_group: anaconda-releases
dependencies:
- anaconda-webui
dist_git_branches:
- fedora-development
allowed_builders:
- m4rtink
- kkoukiou
- rvykydal
- jkonecny
- packit
metadata:
targets:
- fedora-latest
branch: f36-devel
owner: "@rhinstaller"
project: Anaconda-devel
preserve_project: True
additional_repos:
- "copr://@storage/blivet-daily"

View file

@ -0,0 +1,57 @@
From 10e197fb5e7db7160b0837eda63b420b523755da Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Thu, 3 Feb 2022 12:13:51 +0100
Subject: [PATCH 1/2] Do not copy resolv.conf to target system at the end of
installation
An /etc/resolv.conf symlink is created on target system by
systemd-resolved in postin rpm script. And if it is not (bug #2018913)
it would be crated during boot of installed system (by systemd-resolved).
The only case where anaconda copying the resolv.conf could have actually
effect would be overwriting /etc/resolv.conf on target system in non-rpm
payload installations (image installations). But even in this case
Anaconda should not interfere into management of /etc/resolv.conf on the
target system. It is a business of either the image creator or a service
on starting installed system (systemd-resolved or NM).
---
pyanaconda/modules/network/installation.py | 12 ------
.../modules/network/test_module_network.py | 37 -------------------
2 files changed, 49 deletions(-)
diff --git a/pyanaconda/modules/network/installation.py b/pyanaconda/modules/network/installation.py
index defd91327c..f46574e6f6 100644
--- a/pyanaconda/modules/network/installation.py
+++ b/pyanaconda/modules/network/installation.py
@@ -98,7 +98,6 @@ class NetworkInstallationTask(Task):
SYSCONF_NETWORK_FILE_PATH = "/etc/sysconfig/network"
ANACONDA_SYSCTL_FILE_PATH = "/etc/sysctl.d/anaconda.conf"
- RESOLV_CONF_FILE_PATH = "/etc/resolv.conf"
NETWORK_SCRIPTS_DIR_PATH = IFCFG_DIR
PREFIXDEVNAME_CONFIG_FILE_PREFIX = "71-net-ifnames-prefix-"
NETWORK_SCRIPTS_CONFIG_FILE_PREFIXES = ("ifcfg-", "keys-", "route-")
@@ -154,7 +153,6 @@ Name={}
self._disable_ipv6_on_system(self._sysroot)
self._copy_device_config_files(self._sysroot)
self._copy_dhclient_config_files(self._sysroot, self._network_ifaces)
- self._copy_resolv_conf(self._sysroot, self._overwrite)
if self._configure_persistent_device_names:
self._copy_prefixdevname_files(self._sysroot)
@@ -217,16 +215,6 @@ Name={}
msg = "Cannot disable ipv6 on the system: {}".format(e.strerror)
raise NetworkInstallationError(msg) from e
- def _copy_resolv_conf(self, root, overwrite):
- """Copy resolf.conf file to target system.
-
- :param root: path to the root of the target system
- :type root: str
- :param overwrite: overwrite existing configuration file
- :type overwrite: bool
- """
- self._copy_file_to_root(root, self.RESOLV_CONF_FILE_PATH, follow_symlinks=False)
-
def _copy_file_to_root(self, root, config_file, overwrite=False, follow_symlinks=True):
"""Copy the file to target system.

View file

@ -1,31 +0,0 @@
From b4b09f54b39b288f326b4734c13d27aa710e69d3 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Mon, 2 Jun 2025 12:28:49 -0700
Subject: [PATCH] Don't pass --no-x11 to gnome-kiosk
This is also gone when mutter is built without X11 support, as
is now the case in Rawhide and ELN, and probably soon in EL 10.
Don't backport this to earlier branches.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pyanaconda/display.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/display.py b/pyanaconda/display.py
index 25a0e15142..20adcf58ff 100644
--- a/pyanaconda/display.py
+++ b/pyanaconda/display.py
@@ -226,8 +226,7 @@ def do_startup_wl_actions(timeout, headless=False, headless_resolution=None):
argv.extend(["--vt", "6"])
# add the generic GNOME Kiosk invocation
- argv.extend(["gnome-kiosk", "--wayland", "--no-x11",
- "--wayland-display", constants.WAYLAND_SOCKET_NAME])
+ argv.extend(["gnome-kiosk", "--wayland", "--wayland-display", constants.WAYLAND_SOCKET_NAME])
# remote access needs gnome-kiosk to start in headless mode
if headless:
--
2.49.0

View file

@ -1,66 +0,0 @@
From c7dce0445423e7386fdc6998a6a8de50a7a39bca Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 9 Oct 2025 10:07:01 -0700
Subject: [PATCH] RebootData: don't allow action to be None
Silverblue installs (and probably others where the kickstart data
does not explicitly specify a reboot action) crash, because
the `RebootData` instance's `action` winds up as `None`, since
this is the default value of `self.action` in
`pykickstart.commands.reboot.F23_Reboot`. Trying to translate
this to a DBus structure with `RebootData.to_structure` fails,
because DBus has no concept of `None`.
To avoid this, let's have the setter convert `None` to `-1`, the
same value we use as a default when initializing the instance.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pyanaconda/modules/common/structures/reboot.py | 5 ++++-
.../modules/runtime/test_module_runtime.py | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/modules/common/structures/reboot.py b/pyanaconda/modules/common/structures/reboot.py
index fd2673b169..cadbfbd01f 100644
--- a/pyanaconda/modules/common/structures/reboot.py
+++ b/pyanaconda/modules/common/structures/reboot.py
@@ -46,7 +46,10 @@ class RebootData(DBusData):
return self._action
@action.setter
- def action(self, value: Int):
+ def action(self, value: Int | None):
+ if value is None:
+ # dbus cannot handle None
+ value = -1
self._action = value
@property
diff --git a/tests/unit_tests/pyanaconda_tests/modules/runtime/test_module_runtime.py b/tests/unit_tests/pyanaconda_tests/modules/runtime/test_module_runtime.py
index 22286e59c1..83d3a123ef 100644
--- a/tests/unit_tests/pyanaconda_tests/modules/runtime/test_module_runtime.py
+++ b/tests/unit_tests/pyanaconda_tests/modules/runtime/test_module_runtime.py
@@ -18,6 +18,7 @@
import unittest
from textwrap import dedent
+from pyanaconda.modules.common.structures.reboot import RebootData
from pyanaconda.modules.runtime.runtime import RuntimeService
from pyanaconda.modules.runtime.runtime_interface import RuntimeInterface
from tests.unit_tests.pyanaconda_tests import check_kickstart_interface
@@ -166,3 +167,12 @@ class RuntimeInterfaceTestCase(unittest.TestCase):
ks_in = "halt --eject\n"
ks_out = "# Halt after installation\nhalt --eject\n"
self._test_kickstart(ks_in, ks_out)
+
+ def test_process_kickstart_with_no_payload(self):
+ """Test all values are ints when reading empty kickstart."""
+ self.interface.ReadKickstart("")
+ assert isinstance(self.module.reboot.action, int)
+ assert isinstance(self.module.reboot.eject, int)
+ assert isinstance(self.module.reboot.kexec, int)
+ # and check we can to_structure it
+ RebootData.to_structure(self.module.reboot)
--
2.51.0

View file

@ -0,0 +1,46 @@
From 427f98963643e7f823f650dab015c80d854aa2d1 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 19 May 2022 09:50:17 -0700
Subject: [PATCH] Specify that we want the Adwaita icon theme
Back in 38556e7e in 2016 when anaconda switched from 'gnome'
icon theme, intending to use 'Adwaita' instead, we dropped the
line that specifically declares what theme anaconda wants to
use. Presumably we expected GTK would always pick Adwaita for
us. However, with GTK 3.24.34, this seems to not reliably happen
on KDE. On KDE images, the breeze icon theme is installed, and
it also provides many of the icons anaconda uses. When running
anaconda on a KDE live image with GTK 3.24.34, we're often seeing
the icons from the breeze theme used instead of the icons from
the Adwaita theme. This happened in 4 out of 4 tests on openQA
prod, 3 out of 4 tests on openQA stg, and 5 out of 5 tests I
ran in a VM myself. I then applied this change directly to the
file in the VM and re-tested another 5 times; all 5 times the
right icons were shown.
I'm not sure why this is suddenly a problem with GTK 3.24.34
when it never was before even though both icon themes have been
in KDE for years, but this seems correct anyway. We definitely
want anaconda to use the Adwaita icons, not ones from any other
theme.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pyanaconda/ui/gui/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index d458b66f14..428f30e744 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -754,6 +754,7 @@ class GraphicalUserInterface(UserInterface):
# Set some program-wide settings.
settings = Gtk.Settings.get_default()
settings.set_property("gtk-font-name", "Cantarell")
+ settings.set_property("gtk-icon-theme-name", "Adwaita")
# Get the path to the application data
data_path = os.environ.get("ANACONDA_DATA", "/usr/share/anaconda")
--
2.36.1

View file

@ -1,139 +0,0 @@
From c6118f65fe3583e1c15c383a8a9c6f5c1989fb22 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 9 Oct 2025 16:51:15 -0700
Subject: [PATCH] pyanaconda: localization: Indicate ASCII support in
get_keyboard_layouts
It is useful to know whether a given keyboard layout supports
ASCII input or not. Immediately, we want to use this in the
webUI keyboard logic, but it may be useful elsewhere too in
future, e.g. to warn the user if they use the Keyboard spoke
to create a configuration with no layout capable of ASCII input.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pyanaconda/localization.py | 11 +++++++++
.../common/structures/keyboard_layout.py | 10 ++++++++
.../modules/localization/localization.py | 2 ++
.../localization/test_module_localization.py | 23 +++++++++++--------
4 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/pyanaconda/localization.py b/pyanaconda/localization.py
index 73415b2511..08a9343463 100644
--- a/pyanaconda/localization.py
+++ b/pyanaconda/localization.py
@@ -489,6 +489,17 @@ def get_common_keyboard_layouts():
return langtable.list_common_keyboards()
+def layout_supports_ascii(layout):
+ """Return a boolean indicating whether the xkb layout (given as
+ e.g. 'en(us)' or 'fr(oss)' or 'ru') can input ASCII characters.
+
+ :return: True for ASCII capable, False for not
+ :rtype: bool
+ :param str layout: layout descriptor string
+ """
+ return langtable.supports_ascii(layout)
+
+
def get_locale_timezones(locale):
"""Function returning preferred timezones for the given locale.
diff --git a/pyanaconda/modules/common/structures/keyboard_layout.py b/pyanaconda/modules/common/structures/keyboard_layout.py
index b5aacc764b..007e975965 100644
--- a/pyanaconda/modules/common/structures/keyboard_layout.py
+++ b/pyanaconda/modules/common/structures/keyboard_layout.py
@@ -29,6 +29,7 @@ class KeyboardLayout(DBusData):
def __init__(self):
self._layout_id = ""
self._description = ""
+ self._supports_ascii = False
self._is_common = False
self._langs = []
@@ -59,6 +60,15 @@ class KeyboardLayout(DBusData):
def is_common(self, value: bool):
self._is_common = value
+ @property
+ def supports_ascii(self) -> bool:
+ """Return whether the layout is capable of typing ASCII characters."""
+ return self._supports_ascii
+
+ @supports_ascii.setter
+ def supports_ascii(self, value: bool):
+ self._supports_ascii = value
+
@property
def langs(self) -> List[Str]:
"""Return the list of associated languages."""
diff --git a/pyanaconda/modules/localization/localization.py b/pyanaconda/modules/localization/localization.py
index 346a55a1c0..4fb7333ed7 100644
--- a/pyanaconda/modules/localization/localization.py
+++ b/pyanaconda/modules/localization/localization.py
@@ -33,6 +33,7 @@ from pyanaconda.localization import (
get_language_id,
get_language_locales,
get_native_name,
+ layout_supports_ascii,
)
from pyanaconda.modules.common.base import KickstartService
from pyanaconda.modules.common.constants.services import LOCALIZATION
@@ -218,6 +219,7 @@ class LocalizationService(KickstartService):
layout.description = self.get_layout_variant_description(name, with_lang=True, xlated=True)
layout.is_common = name.replace(" ", "") in common_langtable_keyboards and is_common_lang
layout.langs = info.langs
+ layout.supports_ascii = layout_supports_ascii(name.replace(" ", ""))
layouts.append(layout)
return layouts
diff --git a/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py b/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py
index 7f6449d3ea..7582df2401 100644
--- a/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py
+++ b/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py
@@ -228,28 +228,31 @@ class LocalizationInterfaceTestCase(unittest.TestCase):
normalized_layouts = KeyboardLayout.from_structure_list(layouts)
layouts_expectation = [
- ("ara (olpc)", "Arabic (OLPC)", "Arabic", False),
- ("cz", "Czech", "Czech", False),
- ("de (nodeadkeys)", "German (no dead keys)", "German", True),
- ("es", "Spanish", "Spanish; Castilian", True),
- ("fr (oss)", "French (alt.)", "French", True),
- ("gr", "Greek", "Greek, Modern (1453-); Greek", False),
- ("it", "Italian", "Italian", False),
- ("jp", "Japanese", "Japanese", True),
- ("us", "English (US)", "English", True),
+ ("ara (olpc)", "Arabic (OLPC)", "Arabic", False, True),
+ ("cz", "Czech", "Czech", False, True),
+ ("de (nodeadkeys)", "German (no dead keys)", "German", True, True),
+ ("es", "Spanish", "Spanish; Castilian", True, True),
+ ("fr (oss)", "French (alt.)", "French", True, True),
+ ("gr", "Greek", "Greek, Modern (1453-); Greek", False, False),
+ ("it", "Italian", "Italian", False, True),
+ ("jp", "Japanese", "Japanese", True, True),
+ ("us", "English (US)", "English", True, True),
+ ("ru (dos)", "Russian (DOS)", "Russian", False, False),
]
- for layout_id, description, lang, is_common in layouts_expectation:
+ for layout_id, description, lang, is_common, supports_ascii in layouts_expectation:
layout = KeyboardLayout()
layout.layout_id = layout_id
layout.description = description
layout.is_common = is_common
+ layout.supports_ascii = supports_ascii
layout.langs = [lang]
gen = (normalized_layout for normalized_layout in normalized_layouts if layout.layout_id == normalized_layout.layout_id)
for normalized_layout in gen:
assert layout.description == normalized_layout.description
assert layout.is_common == normalized_layout.is_common
+ assert layout.supports_ascii == normalized_layout.supports_ascii
assert layout.langs == normalized_layout.langs
break
else:
--
2.51.0

View file

@ -0,0 +1,133 @@
From 279328cd3231b972cc32c241aa45e5df20b0e947 Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Tue, 22 Feb 2022 11:55:16 +0100
Subject: [PATCH 2/2] Do not copy /etc/resolv.conf to chroot before
installation
It does not seem to make sense anymore given systemd-resolved is
creating its own symlink in rpm postin script that rewrites the file.
(see rhbz#2018913, rhbz#2032085)
---
pyanaconda/core/configuration/system.py | 5 -----
pyanaconda/installation.py | 25 -------------------------
pyanaconda/network.py | 24 ++----------------------
3 files changed, 2 insertions(+), 52 deletions(-)
diff --git a/pyanaconda/core/configuration/system.py b/pyanaconda/core/configuration/system.py
index 85560280b9..9ff8b77ba4 100644
--- a/pyanaconda/core/configuration/system.py
+++ b/pyanaconda/core/configuration/system.py
@@ -171,8 +171,3 @@ class SystemSection(Section):
def provides_system_bus(self):
"""Can we access the system DBus?"""
return self._is_boot_iso or self._is_live_os or self._is_booted_os
-
- @property
- def provides_resolver_config(self):
- """Can we copy /etc/resolv.conf to the target system?"""
- return self._is_boot_iso
diff --git a/pyanaconda/installation.py b/pyanaconda/installation.py
index 95b63c1c8c..bcd201188f 100644
--- a/pyanaconda/installation.py
+++ b/pyanaconda/installation.py
@@ -45,25 +45,6 @@ log = get_module_logger(__name__)
__all__ = ["run_installation"]
-class WriteResolvConfTask(Task):
- """Custom task subclass for handling the resolv.conf copy task.
-
- The main reason is to resolve the sysroot path right before the
- copy operation, not at task & task queue creation time.
-
- Secondary reason is to demonstrate how a lightweight Task subclass can be used.
- """
-
- def run_task(self):
- """Resolve the sysroot path only right before doing the copy operation.
-
- If we just added the sysroot path as an argument, it would be resolved when the
- task queue was created, not when the task is actually executed, which could
- theoretically result in an incorrect path.
- """
- network.copy_resolv_conf_to_root(conf.target.system_root)
-
-
def _writeKS(ksdata):
path = conf.target.system_root + "/root/anaconda-ks.cfg"
@@ -309,12 +290,6 @@ def _prepare_installation(payload, ksdata):
# - check for possibly needed additional packages.
pre_install = TaskQueue("Pre install tasks", N_("Running pre-installation tasks"))
- # make name resolution work for rpm scripts in chroot
- if conf.system.provides_resolver_config:
- # we use a custom Task subclass as the sysroot path has to be resolved
- # only when the task is actually started, not at task creation time
- pre_install.append(WriteResolvConfTask("Copy resolv.conf to sysroot"))
-
if is_module_available(SECURITY):
security_proxy = SECURITY.get_proxy()
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index d5fd6e2add..38fe957104 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -16,10 +16,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import shutil
import socket
import itertools
-import os
import time
import threading
import re
@@ -31,7 +29,6 @@ from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.core import util, constants
from pyanaconda.core.i18n import _
from pyanaconda.core.kernel import kernel_arguments
-from pyanaconda.core.path import make_directories
from pyanaconda.core.regexes import HOSTNAME_PATTERN_WITHOUT_ANCHORS, \
IPV6_ADDRESS_IN_DRACUT_IP_OPTION, MAC_OCTET
from pyanaconda.core.configuration.anaconda import conf
@@ -56,9 +53,8 @@ _nm_client = None
__all__ = ["get_supported_devices", "status_message", "wait_for_connectivity",
"wait_for_connecting_NM_thread", "wait_for_network_devices", "wait_for_connected_NM",
- "initialize_network", "copy_resolv_conf_to_root", "prefix_to_netmask",
- "netmask_to_prefix", "get_first_ip_address", "is_valid_hostname", "check_ip_address",
- "get_nm_client", "write_configuration"]
+ "initialize_network", "prefix_to_netmask", "netmask_to_prefix", "get_first_ip_address",
+ "is_valid_hostname", "check_ip_address", "get_nm_client", "write_configuration"]
def get_nm_client():
@@ -218,22 +214,6 @@ def iface_for_host_ip(host_ip):
return route_info[route_info.index("dev") + 1]
-def copy_resolv_conf_to_root(root="/"):
- """Copy resolv.conf to a system root."""
- src = "/etc/resolv.conf"
- dst = os.path.join(root, src.lstrip('/'))
- if not os.path.isfile(src):
- log.debug("%s does not exist", src)
- return
- if os.path.isfile(dst):
- log.debug("%s already exists", dst)
- return
- dst_dir = os.path.dirname(dst)
- if not os.path.isdir(dst_dir):
- make_directories(dst_dir)
- shutil.copyfile(src, dst)
-
-
def run_network_initialization_task(task_path):
"""Run network initialization task and log the result."""
task_proxy = NETWORK.get_proxy(task_path)
--
2.35.1

View file

@ -0,0 +1,50 @@
From 5e380c4f30b4a8dc0e4670ff029180128d6a5acd Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 8 Mar 2022 16:10:30 -0800
Subject: [PATCH 3/6] network: Handle network configuration paths not existing
When installing network configuration files, we shouldn't assume
that the relevant paths (network-scripts and system-connections)
actually exist, they don't have to. NetworkManager has split
/etc/sysconfig/network-scripts off into a subpackage that is
no longer installed by default. We guarded against this in
`get_config_files_paths` already, but not in
`_copy_device_config_files`.
(cherry picked from commit dfdc075052b06437b261dc3d5e3ceb4265a28ded)
---
pyanaconda/modules/network/installation.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/modules/network/installation.py b/pyanaconda/modules/network/installation.py
index f46574e6f6..3ac65e0df0 100644
--- a/pyanaconda/modules/network/installation.py
+++ b/pyanaconda/modules/network/installation.py
@@ -240,15 +240,17 @@ Name={}
:param root: path to the root of the target system
:type root: str
"""
- for config_file in os.listdir(self.NETWORK_SCRIPTS_DIR_PATH):
- if config_file.startswith(self.NETWORK_SCRIPTS_CONFIG_FILE_PREFIXES):
- config_file_path = os.path.join(self.NETWORK_SCRIPTS_DIR_PATH,
+ if os.path.exists(self.NETWORK_SCRIPTS_DIR_PATH):
+ for config_file in os.listdir(self.NETWORK_SCRIPTS_DIR_PATH):
+ if config_file.startswith(self.NETWORK_SCRIPTS_CONFIG_FILE_PREFIXES):
+ config_file_path = os.path.join(self.NETWORK_SCRIPTS_DIR_PATH,
+ config_file)
+ self._copy_file_to_root(root, config_file_path)
+ if os.path.exists(self.NM_SYSTEM_CONNECTIONS_DIR_PATH):
+ for config_file in os.listdir(self.NM_SYSTEM_CONNECTIONS_DIR_PATH):
+ config_file_path = os.path.join(self.NM_SYSTEM_CONNECTIONS_DIR_PATH,
config_file)
self._copy_file_to_root(root, config_file_path)
- for config_file in os.listdir(self.NM_SYSTEM_CONNECTIONS_DIR_PATH):
- config_file_path = os.path.join(self.NM_SYSTEM_CONNECTIONS_DIR_PATH,
- config_file)
- self._copy_file_to_root(root, config_file_path)
def _copy_dhclient_config_files(self, root, network_ifaces):
"""Copy dhclient configuration files to target system.
--
2.35.1

View file

@ -0,0 +1,282 @@
From 572606437f9eebe9640acc3396a0e8eaf74869c7 Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Mon, 14 Mar 2022 13:31:55 +0100
Subject: [PATCH 4/6] Don't configure the keyboard in Live environments with
XWayland
Call the can_configure_keyboard function to check if we can configure the
keyboard. The function doesn't allow the configuration in Live environments
that run Anaconda on XWayland. Use the xisxwayland tool for detection.
Related: rhbz#2016613
(cherry picked from commit e24a1ba6d97481ac81fbfa492f58d9d7e74355b9)
---
anaconda.spec.in | 1 +
pyanaconda/core/configuration/system.py | 5 ++
pyanaconda/keyboard.py | 48 +++++++++++++++-
pyanaconda/ui/gui/__init__.py | 1 +
pyanaconda/ui/gui/spokes/keyboard.py | 13 ++---
.../pyanaconda_tests/test_keyboard.py | 56 ++++++++++++++++++-
6 files changed, 114 insertions(+), 10 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 57f216f14c..fadc83d858 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -157,6 +157,7 @@ BuildRequires: desktop-file-utils
Requires: anaconda-gui = %{version}-%{release}
Requires: usermode
Requires: zenity
+Requires: xisxwayland
Recommends: xhost
%description live
diff --git a/pyanaconda/core/configuration/system.py b/pyanaconda/core/configuration/system.py
index 9ff8b77ba4..37fd50ce91 100644
--- a/pyanaconda/core/configuration/system.py
+++ b/pyanaconda/core/configuration/system.py
@@ -127,6 +127,11 @@ class SystemSection(Section):
"""Can we configure the keyboard?"""
return self._is_boot_iso or self._is_live_os or self._is_booted_os
+ @property
+ def can_run_on_xwayland(self):
+ """Could we run on XWayland?"""
+ return self._is_live_os
+
@property
def can_modify_syslog(self):
"""Can we modify syslog?"""
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 3ab47bc420..10b7e56920 100644
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -26,6 +26,7 @@ import langtable
from pyanaconda.core.configuration.anaconda import conf
from pyanaconda import localization
from pyanaconda.core.constants import DEFAULT_KEYBOARD
+from pyanaconda.core.util import execWithRedirect
from pyanaconda.modules.common.task import sync_run_task
from pyanaconda.modules.common.constants.services import LOCALIZATION
@@ -55,6 +56,49 @@ class InvalidLayoutVariantSpec(Exception):
pass
+def _is_xwayland():
+ """Is Anaconda running in XWayland environment?
+
+ This can't be easily detected from the Anaconda because Anaconda
+ is running as XWayland app. Use xisxwayland tool for the detection.
+ """
+ try:
+ rc = execWithRedirect('xisxwayland', [])
+
+ if rc == 0:
+ return True
+
+ log.debug(
+ "Anaconda doesn't run on XWayland. "
+ "See xisxwayland --help for more info."
+ )
+ except FileNotFoundError:
+ log.warning(
+ "The xisxwayland tool is not available! "
+ "Taking the environment as not Wayland."
+ )
+
+ return False
+
+
+def can_configure_keyboard():
+ """Can we configure the keyboard?
+
+ FIXME: This is a temporary solution.
+
+ The is_wayland logic is not part of the configuration so we would
+ have to add it to the configuration otherwise it won't be accessible
+ in the Anaconda modules.
+ """
+ if not conf.system.can_configure_keyboard:
+ return False
+
+ if conf.system.can_run_on_xwayland and _is_xwayland():
+ return False
+
+ return True
+
+
def parse_layout_variant(layout_variant_str):
"""
Parse layout and variant from the string that may look like 'layout' or
@@ -180,7 +224,7 @@ def set_x_keyboard_defaults(localization_proxy, xkl_wrapper):
new_layouts = [DEFAULT_KEYBOARD]
localization_proxy.SetXLayouts(new_layouts)
- if conf.system.can_configure_keyboard:
+ if can_configure_keyboard():
xkl_wrapper.replace_layouts(new_layouts)
# the console layout configured should be "native" by default,
@@ -193,7 +237,7 @@ def set_x_keyboard_defaults(localization_proxy, xkl_wrapper):
# initialize layout switching if needed
localization_proxy.SetLayoutSwitchOptions(["grp:alt_shift_toggle"])
- if conf.system.can_configure_keyboard:
+ if can_configure_keyboard():
xkl_wrapper.set_switching_options(["grp:alt_shift_toggle"])
# activate the language-default layout instead of the additional
# one
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index fc95721f97..5b95ee99ac 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -41,6 +41,7 @@ from pyanaconda.core.path import make_directories
from pyanaconda import threading as anaconda_threading
from pyanaconda.core.glib import Bytes, GError
+from pyanaconda.keyboard import can_configure_keyboard
from pyanaconda.ui import UserInterface, common
from pyanaconda.ui.gui.utils import unbusyCursor
from pyanaconda.core.async_utils import async_action_wait
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index fe7c225719..a32dab0696 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -33,7 +33,6 @@ from pyanaconda.ui.gui.xkl_wrapper import XklWrapper, XklWrapperError
from pyanaconda import keyboard
from pyanaconda import flags
from pyanaconda.core.i18n import _, N_, CN_
-from pyanaconda.core.configuration.anaconda import conf
from pyanaconda.core.constants import DEFAULT_KEYBOARD, THREAD_KEYBOARD_INIT, THREAD_ADD_LAYOUTS_INIT
from pyanaconda.ui.communication import hubQ
from pyanaconda.core.string import strip_accents, have_word_match
@@ -381,7 +380,7 @@ class KeyboardSpoke(NormalSpoke):
self._add_dialog = AddLayoutDialog(self.data)
self._add_dialog.initialize()
- if conf.system.can_configure_keyboard:
+ if keyboard.can_configure_keyboard():
self.builder.get_object("warningBox").hide()
# We want to store layouts' names but show layouts as
@@ -401,7 +400,7 @@ class KeyboardSpoke(NormalSpoke):
self._layoutSwitchLabel = self.builder.get_object("layoutSwitchLabel")
- if not conf.system.can_configure_keyboard:
+ if not keyboard.can_configure_keyboard():
# Disable area for testing layouts as we cannot make
# it work without modifying runtime system
@@ -453,7 +452,7 @@ class KeyboardSpoke(NormalSpoke):
def _addLayout(self, store, name):
# first try to add the layout
- if conf.system.can_configure_keyboard:
+ if keyboard.can_configure_keyboard():
self._xkl_wrapper.add_layout(name)
# valid layout, append it to the store
@@ -466,7 +465,7 @@ class KeyboardSpoke(NormalSpoke):
"""
- if conf.system.can_configure_keyboard:
+ if keyboard.can_configure_keyboard():
self._xkl_wrapper.remove_layout(store[itr][0])
store.remove(itr)
@@ -558,7 +557,7 @@ class KeyboardSpoke(NormalSpoke):
return
store.swap(cur, prev)
- if conf.system.can_configure_keyboard:
+ if keyboard.can_configure_keyboard():
self._flush_layouts_to_X()
if not store.iter_previous(cur):
@@ -581,7 +580,7 @@ class KeyboardSpoke(NormalSpoke):
return
store.swap(cur, nxt)
- if conf.system.can_configure_keyboard:
+ if keyboard.can_configure_keyboard():
self._flush_layouts_to_X()
if activate_default:
diff --git a/tests/unit_tests/pyanaconda_tests/test_keyboard.py b/tests/unit_tests/pyanaconda_tests/test_keyboard.py
index 5f632ceb5c..b97aef0664 100644
--- a/tests/unit_tests/pyanaconda_tests/test_keyboard.py
+++ b/tests/unit_tests/pyanaconda_tests/test_keyboard.py
@@ -15,12 +15,66 @@
# License and may only be used or replicated with the express permission of
# Red Hat, Inc.
#
-
from pyanaconda import keyboard
import unittest
import pytest
+from unittest.mock import patch
+
+
+class KeyboardUtilsTestCase(unittest.TestCase):
+ """Test the keyboard utils."""
+
+ @patch("pyanaconda.keyboard.conf")
+ @patch("pyanaconda.keyboard.execWithRedirect")
+ def test_can_configure_keyboard(self, exec_mock, conf_mock):
+ """Check if the keyboard configuration is enabled or disabled."""
+ # It's a dir installation.
+ conf_mock.system.can_configure_keyboard = False
+ conf_mock.system.can_run_on_xwayland = False
+ assert keyboard.can_configure_keyboard() is False
+ exec_mock.assert_not_called()
+
+ # It's a boot.iso.
+ conf_mock.system.can_configure_keyboard = True
+ conf_mock.system.can_run_on_xwayland = False
+ assert keyboard.can_configure_keyboard() is True
+ exec_mock.assert_not_called()
+
+ # It's a Live installation on Wayland.
+ conf_mock.system.can_configure_keyboard = True
+ conf_mock.system.can_run_on_xwayland = True
+ exec_mock.return_value = 0
+ assert keyboard.can_configure_keyboard() is False
+ exec_mock.assert_called_once_with('xisxwayland', [])
+ exec_mock.reset_mock()
+
+ # It's a Live installation and not on Wayland.
+ conf_mock.system.can_configure_keyboard = True
+ conf_mock.system.can_run_on_xwayland = True
+ exec_mock.return_value = 1 # xisxwayland returns 1 if it is not XWayland
+ assert keyboard.can_configure_keyboard() is True
+ exec_mock.assert_called_once_with('xisxwayland', [])
+ exec_mock.reset_mock()
+
+ # It's a Live installation and probably not on Wayland,
+ # because the xisxwayland tooling is not present.
+ conf_mock.system.can_configure_keyboard = True
+ conf_mock.system.can_run_on_xwayland = True
+ exec_mock.side_effect = FileNotFoundError()
+
+ with self.assertLogs(level="WARNING") as cm:
+ keyboard.can_configure_keyboard()
+
+ msg = "The xisxwayland tool is not available!"
+ assert any(map(lambda x: msg in x, cm.output))
+
+ exec_mock.assert_called_once_with('xisxwayland', [])
+ exec_mock.reset_mock()
+
+
class ParsingAndJoiningTests(unittest.TestCase):
+
def test_layout_variant_parsing(self):
"""Should correctly parse keyboard layout and variant string specs."""
--
2.35.1

View file

@ -0,0 +1,86 @@
From e786f58127bed4fc980a6f9cf2796947942066c2 Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Thu, 17 Feb 2022 21:12:14 +0100
Subject: [PATCH 5/6] Disable layout_indicator in Anaconda
Let's remove the layout indicator in if we can't change the keyboard. It's only
confusing because the value may not be correct.
Resolves: rhbz#2016613
(cherry picked from commit 3c0849c2ed92cf6885e4de2315573120a8e1c555)
---
pyanaconda/ui/gui/__init__.py | 12 +++++++++++-
widgets/src/BaseWindow.c | 14 ++++++++++++++
widgets/src/BaseWindow.h | 1 +
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 5b95ee99ac..bcd70335ad 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -43,7 +43,7 @@ from pyanaconda import threading as anaconda_threading
from pyanaconda.core.glib import Bytes, GError
from pyanaconda.keyboard import can_configure_keyboard
from pyanaconda.ui import UserInterface, common
-from pyanaconda.ui.gui.utils import unbusyCursor
+from pyanaconda.ui.gui.utils import unbusyCursor, really_hide
from pyanaconda.core.async_utils import async_action_wait
from pyanaconda.ui.gui.utils import watch_children, unwatch_children
from pyanaconda.ui.gui.helpers import autoinstall_stopped
@@ -160,6 +160,16 @@ class GUIObject(common.UIObject):
self.builder.connect_signals(self)
+ # Hide keyboard indicator if we can't configure the keyboard
+ # It doesn't really give you any benefit of seeing something which could
+ # give you wrong values.
+ # This has to be applied to every spoke and hub - we have to ignore dialog and other
+ # non full screen parts.
+ if not can_configure_keyboard() and isinstance(self.window, AnacondaWidgets.BaseWindow):
+ layout_indicator = self.window.get_layout_indicator_box()
+ really_hide(layout_indicator)
+ layout_indicator.set_sensitive(False)
+
def _findUIFile(self):
path = os.environ.get("UIPATH", "./:/usr/share/anaconda/ui/")
dirs = path.split(":")
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index 629bcfc1d0..669c046530 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -557,6 +557,20 @@ GtkWidget *anaconda_base_window_get_help_button(AnacondaBaseWindow *win) {
return win->priv->help_button;
}
+/**
+ * anaconda_base_window_get_layout_indicator_box:
+ * @win: a #AnacondaBaseWindow
+ *
+ * Returns the AnacondaLayoutIndicator.
+ *
+ * Returns: (transfer none): the layout indicator box
+ *
+ * Since: 3.4
+ */
+GtkWidget *anaconda_base_window_get_layout_indicator_box(AnacondaBaseWindow *win) {
+ return win->priv->layout_indicator;
+}
+
/**
* anaconda_base_window_get_nav_area_background_window:
* @win: a #AnacondaBaseWindow
diff --git a/widgets/src/BaseWindow.h b/widgets/src/BaseWindow.h
index f9db2537ee..43eef0811d 100644
--- a/widgets/src/BaseWindow.h
+++ b/widgets/src/BaseWindow.h
@@ -83,6 +83,7 @@ GtkWidget *anaconda_base_window_get_main_box (AnacondaBaseWindow *win);
GtkWidget *anaconda_base_window_get_nav_area (AnacondaBaseWindow *win);
GtkWidget *anaconda_base_window_get_nav_area_background_window (AnacondaBaseWindow *win);
GtkWidget *anaconda_base_window_get_help_button (AnacondaBaseWindow *win);
+GtkWidget *anaconda_base_window_get_layout_indicator_box (AnacondaBaseWindow *win);
G_END_DECLS
--
2.35.1

View file

@ -0,0 +1,131 @@
From 6b614bb89b5517daeed25904efc2558ab1f8c973 Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Tue, 15 Feb 2022 21:48:47 +0100
Subject: [PATCH 6/6] Increase version of the anaconda-widgets
We changed the layout indicator related code so we need to increase version here.
Related: rhbz#2016613
(cherry picked from commit 488dffbe90a5a984a088b2e0c02ddc0f5972e8cf)
---
pyanaconda/ui/gui/__init__.py | 2 +-
pyanaconda/ui/gui/hubs/__init__.py | 2 +-
pyanaconda/ui/gui/spokes/lib/accordion.py | 2 +-
pyanaconda/ui/gui/spokes/storage.py | 2 +-
widgets/configure.ac | 2 +-
widgets/glade/AnacondaWidgets.xml | 4 ++--
widgets/src/Makefile.am | 14 +++++++-------
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index bcd70335ad..d458b66f14 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -24,7 +24,7 @@ from contextlib import contextmanager
import gi
gi.require_version("Gdk", "3.0")
gi.require_version("Gtk", "3.0")
-gi.require_version("AnacondaWidgets", "3.3")
+gi.require_version("AnacondaWidgets", "3.4")
gi.require_version("Keybinder", "3.0")
gi.require_version("GdkPixbuf", "2.0")
gi.require_version("GObject", "2.0")
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index f6f592f5d5..068d7c717d 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -115,7 +115,7 @@ class Hub(GUIObject, common.Hub):
import gi
gi.require_version("Gtk", "3.0")
- gi.require_version("AnacondaWidgets", "3.3")
+ gi.require_version("AnacondaWidgets", "3.4")
from gi.repository import Gtk, AnacondaWidgets
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
index 5bd1ec3eba..3a75565225 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -24,7 +24,7 @@ from pyanaconda.core.storage import get_supported_autopart_choices
from pyanaconda.ui.gui.utils import escape_markup, really_hide, really_show
import gi
-gi.require_version("AnacondaWidgets", "3.3")
+gi.require_version("AnacondaWidgets", "3.4")
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, AnacondaWidgets
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index fa8224c86a..f861dcba78 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -58,7 +58,7 @@ from pyanaconda.ui.gui.spokes.lib.storage_dialogs import NeedSpaceDialog, NoSpac
import gi
gi.require_version("Gtk", "3.0")
gi.require_version("Gdk", "3.0")
-gi.require_version("AnacondaWidgets", "3.3")
+gi.require_version("AnacondaWidgets", "3.4")
from gi.repository import Gdk, AnacondaWidgets, Gtk
log = get_module_logger(__name__)
diff --git a/widgets/configure.ac b/widgets/configure.ac
index 56e712b189..ba666008a7 100644
--- a/widgets/configure.ac
+++ b/widgets/configure.ac
@@ -20,7 +20,7 @@
m4_define(python_required_version, 3.4)
AC_PREREQ([2.63])
-AC_INIT([AnacondaWidgets], [3.3], [clumens@redhat.com])
+AC_INIT([AnacondaWidgets], [3.4], [clumens@redhat.com])
# Disable building static libraries.
# This needs to be set before initializing automake
diff --git a/widgets/glade/AnacondaWidgets.xml b/widgets/glade/AnacondaWidgets.xml
index c797bb049b..f166052625 100644
--- a/widgets/glade/AnacondaWidgets.xml
+++ b/widgets/glade/AnacondaWidgets.xml
@@ -1,7 +1,7 @@
<glade-catalog
name="AnacondaWidgets"
- version="3.3"
- targetable="3.2,3.1,3.0,2.0,1.0"
+ version="3.4"
+ targetable="3.3,3.2,3.1,3.0,2.0,1.0"
library="AnacondaWidgets"
domain="glade-3"
depends="gtk+">
diff --git a/widgets/src/Makefile.am b/widgets/src/Makefile.am
index 75c37155c1..d5af7f7448 100644
--- a/widgets/src/Makefile.am
+++ b/widgets/src/Makefile.am
@@ -110,18 +110,18 @@ CLEANFILES = resources.c resources.h $(RESOURCE_XML)
MAINTAINERCLEANFILES = gettext.h
if HAVE_INTROSPECTION
-AnacondaWidgets-3.3.gir: libAnacondaWidgets.la
+AnacondaWidgets-3.4.gir: libAnacondaWidgets.la
-AnacondaWidgets_3_3_gir_FILES = $(GISOURCES) $(GIHDRS)
-AnacondaWidgets_3_3_gir_LIBS = libAnacondaWidgets.la
-AnacondaWidgets_3_3_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Anaconda --symbol-prefix=anaconda
-AnacondaWidgets_3_3_gir_INCLUDES = Gtk-3.0 Xkl-1.0
+AnacondaWidgets_3_4_gir_FILES = $(GISOURCES) $(GIHDRS)
+AnacondaWidgets_3_4_gir_LIBS = libAnacondaWidgets.la
+AnacondaWidgets_3_4_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Anaconda --symbol-prefix=anaconda
+AnacondaWidgets_3_4_gir_INCLUDES = Gtk-3.0 Xkl-1.0
-INTROSPECTION_GIRS = AnacondaWidgets-3.3.gir
+INTROSPECTION_GIRS = AnacondaWidgets-3.4.gir
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-CLEANFILES += AnacondaWidgets-3.3.gir $(typelib_DATA)
+CLEANFILES += AnacondaWidgets-3.4.gir $(typelib_DATA)
MAINTAINERCLEANFILES += Makefile.in
endif
--
2.35.1

View file

@ -1,42 +0,0 @@
From d75de3da3648dee474ddea6639e09c071f027232 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Sat, 7 Jun 2025 13:44:25 +0200
Subject: [PATCH] Avoid buffer overflow with TIOCGWINSZ
It has 4 bytes, not 2.
On Python 3.14+, the previous version raised SystemError:
>>> from pyanaconda.argument_parsing import get_help_width
...
>>> get_help_width()
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
get_help_width()
~~~~~~~~~~~~~~^^
File "/usr/lib64/python3.14/site-packages/pyanaconda/argument_parsing.py", line 68, in get_help_width
data = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, '1234')
SystemError: buffer overflow
See https://github.com/python/cpython/commit/c2eaeee3dc3306ca486b0377b07b1a957584b691
Fixes https://bugzilla.redhat.com/2370944
---
pyanaconda/argument_parsing.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/argument_parsing.py b/pyanaconda/argument_parsing.py
index e24f0f1b999..55cf7993625 100644
--- a/pyanaconda/argument_parsing.py
+++ b/pyanaconda/argument_parsing.py
@@ -65,8 +65,8 @@ def get_help_width():
return DEFAULT_HELP_WIDTH
try:
- data = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, '1234')
- columns = int(struct.unpack('hh', data)[1])
+ data = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, '12345678')
+ columns = int(struct.unpack('hhhh', data)[1])
except (OSError, ValueError) as e:
log.info("Unable to determine terminal width: %s", e)
print("terminal size detection failed, using default width")

View file

@ -1,70 +0,0 @@
From 11b7e782d8de7da49f0b4e650e8fc0c60f69304f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Sun, 8 Jun 2025 17:46:29 +0200
Subject: [PATCH] Avoid the multiprocessing forkserver method with dnf
Fixes:
Traceback (most recent call last):
File "/usr/lib64/python3.14/site-packages/pyanaconda/core/threads.py", line 281, in run
threading.Thread.run(self)
~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib64/python3.14/threading.py", line 1023, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/site-packages/pyanaconda/modules/common/task/task.py", line 97, in _thread_run_callback
self._task_run_callback()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib64/python3.14/site-packages/pyanaconda/modules/common/task/task.py", line 110, in _task_run_callback
self._set_result(self.run())
~~~~~~~~^^
File "/usr/lib64/python3.14/site-packages/pyanaconda/modules/payloads/payload/dnf/installation.py", line 281, in run
self._dnf_manager.install_packages(self.report_progress)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/site-packages/pyanaconda/modules/payloads/payload/dnf/dnf_manager.py", line 664, in install_packages
process.start()
~~~~~~~~~~~~~^^
File "/usr/lib64/python3.14/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
~~~~~~~~~~~^^^^^^
File "/usr/lib64/python3.14/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib64/python3.14/multiprocessing/context.py", line 300, in _Popen
return Popen(process_obj)
File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
super().__init__(process_obj)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib64/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 47, in _launch
reduction.dump(process_obj, buf)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: cannot pickle 'SwigPyObject' object
---
pyanaconda/modules/payloads/payload/dnf/dnf_manager.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/modules/payloads/payload/dnf/dnf_manager.py b/pyanaconda/modules/payloads/payload/dnf/dnf_manager.py
index 925ed73790a..e7c25369912 100644
--- a/pyanaconda/modules/payloads/payload/dnf/dnf_manager.py
+++ b/pyanaconda/modules/payloads/payload/dnf/dnf_manager.py
@@ -652,9 +652,12 @@ def install_packages(self, callback, timeout=20):
:param timeout: a time out of a failed process in seconds
:raise PayloadInstallationError: if the installation fails
"""
- queue = multiprocessing.Queue()
+ # SwigPyObjects are not picklable, so force the fork method
+ # On Python 3.14+, forkserver is the default (and it pickles)
+ context = multiprocessing.get_context(method="fork")
+ queue = context.Queue()
display = TransactionProgress(queue)
- process = multiprocessing.Process(
+ process = context.Process(
target=self._run_transaction,
args=(self._base, display)
)

View file

@ -1,3 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.13.0.post1.dev2+g84134016c.
The file was generated using packit 0.48.1.dev7+g623077c.

File diff suppressed because it is too large Load diff

View file

@ -1,36 +0,0 @@
# The purpose of this file is to overwrite some default config
# of rpmlint, which may not fit our project needs / specification
Filters = [
# Discard no-binary error for anaconda packages which cant be a noarch type
'anaconda.x86_64: E: no-binary',
'anaconda-core-debuginfo.x86_64: E: no-binary',
'anaconda-install-env-deps.x86_64: E: no-binary',
'anaconda-install-img-deps.x86_64: E: no-binary',
# Discard explicite library dependencies
'explicit-lib-dependency flatpak-libs',
'explicit-lib-dependency libblockdev-lvm-dbus',
'explicit-lib-dependency libblockdev-tools',
'explicit-lib-dependency librsvg2',
# Discard warning about binary debug symbols. Those are our helper
# binaries and it is not important for them to be stripped
'unstripped-binary-or-object /usr/libexec/anaconda/dd_extract',
'unstripped-binary-or-object /usr/libexec/anaconda/dd_list',
'unstripped-binary-or-object /usr/lib64/libAnacondaWidgets*',
'unstripped-binary-or-object /usr/lib64/glade/modules/libAnacondaWidgets*',
# Discard symbolic link warnings.
'dangling-symlink /usr/share/anaconda/window-manager/glib-2.0/schemas/org.gnome.*',
'dangling-relative-symlink /usr/lib/.build-id/*',
# Discard missing manual pages error
'no-manual-page-for-binary liveinst',
'no-manual-page-for-binary anaconda-cleanup',
'no-manual-page-for-binary anaconda-disable-nm-ibft-plugin',
'no-manual-page-for-binary anaconda-nm-disable-autocons',
'no-manual-page-for-binary instperf',
'no-manual-page-for-binary instperf',
'no-manual-page-for-binary anaconda',
'no-manual-page-for-binary handle-sshpw',
# Discard missing README / documentation for package
'no-documentation',
# Discard spelling errors for project commonly used words
'spelling-error .* en_US (metapackage|kickstarts|iso|eg|lorax) ',
]

View file

@ -1 +1 @@
SHA512 (anaconda-44.11.tar.bz2) = 30e8c3bde05afefe7cb18ba17d84fc31007e9086932f47136e74e432563786cd577123f7c904bc3ddd5e5c5f6f722dae3cedbc131d5871c06f7829ba632ffaf7
SHA512 (anaconda-36.16.5.tar.bz2) = 0aad7f859c641e0e767801aa0bbd2f19cac01e80813ce1d3012319e316a271bb4c60875957c3431f9681ddb28045f91d7010122e8f2c5c44d7d670737ae112ea

View file

@ -1,10 +1,5 @@
#!/bin/sh -eux
# Remove webui because it does not support much anything yet
# Possible alternative: rpm -E --nodeps anaconda-webui
dnf remove -y anaconda-webui
# Prepare test work directory
@ -18,9 +13,9 @@ source ./repositories
TEST_KICKSTART=./ks.dirinstall.cfg
# Dump URLs of installation repositories found in local repositories whose names are configured in 'repositories' file
echo "url --metalink=$(dnf repoinfo $BASE_REPO | grep -e "^ *Metalink *:" | cut -d: -f2- | sed 's/^ *//')" > ${KICKSTART_PATH}
echo "url --metalink=$(dnf repoinfo $BASE_REPO | grep ^Repo-metalink | cut -d: -f2- | sed 's/^ *//')" > ${KICKSTART_PATH}
for repo in $REPOS; do
echo "repo --name=$repo --metalink=$(dnf repoinfo $repo | grep "^ *Metalink *:" | cut -d: -f2- | sed 's/^ *//')" >> ${KICKSTART_PATH}
echo "repo --name=$repo --metalink=$(dnf repoinfo $repo | grep ^Repo-metalink | cut -d: -f2- | sed 's/^ *//')" >> ${KICKSTART_PATH}
done
cat ${TEST_KICKSTART} >> ${KICKSTART_PATH}

View file

@ -1,12 +1,4 @@
# Names of local repositories whose urls will be used for installation
# Repositories for "Fedora X" needs to be dynamically resolved based on host
if dnf repoinfo --enabled | grep -qe "Repo ID *: rawhide"; then
BASE_REPO="rawhide"
else
BASE_REPO="fedora"
fi
# Additional repositories
REPOS=""
#REPOS="fedora-modular"
# Repositories for "Fedora X" release:
BASE_REPO="fedora"
REPOS="fedora-modular"