Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Xorg server and libxklavier #5829

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
02007a2
Add GNOME Kiosk keyboard manager class
jexposit Feb 8, 2024
f868873
Use GNOME Kiosk's API in XklWrapper
jexposit Feb 8, 2024
fad1a6b
Setup gdbus-codegen
jexposit Feb 8, 2024
5deaf8f
Use GNOME Kiosk's API in LayoutIndicator
jexposit Feb 8, 2024
c69eb69
Drop libxklavier
jexposit Feb 8, 2024
c4029ba
Drop the X.Org server dependency
jexposit Feb 21, 2024
44f5b5f
Add unit tests for GkKeyboardManager and its API in localization module
rvykydal Feb 27, 2024
145e0a0
Drop xrandr
jexposit Feb 14, 2024
f6c7674
Drop xrdb
jexposit Feb 14, 2024
942bd79
Rename usevnc flag & similar variables
M4rtinK Mar 11, 2024
d0f4f82
Introduce GNOME remote desktop support
M4rtinK Feb 27, 2024
0ef2b73
Add RDP boot options & deprecate VNC boot options
M4rtinK Mar 11, 2024
94b2c48
Replace VNC support with GNOME remote desktop
M4rtinK Mar 12, 2024
8783ed0
Adjust to freerdp and GNOME package changes
M4rtinK May 27, 2024
d033b11
Handle inst.rdp in Dracut
M4rtinK Jun 20, 2024
a646178
Cleanup remaining Xorg and VNC references and dead code
M4rtinK Jun 20, 2024
21bc6f9
Redirect Anaconda main process stderr to Journal
M4rtinK Aug 21, 2024
f3da24a
Remove leftover debugging message
M4rtinK Aug 21, 2024
318946d
Redirect output of various GNOME related tools to Journal
M4rtinK Aug 20, 2024
52262c8
Add missing support to localed for compositor
jkonecny12 Aug 26, 2024
7824265
Add localed signal support to LocaledWrapper
jkonecny12 Aug 28, 2024
dd9ae5d
Switch keyboard management to Localed
jkonecny12 Aug 28, 2024
49e3916
Remove dead spice_vd_agent code
jkonecny12 Sep 2, 2024
efda6c7
Do not create GRDServer on Live ISO
jkonecny12 Sep 3, 2024
efd866c
Remove Wayland detection logic from code
jkonecny12 Sep 3, 2024
870942d
Set --rdp in liveinst unsupported
jkonecny12 Sep 3, 2024
cedfa2c
Add release-notes for Wayland migration
jkonecny12 Aug 14, 2024
4cd89b3
Do not change compositor options when not defined
jkonecny12 Sep 13, 2024
d963400
Fix typo in the GRD source file name
jkonecny12 Sep 17, 2024
da20f70
Disable fedora-cisco repository in our containers
jkonecny12 Sep 24, 2024
db576ec
Create GRDServer class only when required
jkonecny12 Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ widgets/doc/xml
widgets/gtk-doc.make
widgets/src/gettext.h
widgets/src/resources.*
widgets/src/an-localization.*
pyanaconda/version.py
.doctrees
_sources
Expand Down
30 changes: 23 additions & 7 deletions anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@

from pyanaconda.modules.common.structures.rescue import RescueData

# Redirect Anaconda main process stderr to Journal,
# as otherwise this could end up writing all over
# the TUI on TTY1.

# create an appropriately named Journal writing stream
from systemd import journal
anaconda_stderr_stream = journal.stream("anaconda", priority=journal.LOG_ERR)
# redirect stderr of this process to the stream
os.dup2(anaconda_stderr_stream.fileno(), sys.stderr.fileno())


def exitHandler(rebootData):
# Clear the list of watched PIDs.
Expand All @@ -40,8 +50,8 @@ def exitHandler(rebootData):

# pylint: disable=possibly-used-before-assignment
# pylint: disable=used-before-assignment
if flags.usevnc:
vnc.shutdownServer()
if flags.use_rd:
gnome_remote_desktop.shutdown_server()

