Skip to content

COPR: disable debuginfo subpackage + sed version into spec#24

Merged
johnpmitsch merged 1 commit into
mainfrom
fix/copr-mock-debuginfo-and-version-sub
Jun 11, 2026
Merged

COPR: disable debuginfo subpackage + sed version into spec#24
johnpmitsch merged 1 commit into
mainfrom
fix/copr-mock-debuginfo-and-version-sub

Conversation

@johnpmitsch

Copy link
Copy Markdown
Collaborator

Summary

v0.1.7's COPR build got past everything from PR #20 + #22 and dispatched cleanly to all 10 chroots. EPEL 10 succeeded — first real qn RPMs are now in the COPR repo. But the other 8 chroots failed with two issues:

Bug 1: Older RPMs don't inherit --define qn_version

EPEL 9 + Fedora 42-44 saw literal %{qn_version} in Version: and the SRPM filename glob:

warning: line 22: Possible unexpanded macro in: Version: %{qn_ver...
error: File not found by glob: /builddir/build/originals/qn-%{qn_version}-1.el9.src.rpm

When mock re-parses the SRPM during the binary-build phase, it doesn't inherit the source-build's --define. EPEL 10's RPM handles this; older ones don't.

Fix: sed the version literally into the spec in the workflow before rpmbuild -bs. The SRPM gets Version: 0.1.8 baked in; every downstream parse sees the same literal. @@QN_VERSION@@ is the placeholder in the checked-in spec.

Bug 2: Fedora's strict files check rejects auto-generated debug symbols

error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/bin/qn-*.debug

Fedora's RPM auto-generates a debug subpackage via find-debuginfo and expects it claimed in the files section. Our spec only claims /usr/bin/qn + docs.

Fix: %global debug_package %{nil} near the top of the spec. Our binary is already stripped by cargo-dist; there's no value in shipping a -debuginfo subpackage.

Status

v0.1.7's EPEL 10 builds succeeded — Phase 7 is partially shipped. After this PR + v0.1.8, all 10 chroots should be green and the last channel is fully automated.

Test plan

  • dist plan exits 0.
  • Sed substitution smoke-tested locally: sed "s/@@QN_VERSION@@/0.1.8/g" packaging/qn-bin.spec produces a valid spec with Version: 0.1.8 and 0.1.8-1 in the changelog header.
  • grep -nE '^#.*%' packaging/qn-bin.spec returns no matches.
  • After merge, cut v0.1.8 and confirm all 10 chroots succeed in COPR.

v0.1.7's COPR build dispatched cleanly to all 10 chroots (the
"Name field" bug from PR #22 is fixed), and EPEL 10's two chroots
*succeeded* — first time COPR has shipped a real qn build. But the
other 8 chroots failed with two distinct issues:

1. Older RPMs (EPEL 9, Fedora 42-44) didn't honor the source build's
   `--define qn_version=...`. When mock re-parsed the SRPM during the
   binary-build phase, it saw a literal `%{qn_version}` in Version:
   and the SRPM filename glob, leading to:

     warning: line 22: Possible unexpanded macro in: Version: %{qn_ver...
     error: File not found by glob: /builddir/build/originals/qn-%{qn_version}-1.el9.src.rpm

   EPEL 10's RPM is newer and handles the source-build define
   correctly, hence the partial success.

   Fix: sed the version literally into the spec file in the workflow
   before `rpmbuild -bs`. The SRPM gets the real version baked in
   everywhere, every downstream parse sees the same literal. `@@QN_VERSION@@`
   is the placeholder.

2. Fedora's strict "unpackaged files found" check killed the build with:

     error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/bin/qn-*.debug

   Fedora's RPM auto-generates debug symbols via find-debuginfo and
   expects them packaged. Our spec only claims /usr/bin/qn + docs in
   the files section.

   Fix: `%global debug_package %{nil}` near the top of the spec. Our
   binary is already stripped by cargo-dist upstream; there's nothing
   for debuginfo to extract, and even if there were, we wouldn't want
   to ship a -debuginfo subpackage for a single-binary tool.

v0.1.7's EPEL 10 success means Phase 7 is partially shipped — anyone
on Fedora-10-derived distros can `dnf copr enable quicknode/qn && dnf
install qn` today. v0.1.8 (next release) should backfill Fedora
42-44 and EPEL 9.
@johnpmitsch johnpmitsch merged commit a984281 into main Jun 11, 2026
13 checks passed
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