This repository contains the RPM .spec file and configuration files used to automatically build and distribute Espanso (with native Wayland support) for Fedora 43 and Fedora 44 using Fedora Copr.
The espanso.spec file automates the entire compilation and environment setup. Instead of manually configuring dependencies or setting security permissions, the RPM package handles it out of the box:
- Wayland Optimization: Compiles the binary directly from the official upstream source with the specific features required for Wayland (
--features modulo,vendored-tls,wayland). - Automated Permissions: Injects the necessary Linux capabilities (
setcap "cap_dac_override+p") right after installation so Espanso can intercept and inject text natively under Wayland. - The Safe Config Strategy (
--no-clobber): Espanso requires a skeleton config directory to start up without crashing. The spec file installs the official default expansion configuration templates (with the:espansoand:dateexamples) into a system-wide directory (/usr/share/espanso/skel/). When a user starts the systemd service, it runs a pre-check command:cp -r --no-clobber /usr/share/espanso/skel/* %h/.config/espanso/- First-time users: Seamlessly receive the complete default configurations.
- Existing users: The
--no-clobberflag prevents systemd from overwriting any existing custom expansions or configurations during updates.
When making modifications or updating the application, use the following workflows to ensure Fedora's package manager (DNF) recognizes the upgrades properly.
If you are fixing a packaging bug, changing a systemd configuration, or updating the README/Notice text, but Espanso itself hasn't released a new version:
- Leave the
Version:tag exactly as it is. - Increment the
Release:number by 1 (e.g., change1%{?dist}to2%{?dist}). - Document your changes at the top of the
%changelogblock.
If the upstream developers release a brand new version of Espanso (e.g., upgrading from 2.3.0 to 2.4.0):
- Update the
Version:tag to match the new release string (e.g.,Version: 2.4.0). - Reset the
Release:number back to1(e.g.,Release: 1%{?dist}). - Document the upstream upgrade at the top of the
%changelogblock.
-
Commit and push your changes to this repository:
git add espanso.spec git commit -m "Update package version to X.Y.Z" git push origin main -
Log in to the Fedora Copr Portal.
-
Navigate to your project, select the
espansopackage, and click Build.
β οΈ Important Reminder: Ensure that "Internet access" remains enabled in your Copr project settings, otherwisecargowill fail to fetch Rust crates during compilation.