Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Espanso Fedora Copr Package

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.


πŸ› οΈ About the Spec File

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 :espanso and :date examples) 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-clobber flag prevents systemd from overwriting any existing custom expansions or configurations during updates.

πŸ”„ Maintenance & Versioning Workflow

When making modifications or updating the application, use the following workflows to ensure Fedora's package manager (DNF) recognizes the upgrades properly.

Scenario A: Upstream version stays the same (Fixes & Tweaks)

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:

  1. Leave the Version: tag exactly as it is.
  2. Increment the Release: number by 1 (e.g., change 1%{?dist} to 2%{?dist}).
  3. Document your changes at the top of the %changelog block.

Scenario B: New upstream version released by Espanso

If the upstream developers release a brand new version of Espanso (e.g., upgrading from 2.3.0 to 2.4.0):

  1. Update the Version: tag to match the new release string (e.g., Version: 2.4.0).
  2. Reset the Release: number back to 1 (e.g., Release: 1%{?dist}).
  3. Document the upstream upgrade at the top of the %changelog block.

πŸš€ How to Trigger a Build

  1. 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
    
  2. Log in to the Fedora Copr Portal.

  3. Navigate to your project, select the espanso package, and click Build.

⚠️ Important Reminder: Ensure that "Internet access" remains enabled in your Copr project settings, otherwise cargo will fail to fetch Rust crates during compilation.

About

Copr Repo for building espanso for wayland on fedora

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors