Commit graph

4,400 commits

Author SHA1 Message Date
888c1e7f16 lib.ExecContext.__init__(): Add parameter uri
Take a positional uri argument to the constructor of ExecContext,
forcing SSHClient to follow suit. The latter was instantiated with a
hostname as only argument up to now, which still works as a special
case of an uri.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
db9bf1826d cmds.projects.CmdListRepos: Use new SSHClient API
Use SSHClient as an ExecContext, i.e. use the .run() method instead
of .run_cmd(). Also, let SSHClient decide which implementation to
use.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
a76a6c9316 lib.SSHClient: Move public methods down
Code beautification chore: Move the public methods of SSHClients to
the bottom of the class to be consistent with other classes.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
284eb30ecf lib.SSHClient: Derive from ExecContext
Make SSHClient an ExecContext by implementing _run() and _sudo().

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
989e2c93e3 lib.SSHClient.run_cmd(): Align prototype with EC
Align the prototype of SSHClient.run_cmd() to ExecContext.run(). This
is a push towards making the SSHClient code an ExceContext, too. Some
arguments still log a warning or outright raise NotImplementedError.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
666f778e05 cmds.distro.CmdInfo: Beautify exception logging
CmdInfo._expand_macros() raises a custom exception during exception
handling. Replace that by logging some details and raising the
original exception to keep the stack trace readable.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
ca6f27d2f0 mkspec-wrapper.sh: Add OS id to $INSTALL_LOG
Add the name of the operating system ID as taken from /etc/os-release
to $INSTALL_LOG. This should allow for easier post-mortem debugging
if multiple builds used the same file in /tmp and possibly also
prevent conflicts.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
210f58f1f8 Release 1.0.0-189@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-17 16:02:34 +00:00
30d966254f Release 1.0.0-189@kali-rolling/amd64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-17 15:45:48 +00:00
37a8a4bc7b Start version: 1.0.0-189
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-17 15:45:00 +00:00
d0776db01f lib.SSHClient.run_cmd(): Accept cmd: list[str]
Make SSHClient accept a list of strings for the cmd argument to align
with the other run_cmd() functions in jw-pkg.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 16:23:34 +01:00
5a48143064 py-defs.mk: Move boolean vars to top
Move the PY_XXX = true|false variable definitions meant to be preset
by including makefiles to the top of py-defs.mk to make the structure
of the file clearer.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 16:22:17 +01:00
226a241e8a py-defs.mk: Add PY_INSTALL_INIT_PY
Add PY_INSTALL_INIT_PY ?= true to py-defs.mk. If set to false, a
Python module will not try to attempt installing an existing /
generated __init__.py. This is useful when installing into an exiting
directory with an existing __init__.py.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 16:22:02 +01:00
eb216692eb defs.mk: Add *.yaml to LOCAL_CFG
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 13:38:18 +01:00
a6bf4b164a cmds/__init__.py: Make class loading dynamic
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 10:44:24 +01:00
58142a1115 lib.Distro.pkg_files(): Fix argument name
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 07:35:21 +01:00
896a607b09 systemctl-wrapper.sh: Beautify logging
Apply some more ASCII-art to systemctl-wrapper.sh's output.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 19:14:41 +01:00
c893584e5e make: Replace RPM -> PKG
jw-pkg supports more than RPM-based package managers, but for
historic reasons, lots of its Makefile variables still have "RPM" in
their names. This is misleading. Replace "RPM" in variable names by
the more generic "PKG" where appropriate.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:57:50 +01:00
ed17aaa6c9 make: Align equal signs in *.mk to column 30
Chore: Format equal signs uniformly. They should all be at column 30
but aren't. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:57:50 +01:00
d8db1e77dc rpmbuild.mk: Remove cruft
Remove stuff from rpmbuild.mk which is either unused, unusable or
not aligned with non-rpm-centric packaging workflows:

  - Variable RPMBUILD

  - Targets pkgbuild.dist pkg-upload-local.dist

  - Variables used by these targets

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:57:43 +01:00
824de4eca4 lib.distros.*.Distro: Align PM prototypes
Make all backend package manager prototypes have the same arguments:

	yum(self, args: list[str], verbose: bool=True, sudo: bool=True)

This also implies having them behave equally verbose, unless
otherwise specified by the caller. This changes the default for
Debian.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:53:58 +01:00
9cd5ef2b98 upload-defs-rpm.mk: Remove
upload-defs-rpm.mk doesn't contain anything useful, remove it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:53:53 +01:00
445fb5b2a8 Release 1.0.0-188@kali-rolling/amd64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-16 09:22:09 +00:00
8c314e7480 Release 1.0.0-188@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-16 06:37:47 +00:00
b34c22fdf8 Start version: 1.0.0-188
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-16 06:27:38 +00:00
153652a832 rpmdist.mk: Add pkg-release-update-version
Currently, the the version file is updated in the context of

  pkg.sh release-reinstall -D "$(RPM_REQUIRES_DEVEL)"

RPM_REQUIRES_DEVEL is often filled from the current version, which in
turn is filled from the version file, so the order of events here is
unclear at best.

