From 11308bc7e10c84a2576fa02662c65bccaf4284da Mon Sep 17 00:00:00 2001 From: Markus Frei Date: Thu, 29 Oct 2026 11:23:16 +0100 Subject: [PATCH] fix(build): skip the releases that hold upstream sources when publishing --- CONTRIBUTING.md | 13 +++++++++++++ build/publish.sh | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 763d8f3..7b7e722 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -264,6 +264,19 @@ instead of `PKG_SOURCE_URL`: `create-package.sh` packs that directory into `PKG_SOURCE_TARBALL` with a top-level `-/` directory, the way an upstream tarball looks, so the recipes need no special case. +Some upstreams refuse downloads from GitHub's runners. Their source goes as an asset into +a release of this repository tagged `sources-`, uploaded from a host the upstream +serves, and `PKG_SOURCE_URL` points there. Such a release is a full release, never a +prerelease, so `lf-promote.yml` leaves it alone, and `publish.sh` and +`scan-vulnerabilities.sh` skip it. Create it with `--latest=false`, so the latest +release stays a package: + +```bash +gh release create sources- --latest=false --title 'Sources of ' \ + --notes 'Upstream sources the build cannot fetch from GitHub runners.' +gh release upload sources- +``` + The spec uses `%{pkg_version}` / `%{pkg_release}`, injected by `create-rpm.sh`, so the version lives only in the manifest. The build iteration is not part of the manifest: the release workflow counts it up per version (see below). diff --git a/build/publish.sh b/build/publish.sh index b70b659..fab9b5b 100755 --- a/build/publish.sh +++ b/build/publish.sh @@ -13,6 +13,10 @@ # GitHub release -> channel `release` # prerelease titled "(rejected)" -> removed from `testing` again # +# Releases tagged `sources-` are skipped: they hold upstream sources +# that the build cannot fetch from GitHub's runners itself (see the +# package.conf of the package), not packages. +# # Pull, not push: CI attaches the packages unsigned, and only this script, on # our own server, holds the signing key. Before anything is published, every # asset is checked against its build provenance attestation, so only files @@ -758,12 +762,13 @@ main() { # Oldest first: a server set up from scratch replays the releases in the # order they happened, so the newest build ends up behind a bootstrap link. + # The source releases carry no attestation and would fail the run. gh release list \ --exclude-drafts \ --json 'isPrerelease,name,tagName' \ --limit 1000 \ --repo "$PUBLISH_GITHUB_REPO" \ - --jq 'reverse | .[] | "\(.tagName) \(.isPrerelease) \(.name)"' \ + --jq 'reverse | .[] | select(.tagName | startswith("sources-") | not) | "\(.tagName) \(.isPrerelease) \(.name)"' \ | while read -r tag prerelease name; do if [ "$prerelease" = 'true' ] && [[ "$name" == *'(rejected)' ]]; then channel='rejected'