From 86855ac9700fc0601e9b64eefa9604eac5c8ed33 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mar 24 2026 14:46:45 +0000 Subject: Add fedora-packaging agent skill This commit introduces a new agent skill `fedora-packaging`, providing the agent with direct access to Fedora's RPM packaging guidelines. Motivation: Packaging software for Fedora or EPEL requires adhering to many language, build, and system-level guidelines. By adding this skill, the agent can autonomously check the exact policy for naming, licensing, systemd scriptlets, weak dependencies, and language-specific concerns (like Rust, Go, Python, etc.), reducing hallucinations and ensuring compliance. Use cases: - Writing or editing RPM .spec files. - Packaging new software for Fedora/EPEL. - Reviewing Fedora package submissions against the official checklist. - Querying Fedora packaging policy on cross-cutting topics like crypto policies or weak dependencies. - Referencing language-specific guidelines and example .spec templates. Installation: To install this skill locally, run: npx skills add ./fedora-packaging # or install it globally: npx skills add ./fedora-packaging --global --- diff --git a/fedora-packaging/SKILL.md b/fedora-packaging/SKILL.md new file mode 100644 index 0000000..935b314 --- /dev/null +++ b/fedora-packaging/SKILL.md @@ -0,0 +1,132 @@ +--- +name: fedora-packaging +description: "Fedora RPM packaging guidelines for writing, reviewing, and maintaining spec files. Use when: writing or editing RPM .spec files, packaging software for Fedora/EPEL, reviewing Fedora package submissions, asking about Fedora packaging policy (naming, licensing, versioning, systemd, scriptlets, weak dependencies), or language-specific packaging for Rust, Go, Python, Java, Ruby, Perl, Haskell, OCaml, C/C++, Lua, Node.js, PHP, JavaScript, R, Fortran, Ada, D, Lisp, Tcl, Mono, Octave, or Emacs Lisp." +--- + +# Fedora Packaging Guidelines + +Reference material lives in `references/` relative to this skill's root. +All guideline files are AsciiDoc (`.adoc`). + +## Core Workflow + +1. Identify the language/technology and relevant cross-cutting concerns +2. Read the relevant reference(s) from the tables below +3. Use example spec templates from `references/examples/` as starting points +4. Apply general policies (naming, licensing, versioning) for all new packages + +## General Policies + +Read these for every new package or review. + +| Topic | File | +|-------|------| +| Naming | [Naming.adoc](references/pages/Naming.adoc) | +| Licensing | [LicensingGuidelines.adoc](references/pages/LicensingGuidelines.adoc) | +| Versioning | [Versioning.adoc](references/pages/Versioning.adoc) | +| Review checklist | [ReviewGuidelines.adoc](references/pages/ReviewGuidelines.adoc) | +| What can be packaged | [what-can-be-packaged.adoc](references/pages/what-can-be-packaged.adoc) | +| SourceURL | [SourceURL.adoc](references/pages/SourceURL.adoc) | +| Dist Tag | [DistTag.adoc](references/pages/DistTag.adoc) | + +## Cross-cutting Topics + +Read on demand, when relevant to the package. + +| Topic | File | When to read | +|-------|------|-------------| +| Alternatives | [Alternatives.adoc](references/pages/Alternatives.adoc) | Package provides alternatives | +| AppData / MetaInfo | [AppData.adoc](references/pages/AppData.adoc) | GUI applications | +| Conflicts | [Conflicts.adoc](references/pages/Conflicts.adoc) | Package conflicts with others | +| Crypto Policies | [CryptoPolicies.adoc](references/pages/CryptoPolicies.adoc) | Crypto/TLS usage | +| Cron files | [CronFiles.adoc](references/pages/CronFiles.adoc) | Package installs cron jobs | +| Debuginfo | [Debuginfo.adoc](references/pages/Debuginfo.adoc) | Debuginfo issues | +| Default Services | [DefaultServices.adoc](references/pages/DefaultServices.adoc) | Enabling services by default | +| Dep. Filtering | [AutoProvidesAndRequiresFiltering.adoc](references/pages/AutoProvidesAndRequiresFiltering.adoc) | Auto-provides/requires issues | +| Deprecating packages | [deprecating-packages.adoc](references/pages/deprecating-packages.adoc) | Retiring a package | +| Directory Replacement | [Directory_Replacement.adoc](references/pages/Directory_Replacement.adoc) | Replacing dirs with symlinks or vice versa | +| Initial Service Setup | [Initial_Service_Setup.adoc](references/pages/Initial_Service_Setup.adoc) | First-boot service config | +| Language Packs | [Langpacks.adoc](references/pages/Langpacks.adoc) | Translations / langpacks | +| Manual Changelog | [manual-changelog.adoc](references/pages/manual-changelog.adoc) | Changelog policy | +| Patch Status | [PatchUpstreamStatus.adoc](references/pages/PatchUpstreamStatus.adoc) | Documenting patch status | +| Per-Product Config | [Per-Product_Configuration.adoc](references/pages/Per-Product_Configuration.adoc) | Product-specific config | +| PkgConfig deps | [PkgConfigBuildRequires.adoc](references/pages/PkgConfigBuildRequires.adoc) | Using pkgconfig() deps | +| PKCS#11 | [Pkcs11Support.adoc](references/pages/Pkcs11Support.adoc) | Smartcard / PKCS#11 support | +| RPM Macros | [RPMMacros.adoc](references/pages/RPMMacros.adoc) | Shipping RPM macros | +| RPM Source Dir | [RPM_Source_Dir.adoc](references/pages/RPM_Source_Dir.adoc) | Source directory layout | +| Scriptlets | [Scriptlets.adoc](references/pages/Scriptlets.adoc) | Pre/post install scripts | +| Shell Completions | [ShellCompletions.adoc](references/pages/ShellCompletions.adoc) | Bash/zsh/fish completions | +| SSL Certificates | [SSLCertificateHandling.adoc](references/pages/SSLCertificateHandling.adoc) | SSL/TLS cert handling | +| Systemd | [Systemd.adoc](references/pages/Systemd.adoc) | Packages with systemd units | +| Tmpfiles.d | [Tmpfiles.d.adoc](references/pages/Tmpfiles.d.adoc) | Tmpfiles configuration | +| Unowned Dirs | [UnownedDirectories.adoc](references/pages/UnownedDirectories.adoc) | Directory ownership | +| Users and Groups | [UsersAndGroups.adoc](references/pages/UsersAndGroups.adoc) | System users/groups | +| Vpath builds | [vpath.adoc](references/pages/vpath.adoc) | Out-of-tree builds | +| Weak Dependencies | [WeakDependencies.adoc](references/pages/WeakDependencies.adoc) | Recommends/Suggests/Supplements | + +## Build Systems + +| Build System | File | +|-------------|------| +| CMake | [CMake.adoc](references/pages/CMake.adoc) | +| Meson | [Meson.adoc](references/pages/Meson.adoc) | + +## Programming Languages + +Read the language-specific guideline when packaging for that language. + +| Language | File(s) | Example specs | +|----------|---------|---------------| +| Ada | [Ada.adoc](references/pages/Ada.adoc) | | +| C / C++ | [C_and_C++.adoc](references/pages/C_and_C++.adoc) | | +| D | [D.adoc](references/pages/D.adoc) | | +| Fortran | [Fortran.adoc](references/pages/Fortran.adoc) | | +| Go | [Golang.adoc](references/pages/Golang.adoc) | `examples/golang/*.spec` | +| Go (legacy) | [Golang_old.adoc](references/pages/Golang_old.adoc), [Golang_advanced.adoc](references/pages/Golang_advanced.adoc), [Golang_templates.adoc](references/pages/Golang_templates.adoc) | | +| Haskell | [Haskell.adoc](references/pages/Haskell.adoc) | `examples/haskell-*.spec` | +| Java | [Java.adoc](references/pages/Java.adoc) | | +| JavaScript | [JavaScript.adoc](references/pages/JavaScript.adoc) | | +| Lisp | [Lisp.adoc](references/pages/Lisp.adoc) | | +| Lua | [Lua.adoc](references/pages/Lua.adoc) | | +| Mono | [Mono.adoc](references/pages/Mono.adoc) | | +| Node.js | [Node.js.adoc](references/pages/Node.js.adoc) | | +| OCaml | [OCaml.adoc](references/pages/OCaml.adoc) | `examples/ocaml-*.spec` | +| Octave | [Octave.adoc](references/pages/Octave.adoc) | | +| Perl | [Perl.adoc](references/pages/Perl.adoc) | | +| PHP | [PHP.adoc](references/pages/PHP.adoc) | | +| Python | [Python.adoc](references/pages/Python.adoc), [Python_Appendix.adoc](references/pages/Python_Appendix.adoc) | `examples/python-example.spec` | +| Python (legacy) | [Python_201x.adoc](references/pages/Python_201x.adoc) | | +| R | [R.adoc](references/pages/R.adoc) | | +| Ruby | [Ruby.adoc](references/pages/Ruby.adoc) | | +| Rust | [Rust.adoc](references/pages/Rust.adoc) | | +| Tcl/Tk | [Tcl.adoc](references/pages/Tcl.adoc) | | + +## Other Domain-specific Guidelines + +| Domain | File | +|--------|------| +| Ansible Collections | [Ansible_collections.adoc](references/pages/Ansible_collections.adoc) | +| BLAS/LAPACK | [BLAS_LAPACK.adoc](references/pages/BLAS_LAPACK.adoc) | +| Emacs | [Emacs.adoc](references/pages/Emacs.adoc) | +| Environment Modules | [EnvironmentModules.adoc](references/pages/EnvironmentModules.adoc) | +| Fonts | [FontsPolicy.adoc](references/pages/FontsPolicy.adoc) | +| GAP | [GAP.adoc](references/pages/GAP.adoc) | +| KDE | [KDEPackaging.adoc](references/pages/KDEPackaging.adoc) | +| LibreOffice Extensions | [LibreOfficeExtensions.adoc](references/pages/LibreOfficeExtensions.adoc) | +| MinGW | [MinGW.adoc](references/pages/MinGW.adoc) | +| MPI | [MPI.adoc](references/pages/MPI.adoc) | +| Sugar Activities | [SugarActivityGuidelines.adoc](references/pages/SugarActivityGuidelines.adoc) | +| Tree-sitter parsers | [Tree-sitter.adoc](references/pages/Tree-sitter.adoc) | +| Web Assets | [Web_Assets.adoc](references/pages/Web_Assets.adoc) | +| WordPress | [WordPress_plugin_packaging_guidelines.adoc](references/pages/WordPress_plugin_packaging_guidelines.adoc) | + +## Example Spec Templates + +All in `references/examples/`: + +- `python-example.spec` — Python package +- `golang/*.spec` — Go packages (minimal, full, binary, multi-package variants) +- `haskell-binary-library.spec`, `haskell-binary-only.spec`, `haskell-library-only.spec` +- `ocaml-example.spec`, `ocaml-dune-example.spec`, `ocaml-topkg-example.spec` +- `spectemplate-forge-*.spec` — Forge-hosted projects (release, tag, branch, commit, multi) +- `fonts/*.spec` — Font packaging templates diff --git a/fedora-packaging/references/examples b/fedora-packaging/references/examples new file mode 120000 index 0000000..02dc39d --- /dev/null +++ b/fedora-packaging/references/examples @@ -0,0 +1 @@ +../../guidelines/modules/ROOT/examples \ No newline at end of file diff --git a/fedora-packaging/references/pages b/fedora-packaging/references/pages new file mode 120000 index 0000000..5b00101 --- /dev/null +++ b/fedora-packaging/references/pages @@ -0,0 +1 @@ +../../guidelines/modules/ROOT/pages \ No newline at end of file