Add the variable PROJECTS_DIR_REMOTE_BASE, defaulting to ssh://git.janware.com/srv/git if REMOTE_USER is defined, and to https://janware.com/code in case it isn't.
Replace git-srv-admin.sh list-personal-projects by the more universal "jw-projects.py list-repos" for enumerating repo names. This is a step towards supporting Git servers other than janware.com.
Add support for --create-user-repos to pgit.sh. It controls whether or not personal remote repositories on janware.com are created when cloning from another user.
Add the command list-repos to jw-projects.py. It is meant to do the same thing as "git-srv-adm.sh list-personal-projects", i.e. enumerate remote Git repositories, but also support additional servers and protocols. As of this commit, support for https://github.com and for forgejo installations over HTTPS is implemented.
SSHClient(hostname) is an abstract class for SSH / SCP operations. It comes with two implementations, SSHClientInternal an SSHClientCmd. The former needs paramiko installed, which might be a reason to fail on unprepared systems, the latter is slower and more limited.
run_from_cmd_module() is a helper function used to allow command selection alongside the legacy and now obsolete method. Unrolling it is a step towards adding proper argparse subparsers, so do that.
jw-pkg is related to, but strictly speaking not indispensible for building and packaging software. So, in the attempt have a minimal jw-build, move jw-pkg to jw-base, and fix all packages that use it.
Make list-files target ignore errors. This catches errors from git ls-files | xargs realpath if git ls-files lists dead symbolic links, as in my-project/blah/dev/fd -> ./proc/self/fd.
Implemented by passing -q (quiet) to realpath, not sure what else this suppresses.
There's a certain logic that jw-pkg is part of jw-build, because it comes in handy to compile config file templates in a post-install stage. On the other hand, jw-base looks like a better place for that.
Re-adding for now, to not break too many packages.
The default behaviour of a generated __init__.py is to load all exported symbols in the respective directory. Since jw-python.py is invoked often, this hampers performance, so disable it.
For requires, provides and conflicts, isolate the bulk of the code in BaseCmdPkgRelations, then derive CmdPkgConflicts, CmdPkgProvides and CmdPkgRequires from that class.
Implement the functionality of create-pkg-config.sh in a Python module CmdCreatePkgConfig.py. This allows to remove create-pkg-config.sh and jw-build-functions.sh.
Note that the translation was done pretty literally to play it safe. More code can and should be removed by taking advantage of the fact that jw-projects.py knows more about the project than the shell scripts.
- Explicitly marked as unused
- Meant to provide Python2 compatibility
- Meant to run App.py as main module
- Turned obsolete by removing the command functions from
Projects.py
For every cmd_xxx() method in build.App, create a class that's instatiated for running the respective command. This has the advantage of making App.py smaller (and faster), and having smaller, more maintainable command modules adhering to a common interface.
Re-add everthing needed for building and packaging ytools. This is a big commit, 2002 lines of code. It mostly consists of C/C++ machinery, plus some documentation-related stuff.