livecheck

Tool to update ebuilds.

https://github.com/tatsh/livecheck

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.2%) to scientific vocabulary

Keywords

command-line ebuild gentoo portage
Last synced: 6 months ago · JSON representation

Repository

Tool to update ebuilds.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • Open Issues: 3
  • Releases: 0
Topics
command-line ebuild gentoo portage
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing Funding License Citation Codeowners Security

README.md

livecheck

Python versions PyPI - Version GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) CodeQL QA Tests Coverage Status Documentation Status mypy pre-commit pydocstyle pytest Ruff Downloads Stargazers

@Tatsh Mastodon Follow

Tool for overlays to update ebuilds. Inspired by the MacPorts port subcommand of the same name and nvchecker.

Internal workings

The script uses the first url of the ebuild using the SRC_URI variable to search for new versions, using logic for github, PyPI, PECL or if it is configured in the livecheck.json file within the same package directory. Then if you do not find a new version, try to use the repositories within the metadata.xml file That is why it is important to have the first download url well defined and thus automatically update the ebuild.

It is recommended to activate the oauth_token of both github and gitlab to avoid Rate Limiting problems for the REST API. Use your secret storage to store github.com or gitlab.com tokens with the livecheck user. See keyring to manage tokens.

Installation

On Gentoo, add my overlay and install:

shell eselect overlay enable tatsh-overlay emerge --sync emerge livecheck

Command line usage

```plain Usage: livecheck [OPTIONS] [PACKAGE_NAMES]...

Options: -a, --auto-update Rename and modify ebuilds. -d, --debug Enable debug logging. -D, --development Include development packages. -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. -W, --working-dir DIRECTORY Working directory. Should be a port tree root. --help Show this message and exit. ```

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
  • JetBrains products
  • PECL
  • Packages from Yarnpkg and Npmjs
  • Perl CPAN
  • PyPI
  • Raphnet
  • Repology
  • RubyGems
  • Search in a url directory
  • SourceHut releases / commit hashes
  • Sourceforge

This works as long as the version system is usable with Portage's version comparison function. For anything else, see Package configuration.

Package configuration

For packages that will not work with currently heuristic checking, a configuration file named livecheck.json can be placed in the directory alongside the ebuild.

Hook directory

The hooks directory structure is subdivided into actions, currently post and pre, within each action directory there can be several scripts that are executed in order of name.

Hook arguments

  • Root portage directory, e.g. /var/db/repos/gentoo.
  • Category and package name, e.g. dev-lang/php.
  • Previous version, e.g. 8.2.32-r2.
  • New version, e.g. 8.2.33.
  • SHA hash of the old version. Optional.
  • SHA hash of the new version. Optional.
  • Date associated with the hash. Optional.

Configuration keys

  • branch - string- The GitHub branch name to use for commits.
  • composer_packages - boolean - Download composer vendor modules.
  • composer_path - path - Where is 'composer.json' located (need composer_packages).
  • development - bool - Include development packages.
  • gomodule_packages - boolean - Download go vendor modules.
  • gomodule_path - path - Where is 'go.mod' located (need gomodule_packages).
  • jetbrains_packages - boolean - Update internal ID.
  • keep_old - boolean - Keep old ebuild versions.
  • no_auto_update - boolean - Do not allow auto-updating of this package.
  • nodejs_packages - boolean - Download nodejs node_modules.
  • nodejs_path - path - Where is 'package.json' located (need nodejs_packages).
  • sha_source- string - Url to get the sha value.
  • stable_version- string - Regular expression to determine if it is a stable version.
  • sync_version - string - Category and ebuild with version to sync.
  • transformation_function - string - Function to use to transform the version string. Currently only dotize is supported. Others are for internal use.
  • type - string - Only one none, davinci, regex, directory, commit, repology or checksum.

Use the pattern to adjust the version using a regular expression

  • pattern_version - string - The pattern string
  • replace_version - string - The replace string

Only then type is regex or directory

  • url - URL of the document to run regular expressions against. Required

Only then type is regex

  • regex - string - The regular expression to use. Required

Only then type is repology

  • package - string - The package to search in repology. Required

Development use

Creating new downloads

There are 2 types of downloads: file and latest commit (currently only Git is supported) and this is evident from the first download URL of the ebuild itself.

  • To download a file, a search is performed by version/tag, and optionally you can include the commit of said version, including all the results in a list so that the highest one can be selected, according to the search criteria or limit.

  • To locate the last commit of an ebuild, we need the SHA of the commit and the date. This is necessary to be able to adjust the name of the ebuild using the a.b.c_pYYYYMMDD version as a scheme. If a different SHA is detected the version is updated.

Set up PYTHONPATH

As root, set the environment variable PYTHONPATH to include where the livecheck module is located. Use python -m livecheck instead of livecheck to execute commands.

With a virtualenv

Run poetry install --all-extras --with=dev,docs,tests to set up a virtualenv. You must also add Portage to this virtualenv manually.

Fully copy /etc/portage to the root of your virtualenv. Then you must fix make.profile. Also consider making changes in repos.conf if necessary.

Example:

shell eval "$(poetry env activate)" pip install git+https://github.com/gentoo/portage.git pip install keyrings-alt cp -R /etc/portage "${VIRTUAL_ENV}/etc/" ln -sf "$(readlink -f /etc/portage/make.profile)" "${VIRTUAL_ENV}/etc/portage/make.profile"

