Commit graph

4,394 commits

Author SHA1 Message Date
e7d1a455c3 Start version: 1.0.0-177 2026-03-04 20:26:20 +00:00
f55a32024b pgit.sh get: Fix default revision for fresh clones
Fix detection of a project's revision if a project directory is
freshly cloned, and hence doesn't exist, yet. The fix is to default
to master for now.
2026-03-04 16:59:46 +00:00
404901bcff cmds.distro.backend.debian.Util: Remove --fix-broken
--fix-broken is added to apt-get options in non-interactive mode, but
seems to work only with apt-get install, not with apt-get update.
Don't add it at all for now.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:39:39 +00:00
a25701991d distro.backend.debian.Refresh.run(): Fix apt_get()
Fix call to apt_get(), needs to be a list, not a string.
2026-03-04 16:30:43 +00:00
4eeb12c12e cmds.distro.backend.debian.Util.apt_get(): Fix -yes
Fix a typo in the non-interactive command-line option (--yes) passed
to apt_get().

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:16:20 +00:00
8ca8df859b cmds.distro.backend.debian.Delete: Add class
Add Debian supoort for single-package deletion.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:04:27 +00:00
a7293e0ac9 cmds.distro.backend.debian.Util.py: Add dpkg()
Add utility method .dpkg() to the backend.debian.Utils class, saving
the need to import it, saving the need to import it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:04:27 +00:00
7e85076b44 cmds.distro.backend.debian.Install|Dup: Fix .apt_get()
.apt_get() is called on self, should be called on self.util instead,
fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:04:27 +00:00
9e8f5e3d2e cmds.distro.backend.debian.Util.apt_get(): Take list
apt_get(), like all other functions and methods spawning processes
should take a list instead of a starred *args array. Implement that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:04:27 +00:00
39ab1885e6 cmds.distro.backend.suse.Util.rpm(): Relay args
Relay *args and **kwargs unchanged to run_rpm(), no need to limit
them so far.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:02:44 +00:00
770920ef91 cmds.distro.CmdDelete: args.packages -> args.names
Rename the "packages" argument to "names" to be a little more
consistent with the pkg subcommand argument nomenclature.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:02:38 +00:00
0c1c2b9351 lib.util.run_cmd(): Reduce interactive logging
run_cmd() with cmd_input == mode:interactive  and verbose == true
logs output too often. First, __log() is called, then pty.spawn()
writes everything it reads from the PTY master to the terminal.

The fix it to not call __log() from _read() for the PTY reader.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 16:02:07 +00:00
e322629ac1 Release 1.0.0-176@suse-tumbleweed/x86_64 2026-03-04 14:14:46 +00:00
6d90813c67 Start version: 1.0.0-176 2026-03-04 14:14:09 +00:00
0317f46a01 cmds.distro.pkg.CmdMeta: Add class
Support distro pkg meta <package names ...>, returning meta
information for the specified package names.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:56:11 +01:00
f55d3045e0 cmds.distro.backend.debian.Pkg: Add module
Add Debian support for the "pkg"-command.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:55:06 +01:00
2897ba849f cmds.distro.backend.debian.Select: Add class
Add Select for Debian backends.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:54:33 +01:00
7f72d17f7a cmds.distro.lib.dpkg: Add module
As with cmds.distro.lib.rpm, the dpkg module is a place for Python
abstractions of the Debian package manager tools dpkg and friends.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:53:14 +01:00
1bb3c166d6 cmds.distro.lib.rpm.query_packages(): Add function
Replace all_installed_packages() by query_packages(). The function
takes an optional list of packages to be queried. If it's empty, a
list of all installed packages are returned.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:52:14 +01:00
3e9ec1f6c5 cmds.distro.lib.Package: Add more methods
Add more methods, to make Package more useful:

  - __repr__()

  - Class-mMethods to help with parsing of strings gathered from the
    OS-tools' output:

      parse_spec_str()
      parse_specs_str()
      order_tags()

  - Add field maintainer

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:49:11 +01:00
ecd077c93d cmds.distro.CmdPkg: args.name -> names
Make all pkg commands take a "names" argument (plural) instead of
"name", and make it a non-option-argument, to be passed to the
subcomand instead.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:48:46 +01:00
8bc22a3a68 lib.util.run_cmd(): Fix docstring
The docstring of run_cmd()'s signature documents a wrong return
value, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:48:26 +01:00
9373550af6 create-mkdebian.sh: Fix Maintainer + Homepage
There's no "Homepage" meta tag in the .deb files created by jw-pkg,
add one.