# pylint: disable=possibly-used-before-assignment
# pylint: disable=used-before-assignment
Expand Down Expand Up @@ -150,6 +160,12 @@ def setup_environment():
if "LD_PRELOAD" in os.environ:
del os.environ["LD_PRELOAD"]

# Go ahead and set $WAYLAND_DISPLAY whether we're going to use Wayland or not
if "WAYLAND_DISPLAY" in os.environ:
flags.preexisting_wayland = True
else:
os.environ["WAYLAND_DISPLAY"] = constants.WAYLAND_SOCKET_NAME # pylint: disable=possibly-used-before-assignment

# Go ahead and set $DISPLAY whether we're going to use X or not
if "DISPLAY" in os.environ:
flags.preexisting_x11 = True
Expand All @@ -163,7 +179,6 @@ def setup_environment():
if "EDITOR" not in os.environ and os.path.isfile("/etc/profile.d/nano-default-editor.sh"):
os.environ["EDITOR"] = "/usr/bin/nano"


if __name__ == "__main__":
# check if the CLI help is requested and return it at once,
# without importing random stuff and spamming stdout
Expand Down Expand Up @@ -268,7 +283,7 @@ def setup_environment():
opts.display_mode = constants.DisplayModes.TUI
opts.noninteractive = True

from pyanaconda import vnc
from pyanaconda import gnome_remote_desktop
from pyanaconda import kickstart
# we are past the --version and --help shortcut so we can import display &
# startup_utils, which import Blivet, without slowing down anything critical
Expand Down Expand Up @@ -306,10 +321,11 @@ def setup_environment():
except pid.PidFileError as e:
log.error("Unable to create %s, exiting", pidfile.filename)

