GTK4 / Wayland migration record

Current status

GTK4/PyGObject/libadwaita is a staged candidate. Textual remains the production interface on tty1; the Live image must not enable feclora-gtk.service or remove the Textual runtime until every acceptance gate below is met. tty2 remains the independent root maintenance and recovery terminal.

The GTK source contains all 14 navigation sections. The legacy Textual frontend has 49 distinct literal privileged-API action names; all 49 identifiers are present in GTK. A static call-site inventory finds 42 of those identifiers in direct literal self.api.submit calls. Seven are dispatched through variables or loops: arm_deployment_job, cancel_deployment_job, export_p2v_s3, pxe_service_status, reconcile_deployment_job, start_deployment_service and stop_deployment_service. GTK also makes two additional literal queries, local_operations and recovery_jobs. This is identifier coverage only; it does not establish semantic parity. Parameter shapes, defaults, form validation, confirmation wording, destructive-scope checks, progress interpretation, cancellation races, retry behavior, error recovery and persisted state must also be compared. The audit remains open for every section and workflow.

Required graphics architecture

The GTK systemd unit and source enforce the Wayland environment, but they are not production-enabled. The candidate unit is staged only so its configuration can be inspected and tested.

Software-renderer constraint

Fedora 45’s stock Weston package declares a dependency on mesa-dri-drivers. The Mesa DRI 26.2.6 package metadata included libX11-xcb, while the newer 26.2.7 stable package metadata no longer lists those X11 dependencies. The candidate still removes and rejects the DRI package because Weston’s GL renderer is disabled and the appliance deliberately uses software rendering; this avoids carrying an unused graphics stack or depending on that package’s changing dependency closure. Fedora 45’s Mesa EGL 26.2.6 package still requires libX11-xcb and libX11, so it is explicitly forbidden. The candidate disables Weston’s GL and Vulkan renderers at build time (-Drenderer-gl=false -Drenderer-vulkan=false) and selects Pixman explicitly with --renderer=pixman; DRM/KMS and kiosk-shell remain enabled. The GTK build disables its Vulkan renderer, selects the Cairo GSK renderer, and sets GDK_DISABLE=gl,egl,glx,vulkan,dmabuf before importing GTK. This avoids requesting GL, EGL, GLX, Vulkan or dmabuf rendering paths at runtime. The spec patcher and RPM verifier remove/reject the unused Mesa DRI and EGL packages. This is a deliberate software-compositing trade-off: UI rendering consumes CPU and must be measured on the target hardware. The runtime dependency-closure audit must prove that no Mesa DRI/EGL package with X11 dependencies is pulled in.

Fedora package metadata: Weston 15.0.1-3.fc45, Mesa DRI drivers, Mesa EGL.

Fedora 45 source rebuilds

The required source baselines and Meson options are:

Cairo 1.18.6:
  -Dxlib=disabled -Dxcb=disabled -Dxlib-xcb=disabled

Weston 15.0.1:
  -Dxwayland=false -Dbackend-x11=false
  -Dbackend-drm=true -Dshell-kiosk=true -Dsystemd=true
  -Drenderer-gl=false -Drenderer-vulkan=false

GTK 4.24.1:
  -Dx11-backend=false -Dwayland-backend=true -Dvulkan=disabled

libadwaita 1.10.0:
  Rebuild against the custom GTK4 and Cairo RPMs.

Why Cairo must also be rebuilt

The candidate must retain Fedora’s system python3-gobject and python3-cairo packages rather than installing PyGObject through pip. Their dependency graph matters: python3-gobject requires libcairo, libcairo-gobject and python3-cairo. The stock Fedora 45 Cairo 1.18.6 runtime RPM in turn requires libX11, libXext and libXrender. Therefore the PyGObject packages are staged in packages/wayland-candidate-runtime.txt and deliberately excluded from the current Textual Live image until the custom X11-free Cairo and Cairo-GObject RPMs have been built and verified. Rebuilding only Weston and GTK4 would otherwise pull X11 libraries into the appliance through the retained system PyGObject package.

The build pipeline now rebuilds Fedora 45 Cairo 1.18.6 first, with Xlib and XCB surfaces disabled. Its Cairo spec patch removes X11-specific dependency declarations and Xlib/XCB headers/pkg-config file entries from the generated RPM metadata. The resulting cairo and cairo-gobject runtime RPMs must be installed alongside the unchanged Fedora python3-gobject and python3-cairo packages. The Cairo development RPMs are build-only artifacts and are separated under out/wayland-rpms/build-deps/; they must not be added to the Live image.

This is a prerequisite, not evidence of success: the Fedora Cairo spec rewrite and the resulting RPMs still need to be built and inspected on a Fedora 45 host.

RPM inspection gate

Before incorporation, inspect every generated non-source binary RPM from all four Fedora builds (runtime, development and debug subpackages) with:

build/verify-wayland-rpms.sh \
  weston.rpm weston-libs.rpm gtk4.rpm libadwaita.rpm \
  cairo.rpm cairo-gobject.rpm \
  build-deps/gtk4-devel.rpm \
  build-deps/cairo-devel.rpm build-deps/cairo-gobject-devel.rpm

The verifier rejects:

Use its –installed-root mode on the completed target root before release. That mode also requires the retained python3-gobject and python3-cairo packages and audits every installed RPM’s files, requirements and advertised capabilities. Static fixtures are not substitutes for actual RPM inspection.

Building the Fedora 45 RPM candidates

On a Fedora 45 x86_64 build host, install the host tools with make deps, then add the build user to the mock group and start a new login session:

sudo usermod -aG mock "$USER"
# Log out and back in, then:
make wayland-rpms

