Commit a2e2277
authored
Fix COPR SRPM build: embed both arch tarballs in the SRPM (#20)
v0.1.5's custom-publish-copr job failed at the "Build SRPM" step with:
error: Bad file: /home/runner/rpmbuild/SOURCES/quicknode-cli-x86_64-
unknown-linux-gnu.tar.xz.sha256: No such file or directory
Root cause: `rpmbuild -bs` needs Source files to exist locally in
~/rpmbuild/SOURCES/ to build the SRPM, even when the spec declares
them as URLs. The "URLs get fetched at build time" model only kicks
in when COPR's mock runs the SRPM, not when the SRPM is initially
assembled.
There was a second latent bug: the spec used %ifarch to template a
single Source URL based on the build host's arch. The runner is
x86_64, so the SRPM would have only embedded the x86_64 tarball, and
COPR's aarch64 mock builds would have failed for the opposite reason.
Both fixed by switching to a single architecture-fat SRPM:
* packaging/qn-bin.spec — drops the %ifarch URL templating, drops
the curl + sha256 dance in %prep. Declares both arch tarballs as
Source0 (x86_64) + Source1 (aarch64). %prep uses %ifarch with
%setup -T -b N to extract the right embedded source for the
chroot's arch.
rpm itself sha256-verifies embedded sources at extract time
(sha256s live in the SRPM header), so we don't need to redo it
in %prep.
* .github/workflows/publish-copr.yml — adds a step that uses gh
release download to pull both arch tarballs into SOURCES/ before
invoking `rpmbuild -bs`. The SRPM ends up carrying both tarballs
(~8 MB) and ships once to COPR.
Drops --enable-net=on from `copr-cli build`: now that the SRPM
embeds the sources, mock chroots don't need network. The COPR
project's "enable net" setting still applies if we ever do need
it; this flag was just a per-build override.
Single SRPM, single copr-cli dispatch, all chroots build from the
same source set. The binary in the resulting RPMs stays bit-identical
to what ships everywhere else.
v0.1.5 already shipped to crates.io, GHCR, .deb, and the GitHub
Release — only COPR was missed. v0.1.6 (next release) will exercise
this fix and backfill COPR.1 parent 3c97c75 commit a2e2277
2 files changed
Lines changed: 42 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| |||
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
38 | 26 | | |
39 | 27 | | |
40 | 28 | | |
| |||
51 | 39 | | |
52 | 40 | | |
53 | 41 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
66 | 48 | | |
67 | 49 | | |
68 | 50 | | |
| |||
0 commit comments