# If we had a $DISPLAY at start and zenity is available, we may be
# running in a live environment and we can display an error dialog.
# If we had a Wayland/X11 display at start and zenity is available, we may
# be running in a live environment and we can display an error dialog.
# Otherwise just print an error.
if flags.preexisting_x11 and os.access("/usr/bin/zenity", os.X_OK):
preexisting_graphics = flags.preexisting_wayland or flags.preexisting_x11
if preexisting_graphics and os.access("/usr/bin/zenity", os.X_OK):
# The module-level _() calls are ok here because the language may
# be set from the live environment in this case, and anaconda's
# language setup hasn't happened yet.
Expand Down
23 changes: 12 additions & 11 deletions anaconda.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{vers
%define libarchivever 3.0.4
%define libblockdevver 2.1
%define libreportanacondaver 2.0.21-1
%define libxklavierver 5.4
%define mehver 0.23-1
%define nmver 1.0
%define pykickstartver 3.58-1
Expand All @@ -58,7 +57,6 @@ BuildRequires: gobject-introspection-devel
%if %{with glade}
BuildRequires: glade-devel
%endif
BuildRequires: libxklavier-devel >= %{libxklavierver}
BuildRequires: make
BuildRequires: pango-devel
BuildRequires: python3-devel
Expand Down Expand Up @@ -139,7 +137,7 @@ Requires: python3-pid
Requires: crypto-policies
Requires: crypto-policies-scripts

# required because of the rescue mode and VNC question
# required because of the rescue mode and RDP question
Requires: anaconda-tui = %{version}-%{release}

# Make sure we get the en locale one way or another
Expand Down Expand Up @@ -176,7 +174,6 @@ BuildRequires: desktop-file-utils
# live installation currently implies a graphical installation
Requires: anaconda-gui = %{version}-%{release}
Requires: zenity
Requires: xisxwayland
Recommends: xhost

%description live
Expand Down Expand Up @@ -256,16 +253,19 @@ Requires: zram-generator
# needed for proper driver disk support - if RPMs must be installed, a repo is needed
Requires: createrepo_c
# Display stuff moved from lorax templates
Requires: xorg-x11-drivers
Requires: xorg-x11-server-Xorg
Requires: xrandr
Requires: xrdb
Requires: dbus-x11
Requires: gsettings-desktop-schemas
Requires: nm-connection-editor
Requires: librsvg2
Requires: gnome-kiosk
Requires: gnome-remote-desktop
# needed to generate RDP certs at runtime
Requires: openssl
# needed by GNOME kiosk but not declared a as explicit dep,
# instead expected to be declared like this according to the
# maintainers
Requires: mesa-dri-drivers
Requires: brltty
Requires: python3-pam
# dependencies for rpm-ostree payload module
Requires: rpm-ostree >= %{rpmostreever}
Requires: ostree
Expand All @@ -290,8 +290,6 @@ Requires: python3-meh-gui >= %{mehver}
Requires: python3-xkbregistry
Requires: adwaita-icon-theme
Requires: tecla
Requires: tigervnc-server-minimal
Requires: libxklavier >= %{libxklavierver}
Requires: nm-connection-editor
%ifnarch s390 s390x
Requires: NetworkManager-wifi
Expand All @@ -303,6 +301,8 @@ Requires: system-logos

# Needed to compile the gsettings files
BuildRequires: gsettings-desktop-schemas
# Needed for gdbus-codegen
BuildRequires: glib2-devel

%description gui
This package contains graphical user interface for the Anaconda installer.
Expand Down Expand Up @@ -409,6 +409,7 @@ rm -rf \
%{_sbindir}/anaconda
%{_sbindir}/handle-sshpw
%{_datadir}/anaconda
%{_sysconfdir}/pam.d/anaconda
%{_prefix}/libexec/anaconda
%exclude %{_datadir}/anaconda/gnome
%exclude %{_datadir}/anaconda/pixmaps
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ AC_CONFIG_FILES([Makefile
data/systemd/Makefile
data/dbus/Makefile
data/gtk-4.0/Makefile
data/pam/Makefile
data/window-manager/Makefile
data/window-manager/config/Makefile
po/Makefile
Expand Down
2 changes: 1 addition & 1 deletion data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

SUBDIRS = command-stubs gtk-4.0 liveinst systemd pixmaps window-manager dbus conf.d profile.d
SUBDIRS = command-stubs gtk-4.0 liveinst systemd pam pixmaps window-manager dbus conf.d profile.d

CLEANFILES = *~

Expand Down
32 changes: 11 additions & 21 deletions data/anaconda_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,30 +93,20 @@ Run in live installation mode.
resolution
Run GUI installer in the resolution specified, "1024x768" for example.

usefbx
Use the framebuffer X driver instead of attempting to use a hardware-specific one.

vnc
Enable VNC-based installation. You will need to connect to the machine using a VNC client application.
A VNC install implies that the installed system will boot up in runlevel 3 instead of to the graphical
login screen. The VNC session will be shared. Consider setting a VNC password using the vncpassword
option. This option is not supported for live installations.

vncconnect
Once installation is up and running, connect to the VNC client named HOST, and optionally use port PORT.

vncpassword
Enable a password for the VNC connection. This will prevent someone from inadvertently connecting
to the vnc-based installation. Requires the VNC option to be specified as well. If you have specified
vncconnect the PASSWORD will not be used unless connection to host is not possible. Please note that
the password needs to be 6 to 8 characters long (limitation of the VNC protocol).
xtimeout
Specify the timeout in seconds for starting X server or Wayland compositor.

xdriver
Use DRIVER as the X driver to use during installation as well as on the installed system.
rdp
Enable Remote Desktop Protocol-controlled installation. You will need to connect to the machine using an RDP
client application. An RDP install implies that the installed system will boot up in in multiuser.target
instead of to the graphical login screen. Multiple RDP clients can connect. When using rdp you also need to set
RDP username and password using the rdp.username and rdp.password options.

xtimeout
Specify the timeout in seconds for starting X server.
rdp.username
Set password for the RDP session. To enable RDP access, also use the rdp and rdp.password options.

rdp.password
Set password for the RDP session. To enable RDP access, also use the rdp and rdp.username options.
keymap
Keyboard layout to use during installation and on the installed system. Valid KEYMAP values
are those which can be used for the keyboard kickstart command.
Expand Down
7 changes: 2 additions & 5 deletions data/liveinst/liveinst
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ fi
# Process cmdline args
for opt in $(cat /proc/cmdline) "$@"; do
case $opt in
xdriver=*)
ANACONDA="$ANACONDA --$opt"
;;
updates=*)
UPDATES="${opt#updates=}"
;;
Expand Down Expand Up @@ -116,9 +113,9 @@ for opt in $(cat /proc/cmdline) "$@"; do
fi
exit 1
;;
vnc|--vnc)
rdp|rdp.username|rdp.password|--rdp|--rdp.username|--rdp.password)
title="Configuration not supported"
text="VNC is not supported on live media."
text="RDP is not supported on live media."
if which zenity &> /dev/null; then
zenity --warning --title="$title" --text="$text"
else
Expand Down
21 changes: 21 additions & 0 deletions data/pam/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2024 Neal Gompa.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