The build pipeline checks out these exact Fedora 45 dist-git release tags, rather than a moving branch head:

The GTK 4.24.1 source is intentionally pinned. As of 2026-11-28, Fedora’s package overview lists 4.24.2-1.fc45 as stable and 4.24.1-1.fc45 as updates-testing. The requested 4.24.1 baseline must not silently drift to the newer stable build; the builder records the exact dist-git tag and resolved commit in its source manifest.

The pipeline verifies exact source RPM provenance for every generated binary subpackage, patches the Meson switches, assigns the reserved Feclora RPM epoch 1, and sets the custom release 99.fc45.feclora1. Epoch 1 prevents any stock Fedora epoch-0 build, including a future higher upstream version, from superseding these packages. Release 99 orders the custom rebuild above same-version Fedora builds.

Weston 15.0.1 has no launcher-libseat Meson option. Its DRM backend unconditionally resolves the libseat dependency; the generated weston-libs RPM must therefore require libseat.so.1, which the RPM verifier checks.

The build order is:

  1. Build Cairo 1.18.6 and locate its runtime and development subpackages.
  2. Install the custom Cairo runtime/development RPMs into the persistent Fedora 45 Mock root.
  3. Build Weston 15.0.1 with DRM/kiosk enabled and XWayland/X11 disabled.
  4. Build GTK 4.24.1 with Wayland enabled and GDK X11 disabled.
  5. Install the custom GTK4 runtime/development RPMs into that same Mock root.
  6. Rebuild libadwaita 1.10.0 against the custom GTK4/Cairo stack.
  7. Inspect every generated binary RPM, then create a separate minimal Fedora 45 Mock runtime root with the six custom runtime RPMs plus Fedora’s python3-gobject/python3-cairo packages. Resolve its complete dependency closure and run the installed-root verifier before copying artifacts.
  8. Save the resolved package closure and audit logs alongside the RPMs.

The isolated Mock closure is a candidate-stack check, not a substitute for the final LiveOS audit: Fedora’s @core transaction and all Kickstart packages can add further dependencies. After building an image, run build/verify-wayland-rpms.sh --installed-root <mounted-live-root> <six-custom-rpms...> against the complete installed root before any release decision.

The pipeline does not modify Kickstart or install the RPMs into the Live image. A successful run retains the patched Fedora source RPMs under sources/, per-package Mock logs under build-logs/, the source commit manifest and build-environment.txt. On failure, the temporary build workspace is deliberately retained and its path is printed so the failure logs and partial artifacts can be inspected. Review these records and all RPM metadata before considering package admission. If the host cannot reach Fedora dist-git or Fedora repositories, the build is blocked; do not substitute stock RPMs or unverified upstream builds.

Semantic parity audit

For each Textual workflow, compare the GTK implementation and tests at the form and state-transition level:

  1. Input fields, types, required/optional status, defaults and parameter names.
  2. Validation order and messages, including server-side preflight calls.
  3. Destructive confirmation scope, destination identity and irreversible effects; cancellation must not bypass confirmation.
  4. Asynchronous request state, progress units, operation IDs and stale-page callback handling.
  5. Cancellation request/acknowledgement races, repeated clicks and the possibility of partially written destinations.
  6. Terminal states: completed, failed, cancelled, interrupted and unknown; status polling errors must not imply that a job stopped.
  7. Refresh, retry, recovery and persistence after navigation or process loss.
  8. Secret handling: no passphrases or credentials in logs, API events, persisted UI state or exception text.

The audit must cover all 14 sections, not only the 18 named disk operations. Every semantic difference must be documented and either corrected or approved as an intentional product change. Add behavioral tests for each workflow; AST/string checks and action-name comparisons are insufficient.

Weston session and appliance integration

Before enabling GTK:

Release gates

Until every gate is checked with recorded evidence, Textual remains the production boot interface. Do not claim a successful ISO build, VM boot, BIOS/UEFI acceptance or RPM audit unless that exact operation has been run.

Audit update — 2026-11-28

The Fedora source-spec patcher now applies a second fail-closed pass to all four pinned source families. It removes X11-only dependency tokens from RPM dependency tags and X11 payload declarations from %files sections while preserving unrelated Wayland requirements on mixed dependency lines. In particular, the Weston and GTK4 specs are checked for XWayland/X11 modules, GDK X11 headers and typelibs, X11 pkg-config files, and X11 library payloads. The generated-RPM verifier also rejects static/archive and libtool X11 libraries (.a/.la) and additional X11 pkg-config requirements such as Xcursor, Xinerama, Xi, XFixes, XComposite, XDamage and XRandR.

The GTK history audit found a safety-relevant presentation gap: the shared remote-job/deployment history renderer, ddrescue history and client history did not consistently expose backend inspection_errors. GTK now displays the affected record identifiers and an explicit warning not to resume or repeat those operations before manual inspection. The client inventory summary is also separate from the client-history status so asynchronous inventory refreshes cannot overwrite the history result.

The kiosk candidate validation now checks that the GTK unit opens the dedicated feclora-wayland PAM session, that pam_systemd registers it as a Wayland session, and that Weston uses the logind libseat backend on tty1. The Kickstart already stages that PAM file and the GTK unit but does not enable the GTK service.

These changes are source and test updates only. No Fedora 45 Mock build was available during this audit: the spec rewrites have not yet been applied to actual downloaded Fedora source trees, no custom RPMs have been generated or inspected, and no target-root closure has been admitted. The GTK/Weston systemd session, full Python test suite, ISO build, VM, BIOS/UEFI and physical hardware checks also remain pending. Textual remains the production interface.