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

Commits on Sep 25, 2024

  1. Add GNOME Kiosk keyboard manager class

    Add a class wrapping GNOME Kiosk's input sources API that future commits
    will use via the localization service to replace the X11 keyboard
    management logic.
    
    Resolves: RHEL-38399
    (cherry picked from commit 805826c)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    02007a2 View commit details
    Browse the repository at this point in the history
  2. Use GNOME Kiosk's API in XklWrapper

    libxklavier is deprecated and X11-only. On RHEL, the GNOME Kiosk API can
    be used instead to handle the keyboard configuration.
    
    In order to make the code migration as simple as possible, keep the
    XklWrapper class and update its implementation to use GNOME Kiosk's API
    via the localization service.
    
    Resolves: RHEL-38399
    (cherry picked from commit 3a0088e)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f868873 View commit details
    Browse the repository at this point in the history
  3. Setup gdbus-codegen

    Invoke gdbus-codegen as part of the make build and makeupdates script to
    generate C code from org.fedoraproject.Anaconda.Modules.Localization.xml.
    
    Resolves: RHEL-38399
    (cherry picked from commit 68cde1a)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    fad1a6b View commit details
    Browse the repository at this point in the history
  4. Use GNOME Kiosk's API in LayoutIndicator

    This C widget is the last place were libxklavier is used.
    
    Use GNOME Kiosk's API via the localization service instead.
    
    Resolves: RHEL-38399
    (cherry picked from commit 9a611fd)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    5deaf8f View commit details
    Browse the repository at this point in the history
  5. Drop libxklavier

    Resolves: RHEL-38399
    Resolves: RHBZ#1955025
    (cherry picked from commit ce6cc95)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    c69eb69 View commit details
    Browse the repository at this point in the history
  6. Drop the X.Org server dependency

    Start GNOME Kiosk as a Wayland compositor and run Anaconda as a native
    Wayland client.
    
    This commit is a follow up on the work done by Neal Gompa [1], Martin
    Kolman and Ray Strode [2]. Credit goes to them for the code I copied
    and pasted.
    
    [1] rhinstaller#5401
    [2] rhinstaller#5309
    
    Co-authored-by: Neal Gompa <[email protected]>
    Co-authored-by: Martin Kolman <[email protected]>
    Co-authored-by: Ray Strode <[email protected]>
    
    Resolves: RHEL-38399
    Resolves: https://fedoraproject.org/wiki/Changes/AnacondaWebUIforFedoraWorkstation
    (cherry picked from commit 8800331)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    c4029ba View commit details
    Browse the repository at this point in the history
  7. Add unit tests for GkKeyboardManager and its API in localization module

    Resolves: RHEL-38399
    (cherry picked from commit 27b097e)
    rvykydal authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    44f5b5f View commit details
    Browse the repository at this point in the history
  8. Drop xrandr

    Anaconda uses xrandr to set the screen resolution when the boot option
    "inst.resolution" [1] is used.
    
    In order to be able to drop the X.Org server, use Mutter's API instead
    of xrandr.
    
    The kickstart equivalent option has been removed, so we don't need to
    care about it [2].
    
    [1] https://anaconda-installer.readthedocs.io/en/latest/boot-options.html#inst-resolution
    [2] https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#xconfig
    
    Resolves: RHEL-38399
    (cherry picked from commit 8b94761)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    145e0a0 View commit details
    Browse the repository at this point in the history
  9. Drop xrdb

    It wasn't used and it won't work on Wayland.
    
    Resolves: RHEL-38399
    (cherry picked from commit 846dbde)
    jexposit authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f6c7674 View commit details
    Browse the repository at this point in the history
  10. Rename usevnc flag & similar variables

    Rename the usevnc flag to use_rd, eq. "use Remote Desktop".
    
    This should better describe what this flag means with RDP support
    being added & differentiates this from a possible future remote
    Web UI access, that is using a different technology from remote desktop
    systems.
    
    Resolves: RHEL-38407
    (cherry picked from commit d1abe94)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    942bd79 View commit details
    Browse the repository at this point in the history
  11. Introduce GNOME remote desktop support

    Add support for using GNOME remote desktop for providing
    remote graphical installation support via RDP.
    
    While GNOME remote desktop also supports VNC, we are not adding support
    for using it at this time.
    
    The main difference from VNC is that RDP requires both (RDP specific)
    username and password to be set and is encrypted by default (with locally
    generated SSL certificates).
    
    Resolves: RHEL-38407
    (cherry picked from commit e45e07e)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d0f4f82 View commit details
    Browse the repository at this point in the history
  12. Add RDP boot options & deprecate VNC boot options

    Add boot options for use with Remote Desktop Protocol,
    used to guide the installation remotely using the GUI.
    
    Also deprecate the VNC boot options.
    
    Resolves: RHEL-38407
    (cherry picked from commit 3ce5351)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    0ef2b73 View commit details
    Browse the repository at this point in the history
  13. Replace VNC support with GNOME remote desktop

    Rebuild the original TUI Ask VNC spoke to a more generic
    "Ask Remote Desktop" spoke, supporting RDP.
    
    Replace the Tiger VNC provided VNC support with GNOME remote desktop
    provided RDP support & remove Tiger VNC support.
    
    Also log a warning if the old VNC options are used & these options will
    now no longer have an effect.
    
    Remove module from the code so it should be easier for backporting to
    rhel-10. However, we should replace Vnc module with Rdp module in later
    commit.
    
    Resolves: RHEL-38407
    (merge of commit 883d6d0)
    (merge of commit da6f157)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    94b2c48 View commit details
    Browse the repository at this point in the history
  14. Adjust to freerdp and GNOME package changes

    Adjust HOME variable to fix credential storage with new freerdp and also
    adjust GNOME remote desktop options for updated package.
    
    Resolves: RHEL-38407
    (cherry picked from commit 04d5bb7)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    8783ed0 View commit details
    Browse the repository at this point in the history
  15. Handle inst.rdp in Dracut

    Looks like we enable network already in dracut if inst.vnc is used,
    lets switch the code to work with inst.rdp.
    
    Also drop the VNC related commands, as they are no longer
    expected to be used.
    
    Resolves: RHEL-41219
    (cherry picked from commit d331ba0)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d033b11 View commit details
    Browse the repository at this point in the history
  16. Cleanup remaining Xorg and VNC references and dead code

    After the main PR series that turned Anaconda into a native Wayland
    application and switched from VNC to RDP fro remote access, there were
    still some leftovers here and there.
    
    So lets address those - adjust various references in doc strings to
    correctly mention Wayland and RDP. And also drop various bits of code
    that are no longer needed.
    
    Lastly, drop a few Anaconda boot options that no longer work in the
    Wayland world:
    
    - xdriver
    - usefbx
    - vnc
    - vncconnect
    - vncpassword
    
    NOTE: Even with Anaconda running natively on a Wayland compositor,
    keyboard layouts are still called X layouts. This is the correct,
    as Wayland is still using the keyboard layout format introduced by
    the X server.
    
    Resolves: RHEL-41219
    (cherry picked from commit ee14273)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    a646178 View commit details
    Browse the repository at this point in the history
  17. Redirect Anaconda main process stderr to Journal

    This should prevent error messages (at the moment mostly
    from GTK, which stil runs in the main thread) from swamping
    the TUI running on TTY1.
    
    This also has the added benefit of any such errors now being captured
    in the Journal, which is usually stored from any test runs
    and easy for customers to send back if they encounter an issue.
    
    And thanks a lot to Ray Strode for helping us track this down! :)
    
    Resolves: RHEL-47097
    (cherry picked from commit 9406a6a)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    21bc6f9 View commit details
    Browse the repository at this point in the history
  18. Remove leftover debugging message

    The address is printed correctly a few line below.
    
    Resolves: RHEL-47097
    (cherry picked from commit fcb5154)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f3da24a View commit details
    Browse the repository at this point in the history
  19. Redirect output of various GNOME related tools to Journal

    This should avoid the output spamming TUI on TTY1 & any errors will
    be captured in Journal dumps.
    
    Resolves: RHEL-47097
    (cherry picked from commit 487a26b)
    M4rtinK authored and jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    318946d View commit details
    Browse the repository at this point in the history
  20. Add missing support to localed for compositor

    The plan is to use systemd-localed to control compositor keyboard and
    replace current `gk_keyboard_manager`. Most of the code is in place
    already but we need to add a few missing ones.
    
    The most problematic is missing support for next layout. The issue is
    that localed service don't have support for selection, to resolve this
    issue we will set the first in the list as selected.
    
    However, it means that we have to keep what user has set from Anaconda
    so we can find next candidate when switch to next layout is requested.
    Keep the information when user set the layouts to the compositor.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    52262c8 View commit details
    Browse the repository at this point in the history
  21. Add localed signal support to LocaledWrapper

    with this patch when compositor will change keyboard layout we will be
    able to react to that in Anaconda.
    
    This is mostly useful for Live ISO images.
    
    We have two signals currently to resolve that something has changed, one
    of the signals is that selected layout has changed in the compositor.
    The issue is that localed service doesn't have information about
    selected (first is taken as selected). To resolve that we need to keep
    values from our last query or last signal about the change so we are
    able to detect the change in selection.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7824265 View commit details
    Browse the repository at this point in the history
  22. Switch keyboard management to Localed

    Because of the switch to Wayland Anaconda has to change compositor
    keyboard manager because libxklavier doesn't work on Wayland.
    
    To fix that we migrated to Gnome Kiosk DBus API in RHEL-10, however,
    this solution can't be used outside of Gnome Kiosk. For that reason,
    we are switching to Localed which we set as the default to enable
    Anaconda to control keyboard switching.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    dd9ae5d View commit details
    Browse the repository at this point in the history
  23. Remove dead spice_vd_agent code

    This code is not used since migration to Wayland. We need another
    solution for this feature.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    49e3916 View commit details
    Browse the repository at this point in the history
  24. Do not create GRDServer on Live ISO

    The GRDServer class have checks in the __init__ method which starts to
    complain about missing GRD in the system. That doesn't apply in Live
    environment where we don't support GRD in the first place.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    efda6c7 View commit details
    Browse the repository at this point in the history
  25. Remove Wayland detection logic from code

    This logic was used to disable keyboard switching for given system.
    However, we we support even Wayland systems with the new solution, so
    let's remove this.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    efd866c View commit details
    Browse the repository at this point in the history
  26. Set --rdp in liveinst unsupported

    Previously it was vnc but we switched to RDP instead.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    870942d View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    cedfa2c View commit details
    Browse the repository at this point in the history
  28. Do not change compositor options when not defined

    If Anaconda will set keyboard layouts to compositor but options are
    missed then we shouldn't change the compositor options but rather use
    what is already set.
    
    This will avoid problematic behavior of changing what user has defined
    in the system or similar cases. Also we have this tested in
    kickstart-tests, so this commit is fixing these tests.
    
    Also fix existing tests and cover this functionality by tests.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4cd89b3 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    d963400 View commit details
    Browse the repository at this point in the history
  30. Disable fedora-cisco repository in our containers

    We need to disable these repositories to avoid dependencies from it.
    
    With this changeset we depends on gnome-remote-desktop which depends on
    librdp which depends (Fedora only) on openh264. However, if fedora-cisco
    repository is not enabled it will instead install noopenh264 package
    which is a stub package in the main repositories.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    da20f70 View commit details
    Browse the repository at this point in the history
  31. Create GRDServer class only when required

    Move the GRDServer class creation to the end of the `setup_display`
    method. This class have checks for binaries in the `__init__` method
    which is causing early failures. Also do not create the class if it is
    not really used.
    jkonecny12 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    db576ec View commit details
    Browse the repository at this point in the history