quine branch: README and the rebase workflow
The fork's default branch, with no KDE code: how the quine-v<version> branches work, and a daily workflow that carries our commits onto each new Plasma 6 release as a new quine-v<version> branch, failing if a commit doesn't apply cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
c2d011e63e
2 changed files with 116 additions and 0 deletions
73
.forgejo/workflows/rebase.yml
Normal file
73
.forgejo/workflows/rebase.yml
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# Carries our commits onto each new Plasma release: for every Plasma 6
|
||||
# release tag newer than the newest quine-v* branch, makes quine-v<version>
|
||||
# = the tag + our commits from that branch. Fails, making no branch, if a
|
||||
# commit doesn't apply cleanly. See README.md.
|
||||
name: rebase
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Between our Aurora build (05:00 UTC) and quine-linux's (07:00 UTC).
|
||||
- cron: '0 6 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: rebase
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
rebase:
|
||||
runs-on: runner-x86-linux
|
||||
env:
|
||||
FORK: ${{ github.server_url }}/${{ github.repository }}.git
|
||||
MIRROR: ${{ github.server_url }}/quine-global-labs/mirror-kde-plasma-desktop.git
|
||||
steps:
|
||||
- name: Make branches for new Plasma releases
|
||||
env:
|
||||
TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init -q work && cd work
|
||||
git config user.name "Quine Linux CI"
|
||||
git config user.email "ci@quinefoundation.com"
|
||||
# The job token can push to this repo. Blob-less fetches: git
|
||||
# fetches file contents from these remotes as cherry-picks need them.
|
||||
git remote add origin "${FORK/https:\/\//https://ci:$TOKEN@}"
|
||||
git remote add upstream "$MIRROR"
|
||||
git fetch -q --filter=blob:none origin 'refs/heads/quine-v*:refs/remotes/origin/quine-v*'
|
||||
git fetch -q --filter=blob:none upstream 'refs/tags/v6.*:refs/tags/v6.*'
|
||||
|
||||
# Newest branch we have, and release tags newer than it. Betas
|
||||
# are x.y.80 and up.
|
||||
newest=$(git for-each-ref --format='%(refname:lstrip=3)' 'refs/remotes/origin/quine-v*' |
|
||||
sed 's/^quine-v//' | sort -V | tail -1)
|
||||
[ -n "$newest" ] || { echo "no quine-v* branch to start from" >&2; exit 1; }
|
||||
echo "newest branch: quine-v$newest"
|
||||
new=$(git tag -l 'v6.*' | sed 's/^v//' |
|
||||
grep -E '^6\.[0-9]+\.[0-9]+$' | awk -F. '$3 < 80' |
|
||||
sort -V | awk -v n="$newest" '
|
||||
BEGIN { split(n, b, ".") }
|
||||
{ split($0, a, ".")
|
||||
if (a[1] > b[1] || (a[1] == b[1] && (a[2] > b[2] || (a[2] == b[2] && a[3] > b[3])))) print }')
|
||||
if [ -z "$new" ]; then
|
||||
echo "no Plasma release newer than $newest"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
base=$newest
|
||||
for v in $new; do
|
||||
echo "::group::quine-v$v"
|
||||
git switch -q --detach "v$v"
|
||||
commits=$(git rev-list --reverse "v$base..origin/quine-v$base")
|
||||
for c in $commits; do
|
||||
if ! git cherry-pick -x "$c" >/dev/null; then
|
||||
git cherry-pick --abort || true
|
||||
echo "::error::$(git log -1 --format='%h %s' "$c") doesn't apply to v$v; make quine-v$v by hand (README.md)"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
git push -q origin "HEAD:refs/heads/quine-v$v" "refs/tags/v$v"
|
||||
git update-ref "refs/remotes/origin/quine-v$v" HEAD
|
||||
echo "made quine-v$v: v$v + $(echo "$commits" | wc -w) commit(s) from quine-v$base"
|
||||
echo "::endgroup::"
|
||||
base=$v
|
||||
done
|
||||
43
README.md
Normal file
43
README.md
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# plasma-desktop, Quine Linux's fork
|
||||
|
||||
KDE's [plasma-desktop](https://invent.kde.org/plasma/plasma-desktop), with
|
||||
the changes Quine Linux ships. Copied from our pull mirror,
|
||||
[`mirror-kde-plasma-desktop`](../mirror-kde-plasma-desktop).
|
||||
|
||||
## Branches
|
||||
|
||||
- **`quine-v<version>`**: KDE's release tag `v<version>` plus our commits.
|
||||
[quine-linux](../quine-linux) builds Kickoff (the start menu) from the
|
||||
branch for the Plasma version its image ships (its Containerfile's
|
||||
`kickoff-builder` stage); there's one per Plasma release since 6.7.5.
|
||||
- **`quine`** (default): this README and the workflow below. No KDE code.
|
||||
- **`master`** and KDE's tags: as copied from upstream.
|
||||
|
||||
Our commits so far:
|
||||
|
||||
- Kickoff: an update bar ("A system update is available" / "Restart to
|
||||
finish updating"), fed by quine-linux's `quine-update-check.service`.
|
||||
|
||||
## Following new Plasma releases
|
||||
|
||||
[`.forgejo/workflows/rebase.yml`](.forgejo/workflows/rebase.yml) runs daily
|
||||
at 06:00 UTC, between our Aurora build (05:00) and quine-linux's (07:00).
|
||||
For every Plasma 6 release tag newer than the newest `quine-v*` branch (from
|
||||
the mirror; betas, `.80` and up, are skipped), it puts our commits from that
|
||||
branch on top of the tag as a new `quine-v<version>` branch.
|
||||
|
||||
If a commit doesn't apply cleanly, the run fails and makes no branch. Then
|
||||
make the branch by hand:
|
||||
|
||||
```sh
|
||||
git fetch origin && git fetch https://forge.quinefoundation.com/quine-global-labs/mirror-kde-plasma-desktop.git 'refs/tags/v<new>:refs/tags/v<new>'
|
||||
git switch -c quine-v<new> v<new>
|
||||
git cherry-pick v<old>..origin/quine-v<old> # resolve, git cherry-pick --continue
|
||||
git push origin quine-v<new> v<new>
|
||||
```
|
||||
|
||||
Until then, quine-linux's build fails when its image moves to that Plasma
|
||||
version, saying which branch is missing.
|
||||
|
||||
To change our commits: commit on the newest `quine-v*` branch (and older
|
||||
ones still in use, if needed); the next release's branch picks them up.
|
||||
Loading…
Reference in a new issue