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 f08f658d33
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m48s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m35s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m49s
CI / Packaging test (push) Successful in 0s
lib.ec.secret_store: Add and use framework
"jw-pkg secrets install" copies secret material from a GPG-encrypted tar
archive to dotenv .jw-secret files on a target host. This commit refactors
the underlying code and adds hooks for the inverse copy direction, and for
more secret sources and targets.

The peers between which secrets are copied are represented by the new
abstract secret_store.Base class, and the existing tar blob and host
storages, inheriting from that class, are TarGpg and KvFile. Moreover,
secret_store.Base is inheriting from FileContext, so all of jw-pkg's
file-like operations are available as hooks.

Secrets inside instances of two file contexts are addressable as
(targpg|kvfile)://target.host.com/path/to/file.conf.jw-secret. The on-host
KvFile will look either locally or via SSH for that file, and TarGpg will
look inside a tar archive specified in the JW_SECRETS_TARGPG_TAR
environment variable.

Uris with these schemas can be passed to FileContext.create(), which will
return a chrooted file context of the correct type.

KvFile.stat("/path/to/file.conf.jw-secret").ftype is FT_SECRET which
inherits from FT_COMPOUND - which means that readdir() works on such
animals. Not entirely sure if that's a good idea, but it feels pretty
generic. Let's see where that takes us.

DistroContext.install() after this refactor reads its source through the
store interface and writes the landing through the KvFile store.

Both secret stores are exercised through the existing unit test of jw-pkg
secrets install, and unit tests for both stores are also added by this
commit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-17 12:52:20 +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 py-defs.mk: Define PYTHON_RUNNER 2026-10-16 09:08:10 +02:00
scripts mkspec-wrapper.sh: Fix INSTALL_LOG default 2026-10-16 08:48:20 +02:00
src lib.ec.secret_store: Add and use framework 2026-10-17 12:52:20 +02:00
test lib.ec.secret_store: Add and use framework 2026-10-17 12:52:20 +02:00
.gitignore run-success.mk: Record last successful run 2026-09-16 18:16:17 +02:00
HASH Release 1.0.0-276@suse-tumbleweed/x86_64 2026-10-16 23:34:57 +00:00
Makefile .gitignore: Run make gitignore 2026-09-13 23:09:26 +02:00
RELEASES Release 1.0.0-276@suse-tumbleweed/x86_64 2026-10-16 23:34:57 +00:00
VERSION Start version: 1.0.0-276 2026-10-16 23:11:23 +00:00