https://github.com/pkgforge/sbuilder
Utilities for linting and building SBUILD packages [maintainer=@QaidVoid]
https://github.com/pkgforge/sbuilder
Last synced: about 1 month ago
JSON representation
Utilities for linting and building SBUILD packages [maintainer=@QaidVoid]
- Host: GitHub
- URL: https://github.com/pkgforge/sbuilder
- Owner: pkgforge
- License: mit
- Created: 2024-11-20T11:36:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-14T13:44:26.000Z (about 1 month ago)
- Last Synced: 2026-02-14T21:32:25.878Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 415 KB
- Stars: 25
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sbuilder
Toolchain for building, linting, metadata generation, and cache management of SBUILD packages.
## sbuild
Build packages from SBUILD recipes.
```sh
Usage: sbuild
Commands:
build Build packages from SBUILD recipes
info Get information about an SBUILD recipe
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
```
### sbuild build
```sh
Usage: sbuild build [OPTIONS] ...
Arguments:
... SBUILD recipe files or URLs to build
Options:
-o, --outdir Output directory for build artifacts
-k, --keep Keep temporary build directory after completion
--timeout Build timeout in seconds [default: 3600]
--timeout-linter Linter timeout in seconds [default: 30]
--log-level Log level for build output [default: info] [possible values: info, verbose, debug]
--ci CI mode - output GitHub Actions environment variables
--force Force rebuild even if package exists
--github-token GitHub token for authenticated requests [env: GITHUB_TOKEN]
--ghcr-token GHCR token for pushing packages [env: GHCR_TOKEN]
--ghcr-repo GHCR repository base (e.g., pkgforge/bincache)
--push Push packages to GHCR after build
--sign Sign packages with minisign
--minisign-key Minisign private key (or path to key file) [env: MINISIGN_KEY]
--minisign-password Minisign private key password [env: MINISIGN_PASSWORD]
--checksums Generate checksums for built artifacts [default: true]
-h, --help Print help
```
### sbuild info
```sh
Usage: sbuild info [OPTIONS]
Arguments:
SBUILD recipe file or URL
Options:
--check-host Check if recipe supports this host (e.g., x86_64-linux)
--format Output format [default: text] [possible values: text, json]
--field Output specific field (pkg, pkg_id, version, hosts, etc.)
-h, --help Print help
```
## sbuild-linter
A linter for SBUILD package files. Validates the provided `SBUILD` package recipe, performs checks and generates the validated recipe for the builder to work with.
```sh
Usage: sbuild-linter [OPTIONS] [FILES]
Options:
--pkgver, -p Enable pkgver mode
--no-shellcheck Disable shellcheck
--parallel Run N jobs in parallel (default: 4)
--inplace, -i Replace the original file on success
--success File to store successful packages list
--fail File to store failed packages list
--timeout Timeout duration after which the pkgver check exits
--help, -h Show this help message
Arguments:
FILE... One or more package files to validate
```
## sbuild-meta
Metadata generator for SBUILD packages.
```sh
Usage: sbuild-meta [OPTIONS]
Commands:
generate Generate metadata for packages
should-rebuild Check if a recipe should be rebuilt
check-updates Check for upstream updates
hash Compute hash of a recipe
fetch-manifest Fetch and display manifest for a package
help Print this message or the help of the given subcommand(s)
Options:
--log-level Log level (error, warn, info, debug, trace) [default: info]
-h, --help Print help
-V, --version Print version
```
### sbuild-meta generate
```sh
Usage: sbuild-meta generate [OPTIONS] --arch --recipes ... --output
Options:
-a, --arch Target architecture (x86_64-linux, aarch64-linux, riscv64-linux)
-r, --recipes ... Recipe directories to scan
-o, --output Output directory for JSON files (creates {cache_type}/{arch}.json)
--cache-type Cache type to generate (bincache, pkgcache, or all) [default: all]
-c, --cache Historical cache database (optional)
-p, --parallel Number of parallel workers [default: 4]
--github-token GitHub token for registry access [env: GITHUB_TOKEN]
--ghcr-owner GHCR owner/organization [default: pkgforge]
-h, --help Print help
```
### sbuild-meta should-rebuild
```sh
Usage: sbuild-meta should-rebuild [OPTIONS] --recipe
Options:
-r, --recipe Path to SBUILD recipe
-c, --cache Path to cache database
-f, --force Force rebuild regardless of status
-h, --help Print help
```
### sbuild-meta check-updates
```sh
Usage: sbuild-meta check-updates [OPTIONS] --recipes ... --output
Options:
-r, --recipes ... Recipe directories to scan
-c, --cache Path to cache database
-o, --output Output JSON file with outdated packages
-p, --parallel Number of parallel workers [default: 10]
--timeout Timeout for pkgver script execution (in seconds) [default: 30]
-h, --help Print help
```
### sbuild-meta hash
```sh
Usage: sbuild-meta hash [OPTIONS]
Arguments:
Path to SBUILD recipe
Options:
--exclude-version Exclude version field from hash
-h, --help Print help
```
### sbuild-meta fetch-manifest
```sh
Usage: sbuild-meta fetch-manifest [OPTIONS] --repository
Options:
-r, --repository Package repository (e.g., pkgforge/bincache/bat)
-t, --tag Tag to fetch (optional, uses latest arch-specific if not provided)
-a, --arch Target architecture [default: x86_64-linux]
--github-token GitHub token for registry access [env: GITHUB_TOKEN]
-h, --help Print help
```
## sbuild-cache
Build cache management for SBUILD packages.
```sh
Usage: sbuild-cache [OPTIONS]
Commands:
init Initialize a new cache database
update Update a package's build status
mark-outdated Mark a package as outdated
stats Show build statistics
list List packages with optional filtering
needs-rebuild List packages needing rebuild
report Generate a build status report
recent Show recent builds
prune Prune old build history
get Get package info
gh-summary Generate GitHub Actions summary (writes to $GITHUB_STEP_SUMMARY)
help Print this message or the help of the given subcommand(s)
Options:
-c, --cache Path to cache database [default: build_cache.sdb]
-h, --help Print help
-V, --version Print version
```
### sbuild-cache init
```sh
Usage: sbuild-cache init
```
### sbuild-cache update
```sh
Usage: sbuild-cache update [OPTIONS] --package --version --status
Options:
-p, --package Package identifier (pkg_id)
-H, --host Target architecture [default: x86_64-linux]
-v, --version Package version
-s, --status Build status (success, failed, pending, skipped)
-b, --build-id Build ID
-t, --tag GHCR tag
--hash Recipe hash
-h, --help Print help
```
### sbuild-cache mark-outdated
```sh
Usage: sbuild-cache mark-outdated [OPTIONS] --package --upstream-version
Options:
-p, --package Package identifier
-H, --host Target architecture [default: x86_64-linux]
-u, --upstream-version Upstream version available
-h, --help Print help
```
### sbuild-cache stats
```sh
Usage: sbuild-cache stats [OPTIONS]
Options:
-H, --host Target architecture [default: x86_64-linux]
--json Output as JSON
-h, --help Print help
```
### sbuild-cache list
```sh
Usage: sbuild-cache list [OPTIONS]
Options:
-H, --host Target architecture [default: x86_64-linux]
-s, --status Filter by status [default: all] [possible values: success, failed, pending, skipped, outdated, all]
--json Output as JSON
-l, --limit Limit number of results
-h, --help Print help
```
### sbuild-cache needs-rebuild
```sh
Usage: sbuild-cache needs-rebuild [OPTIONS]
Options:
-H, --host Target architecture [default: x86_64-linux]
--json Output as JSON
-h, --help Print help
```
### sbuild-cache report
```sh
Usage: sbuild-cache report [OPTIONS]
Options:
-H, --host Target architecture [default: x86_64-linux]
-f, --format Output format [default: markdown] [possible values: markdown, html, json]
-o, --output Output file (stdout if not specified)
--history-limit Include recent build history [default: 20]
-h, --help Print help
```
### sbuild-cache recent
```sh
Usage: sbuild-cache recent [OPTIONS]
Options:
-H, --host Target architecture [default: x86_64-linux]
-l, --limit Number of recent builds to show [default: 20]
--json Output as JSON
-h, --help Print help
```
### sbuild-cache prune
```sh
Usage: sbuild-cache prune [OPTIONS]
Options:
-k, --keep Keep last N builds per package [default: 10]
-h, --help Print help
```
### sbuild-cache get
```sh
Usage: sbuild-cache get [OPTIONS] --package
Options:
-p, --package Package identifier
-H, --host Target architecture [default: x86_64-linux]
--json Output as JSON
-h, --help Print help
```
### sbuild-cache gh-summary
```sh
Usage: sbuild-cache gh-summary [OPTIONS]
Options:
-H, --host Target architecture [default: x86_64-linux]
-t, --title Title for the summary [default: "Build Status"]
-h, --help Print help
```