CLEANFILES = *~

pamdir = $(sysconfdir)/pam.d
dist_pam_DATA = anaconda

MAINTAINERCLEANFILES = Makefile.in
8 changes: 8 additions & 0 deletions data/pam/anaconda
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#%PAM-1.0
auth sufficient pam_permit.so
account sufficient pam_permit.so
password sufficient pam_permit.so
session required pam_loginuid.so
-session optional pam_keyinit.so revoke
-session optional pam_limits.so
session required pam_systemd.so
2 changes: 1 addition & 1 deletion data/systemd/anaconda-direct.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ConditionPathIsDirectory=|/sys/hypervisor/s390
ConditionKernelCommandLine=|inst.notmux

[Service]
Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr GDK_BACKEND=x11 XDG_RUNTIME_DIR=/tmp LANG=en_US.UTF-8
Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr GDK_BACKEND=wayland XDG_RUNTIME_DIR=/run/user/0 GIO_USE_VFS=local LANG=en_US.UTF-8
Type=oneshot
WorkingDirectory=/root
ExecStart=/usr/sbin/anaconda
Expand Down
2 changes: 1 addition & 1 deletion data/systemd/anaconda.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Wants=anaconda-noshell.service

[Service]
Type=forking
Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8 GDK_BACKEND=x11 XDG_RUNTIME_DIR=/tmp GIO_USE_VFS=local
Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8 GDK_BACKEND=wayland XDG_RUNTIME_DIR=/run/user/0 GIO_USE_VFS=local
WorkingDirectory=/root
ExecStart=/usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start
4 changes: 4 additions & 0 deletions dockerfile/anaconda-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ COPY ["anaconda.spec.in", "requirements.txt", "/root/"]

# Prepare environment and install build dependencies
RUN set -ex; \
# disable fedora-cisco repository otherwise freerdp will depend on openh264 from fedora-cisco
# if fedora-cisco is not enabled it will fallback to stub library in main repository which is
# what we want
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/fedora-cisco-openh264.repo; \
dnf install -y \
'dnf5-command(copr)'; \
# Enable COPR repositories
Expand Down
4 changes: 4 additions & 0 deletions dockerfile/anaconda-release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ LABEL [email protected]
# Add missing dependencies required to do the build.
RUN set -e; \
dnf update -y; \
# disable fedora-cisco repository otherwise freerdp will depend on openh264 from fedora-cisco
# if fedora-cisco is not enabled it will fallback to stub library in main repository which is
# what we want
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/fedora-cisco-openh264.repo; \
dnf install -y \
git \
python3-pip; \
Expand Down
4 changes: 4 additions & 0 deletions dockerfile/anaconda-rpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ COPY ["anaconda.spec.in", "/root/"]

# Prepare environment and install build dependencies
RUN set -ex; \
# disable fedora-cisco repository otherwise freerdp will depend on openh264 from fedora-cisco
# if fedora-cisco is not enabled it will fallback to stub library in main repository which is
# what we want
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/fedora-cisco-openh264.repo; \
dnf update -y; \
# Install dependencies
dnf install -y \
Expand Down
Loading