Currently the lint task uses Ubuntu Bionic, to be able to pin the python version to 3.6. However, this is problematic:
- While unlikely to happen soon, with the “Ubuntu Pro” stuff, it is unclear when Bionic is going to shut down
- This requires workarounds like https://github.com/bitcoin/bitcoin/blob/0968c514015fb187b7b65575a734c0310f3a1ac0/ci/lint/04_install.sh#L12
This should be fixed by switching to pyenv to pin the version, then bumping to Jammy to remove the git workaround.
I am not familiar with pyenv, which is why I created this issue, but apparently it is possible, see for example https://github.com/fanquake/core-review/blob/abf055db20c388e56185404ac03c7304f3905e39/docker/lint.dockerfile#L35
Edit: As a warning, the lint entry point is undocumented and may be unsafe, so run everything in a VM to be safe. Entry point: https://github.com/bitcoin/bitcoin/blob/01a66e21ef74bed8b6592c1ac4756114719a5949/.cirrus.yml#L76
Useful skills:
- Bash, Python, Pyenv, Ubuntu apt
Want to work on this issue?
For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.