Commit graph

5,237 commits

Author SHA1 Message Date
d0eca89b63
lib.FileContext.chroot: Add property
Give FileContext a read-only property to access self.__chroot, so a caller
holding a context can predict whether the addresses it passes in are
relative to the URI path or absolute.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.1
2026-10-17 11:47:06 +02:00
9abeb4ebca
lib.FileContext.is_gettable: Add property
Analogous to the is_dir() method, add an is_gettable() method: The last
commit introduces FT_COMPOUND, a file type which is a hybrid between
directory and regular file. is_dir() succeeds on it, so is_gettable()
symmetrically provides a test find out if get() also works on a file.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-17 11:47:06 +02:00
0d0f1966ef
lib: Add hierarchical FileType framework
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m51s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m53s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m21s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m45s
CI / Packaging test (push) Successful in 0s
Introduce FileType, a class consisting of a name and a parent property,
designed to make the information FileContext.stat() provides about a
path-addressable object richer.

A FileType property goes as ftype into the StatResult structure. Along with
it, this commit adds a central registry (FileTypes) where the type hierarchy
is kept, and additional parameters to put() and mkdir() to allow creating
typed FileContext objects.

Builtin types are:

  - FT_REG: A regular file, the default thing put() creates
  - FT_DIR: A directory, the default thing mkdir() creates
  - FT_TOP: The parent of the two
  - FT_COMPOUND: An FT_REG returning child entries from readdir()

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.1
2026-10-17 09:55:16 +02:00
9b365ed247
Release 1.0.0-276@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m57s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m45s
CI / Packaging test (push) Successful in 0s
2026-10-16 23:34:57 +00:00
620af6f1b6
Release 1.0.0-276@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m23s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m35s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-10-16 23:12:33 +00:00
28f60d3624
Start version: 1.0.0-276
Signed-off-by: janware DevOps <devops@janware.com>
2026-10-16 23:11:23 +00:00
8106d4a7b0
cmds.pkg.CmdVerify: Add command
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m24s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m43s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m48s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m38s
CI / Packaging test (push) Successful in 0s
Add the "packages verify" command: it runs Distro.verify() with the app's
package filter and prints one line per flagged file.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.2.0
2026-10-16 09:40:22 +02:00
cae983479c
lib.Distro.verify(): Add method
jw-base verify pipes the output of rpm -qV for all janware packages
into a grep for md5 mismatches and missing files. The same capability,
distribution-independent, belongs in the Distro abstraction so that tools
like jw-nettools can check the integrity of the packages they install on a
fleet of hosts.

- Add Distro.verify(), which verifies the given package names, or all
  packages selected by the package filter when none are given, and returns
  the flagged files
- Add Distro._verify() as the distribution hook
- Add FlaggedFile, the record for a flagged file: package, file, and the
  package manager's verify status line - not distribution independent as of
  today, but it's a start
- pm/rpm.py: parse_verify_output() parses the output of `rpm -qV` and
  reports md5 mismatches and missing files, the latter reported with the
  literal word "missing" in the flag field; size, mode, mtime, user, and
  group mismatches are noise on dev machines and are ignored.
  verify_packages() runs `rpm -qV` per package and collects the findings
- pm/dpkg.py: parse_verify_output() parses the output of `dpkg -V` and
  reports md5sum (P) mismatches and missing files (M); verify_packages()
  runs `dpkg -V` per package
- The SUSE, Red Hat, and Debian Distro classes implement _verify() with the
  respective pm helpers; the Arch Distro raises NotImplementedError, like
  its other package manager hooks

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.2.0
2026-10-16 09:40:22 +02:00
2fad5d189c
lib.Distro.pkg_files(): Take list[str] | None
Distro.pkg_files() takes a package name and returns a list of files in that
package. This commit generalizes that - pass None to it and get the list of
all packaged files in the system, and pass a list of strings to retrieve
all files belonging to the named packages.

The same arguments are propagated to _pkg_files(), which in turn propagates
them to list_files().

