From c2d011e63e671ad886aa982d37fa9106aa2b8b7f Mon Sep 17 00:00:00 2001 From: Philip Peterson Date: Mon, 2 Nov 2026 04:30:18 -0900 Subject: [PATCH] quine branch: README and the rebase workflow The fork's default branch, with no KDE code: how the quine-v branches work, and a daily workflow that carries our commits onto each new Plasma 6 release as a new quine-v branch, failing if a commit doesn't apply cleanly. Co-Authored-By: Claude Opus 5.5 --- .forgejo/workflows/rebase.yml | 73 +++++++++++++++++++++++++++++++++++ README.md | 43 +++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 .forgejo/workflows/rebase.yml create mode 100644 README.md diff --git a/.forgejo/workflows/rebase.yml b/.forgejo/workflows/rebase.yml new file mode 100644 index 0000000000..601750f9bf --- /dev/null +++ b/.forgejo/workflows/rebase.yml @@ -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 +# = 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 diff --git a/README.md b/README.md new file mode 100644 index 0000000000..5a904a87f3 --- /dev/null +++ b/README.md @@ -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`**: KDE's release tag `v` 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` 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:refs/tags/v' +git switch -c quine-v v +git cherry-pick v..origin/quine-v # resolve, git cherry-pick --continue +git push origin quine-v v +``` + +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.