Add target pkg-release-update-version and make pkg-release-reinstall
depend on it to make the order explicit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 07:20:52 +01:00
e66acbee70 rpmdist.mk: Remove dead code
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 06:12:01 +01:00
d7cd96bd4b rpmdist.mk: pkg-release-reinstall -> get-official
Make target pkg-release-reinstall depend on target get-official. It
already depends on get-maintainer, but that's not enough in
situations where devops built a target on platform A, pushed the new
release, then proceeds to build on platform B: It needs to pull its
own changes made during release of A.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 06:05:01 +01:00
02c4f9080b topdir.mk: Add target get-official
make get-official already works as a pattern rule, but this commit
adds it explicitly to make tab-completion work.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 06:05:01 +01:00
8869a2d3df cmds.projects.BaseCmdPkgRelations: Code beautification
pkg_relations_list() has an intricate case distinction around
expand_semver_revision_range, clean that up.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 06:05:01 +01:00
8785412eb7 Release 1.0.0-187@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-16 03:39:59 +00:00
10123d8232 Release 1.0.0-187@kali-rolling/amd64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-16 00:10:06 +00:00
1635499168 Start version: 1.0.0-187
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-16 00:09:16 +00:00
adb7fce0ab topdir.mk: pkg-install-release-deps: Improve selector
Use pkg-requires --hide-self to find all prerequisites that should be
installed for a test run against packages installed from the
repositories, including self-built and self-hosted packages.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 19:34:50 +01:00
277e5166e8 App.get_value(): Log return value
Log what App.get_value() lookups return with priority DEBUG,
insightful for debugging.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 19:34:50 +01:00
5b3118319c cmds.projects.CmdRequiredOsPkg|BaseCmdPkgRelations: Align APIs
In a push to eventually merge the classes, somewhat align the
command-line API of CmdRequiredOsPkg to the one of
BaseCmdPkgRelations by using dependency flavours as mandatory, first
argument.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 18:33:51 +01:00
d7e4bd9e33 cmds.projects.BaseCmdPkgRelations: Support --hide-self
To support the pkg-install-testbuild-deps target, a selector is
needed listing all prerequisites to be installed except the project
under test. --hide-self should be useful for that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 18:33:51 +01:00
489652a02f cmds.projects.BaseCmdPkgRelations: Support --skip-excluded
In a push to eventually merge class CmdRequiredOsPkg into this class,
add the --skip-excluded option required by it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 18:33:51 +01:00
f075d3d0cf cmds.projects.BaseCmdPkgRelations: Support --quote
In a push to eventually merge class CmdRequiredOsPkg into this class,
add the --quote option required by it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 18:33:51 +01:00
d643956846 cmds.projects.BaseCmdPkgRelations: Add pkg_relations_list()
Add a function pkg_relations_list(), doing pretty much the same as
pkg_relations(), but taking individual arguments instead of an
argparse.Namespace args argument, in order to provide the
functionality to derived classes.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 18:33:51 +01:00
5f81f8d4da cmds.projects.BaseCmdPkgRelations: Add type hints
Add type hints to the class's methods.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 16:42:04 +01:00
57f204ccaa cmds.projects.BaseCmdPkgRelations: Remove --no-version
Merge --no-version into the --syntax option as "--syntax names-only"
to remove redundancy.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 16:41:59 +01:00
cff63786e9 lib.Distro: Allow empty packages list
In commands taking lists of packages, namely install, delete and
pkg_files, don't bother asking the backend. Uniformly log a warning
and return successfully.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 16:41:46 +01:00
84f1ad66f6 topdir.mk / projects-dir.mk: Remove BASE_PKGS
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 14:58:54 +01:00
e2098ec90a Release 1.0.0-186@kali-rolling/amd64
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-15 09:48:28 +00:00
564c55497c Start version: 1.0.0-186
Signed-off-by: janware DevOps <devops@janware.com>
2026-03-15 09:47:46 +00:00
7046983d7c cmds.projects.BaseCmdPkgRelations: --syntax debian
Add support for --syntax to BaseCmdPkgRelations.pkg_relations(), and
default to 'semver', i.e. the current state of affairs. If that's
changed to 'debian', relations declared in project.conf as

  pkg.requires.os.devel = jw-pkg-devel > 1.2.3

will be output as

  jw-pkg-devel >> 1.2.3

which is what Debian expects.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 10:43:08 +01:00
509fe1c5e0 cmds.projects.BaseCmdPkgRelations: --expand-semver-revision-range
Add support for --expand-semver-revision-range to
cmds.projects.BaseCmdPkgRelations.pkg_relations(). The options turns
a dependency in projects.conf

  pkg.requires.os.devel = jw-pkg-devel = VERSION

into

  jw-pkg-devel >= 1.2.3, jw-pkg-devel < 1.2.4

Note that this will break as soon as a real range is specified in
projects.conf. To be fixed later, this commit is at least less
breakage than before.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 10:42:51 +01:00
5bd1f3378b App.get_value(): Beautify logging
"getting value xxx for project" is a prominent debug log message but
ugly. Beautify to e.g.:

  Lookup jw-fail2ban -> jw-pkg / version

Meaning project "jw-fail2ban" looks up the value for key "version" in
project "jw-pkg".

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 10:42:35 +01:00
b2847809c1 lib.Types: Make debug logging optional
lib.Types class detection is too chatty. Make that a ctor option.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 10:42:24 +01:00