Skip to content

Carry the tag's pf number in the source package's spec - #31

Merged
archledger merged 1 commit into
plasma-fusionfrom
fix/srpm-carries-pf
Nov 14, 2026
Merged

archledger merged 1 commit into
plasma-fusionfrom
fix/srpm-carries-pf

Conversation

@archledger

Copy link
Copy Markdown
Owner

What

The source package build-fork-rpm.sh builds now carries the tag's pf number in its spec. Before, every source package carried the spec's default pf 3.

Why

Copr build 11325448 of v6.8.2-pf4 failed after 25 seconds:

error: Bad file: /builddir/build/SOURCES/kwin-v6.8.2-pf3.tar.gz: No such file or directory

Copr rebuilds the source package from the spec inside it (rpmbuild -bs in mock), without the --define "pf N" the script passes. The spec's default %{!?pf:%global pf 3} then names the pf3 archive, but the package holds kwin-v6.8.2-pf4.tar.gz. The pf3 build worked only because 3 was the default.

The change

  • build-fork-rpm.sh builds from a copy of the spec with the tag's number written in as the default (%{!?pf:%global pf N}).
  • Before building anything, it checks with rpmspec -P that the copy alone names the tag's archive.
  • The spec's comment says so.

For pf3 the copy is the spec as it is.

Tests (the fork's CI image)

  • Before: the spec inside the pf4 source package built before the change parses alone to .../v6.8.2-pf3/kwin-v6.8.2-pf3.tar.gz, while the package holds kwin-v6.8.2-pf4.tar.gz.
  • After: that spec says %{!?pf:%global pf 4} and parses alone to .../v6.8.2-pf4/kwin-v6.8.2-pf4.tar.gz. A rebuild from the source package alone (rpmbuild -bs, no --define) writes kwin-6.8.2-3.fc44.pf4.src.rpm.
  • bash -n and ShellCheck (-S warning): clean.

The pf4 source package from this branch went to Copr as the replacement for build 11325448. Its source is the same GitHub archive of the signed tag, and its spec differs only in the default line and its comment.

A source package built from v6.8.2-pf4 failed in Copr. Copr rebuilds
the source package from the spec it carries (rpmbuild -bs in mock,
with no --define), and that spec still said pf 3, so it asked for
kwin-v6.8.2-pf3.tar.gz, which the package does not have. The pf3
build worked only because 3 was the spec's default.

build-fork-rpm.sh now builds from a copy of the spec with the tag's
number written in as the default. Before building anything, it checks
with rpmspec -P that the copy alone names the tag's archive.

Tested in the fork's CI image. Before the change, the spec of the
source package built from v6.8.2-pf4 parses alone to the pf3 archive.
After it, the spec says pf 4 and parses to kwin-v6.8.2-pf4.tar.gz,
and a rebuild from the source package alone (rpmbuild -bs, no
--define) succeeds.

Signed-off-by: Wisbendji Fimerlus <archledger236@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T10:53:04.905875Z 9a55ee4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@archledger
archledger merged commit 112ebc3 into plasma-fusion Nov 14, 2026
2 checks passed
@archledger
archledger deleted the fix/srpm-carries-pf branch November 14, 2026 13:18
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