Skip to content

Commit c7f128c

Browse files
committed
README: Document version guard
Catalog row, caller shim and the packaged versus repo-only split, plus how a pre-release opens a multi-PR series.
1 parent 6e14aa0 commit c7f128c

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ Shared CI for Kurokesu repos: reusable GitHub Actions workflows, canonical relea
99
| Workflow | Purpose | Called from |
1010
| --- | --- | --- |
1111
| `kernel-code-style.yml` | clang-format plus kernel checkpatch, profile per `platform` input | driver repo `main` shim |
12+
| `dkms-version-guard.yml` | fail a PR that changes packaged content without moving `PACKAGE_VERSION` | driver repo `main` shim |
1213
| `dkms-build.yml` | DKMS source package plus arch:all `.deb` in a clean container, callers pass nothing repo-specific | packaging branch `ci.yml` shim |
1314
| `dkms-release.yml` | release pipeline on `debian/*` tag push: verify tags, build, sign, publish | packaging branch `release.yml` shim |
1415
| `deb-sign.yml` | bundle artifacts, sign `SHA256SUMS` with archive key, self-verify | `dkms-release.yml` |
1516
| `deb-publish.yml` | GitHub pre-release from `release-assets` artifact, re-run refreshes assets | `dkms-release.yml` |
1617

17-
`selftest.yml` is this repo's own CI. It runs `dkms-build.yml` against dummy DKMS fixtures on `selftest/*` orphan branches, one plain-version pair and one semver pre-release pair. Sign and publish have no selftest.
18+
`selftest.yml` is this repo's own CI. It runs `dkms-build.yml` against dummy DKMS fixtures on `selftest/*` orphan branches, one plain-version pair and one semver pre-release pair. It also replays `dkms-version-guard.yml` over scratch repo fixtures (`tests/version-guard-cases.sh`). Sign and publish have no selftest.
1819

1920
## Kernel code style
2021

@@ -32,12 +33,36 @@ on:
3233
permissions:
3334
contents: read
3435
jobs:
35-
code-style:
36+
rpi:
3637
uses: Kurokesu/ci/.github/workflows/kernel-code-style.yml@main
3738
with:
3839
platform: rpi
3940
```
4041
42+
## Version guard
43+
44+
`PACKAGE_VERSION` in `dkms.conf` names the DKMS artifact, what lands in `/usr/src/<package>-<version>` and what users quote from `dkms status` in bug reports. Two installs claiming one version must be bit-identical there. Guard enforces that on pull requests by diffing packaged paths against the base:
45+
46+
- packaged, bump required: `dkms.conf`, `dkms.postinst`, `Makefile`, `*.c`, `*.h`, `*.dts`, `scripts/`, matching what `setup.sh` copies
47+
- repo-only, no bump: `setup.sh`, `README`, `docs/`, lint configs, workflows. Git history already answers which installer someone ran
48+
49+
Patch for a fix, minor for new capability such as a sensor mode, control or link-rate raise. Guard also rejects a version core moving backwards.
50+
51+
Early or multi-PR work escapes the per-PR bump with a pre-release. Set `0.2.0-alpha.1` on the first PR and the demand suspends for the whole series, however many PRs it takes, then promote to plain `0.2.0` on the last one. Keeps churn off the version while `main` stays installable. Spelling rules are in [versioning](#versioning).
52+
53+
Caller shim, `version-guard.yml` on `main`:
54+
55+
```yaml
56+
on:
57+
pull_request:
58+
branches: [main]
59+
permissions:
60+
contents: read
61+
jobs:
62+
dkms:
63+
uses: Kurokesu/ci/.github/workflows/dkms-version-guard.yml@main
64+
```
65+
4166
## DKMS release family
4267

4368
`dkms-build.yml` and `dkms-release.yml` assume DEP-14 layout in the calling repo: driver source on `main` tagged `v<upstream>`, packaging recipe on `debian/latest` tagged `debian/<upstream>-<revision>`. Package name and build dependencies come from the recipe. Release verifies paired tags against `debian/changelog`, then builds, signs and publishes a GitHub pre-release. Signing needs the org-level `ARCHIVE_GPG_SIGNING_KEY` secret, passed with `secrets: inherit`.

0 commit comments

Comments
 (0)