Skip to content

Commit f6f6492

Browse files
authored
Fix COPR spec + point release-prepare at sync-manual-channels (#22)
* Fix COPR mock build: strip percent-signs from spec-file comments v0.1.6's COPR build failed in mock (all 10 chroots) with: warning: Macro expanded in comment on line 5: %install lays error: Name field must be present in package: (main package) Root cause: RPM specs do NOT treat `#` as escaping `%`. The macro processor runs before the comment processor, so a `%macro` token inside a comment gets expanded just like one in a directive. Two comments in packaging/qn-bin.spec mentioned `%prep` and `%install` to describe what those sections do. When RPM hit the `%install` in line 5's comment it expanded it, corrupting the parser's preamble state, and by the time RPM reached `Name: qn` on line 15 it had lost context and emitted the misleading "Name field must be present" error. Fix: remove all `%`-prefixed macro mentions from comments and add a note (without a `%` symbol) reminding future editors that the character is unsafe in spec comments. Belt-and-suspenders: every comment line in the spec is now grep-clean of `%` entirely (`grep -nE '^#.*%' qn-bin.spec` → no matches), so any future edit that accidentally reintroduces `%foo` in a comment gets caught by a one-line lint. This fix is forward-only: v0.1.6 already shipped to crates.io, GHCR, .deb, and the GitHub Release. v0.1.7 will exercise the corrected COPR spec and backfill COPR for the recent versions. * Point release-prepare's tail at release-sync-manual-channels After release-prepare's CI-wait succeeds, the maintainer's next move is to sync the three manual channels (Homebrew tap, Scoop bucket, AUR qn-bin). The tail message used to stop at "inspect the release" — this adds a pointer to release-sync-manual-channels with the version baked in for a clean copy-paste, plus a note that omitting the args auto-detects the version from the latest tag.
1 parent bd1b3db commit f6f6492

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

Justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,7 @@ release-prepare version yes="0":
470470
echo
471471
echo "Phase 1 complete. Inspect the release at:"
472472
echo " https://github.com/$(gh repo view --json nameWithOwner -q .nameWithOwner)/releases/tag/v{{version}}"
473+
echo
474+
echo "Next: sync the manual channels (Homebrew, Scoop, AUR) by running"
475+
echo " just release-sync-manual-channels ~/qn {{version}}"
476+
echo "(omit the args to auto-detect the version from the latest tag)."

packaging/qn-bin.spec

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
#
33
# This spec is built on COPR's mock chroots. The SRPM embeds both Linux
44
# gnu tarballs (x86_64 + aarch64) cargo-dist published for this release;
5-
# %prep selects the right one for the chroot's arch and %install lays
6-
# the binary + docs into the buildroot. No Rust toolchain involved on
7-
# the COPR side — the binary inside the resulting RPM is bit-identical
8-
# to what ships in crates.io, Homebrew, .deb, AUR, and the GHCR image.
5+
# the prep section selects the right one for the chroot's arch and the
6+
# install section lays the binary + docs into the buildroot. No Rust
7+
# toolchain involved on the COPR side — the binary inside the resulting
8+
# RPM is bit-identical to what ships in crates.io, Homebrew, .deb, AUR,
9+
# and the GHCR image.
10+
#
11+
# Comments here intentionally avoid the percent-sign character entirely
12+
# — RPM expands macros inside comments at parse time, which corrupts
13+
# the parser state and causes downstream "Name field must be present"
14+
# errors that look unrelated.
915
#
1016
# Built by .github/workflows/publish-copr.yml on each release. That
1117
# workflow pre-downloads both arch tarballs into ~/rpmbuild/SOURCES/
@@ -19,8 +25,8 @@ Summary: Command-line interface for the Quicknode SDK
1925
License: MIT
2026
URL: https://github.com/quicknode/cli
2127

22-
# Both arch tarballs ship in the SRPM. %prep picks one based on the
23-
# chroot's arch.
28+
# Both arch tarballs ship in the SRPM. The prep section picks one based
29+
# on the chroot's arch.
2430
Source0: https://github.com/quicknode/cli/releases/download/v%{version}/quicknode-cli-x86_64-unknown-linux-gnu.tar.xz
2531
Source1: https://github.com/quicknode/cli/releases/download/v%{version}/quicknode-cli-aarch64-unknown-linux-gnu.tar.xz
2632

0 commit comments

Comments
 (0)