Commit graph

4,756 commits

Author SHA1 Message Date
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
aebd9bb5e6 jw.pkg.cmds.distro.lib.rpm.list_files(): Add function

Add a function list_files, which takes a package name and returns the contained files in a list.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:53:17 +01:00
2906c697de jw.pkg.lib.util.run_cmd(): Add stderr to exception

If an error happens, append stderr to the exception thrown.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:53:17 +01:00
a160555596 jw.pkg.cmds.Cmd._add_subcommands(): Generic detection

Deduce module search path for the calling module's subcommands directly from the module path of the calling module. That's more generic than the previous detection algorithm, because it recursively works for subcommands of subcommands as well.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:53:17 +01:00
595995e084 jw.pkg.cmds: Replace split('\n') by splitlines()

splitlines() removes empty lines, so use it and save some lines of code.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:53:05 +01:00
c8036ad216 jw-pkg.sh: Print help for missing subcommands

Print a help message if no subcommand is specified for one of the comamnds "distro" and "projects".

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:52:25 +01:00
32b28b5958 Release 1.0.0-169@suse-tumbleweed/x86_64 2026-02-21 15:15:02 +00:00
b9eaf8637d Start version: 1.0.0-169 2026-02-21 15:14:25 +00:00
9aba15cd88 topdir.mk: git-get-% -> current-branch

Currently git-get-% pulls into the master branch. Change that to pull into the branch currently checked out in the workspace, because that's the more likely use case if you want a quick update from somewhere.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:54:53 +01:00
5a3299b1c6 projects-dir.mk: Add [git-]get-maintainer

Add targets to update all repositories from their respective maintainers.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:27 +01:00
e799f6bccc pgit.sh: Add command exec

Add a command "exec", which takes its arguments and runs it as a shell command within all projects in $PGIT_SH_PROJECTS.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:27 +01:00
472bba6fbb pgit.sh: Make PGIT_SH_PROJECTS work on all commands

PGIT_SH_PROJECTS currently only sets the projects to operate on for the get command. Extend this to all commands. And replace the environment variable by a command-line option, likely after this script has been ported to Python.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:27 +01:00
ea968b521b pgit.sh: Log complete refspec in get

Change the project header logged during the get command to include the complete refspec.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:27 +01:00
f86634a1d1 pgit.sh: Rename command "clone" to "get"

"clone" in the Git sense means to copy a remote project over from scratch. pgit.sh clone has come from that, but has since evolved into something different, a mixture of clone, pull and fetch, so find a different name. "get" seems generic enough and doesn't clash with a Git meaning. Adapt variable names accordingly across the project.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:25 +01:00
82b41ffce2 pgit.sh: Beautify variable names some more

Continue to name variables in pgit.sh somewhat more consistently, notably turn somevar into some_var. Plus some additional cleanup. Still not a beauty.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 14:10:34 +01:00