Build and packaging library
  • Python 43.9%
  • Makefile 40.9%
  • Shell 15.2%
Find a file
Jan Lindemann 18de6f2cf2 cmds.CmdSecrets: Add command class + subcommands
jw-pkg.py secrets [sub-command] [packages] is a set of utility
commands designed to manage configuration files containing secrets.

To keep secrets from leaking via version control or packages, a
_template_ should be packaged for every sensitive configuration file.
Then, during post-install, configuration files can be generated from
packaged templates via

  jw-pkg.py secrets compile-templates <package> <package> ...

During post-uninstall

  jw-pkg.py secrets rm-compilation-output <package> <package> ...

removes them.

Not specifying any packages will compile or remove all templates on
the system.

To identify which files to consider and generate or remove, the
compilation scans <package> for files ending in .jw-tmpl. For each
match, e.g.

  /path/to/some.conf.jw-tmpl

it will read key-value pairs from

  /path/to/some.conf.jw-secret

and generate

  /path/to/some.conf

from it, replacing all keys by their respective values. The file
attributes of the generated file can be determined by the first line:
of some.conf.jw-tmpl or some.conf.jw-secret:

  # conf: owner=mysql; group=mysql; mode=0640

There are other commands for managing all secrets on the system at
once, see jw-pkg.py secrets --help:

    compile-templates   Compile package template files
    list-compilation-output
                        List package compilation output files
    list-secrets        List package secret files
    list-templates      List package template files
    rm-compilation-output
                        Remove package compilation output files

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-07 21:51:17 +01:00
bin bin, make, scripts: Re-add files necessary for packaging jw-build 2025-11-14 11:22:50 +01:00
conf jw-pkg.py: Enable argcomplete 2026-03-06 12:06:28 +01:00
make lib.Distro, ExecContext: Add classes, refactor lib.distro 2026-03-06 14:56:46 +01:00
scripts jw-pkg.py: Enable argcomplete 2026-03-06 12:06:28 +01:00
src cmds.CmdSecrets: Add command class + subcommands 2026-03-07 21:51:17 +01:00
.gitignore Everywhere: Rename package "jw-build" to "jw-pkg" 2025-11-28 13:35:56 +01:00
HASH Release 1.0.0-181@suse-tumbleweed/x86_64 2026-03-06 19:17:37 +00:00
Makefile $(TOPDIR)/Makefile: Remove superfluous SUBDIRS 2025-11-14 13:39:52 +01:00
RELEASES Release 1.0.0-181@suse-tumbleweed/x86_64 2026-03-06 19:17:37 +00:00
VERSION Start version: 1.0.0-181 2026-03-06 18:33:29 +00:00