Skip to content

Add Fedora RPM packaging and fix system theme sync - #174

Open
subhangadirli wants to merge 5 commits into
Cleboost:masterfrom
subhangadirli:master
Open

Add Fedora RPM packaging and fix system theme sync#174
subhangadirli wants to merge 5 commits into
Cleboost:masterfrom
subhangadirli:master

Conversation

@subhangadirli

Copy link
Copy Markdown
Contributor

Hi, i switched to Fedora :D

Summary

  • “Add Fedora .rpm” packaging (“packages/rpm/rpmspec ” → “build-rpm.sh”), wired into
  • the “replease_work” job builds and uploads alongside the existing “.deb” archives
  • Fix light/dark mode not following the system theme — plain GTK4 doesn't auto-sync with
    the desktop's dark-mode preference like libadwaita does, so it uses color-scheme from the
    XDG Desktop Portal and stardust and app keep it in sync with
    EtK application-prefer-dark-theme
  • Minor cleanup auto-fix

Test plan

  • Built and installed the RPM locally on Fedora 44; confirmed the app now follows the
    system dark theme
  • “cargo build --release” succeeds

subhangadirli and others added 5 commits August 12, 2026 19:59
Plain GTK4 (without libadwaita) does not follow the desktop's dark-mode
preference on its own. Read org.freedesktop.appearance color-scheme
from the XDG Desktop Portal at startup and apply it via
gtk-application-prefer-dark-theme, then keep following live changes
via the SettingChanged signal.

xdg-desktop-portal-gnome wraps the reported value in an extra GVariant
"v" layer beyond what the portal spec calls for, so unwrap variant
layers in a loop rather than once.
Adds packages/rpm/rustmius.spec plus a build-rpm.sh helper mirroring
build-deb.sh: it snapshots the working tree into a source tarball,
builds in a private rpmbuild _topdir, and copies the resulting RPMs
into dist/. Runtime deps (gtk4, vte291-gtk4, openssl, etc.) are picked
up automatically from the linked binary via RPM's find-requires.
Adds an rpm job to the release workflow, mirroring the deb job: it
runs inside a fedora:latest container, reuses the prebuilt generic
x86_64 binary artifact via SKIP_BUILD=1, and uploads the resulting
package for the release job to attach to the GitHub release.

To support SKIP_BUILD, build-rpm.sh now stages a prebuilt binary into
the source tarball when present, and the spec's %build step skips
`cargo build` when it finds one. Also disables Fedora's debuginfo/
debugsource subpackages (%global debug_package %{nil}): every release
channel builds with `strip = "symbols"`, so there's no debug info for
find-debuginfo to extract from a prebuilt binary anyway.

Also ignores stray *.rpm build output and rpmbuild/ trees, matching
the existing deb/AUR artifact ignores.
@Cleboost

Copy link
Copy Markdown
Owner

Thanks for the PR — both features are useful. A few things before merge:

Theme sync

The portal approach looks right for plain GTK4. One issue in the current code: init_theme_sync() creates a local DBusProxy and drops it at the end of the function. That should stop SettingChanged from firing after startup — the initial Read works, but live dark/light toggles likely won't. Please keep the proxy alive for the app lifetime (e.g. OnceLock<DBusProxy>).

Minor: for_bus_sync on the UI thread at window creation can stall startup if the portal is slow.

RPM packaging

  • Version: 2.5.0 is hardcoded in the spec, but build-rpm.sh names the source tarball from Cargo.toml. Release CI only bumps Cargo.toml, so the next tag will likely break unless the spec is updated manually every time. Please drive the version from Cargo.toml (e.g. rpmbuild --define "version $VERSION").
  • The rpm CI job installs gtk/vte devel packages but not cargo, rust, gcc, or desktop-file-utils, which are listed as BuildRequires in the spec. rpmbuild -ba should fail on the dependency check. Either install them in CI, or trim the BuildRequires if they're not needed when SKIP_BUILD=1 (note %check still needs desktop-file-utils for desktop-file-validate).

Optional: consider building the binary inside the Fedora container instead of reusing the Ubuntu artifact — not a hard blocker (glibc backward compat should be fine), but cleaner for a Fedora package.

Happy to re-review once the proxy lifetime and spec/CI deps are fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants