Track upstream branches as pinned releases on an unattended lane
Since publishing moved to CI on merge, a package whose PKGBUILD never
changes while its source moves was never rebuilt: omarchy-dev and
omarchy-settings-dev followed quattro through "#branch=" and a pkgver()
function, and nothing in this repository changed when quattro did. The
host timers that used to notice are off, so edge fell days behind.
The rule now: no git source without a commit or tag pin
(tests/pinned-sources.sh, run in CI). A package that has to follow a
branch declares a git_branch upstream watch, and the pin moves through
the same PR/build/publish path as every other version bump.
Watch (helpers/upstream-watch.py)
git_branch gains tag_pattern: the newest release tag in the pinned
commit's own history, exposed as {tag}/{version}/{distance}, so a
branch build is versioned <tag>.r<n>.g<sha>, above the release it
follows and below the next one. One blobless clone per branch per
run, shared by every package on it. min_release_age selects the
newest commit older than the window, so a push burst builds once.
Lane (helpers/package-metadata.sh, bin/sync-upstream --lane)
"auto_merge": true moves a package from the reviewed 6-hourly sync
PR to the unattended lane. Packages pinned from the same branch move
together: a failure on one restores the others and fails the group,
so the dev pair can never ship from two quattro commits.
Tracker (.github/workflows/track-branches.yml)
Every two hours: pin, open one PR with a GitHub App token, enable
auto-merge. Branch protection still gates the merge on result,
self-tests and build-isolation. A tip that fails to build stays an
open red PR until the next tick supersedes it. The App is required:
a PR opened with GITHUB_TOKEN has its checks held for approval and
its auto-merge would not fire publish.yml.
The reviewed workflows (sync-upstream, sync-rebuilds) open their PRs
with the same App so their builds start without a maintainer clicking
"Approve workflows to run"; without the App they fall back to
GITHUB_TOKEN and behave as before.
Recipes
The dev pair pins _commit and a real sha256sum, keeps the OMARCHY_SRC
override, and drops pkgver(). Its r-number stays the branch's total
commit count because the published history used it and pacman must
never see the version go down. omasnap-git is new: omacom/omasnap
main, versioned <tag>.r<distance>.g<sha>, provides/conflicts omasnap.
This commit is contained in:
1 parent
e7da505280
commit
d87686ca4f
17 files changed
+746
-68
No files matched your search
@@ -48,8 +48,40 @@ pkgrel to 1, but the complete epoch:pkgver-pkgrel must still increase.
|
||||
|
||||
GitHub releases exclude drafts and prereleases unless `allow_prerelease` is true.
|
||||
Existing `min_release_age` policies apply: a feed without a verifiable publication
|
||||
time cannot bypass a configured hold. Git branch watches derive a commit count
|
||||
and date from the actual branch history and write an immutable source pin.
|
||||
time cannot bypass a configured hold.
|
||||
|
||||
## Branch watches
|
||||
|
||||
A `git_branch` watch treats every commit on a branch as a release and writes an
|
||||
immutable pin (`"_commit": "{commit}"`) so the recipe never carries a moving
|
||||
`#branch=` source; `tests/pinned-sources.sh` enforces that. The clone is bare,
|
||||
blobless and single-branch, read only with git, and shared by every package
|
||||
that watches the same branch in one run, so two recipes pinned from it always
|
||||
see the same commit. Values available to `version`:
|
||||
|
||||
- `{date}` (default), `{count}` (commits on the branch), `{commit}`
|
||||
(`{commit:.7}` for the short form)
|
||||
- with `tag_pattern` (a regular expression with a named `version` group,
|
||||
matched against whole tags): `{tag}`, `{version}` from that tag, and
|
||||
`{distance}`, the number of commits past it. Only tags in the pinned
|
||||
commit's own history count, so a release cut on another branch is ignored.
|
||||
|
||||
`{version}.r{distance}.g{commit:.7}` gives `1.21.0.r15.gabc1234`, which pacman
|
||||
orders above the `1.21.0` release it follows and below `1.21.1`; `omasnap-git`
|
||||
uses it. The Omarchy dev pair uses `{version}.r{count}.g{commit:.7}` instead
|
||||
because its published history counted every commit and the number must never
|
||||
go down.
|
||||
|
||||
`min_release_age` on a branch watch selects the newest commit that has been on
|
||||
the branch for at least that long, so a burst of pushes builds once after it
|
||||
settles rather than once per push. `BYPASS_MIN_RELEASE_AGE=1` takes the tip.
|
||||
|
||||
Packages marked `"auto_merge": true` ride the unattended lane
|
||||
(`track-branches.yml`) instead of the reviewed sync PR: their bump PR is opened
|
||||
and auto-merged as soon as the build checks pass. `bin/sync-upstream --lane
|
||||
reviewed|auto-merge|all` selects a lane; the scheduled workflows each pass their
|
||||
own. Packages that pin the same branch move in lockstep: if one of them fails
|
||||
to update, the run restores the others and reports the group as failed.
|
||||
|
||||
Checksums retain their algorithms (SHA256, SHA512, BLAKE2, etc.) and source order.
|
||||
Changed git sources are hashed with makepkg's git-archive convention. Unchanged
|
||||
@@ -131,6 +163,8 @@ in `origin` and has no effect on release selection.
|
||||
| `localsend` | github | [localsend/localsend](https://github.com/localsend/localsend) |
|
||||
| `localsend-bin` | github | [localsend/localsend](https://github.com/localsend/localsend) |
|
||||
| `macbook12-spi-driver-dkms` | git_branch | [https://github.com/marc-git/macbook12-spi-driver.git](https://github.com/marc-git/macbook12-spi-driver.git) |
|
||||
| `omarchy-dev`, `omarchy-settings-dev` | git_branch (auto-merge) | [https://github.com/basecamp/omarchy.git](https://github.com/basecamp/omarchy.git) `quattro` |
|
||||
| `omasnap-git` | git_branch (auto-merge) | [https://github.com/omacom/omasnap.git](https://github.com/omacom/omasnap.git) `main` |
|
||||
| `makima-bin` | github | [cyber-sushi/makima](https://github.com/cyber-sushi/makima) |
|
||||
| `minecraft-launcher` | archive | [https://launcher.mojang.com/download/Minecraft.deb](https://launcher.mojang.com/download/Minecraft.deb) |
|
||||
| `nautilus-dropbox` | github | [dropbox/nautilus-dropbox](https://github.com/dropbox/nautilus-dropbox) |
|
||||
|
||||
Reference in new issue
Block a user