Commit graph

4,789 commits

Author SHA1 Message Date
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
b9e1f91ff6 pgit.sh: Don't show fat header for one project

The fat marker with counter (# ==== [1/1] Fetching ...) is distracting if shown for only one project, so only show a regular marker without counter.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 12:13:11 +01:00
b758bc80cf Release 1.0.0-168@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2026-02-21 03:58:35 +00:00
f49fd47967 Start version: 1.0.0-168
Signed-off-by: janware DevOps <devops@janware.com>
2026-02-21 03:58:02 +00:00
8074abad5d projects-dir.mk: Fetch to current branch by default

To be explicit about what's happening during make fetch, default the fetch refspec to $(CLONE_FROM_USER):current-branch:current-branch.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 04:21:34 +01:00
93b2a2f222 pgit.sh: Support refspec keyword current-branch

If "current-branch" is specified within --refspec, either as from-ref or as to-ref, expand that to the branch the working directory has currently checked out.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 04:14:59 +01:00
e5e0cf9930 jw.pkg.lib.Cmd._run(): Call parent._run()

jw.pkg.lib.Cmd._run() is abstract, but it's nice to give it a default implementation which calls self.parent._run() in case parent is also a command class. That allows for some default processing in _run() for each node up the parent chain.

The children / derived classes just need to make sure all classes in the hierarchy do:

async def _run(self, args): return await super()._run(args) ... add main command logic here ..
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-20 19:30:22 +01:00
6916d7edc8 jw.pkg.lib.util.run_sudo(): Add parameter verbose

Add parameter verbose to run_sudo() and pass it on to run_cmd().

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-20 19:30:22 +01:00
d004e2c5ec Release 1.0.0-167@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2026-02-20 00:37:29 +00:00
4ced42a186 Start version: 1.0.0-167
Signed-off-by: janware DevOps <devops@janware.com>
2026-02-20 00:36:38 +00:00
ada7e7572f topdir.mk: git-pull-%: Always use pgit.sh

git-pull-<username> doesn't use pgit.sh if username == login. pgit.sh should handle that case fine now, so remove the distinction from topdir.mk and make it in one place, i.e. pgit.sh. This has the additional advantage that pull as done by pgit.sh conveniently uses --autostash.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 19:38:16 +01:00
f38abb9057 pgit.sh clone: Merge code path "from-user == login"

The cases from-user == login and from-user != login have different code paths and can be streamlined somewhat, so do that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 19:37:17 +01:00
01bf027070 Release 1.0.0-166@suse-tumbleweed/x86_64
Signed-off-by: janware DevOps <devops@janware.com>
2026-02-19 07:59:26 +00:00
b4e58b7d4a Start version: 1.0.0-166
Signed-off-by: janware DevOps <devops@janware.com>
2026-02-19 07:53:20 +00:00
f1bb90423f projects-dir.mk: Keep HOME in reinstall's env

Add HOME back to environment for pkg-*install*-like targets.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 08:46:44 +01:00
0c0617d794 projects-dir.mk: Keep SSH_AUTH_SOCK in reinstall's env

Purging the environment of pkg-release-reinstall did a tad too much: Add SSH_AUTH_SOCK back to allow SSH agent-based authentication to go through.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 08:22:43 +01:00
d814052aac jw.pkg.cmds.projects.CmdBuild: --source-profile -> --env-reinit

Replace --source-profile by --env-reinit and --env-keep to allow more fine-grained control over environment manipulation.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 08:22:43 +01:00
b3fd624a3f jw.pkg.lib.util.get_profile_env(): add -> keep

Replace the boolean parameter "add" with the richer "keep":

- False -> Don't keep anything - True -> Keep what's in the current environment - List of strings -> Keep those variables

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 07:52:53 +01:00