Owner

  • Login: Tatsh
  • Kind: user

GitHub Events

Total
  • Issues event: 13
  • Watch event: 1
  • Delete event: 99
  • Issue comment event: 99
  • Push event: 186
  • Pull request review event: 35
  • Pull request review comment event: 50
  • Pull request event: 292
  • Create event: 97
Last Year
  • Issues event: 13
  • Watch event: 1
  • Delete event: 99
  • Issue comment event: 99
  • Push event: 186
  • Pull request review event: 35
  • Pull request review comment event: 50
  • Pull request event: 292
  • Create event: 97

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 14
  • Total pull requests: 523
  • Average time to close issues: 30 days
  • Average time to close pull requests: about 20 hours
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 1.64
  • Average comments per pull request: 0.33
  • Merged pull requests: 465
  • Bot issues: 1
  • Bot pull requests: 419
Past Year
  • Issues: 12
  • Pull requests: 306
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 19 hours
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 1.92
  • Average comments per pull request: 0.45
  • Merged pull requests: 268
  • Bot issues: 0
  • Bot pull requests: 202
Top Authors
Issue Authors
  • inode64 (9)
  • Tatsh (6)
  • dependabot[bot] (2)
Pull Request Authors
  • dependabot[bot] (505)
  • inode64 (145)
Top Labels
Issue Labels
stale (5) dependencies (2) python (2)
Pull Request Labels
dependencies (505) python (330) javascript (156)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 46 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 17
  • Total maintainers: 1
pypi.org: livecheck

Tool to update ebuilds.

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 23 Last month
Rankings
Dependent packages count: 10.1%
Average: 16.2%
Downloads: 16.8%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago
pypi.org: portage-livecheck

Tool to update ebuilds.

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 23 Last month
Rankings
Dependent packages count: 7.4%
Average: 38.3%
Dependent repos count: 69.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/close-inactive.yml actions
  • actions/stale v5 composite
.github/workflows/qa.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
package.json npm
  • cspell ^6.31.1 development
  • markdownlint-cli2 ^0.8.1 development
  • prettier ^2.8.7 development
  • prettier-plugin-ini ^1.1.0 development
  • prettier-plugin-sort-json ^1.0.0 development
  • prettier-plugin-toml ^0.3.1 development
yarn.lock npm
  • 201 dependencies
.rtfd-requirements.txt pypi
  • sphinx-click >=4.4.0
  • toml >=0.10.2
poetry.lock pypi
  • alabaster 0.7.13
  • appdirs 1.4.4
  • astroid 2.15.6
  • attrs 23.1.0
  • babel 2.12.1
  • cattrs 23.1.2
  • certifi 2023.7.22
  • charset-normalizer 3.2.0
  • click 8.1.7
  • colorama 0.4.6
  • coverage 6.5.0
  • coveralls 3.3.1
  • dill 0.3.7
  • docopt 0.6.2
  • docutils 0.20.1
  • esbonio 0.16.1
  • exceptiongroup 1.1.3
  • idna 3.4
  • imagesize 1.4.1
  • importlib-metadata 6.8.0
  • iniconfig 2.0.0
  • isort 5.12.0
  • jinja2 3.1.2
  • lazy-object-proxy 1.9.0
  • loguru 0.7.1
  • lsprotocol 2023.0.0a3
  • markupsafe 2.1.3
  • mccabe 0.7.0
  • mock 5.1.0
  • mypy 1.5.1
  • mypy-extensions 1.0.0
  • packaging 23.1
  • platformdirs 3.10.0
  • pluggy 1.3.0
  • portage 3.0.51
  • portage-types 0.0.2
  • pygls 1.0.2
  • pygments 2.16.1
  • pylint 2.17.5
  • pylint-quotes 0.2.3
  • pyspellchecker 0.7.2
  • pytest 7.4.1
  • pytest-mock 3.11.1
  • pytoolconfig 1.2.5
  • pyyaml 6.0.1
  • requests 2.31.0
  • requests-mock 1.11.0
  • rope 1.9.0
  • six 1.16.0
  • snowballstemmer 2.2.0
  • sphinx 7.2.5
  • sphinx-click 5.0.1
  • sphinxcontrib-applehelp 1.0.7
  • sphinxcontrib-devhelp 1.0.5
  • sphinxcontrib-htmlhelp 2.0.4
  • sphinxcontrib-jsmath 1.0.1
  • sphinxcontrib-qthelp 1.0.6
  • sphinxcontrib-serializinghtml 1.1.9
  • toml 0.10.2
  • tomli 2.0.1
  • tomlkit 0.12.1
  • typeguard 3.0.2
  • types-requests 2.31.0.2
  • types-urllib3 1.26.25.14
  • typing-extensions 4.7.1
  • urllib3 2.0.4
  • win32-setctime 1.1.0
  • wrapt 1.15.0
  • yapf 0.40.1
  • zipp 3.16.2
pyproject.toml pypi
  • click >=8.1.3,<8.1.4 || >8.1.4
  • loguru ^0.7.1
  • python >=3.10,<4
  • pyyaml ^6.0.1
  • requests ^2.31.0