This allows faster generation of file lists than before. Having to retrieve
a list of matching packages and query each package for its contained files
can be collapsed into one or two backend calls.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-16 09:40:22 +02:00
63f0fef12e
test/integration/jw-pkg/secrets: Fix make format fallout
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m43s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m38s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m24s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m35s
CI / Packaging test (push) Successful in 0s
Fix a miniscule make format churn.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0
2026-10-16 09:19:48 +02:00
61c9479e79
test/integration/jw-pkg -> test/integration/jw_pkg
The mypy module names of the test tree derive from the full path, anchored
by the top-level test/__init__.py, but a file below a path component that
is not a valid identifier - the dashes in jw-pkg - falls back to the bare
file name, so two same-named test.py drivers collide (the duplicate module
error that drove the runme.py and main.py renames).

Rename the directory a sane Python name - jw_pkg, that's the better fix.
Then name the driver test.py like all the others for consistency.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-16 09:19:48 +02:00
85ddd44cd1
py-defs.mk: Define PYTHON_RUNNER
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m15s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m35s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m18s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m54s
CI / Packaging test (push) Successful in 0s
PYTHON_RUNNER is defined in py-run.mk but is more generally useful, e.g.
for hand-rolled test Makefiles. It's also a cheap definition. Lift it into
py-defs.mk instead.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0
2026-10-16 09:08:10 +02:00
66d1a117a4
platform.mk: Define empty, space, comma
The PYTHONPATH export in py-path.mk is built by substituting the spaces of
the space-separated JW_PKG_PYTHON_PATH list with colons, using "space" from
defs.mk. Which may not be included if somebody wants to include a bare
py-defs.mk, so define it in platform.mk. Not happening in jw-pkg, but nice
to have.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-16 09:08:10 +02:00
256f294b8b
py-path.mk: Include platform.mk for JW_PKG_PY
py-path.mk invokes $(JW_PKG_PY) to compute JW_PKG_PYTHON_PATH, but does not
include the file that defines the variable. Not a problem from inside
jw-pkg, but nice to have if you want to include std-targets.mk and
py-defs.mk without anything else, so include it.

Also drop a dead debug line in the py-path target.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-16 09:08:10 +02:00
f7f872c31e
mkspec-wrapper.sh: Fix INSTALL_LOG default
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m49s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m48s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m25s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m32s
CI / Packaging test (push) Successful in 0s
INSTALL_LOG's default value is composed from a variable that's never set,
$ID. That used to work until the same user builds multiple packages
concurrently on the same host. Use $PROJECT instead.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-16 08:48:20 +02:00
8615fcc97c
Release 1.0.0-275@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m26s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m36s
CI / Packaging test (push) Successful in 0s
2026-10-12 23:37:33 +00:00
17427d1f42
Release 1.0.0-275@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m34s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m39s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-10-12 23:13:03 +00:00
bd382b13fa
Start version: 1.0.0-275
Signed-off-by: janware DevOps <devops@janware.com>
2026-10-12 23:11:55 +00:00
141dd0ac3c
cmds.secrets.CompileTemplates: Fix conf line handling
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m46s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m30s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 5m35s
CI / Packaging test (push) Successful in 0s
File attributes of the compiled output of "jw-pkg secrets
compile-templates" can be specified via the # conf line atop a .jw-tmpl
file, the parsing of that line is buggy, however.

Its mode is parsed as a decimal number unless it carries a leading zero, so
"mode=640" yields 640 decimal, 1200 octal, and the output file ends up
without usable permissions.  The same decimal parse applies to a conf line atop
the .jw-secret of a target, whose attributes are honored the same way, and
the --mode option of compile-templates passes its string value through to
Attrs, whose mode is typed int, so a target without a conf line of its own
crashes in _format_metadata().

Other than that, the # conf line itself should be removed from the compiled
output, but isn't.

This commit makes the conf line handling correct:

- _parse_attributes() parses the mode as octal, with or without a leading
  zero
- _compile_one_template_file() drops the conf line from the compiled
  content
- the --mode option is converted to an octal int by octal_mode() at the
  argument boundary

