jw-build doesn't stop at building software, packaging it afterwards
is also a core feature, so this commit gives the package a better
name.
The commit replaces strings s/jw-build/jw-pkg/ in text files and file
names. Fallout to the functionality is fixed, variable names are left
as they are, though. To be adjusted by later commits.
Signed-off-by: Jan Lindemann <jan@janware.com>
If jw-build is already cloned, infect all other repositories with its
remote via PROJECTS_DIR_REMOTE_BASE.
Signed-off-by: Jan Lindemann <jan@janware.com>
Finish and test the __init_askpass() method, works.
__init_askpass() had never been tested. Finish it and make sure it
works.
Signed-off-by: Jan Lindemann <jan@janware.com>
curl exits with 0 success status, even if the server returns HTTP
401. Passing -f fixes that and has curl error out with exit code 22.
It doesn't show which error, though.
Signed-off-by: Jan Lindemann <jan@janware.com>
Add command get-auth-info to jw-projects.py. It is meant to retrieve
JANWARE_USER from an already cloned jw-build tree.
Signed-off-by: Jan Lindemann <jan@janware.com>
Don't directly import from lib (i.e. from __init__.py), because that
won't work until "make all" has not run through, i.e. during fresh
checkout.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
For requires, provides and conflicts, isolate the bulk of the code in
BaseCmdPkgRelations, then derive CmdPkgConflicts, CmdPkgProvides and
CmdPkgRequires from that class.
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
Remove code
- 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
Signed-off-by: Jan Lindemann <jan@janware.com>
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.
Signed-off-by: Jan Lindemann <jan@janware.com>
Cmd is meant as a base class for classes representing commands
currently still implemented as methods of the Project class.
Signed-off-by: Jan Lindemann <jan@janware.com>
Move nearly all of projects.py into src/python/jw/build/App.py. The
plan is to split the script into parts and import them.
Signed-off-by: Jan Lindemann <jan@janware.com>