livecheck
Tool for overlays to update ebuilds. Inspired by the MacPorts port subcommand of the same name and nvchecker.
Internal workings
The script searches for new versions at every SRCURI location of the ebuild that refers to the package, using logic for GitHub, PyPI, PECL, and other hosts, or the configuration in the livecheck.json file within the same package directory. Vendor archives and signature or checksum files are skipped. The first remaining entry is always consulted, and a later entry is consulted when its URL includes both the package name and the ebuild version. The highest version found across the locations is selected, and a location that is not updated upstream does not hide a newer version published at another one. When no location reports a version, metadata.xml, HOMEPAGE, Repology, and directory listings are tried in turn. The ebuild is automatically updated if --auto-update is passed.
It is recommended to use OAuth tokens for both Github and GitLab to avoid rate limiting problems with the REST API. Use your secret storage to store github.com, bitbucket.org or gitlab.com tokens with the livecheck user. See keyring to manage tokens.
Example: storing credentials
secret-tool store --label="Password for 'livecheck' on 'bitbucket.org'" service bitbucket.org username livecheckInstallation
On Gentoo, add my overlay and install:
eselect overlay enable tatsh-overlay
emerge --sync
emerge livecheckCommand line usage
Usage: livecheck [OPTIONS] [PACKAGE_NAMES]...
Options:
-a, --auto-update Rename and modify ebuilds.
-d, --debug Enable debug logging.
-D, --development Include development packages.
--dist-github-release TEXT GitHub release tag to upload vendor dist
archives under.
--dist-github-repository TEXT
GitHub `owner/repo` to upload vendor dist
archives to as release assets.
--dist-force-upload Force rebuild and re-upload of vendor dist-e, --exclude TEXT Exclude package(s) from updates. -g, --git Use git and pkgdev to make changes. -H, --hook-dir Run a hook directory scripts with various parameters. -k, --keep-old Keep old ebuild versions. -p, --progress Enable progress logging. --package-manager [npm|pnpm|yarn] Package manager to use for Node.js packages. -W, --working-dir DIRECTORY Working directory. Should be a port tree root. --help Show this message and exit.
### Uploading vendor dist archives to GitHub releases
When `--auto-update` regenerates a vendor archive (Composer, Go modules, Maven, Node modules, or
NuGet packages), the file is normally written only into `DISTDIR`. Pass both
`--dist-github-repository owner/repo` and `--dist-github-release tag` to additionally publish the
archive as an asset of that release. Per-package overrides may also be set in `livecheck.json` with
the keys `dist_github_repository` and `dist_github_release`.
By default the asset is **skipped entirely** (no rebuild, no upload) if a release asset with the
expected filename is already present; pass `--dist-force-upload` to rebuild and replace it. When
the release does not exist, livecheck creates it as a **draft** and logs a warning instructing you[!IMPORTANT] Do not enable immutable releases on the destination repository. Replacing an existing asset requires deleting the previous one, which is forbidden once a release is marked immutable, and the upload step will fail.
Heuristic update detection
This package can do automated lookups based on commonly used hosts. Currently:
- Bitbucket
- Davinci products
- Github archives
- Github commit hashes
- Github releases
- GitLab releases