The integration test writes its conf line modes without leading zeros,
expects the conf line gone from the compiled output, takes one target's
mode from a conf line atop its .jw-secret, and passes a --mode that the
conf lines override.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-12 10:58:14 +02:00
79ec79eb9a
Release 1.0.0-274@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m4s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m35s
CI / Packaging test (push) Successful in 0s
2026-10-03 23:43:15 +00:00
8d976ebc3a
Release 1.0.0-274@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m24s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m43s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-10-03 23:12:44 +00:00
e9bb7bb7b2
Start version: 1.0.0-274
Signed-off-by: janware DevOps <devops@janware.com>
2026-10-03 23:11:35 +00:00
ec405d4107
test/integration/jw-pkg/secrets: Add test
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m36s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m46s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m14s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m35s
CI / Packaging test (push) Successful in 0s
Drive the real "jw-pkg secrets" CLI in-process against a GPG-encrypted
tarball in the canonical layout: reverse-domain host prefixes plus a
default tree, host wins. The distro is stubbed only in its package file
list; argument parsing, DistroContext, install, template compilation and
cleanup run as production code.

The fixture package carries three templates: one secret present in both
host and default trees (the host entry must win), one present only in the
default tree, and one missing from the tarball entirely (install must not
extract it). A tar member that is not a secret of the package must not be
extracted either.

Trees whose FileContext supports the targpg:// scheme address the tar
source through that scheme, with the tarball location in the environment,
and additionally exercise the rooted-URI rejection and the install from
the on-host file tree; earlier trees install from the tarball URI
directly.

The Makefile's SECRETS_TEST_BASE variable pins the fixture to a persistent
directory that survives the test run for inspection.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.0
2026-10-03 16:17:23 +02:00
ce3045e081
topdir.mk: Derive GITIGNORE_PATTERNS_END from TOP
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m31s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m47s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m55s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m35s
CI / Packaging test (push) Successful in 0s
The !-exceptions in the generated .gitignore are computed by a grep pattern
that hardcodes the project name, while the top ignore line comes from
GITIGNORE_PATTERNS_TOP. A project that overrides GITIGNORE_PATTERNS_TOP -
jw-pkg's Makefile sets it to empty - still gets the hardcoded exceptions,
and patterns a project adds there get no exceptions at all, so the two can
drift apart.

Derive the exception pattern from the same variable:

- new GITIGNORE_PATTERNS_TOP_INV joins the patterns of
  GITIGNORE_PATTERNS_TOP with |, each wrapped in word boundaries, plus the
  __init__.py pattern
- GITIGNORE_PATTERNS_END greps the tracked files for that alternation with
  grep -E instead of a hardcoded BRE, so the dot in __init__.py is literal
  instead of matching any character

With the default GITIGNORE_PATTERNS_TOP the generated .gitignore is
byte-for-byte identical to before.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-03 15:51:46 +02:00
939eb09c0f
cmds.secrets: Fix rewrite() of long member names
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m21s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m26s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m27s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 5m3s
CI / Packaging test (push) Successful in 0s
rewrite() renames the members of a tar blob, but the TarInfo objects
carried over from the input still hold the pax "path" supplement that was
recorded for the original name. Re-serialization (tf_out.addfile()) uses
the pax supplement with higher precedence than what's in the base header's
name filed, so for member names exceeding the 100 character ustar limit the
rewrite silently has no effect and the original name is written back.

Drop the stale "path" supplement after renaming a member. tf_out.addfile()
then builds a rewritten, up-to-date supplement from the name field if it
needs one.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-03 12:31:07 +02:00
9eec04f0f3
cmds.posix.copy: Allow missing mode option
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m11s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m45s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m0s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m55s
CI / Packaging test (push) Successful in 0s
The -m option of posix copy is optional, and its argparse default is None,
but _run() converts it unconditionally and crashes:

    mode = int(args.mode, 0)

so every copy without -m died with

    TypeError: int() can't convert non-string with explicit base

before the copy even started. Convert the mode only when it is given, and
pass None otherwise, which copy() already treats as "no mode change".

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.99.2
2026-10-03 10:19:58 +02:00
ec89205cbb
ExecContext: Map ENOTDIR to FileNotFoundError
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m15s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m53s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m23s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m40s
CI / Packaging test (push) Successful in 0s
_raise_stat_error() maps the message of a failed remote stat to an
exception. A stat below a file answers "not a directory", which falls
through to the generic EIO: the path is simply absent, and callers see a
re-raised error instead of the FileNotFoundError the "no such file" branch
already gives. Map it to FileNotFoundError, so existence checks see
absence.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.99.2
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-03 10:03:01 +02:00
55db326898
lib.util.run_cmd(): Fix forgotten cmd_input
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m25s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m49s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m0s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m56s
CI / Packaging test (push) Successful in 0s
jw-pkg secrets list-secrets spams the console without --interactive=false
because it thinks it should query packages and files in interactive mode.

The underlying bug is that run_cmd() derives the interactive flag of a
freshly created Local context from cmd_input, but it never forwards
cmd_input to ExecContext.run().  Since run() defaults to
InputMode.OptInteractive, an explicit cmd_input is silently ignored: a byte
string is not fed to the command's stdin, InputMode.Auto is downgraded to
non-interactive, and with a caller-provided ExecContext the requested mode
is lost in all cases.

Forward cmd_input in kwargs so the requested input mode reaches run().

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.99.2
2026-10-03 08:51:44 +02:00
07d1dd628a
Release 1.0.0-273@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m57s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m29s
CI / Packaging test (push) Successful in 0s
2026-09-29 23:36:12 +00:00
8b9b6cc8f0
Release 1.0.0-273@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m13s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m31s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-29 23:14:33 +00:00
270c8c1a7c
Start version: 1.0.0-273
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-29 23:13:24 +00:00
b697b7b754
util.copy(): Add recursive directory copy
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m51s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m42s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m53s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m46s
CI / Packaging test (push) Successful in 0s
copy() copies a single file: it fetches the source root as one content and
puts it at the destination, so addressing a directory source fails, and
there is no way to mirror a tree between file contexts.

Add a recursive mode:

- a directory source is mirrored below the destination root, into it if the
  root is an existing directory, as it if it does not exist yet
- entries are enumerated with readdir(), destination directories are
  created level by level, and every leaf is put with the requested owner,
  group, and mode
- a file source is unaffected, and the destination parent must exist, as
  before

posix copy exposes the mode as -r/--recursive; the help test reference
picks up the new option.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-29 15:29:19 +02:00
0c732672ed
lib.FileContext: Add readdir() method
FileContext offers get(), put(), unlink(), mkdir(), and stat(), but no way
to list the entries of a directory, so consumers that need the names of the
entries under a path in a context have no portable means to obtain them.

Add readdir(), returning Iterable[str], following the _readdir() ->
readdir() pattern used by the other operations: the public method chroots
the path via _chroot() and delegates to the _readdir() hook, which raises
NotImplementedError by default.

Implement _readdir() in the context families:

- Local._readdir(): os.listdir()
- ExecContext._readdir(): runs ls -1A and splits the output into one entry
  per line; inherited by SSHClient and the other command-based contexts
- Curl._readdir(): raises OSError with errno.ENOSYS

Add unit tests covering Local (listing, hidden entries, missing directory)
and Curl (ENOSYS).

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.1
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-29 15:29:19 +02:00
120100c9cb
FileContext.mkdir(): Fix missing _chroot()
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m27s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m41s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m55s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m26s
CI / Packaging test (push) Successful in 0s
mkdir() passes its path to _mkdir() without chrooting it, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-29 15:18:47 +02:00
1bab2573d0
topdir.mk: Make target git-import idempotent
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m33s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 6m41s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m32s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 8m42s
CI / Packaging test (push) Successful in 0s
Target git-import adds everything it finds in the current directory. If
it's already a Git project, that fails over git commit -m "First commit".
Since it's a prerequisite of target git-init-remote, it breaks that target,
too for non-empty git repos, which isn't helpful when trying to run make
git-init-remote to publish an an already existing project.

So only do something meaningful in git-import if the project it's run in
doesn't already contain files.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-28 10:45:48 +02:00
0bf9499df3
Release 1.0.0-272@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m11s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m56s
CI / Packaging test (push) Successful in 0s
2026-09-27 23:39:25 +00:00
af5c02aad0
Release 1.0.0-272@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m58s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m55s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-27 23:12:14 +00:00
50c849d9cd
Start version: 1.0.0-272
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-27 23:10:59 +00:00
58767b663c
pgit.sh: Stop looking for .git at regular file
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m38s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m52s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m15s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m57s
CI / Packaging test (push) Successful in 0s
projects_dir is searched by looking for a directory named .git up the
direcctory lineage. That does't work for worktrees, which are regular files
pointing back to worktree git dir within the the real git directory.

Broaden the check from "test -d .git" to "test -e .git".

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-27 10:16:00 +02:00
6c2c32adaa
Release 1.0.0-271@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m6s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m37s
CI / Packaging test (push) Successful in 0s
2026-09-24 23:36:11 +00:00
d3a93345e7
Release 1.0.0-271@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 4m57s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m37s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-24 23:12:42 +00:00
b59a648beb
Start version: 1.0.0-271
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-24 23:11:34 +00:00
f92de9f3ff
pkg-dist.mk, pkg.sh: Rename PCKG variables to PKG
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 7m1s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m3s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m46s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m51s
CI / Packaging test (push) Successful in 0s
The previous commit renamed the dist/pckg directory to dist/pkg but kept
the pckg spelling in the variables that reference it.

Rename the variables to PKG:

- DIST_PCKG_DIR to DIST_PKG_DIR (make/pkg-dist.mk, pkg.sh)
- PCKG_TAR to PKG_TAR, PCKG_ROOT to PKG_ROOT and DIST_PCKG_RPM to
  DIST_PKG_RPM (make/pkg-dist.mk)

None of the other 320 janware projects use these variables.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-24 13:03:28 +02:00
29dffb9767
pkg-dist.mk, pkg.sh: Rename dist/pckg to dist/pkg
The directory holding the built packages uses the pckg abbreviation while
every other package-related name in the build system uses pkg (PKG_PROJECT,
PKG_FORMAT, PKG_ARCH).

Rename dist/pckg to dist/pkg, in the DIST_PCKG_DIR variable and in the
recipes that hardcode the path.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
2026-09-24 13:03:28 +02:00
c33d72f4d4
pkg-dist.mk, pkg.sh: Build RPMs in dist/build
pkg.sh hardcodes $HOME/rpmbuild as the rpmbuild topdir while make computes
the same location separately as PKG_DIR_BUILD, and a sandboxed shell cannot
build at all: rpmbuild writes its scratch trees and results under the
topdir, outside the project.

- Default PKG_DIR_BUILD to $(TOPDIR)/dist/build for non-root builds and
  pass it to pkg.sh as the new -T option (root keeps /usr/src/packages;
  local.mk can still override)
- Build with --define _topdir pointing at that directory, resolved to an
  absolute path, so the scratch tree, RPMS and SRPMS stay in the project
  tree where make clean drops them

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
2026-09-24 13:03:27 +02:00
a03eb10868
make: Remove INSTALL_PCKG_DEPS_DIR
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m51s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m58s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m56s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m39s
CI / Packaging test (push) Successful in 0s
Remove INSTALL_PCKG_DEPS_DIR and friends from jw-pkg. It was introduced
with 2a4a95 in 2009 and has not seen much use since. By now it has been
made obsolete by declaring dependencies in project.conf. One source of
truth is enough.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-24 09:42:25 +02:00
61736dbeed
Release 1.0.0-270@suse-tumbleweed/x86_64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m57s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m52s
CI / Packaging test (push) Successful in 0s
2026-09-23 23:38:01 +00:00
b31db8cb3b
Release 1.0.0-270@kali-rolling/amd64
All checks were successful
CI / Packaging - Kali Linux (push) Successful in 5m33s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m30s
CI / Packaging test (push) Successful in 0s
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-23 23:12:27 +00:00
8d4dfe70bc
Start version: 1.0.0-270
Signed-off-by: janware DevOps <devops@janware.com>
2026-09-23 23:11:18 +00:00
8b3f4c69da
test/integration/projects/pkg-requires: Add
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m53s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 8m4s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m23s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 7m34s
CI / Packaging test (push) Successful in 0s
Add an integration test for pkg-requires --skip-excluded with a fixture
project tree: excl-never lists the platform name "centos" in [build]
exclude and is not excluded from the build on the test platforms, excl-all
is excluded from the build everywhere, and dep-target is a plain dependency
target.

The test verifies that a platform name in [build] exclude is not treated as
a project, that an excluded jw dependency is not reported with
--skip-excluded, that an excluded seed is neither considered nor output,
and that without the flag the excluded projects are reported with their
dependencies.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-23 17:35:58 +02:00