Commit graph

6 commits

Author SHA1 Message Date
babf58e2dd build.lib.cmds.SSHClient: Finish __init_askpass()
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>
2025-11-20 12:42:45 +01:00
27e9b23849 build.cmds.CmdListRepos: Support username/password authentication
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 11:29:50 +01:00
150bc97fc9 build.lib.util, build.App: Beautify exceptions
Make exceptions somewhat more readable.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 10:44:14 +01:00
b5ab0a3d26 build.lib.SSHClient: Add module
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>
2025-11-18 12:11:31 +01:00
9f15868dd4 build.lib.utils: Add module
Add some utility functions, namely:

  run_cmd(cmd: list[str], wd=None, throw=True, verbose=False) -> str|None
  run_curl(args: list[str], parse_json: bool=True) -> dict|str
  get_username(args: Namespace|None=None, url: str|None=None) -> str
  get_password(args: Namespace|None=None, url: str|None=None, askpass_env: list[str]=[]) -> str

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 12:07:02 +01:00
bc2033490f jw.build.lib: Add module
Add jw.build.lib as a location for generic utility modules.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 12:05:58 +01:00