Also, generate an e-mail address <global.jw-maintainer>@janware.com
to go into the Maintainer field. Not ideal, but a low-hanging fruit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-04 14:45:38 +01:00
45fdf64446 Release 1.0.0-175@suse-tumbleweed/x86_64 2026-03-03 11:22:32 +00:00
cb8389726e Start version: 1.0.0-175 2026-03-03 11:21:55 +00:00
888ea9979a jw.pkg.cmds.distro.CmdDup: Support --donwload-only
Add --download-only to the options of jw-pkg.py distro dup, which
makes the command only download packages from the repositories
without installing them.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:24:49 +01:00
6af16d2dca jw.pkg.cmds.distro.CmdInstall: Support --only-update
Passing --only-update should keep "jw-pkg.py distro install" from
installing packages that are not already installed on the the system.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:24:43 +01:00
79d40af558 jw.pkg.cmds.distro.CmdRebootRequired: Add class
Add the command distro.CmdRebootRequired, adding support for "distro
reboot-required". The command exits with status code 1 if a reboot is
required and 0 otherwise.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:24:22 +01:00
5d95ca01ca jw.pkg.cmds.distro.backend.suse.Util.zypper(): Add verbose
Add boolean parameter verbose to zypper(), causing the obvious.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:24:19 +01:00
fc1431ec48 jw.pkg.cmds.distro.backend.suse.Util.zypper(): Add sudo
Add boolean parameter sudo to zypper(), doing the obvious.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:24:15 +01:00
0b3f12866c jw.pkg.cmds.distro.backend.*._sudo(): Pass *args on
Pass *args and **kwargs on unchanged to run_sudo().

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:24:10 +01:00
7fcb031795 jw.pkg.lib.App.__run(): Use return value as exit status
If a Cmd-classes's _run() method returns an integer between 0 and
255, use that as the program's exit status.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:23:32 +01:00
565946643b jw.pkg.*.run_xxx(): Return exit status
Most run_xxx() return stdout and stderr. There's no way, really, for
the caller to get hold of the exit code of the spawned executable. It
can pass throw=true, catch, and assume a non-zero exit status. But
that's not semantically clean, since the spawned function can well be
a test function which is expected to return a non-zero status code,
and the caller might be interested in what code that was, exactly.

The clearest way to solve this is to return the exit code as well.
This commit does that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 11:23:30 +01:00
3312b53a5b Release 1.0.0-174@suse-tumbleweed/x86_64 2026-03-03 04:48:22 +00:00
876be610b8 Start version: 1.0.0-174 2026-03-03 04:47:45 +00:00
3457daa0fb platform.mk: Add HOST_DISTRO_INFO
HOST_TUPLE is bastardized to contain more info that just the GNU
Triplet. Add HOST_DISTRO_INFO to do the caching job, and leave
HOST_TUPLE alone.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 05:32:47 +01:00
e7cf6afe17 pgit.sh: Fix "Running" log message
pgit.sh logs "Running $0 $@ GIT_SSH=" which is not the exact command
line. Fix that, and prefix log messages with "pgit.sh".

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 05:11:59 +01:00
03fca61248 jw.pkg.App.distro_id: Don't return opensuse
get-os.sh returned "suse" for SuSE-like distros, and that seems more
appropriate since SLES is not OpenSUSE but should share and ID with
other SuSE variants.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 05:11:59 +01:00
d22074abf9 jw.pkg.cmds.distro.Cmd._backend_path: Fix suse mapping
App.distro_id used to return "opensuse-tumbleweed", analogous to
what's in ID@/etc/os-release, but now returns "opensuse", and the
"tumbleweed" goes into "codename". That matches more what Debian-like
distributions do, but it confuses _backend_path. Adapt it to map the
new distro_id correctly.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-03 04:27:50 +01:00
f55bdd2e16 Release 1.0.0-173@kali-rolling/amd64
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 16:18:54 +00:00
20b14c109d pkg.sh: Determine upload dir from jw-pkg.sh distro info
A compiled release package is currently uploaded to a fixed
directory, determine it dynamically for every distro seperately.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 16:10:34 +00:00
e93338872f defs.mk: Move PKG_FORMAT definition into platform.mk
PKG_FORMAT is now more straightforward to get with from the revised
jw-pkg.py distro info --format '%{cascade}', so do that, and do it in
the context where all the other variables are set from the output of
that command.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
6f9905a3d5 dpm.sh: Support --nodeps and --allmatches
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
d481e3b8f1 dpm.sh: Support plain rpm -q
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
0cf4b29cfb scripts/get-os.sh: Remove
Remove the now obsolete get-os.sh from jw-pkg. Use "jw-pkg.py distro
info" to get the information it used to provide.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
c241634cf1 projects-dir.mk: Replace get-os.sh by jw-pkg.py distro info
To reduce redandancy, replace get-os.sh by jw-pkg.py distro info in
projects-dir.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
fa65047d2f platform.mk: Replace get-os.sh by jw-pkg.py distro info
To reduce redundancy, replace get-os.py by jw-pkg-py distro info.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
521600bc56 projects.mk -> platform.mk: Move definitions up
To remove redundancy, get-os.sh needs to be retired in favor of
pkg.py distro info. It's needed in platform.mk, but the only
definiton of JW_PKG_PY is in projects.mk, so move it, along with the
variables essential for the command:

  include $(JWBDIR)/make/py-version.mk (defining PYTHON)
  JW_PKG_PY
  DEVELOPMENT
  VERSION_FILE

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
6483de1a8f jw.pkg.App.get_os(): Don't use get-os.sh
Remove get-os.sh from App.py to reduce redunancy.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
2f157db18d pkg.sh: Replace get-os.sh by pkg.py distro info
Remove get-os.sh from pkg.sh to reduce redunancy.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00