Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,19 @@ instead of `PKG_SOURCE_URL`: `create-package.sh` packs that directory into
`PKG_SOURCE_TARBALL` with a top-level `<name>-<version>/` 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-<name>`, 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-<name> --latest=false --title 'Sources of <name>' \
--notes 'Upstream sources the build cannot fetch from GitHub runners.'
gh release upload sources-<name> <tarball>
```

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).
Expand Down
7 changes: 6 additions & 1 deletion build/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# GitHub release -> channel `release`
# prerelease titled "(rejected)" -> removed from `testing` again
#
# Releases tagged `sources-<package>` 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
Expand Down Expand Up @@ -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'
Expand Down
Loading