Commit graph

4,570 commits

Author SHA1 Message Date
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
1da00283d1 jw.pkg.cmds.projects.CmdOsCascade: Remove
CmdOsCascade is superseeded by CmdInfo. Use the latter and retire the
former.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
e2e1b3388c jw.pkg.cmds.distro.CmdInfo: Add class
CmdInfo provides what "projects os-cascade" provided as "distro info
--format '%{cascade}'" plus additional macros: %{id}, %{name},
%{codename} and ${gnu-triplet}.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
f58e9fe298 jw.pkg.App: Add more distro_xxx properties
In addition to the existing propert distro_id, add the properties
distro_codename, distro_name, distro_cascade and distro_gnu_triplet.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:00:12 +01:00
5566795d6a Release 1.0.0-173@suse-tumbleweed/x86_64 2026-03-01 09:41:58 +00:00
2da64576b9 Start version: 1.0.0-173 2026-03-01 09:41:24 +00:00
5b4035ee8c Release 1.0.0-172@debian-2025.4/amd64
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-28 13:25:50 +00:00
ca7a5a5265 pkg.sh: Evaluate pkg.run on Debian
pkg.run is not evaluated on Debian, fix that. For now it's hacked
into pkg.sh, which is bound to be replaced by Python. The limited
hassle is still worth the detour.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-28 13:15:05 +00:00
a0b166748a create-mkdebian.sh: Indent heredocs
For better readability indent the heredocs.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-28 13:02:03 +00:00
410897bf9e Release 1.0.0-172@suse-tumbleweed/x86_64 2026-02-28 00:18:59 +00:00
8c3dd2b999 Start version: 1.0.0-172 2026-02-28 00:18:24 +00:00
11379f4830 jw.pkg.cmds.projects.CmdGetAuthInfo: --remote-owner-base
Support --remote-owner-base in the command CmdGetAuthInfo. Make it
return what currently --remote-base returned: A URL including the
user / organization specific prefix of the Git remote's URL that
jw-pkg was pulled from.

   https://my-company.com/src/theowner/jw-pkg.git

would have a --remote-owner-base of

   https://my-company.com/src/theowner

Also, change what --remote-base returns to

   https://my-company.com/src

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-27 22:54:15 +01:00
8dcaa1a6a1 jw.pkg.cmds.projects.CmdListRepos: --from-owner
Rename the --from-user option to --from-owner. Forgejo supports users
and organizations under the more general term "owner", so that's the
better term.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-27 17:12:11 +01:00
956235276a jw.pkg.cmds.projects.CmdListRepos: Beautify logging
list-repos tries /users/ and /orgs/ to find a working repo URL in a
Forgejo instance, logs a failure and doesn't log anything if it finds
one that works. In the context, that can be mildly confusing,
beautify the output somewhat.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-27 17:08:28 +01:00
afc77ab61d jw.pkg.lib.util.run_curl(): Beautify logging
Make some incomprensible parser error messages if run_curl() returns
nothing slightly less incomprehensible.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-27 17:03:26 +01:00
efa6e1bad7 Release 1.0.0-171@suse-tumbleweed/x86_64 2026-02-27 09:05:28 +00:00
d9c4d65605 Start version: 1.0.0-171 2026-02-27 09:04:56 +00:00
6c1f0f4c95 jw-pkg.py: CmdListRepos: Take base-url argument seriously
base-url is not used as a prefix in its entirety, but massaged in a
janware-specific way. Still is, but at least this commit is a step
towards being more generic.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-27 09:19:51 +01:00
b81406e11a run_cmd() and friends: Make args a list[str]
This is a code maintenance commit: some run_xxx() helper functions
take a string, some a list, and some just digest all arguments and
pass them on as a list to exec() to be executed. That's highly
inconsistent. This commit changes that to list-only.

Except for the run_cmd() method of SSHClient, which is still run as a
shell method, because, erm, it's a shell. Might be changed in the
future for consistency reasons.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-27 09:09:10 +01:00
fbeefa2d9e projects-dir.mk: Add target get-official
Follow the pattern of get-maintainer, and add that target to
projects-dir.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-26 15:20:25 +01:00
9449840401 projects-dir.mk, topdir.mk: Alias get-% for git-get-%
Add a VCS-independent rule rule get-%, currently an alias for
git-get-%, with an empty recipe to keep GNU Make satisfied.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-26 15:18:09 +01:00
aa8d1cbfc6 projects-dir.mk: get-get-%: Merge into current branch
Don't use the master branch as target when getting code from
somebody, merge into the branch currently checked out.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-26 15:18:09 +01:00
4fdddce39a Release 1.0.0-170@suse-tumbleweed/x86_64 2026-02-25 00:16:08 +00:00
3342d557c0 Start version: 1.0.0-170 2026-02-25 00:15:35 +00:00
881a915098 jw/pkg/cmds/distro/CmdPkg: Add distro pkg ls
Add the distro subcommand class CmdPkg, together with a first
subcommand ls, which prints a list of files contained in a package.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:53:18 +01:00