Commit graph

4,826 commits

Author SHA1 Message Date
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
fc80bde804 topdir.mk: git-init et al: Change commit message

Change commit message of first commit from "initial checkin" to "First commit", because that's more to the point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 19:21:14 +01:00
48664724ce project.conf: Remove sudo and gawk from run deps

sudo is certainly not needed for the run package (which in itself is hardly useful at all), so move that dependency into the devel package. Same for gawk. /opt/jw-pkg/bin/get-os.sh depends on it, but I don't see where else but in a -devel context that would matter. And if it breaks something, it is going to be an easy fix without awk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 18:20:33 +01:00
3ad021f071 projects-dir.mk: reinstall with --source-profile=replace

--source-profile=replace should be passed to all

jw-pkg.py projects build pkg-*install

invocations. Those invocations typically happen in the context of pkg-%install, so add that target, specializing the pkg-% target.

The problem this solves is that /etc/profile is currently read only once before bootstrapping all software on a pristine system is started. This might lead to the situation that package A has installed environment variable definitions into /etc/profile.d, package B needs them for building, but never gets to read them.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 14:44:57 +01:00
230eacac8b jw.pkg.cmds.projects.CmdBuild: Add --source-profile

Add --source-profile=[no|add|replace] to the projects build command, doing the obvious thing.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 14:22:27 +01:00
2d1beeebb0 jw.pkg.lib.util.get_profile_env(): Add function

Add a function get_profile_env(), a function returning environment variables from /etc/profile. Pass add=True to add its contents to the existing environment dictionary, overwriting old entries, or pass False to get the pristine content.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 14:18:46 +01:00
e104fa2e46 jw.pkg.lib.util.run_cmd(): Add output_encoding

Add a parameter "output_encoding" to run_cmd(). The parameter allows the caller to specify if the output encoding should be detected as is by passing None (the default), if the output should be returned as undecoded bytes by passing the special string "bytes", or if the output should be treated as the encoding with the specified name and decoded to strings.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 13:38:12 +01:00
82c6a44ad6 jw.pkg.lib.util.run_cmd(): Fix mode:auto

In cmd_input == "mode:auto", the interactive variable is currently not set due to a typo. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 13:31:26 +01:00
f8dc8ee6d1 jw.pkg.lib.util.run_cmd(): Honour env in PTY mode

The evironment passed to run_cmd() via env is currently not honoured with mode:interactive. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 13:29:48 +01:00
838b745581 jw.pkg.cmds.projects.CmdBuild: Use run_cmd("make")

Use run_cmd() for centralized process handling, instead of hand-rolled Popen().

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 11:37:40 +01:00
0cb6a7972c jw.pkg.cmds.projects.CmdBuild: Make run_make() async

Make the call chain to Popen(make ...) async, in preparation for the next commit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 11:36:14 +01:00
75faf02232 jw.pkg.lib.util.run_cmd(): Add title parameter

Allow the caller to choose which title should be used for the command's logging output box.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 11:31:53 +01:00
7eb15f2477 jw.pkg.lib: Don't log {e}

Don't log an Exception as {e} but as str(e) producing nicer output. Or as repr(e) if a backtrace is requested, because to people who can read backtraces, type info might be of interest. Also, remove pointless time stamps, those belong into the logging framework.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 11:31:13 +01:00
78d49edfeb pkg.sh: Fix rpmbuild %attr(links) warning

dc945537 (pkg.sh log-install: Log %attr(0777, ...) for links) fixed packaging symlink for Debian-based distros, but produces a warning on RPM based distros: Links may not have explicit attributes, so go back to not specifying them at all for RPM.

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