Running pyright in a minimal docker container gives this error:
$ pyright
/usr/bin/npm-default: No such file or directory
Traceback (most recent call last):
File "/usr/bin/pyright-3.13", line 6, in <module>
sys.exit(entrypoint())
~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/pyright/cli.py", line 31, in entrypoint
sys.exit(main(sys.argv[1:]))
~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/pyright/cli.py", line 18, in main
return run(*args, **kwargs).returncode
~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/pyright/cli.py", line 22, in run
pkg_dir = install_pyright(args, quiet=None)
File "/usr/lib/python3.13/site-packages/pyright/_utils.py", line 69, in install_pyright
node.run(
~~~~~~~~^
'npm',
^^^^^^
...<5 lines>...
stderr=subprocess.PIPE if silent else sys.stderr,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/pyright/node.py", line 144, in run
subprocess.run(node_args, **kwargs),
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/npm', 'install', \
'pyright@1.1.409']' returned non-zero exit status 255.
This means that on openSUSE, python3-pyright tries to pull in packages from the NPM registry. This increases the CI supply chain attack surface inacceptably, so remove pyright from the release prerequisites. That should be enough to remove it from the prerequisites of target check as well and allow it to succeed.
The pyright check machinery itself remains useful, so keep it in place for developers who install python3-pyright manually.
pkg.requires.os.release = python3-pyright breaks CI on Kali Linux. It is present in the janware repos, but using those would cross a line: jw-pkg must be buildable from the base repositories alone, so don't make pyright mandatory for Debian, because that pulls it in for Kali, too.
Ironically, the Debian repo provides it. Which makes it obvious that we will need another entry in the os cascade for Debian proper to allow pulling in such packages on Debian.
Move the dependencies listed in BASE_PKGS from projcts-dir.mk and topdir.mk into project.conf.
Due to various hen-and-egg problems on a minimal system, in some situations these packages can't be installed from project.conf. The same is true with BASE_PKGS, however, so remove it, at least that does away with some redundancy.
Remove the sections pkg.requires.ubuntu|raspbian from project.conf, because their contents is present in pkg.requires.debian and is already evaluated by Ubuntu and Raspbian builds.
Remove dependency inkscape: It's needed by svg-to-pixmap.mk, but not for building jw-pkg. If anything, -devel should depend on it, but that seems a little heavy handed and can be achieved by packages which know that they include svg-to-pixmap.mk.
Add dependency cpio: Needed by pkg.sh to copy a the source file tree. Will be removed again as soon as pkg.sh goes Python.
sudo is certainly not needed for the run package (which in itself is hardly useful at all), so move that dependency into the devel package. Same for gawk. /opt/jw-pkg/bin/get-os.sh depends on it, but I don't see where else but in a -devel context that would matter. And if it breaks something, it is going to be an easy fix without awk.
Ubuntu 22.04 (and supposedly all Debian based distros) don't have a package called python anylonger, and use python3 instead. Using the unversioned [requires] sections for simplicity. Note that this might break backwards compatibility, and should be fixed as necessary.
This project was copied from ytools, with anything not related to providing build-functionality left out. This commit replaces the occurences of ytools with jw-build, and removes some but most certainly not all legacy ytools references.