A linter for Ubuntu SRU (Stable Release Update) packages
Project description
sru-lint
Static analysis tool for Ubuntu SRU (Stable Release Update) patches — built to run in CI and generate human-friendly reports.
Documentation
For complete documentation, installation instructions, usage examples, and plugin development guides, visit:
https://canonical-sru-lint.readthedocs-hosted.com/en/latest/
Quick Start
# Install from snap (recommended)
snap install --edge sru-lint
# Or install with Poetry (for development)
git clone https://github.com/dargad/sru-lint.git
cd sru-lint
poetry install
# Check from a patches-unapplied git repo (the current directory)
sru-lint check .
# Check a patch file or URL
sru-lint check path/to/patch.debdiff # if installed via snap
poetry run sru-lint check path/to/patch.debdiff # if using Poetry
sru-lint check https://example.com/patch.diff
# Check from stdin
cat patch.debdiff | sru-lint check - # if installed via snap
cat patch.debdiff | poetry run sru-lint check - # if using Poetry
# List available plugins
sru-lint plugins # if installed via snap
poetry run sru-lint plugins # if using Poetry
Authenticating to Launchpad
By default sru-lint talks to Launchpad anonymously, which is enough for the
public checks. ESM / Ubuntu Pro plugins query private PPAs (e.g.
ppa:ubuntu-esm/esm-infra-security) and need an authenticated session —
without it those checks are skipped or produce false negatives.
To authenticate once and cache the OAuth credentials in your keyring:
sru-lint login # opens a browser to authorize via OAuth
poetry run sru-lint login # equivalent when running from source
Subsequent sru-lint check runs reuse the cached credentials automatically.
Re-run sru-lint login only if the credentials expire or are revoked.
Note: if no usable keyring backend is available (headless session, snap
confinement blocking the keyring, etc.) the credentials cannot persist and
sru-lint check will fall back to anonymous access — sru-lint login will
warn you when this happens.
What it checks
- Changelog entries (valid distributions, LP bugs, version ordering)
- DEP-3 patch format compliance
- Launchpad integration (bug targeting, SRU templates, publication history)
- Upload queue conflicts
- And more via the plugin system...
Development
Run the full local check suite (ruff lint + format, mypy, unit tests, and functional tests) with a single command:
poetry run check-all
It runs every step even if an earlier one fails and prints a PASS/FAIL summary at the end, exiting non-zero if anything failed.
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sru_lint-1.1.tar.gz.
File metadata
- Download URL: sru_lint-1.1.tar.gz
- Upload date:
- Size: 41.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b72e975bc02a404d3859e8d21226f40a9cb81aed19734c247f24cdaa91991e2e
|
|
| MD5 |
232a3edcddb68139eadd0241cb6bcdaa
|
|
| BLAKE2b-256 |
71569c04f2d5b870b7849f4d6c3bb570e87f03456e0ef3a4ab2e873a00990b08
|
Provenance
The following attestation bundles were made for sru_lint-1.1.tar.gz:
Publisher:
pypi-publish.yaml on canonical/sru-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sru_lint-1.1.tar.gz -
Subject digest:
b72e975bc02a404d3859e8d21226f40a9cb81aed19734c247f24cdaa91991e2e - Sigstore transparency entry: 1534520072
- Sigstore integration time:
-
Permalink:
canonical/sru-lint@5cf032083856740dd1f92641b1272da3cd0ad6c2 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@5cf032083856740dd1f92641b1272da3cd0ad6c2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sru_lint-1.1-py3-none-any.whl.
File metadata
- Download URL: sru_lint-1.1-py3-none-any.whl
- Upload date:
- Size: 52.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67ec2ba3ff10998a22d78ccb01411b8b6411cc7247753eadde37667f5fe637ca
|
|
| MD5 |
2a309b87af0d960efb6bcae6812c449b
|
|
| BLAKE2b-256 |
e62d8eb66564c72df6c4287f6c123be427cde6f1e9f638dade4b954b9d9c1ac9
|
Provenance
The following attestation bundles were made for sru_lint-1.1-py3-none-any.whl:
Publisher:
pypi-publish.yaml on canonical/sru-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sru_lint-1.1-py3-none-any.whl -
Subject digest:
67ec2ba3ff10998a22d78ccb01411b8b6411cc7247753eadde37667f5fe637ca - Sigstore transparency entry: 1534520153
- Sigstore integration time:
-
Permalink:
canonical/sru-lint@5cf032083856740dd1f92641b1272da3cd0ad6c2 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@5cf032083856740dd1f92641b1272da3cd0ad6c2 -
Trigger Event:
push
-
Statement type: