Build and packaging library
  • Python 66%
  • Makefile 24.6%
  • Shell 9.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann 141dd0ac3c
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
cmds.secrets.CompileTemplates: Fix conf line handling
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
.github/workflows ci.yaml: test-packaging.yaml@{master-test -> master} 2026-06-08 19:43:15 +02:00
bin bin, make, scripts: Re-add files necessary for packaging jw-build 2025-11-14 11:22:50 +01:00
conf run-success.mk: Record last successful run 2026-09-16 18:16:17 +02:00
doc doc: Add subdir 2026-08-19 20:51:11 +02:00
make topdir.mk: Derive GITIGNORE_PATTERNS_END from TOP 2026-10-03 15:51:46 +02:00
scripts pgit.sh: Stop looking for .git at regular file 2026-09-27 10:16:00 +02:00
src cmds.secrets.CompileTemplates: Fix conf line handling 2026-10-12 10:58:14 +02:00
test cmds.secrets.CompileTemplates: Fix conf line handling 2026-10-12 10:58:14 +02:00
.gitignore run-success.mk: Record last successful run 2026-09-16 18:16:17 +02:00
HASH Release 1.0.0-274@suse-tumbleweed/x86_64 2026-10-03 23:43:15 +00:00
Makefile .gitignore: Run make gitignore 2026-09-13 23:09:26 +02:00
RELEASES Release 1.0.0-274@suse-tumbleweed/x86_64 2026-10-03 23:43:15 +00:00
VERSION Start version: 1.0.0-274 2026-10-03 23:11:35 +00:00