Files
StepForge/docs/linux/dnf.md
TylerandClaude Fable 5 575d893f90
Template tests / tests (pull_request) Failing after 33s
Add production .rpm packaging and dnf setup; share runtime staging
Phase 3 of the improvement plan (PR 9 of the sequence): the dnf/Fedora
packaging half, in separate Linux-specific files, mirroring the apt/.deb work.

- packaging/linux/common/stage-runtime.sh: shared runtime-only payload staging
  extracted from the .deb builder so the two package formats never drift. It
  copies app code + a fixed Electron runtime + production npm deps (npm ls
  --omit=dev), guards against dev-dep leaks, and fails without node_modules.
  The .deb builder now delegates to it.
- packaging/linux/fedora/stepforge.spec: runtime Requires (nss, nspr, gtk3,
  …), Recommends (xinput, portal, pipewire), %license, and a %post that makes
  chrome-sandbox setuid and refreshes desktop/MIME/icon caches. No compilation
  — it packages the prebuilt BuildRoot.
- packaging/linux/fedora/package.sh: stages the shared payload, substitutes
  version/maintainer into the spec, and runs rpmbuild against the prebuilt
  BuildRoot with detected arch. Requires rpmbuild + node_modules; emits an
  .rpm + sha256.
- scripts/linux/dnf/install-runtime-deps.sh and install-build-deps.sh:
  separate runtime vs build dependency sets for dnf (runtime installs no build
  tools).
- docs/linux/dnf.md: Fedora/RHEL install + build guide, distinct from apt.md.

Tests: packaging-linux.test.js gains Fedora/dnf structural checks (spec
Requires + MPL-2.0 + %license + sandbox setup, builder shares staging +
requires rpmbuild, dnf build/runtime dep separation, shared staging never
copies the whole dev tree). tests/integration/linux/package-rpm.test.sh builds
a real .rpm and asserts runtime-only contents (honest skip when rpmbuild is
absent, as on this apt host).

Verified: 13 packaging unit tests pass; the refactored .deb builder still
produces a valid runtime-only package (integration test green); the .rpm
integration test skips cleanly where rpmbuild is unavailable.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-03 23:33:11 -05:00

2.3 KiB

StepForge on dnf-based Linux (Fedora / RHEL)

This is the setup and packaging guide for dnf-based distributions. Debian, Ubuntu, and other apt-based systems have a separate guide: apt.md.

Install from the .rpm

sudo dnf install ./stepforge-<version>-1.<arch>.rpm

dnf pulls the required runtime libraries automatically (they are declared as Requires). The package installs:

  • the app and a fixed Electron runtime under /opt/stepforge,
  • the stepforge launcher at /usr/bin/stepforge,
  • a desktop entry, icons, and .sfgz/.sfglt file associations.

Launch it from your application menu or run stepforge.

Sandbox

The launcher runs sandboxed. On most modern kernels the Chromium user-namespace sandbox works out of the box; the package's %post also makes the setuid chrome-sandbox helper usable as a fallback. StepForge will not silently launch unsandboxed.

Install from the portable tarball

The portable tarball (same one shipped for apt systems) includes the /usr/bin/stepforge launcher. Install the runtime libraries first:

bash scripts/linux/dnf/install-runtime-deps.sh
tar -xzf stepforge_<version>_linux-x64.tar.gz
./usr/bin/stepforge

Capture capabilities on dnf systems

  • X11: full per-click capture with an accurate marker (needs xinput).
  • Wayland (Fedora's default): screen capture via the XDG Desktop Portal + PipeWire; the portal asks permission once per recording. Per-click capture with coordinates is not exposed by Wayland, so recording uses a global hotkey or interval trigger. StepForge reports the active trigger honestly.

Open Settings → Diagnostics in the app to see the detected session type, portal/PipeWire status, and the active capture profile.

Build the .rpm yourself

bash scripts/linux/dnf/install-build-deps.sh    # rpm-build, rpmdevtools, Xvfb, …
nvm install && nvm use                           # pinned Node 22 (see .nvmrc)
npm ci
npm run package:linux:rpm                         # -> build/artifacts/*.rpm + sha256

The builder stages only runtime files (shared with the .deb builder via packaging/linux/common/stage-runtime.sh): the app code, a fixed Electron runtime, and production npm dependencies. It never copies the development node_modules and fails if node_modules is missing.