From 75df988e1cb9863ee5d708dbc578f7690bb182de Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 1 Dec 2026 03:50:16 +0000 Subject: populate pipe: directory, a directory the command makes A pipe source's command printed a file. With directory set, it gets an empty directory as its first argument, mode 0700 in populate's temporary directory, which populate removes afterwards, and fills it, and populate delivers what it made there, with the modes it has, e.g. secrets with mode 0600 under 0700, and the fixed time of pipe's output, compared by checksum. Secrets that should stay in memory can go to a target directory of their own, e.g. in /run, with a populate run of its own. The scenario pipe-directory checks the modes, and that a changed directory gets mirrored, removing what's not in it anymore. --- pkgs/populate/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkgs/populate/README.md') diff --git a/pkgs/populate/README.md b/pkgs/populate/README.md index 0bd1ac1..3a13eea 100644 --- a/pkgs/populate/README.md +++ b/pkgs/populate/README.md @@ -635,6 +635,19 @@ Supported attributes: * `command` - The (shell) command to run. +* `directory` (optional) - + boolean: whether the command makes a directory instead of printing a + file. It gets an empty directory as its first argument, mode 0700 in + populate's temporary directory, which populate removes afterwards, and + fills it, and populate delivers what it made there to the target path, + with the modes it has, e.g. secrets with mode 0600 under 0700. Defaults + to `false`. + +Like the file a command prints, what it makes gets a fixed modification +time, so only checksums tell whether it changed. A directory with +secrets that should only stay in memory can go to a target directory of +its own, e.g. in `/run`, with a populate run of its own. + ### `symlink` Symlink to create at the target, relative to the target directory. -- cgit v1.3.1 [cgit] Unable to lock slot /tmp/cgit/60200000.lock: Permission denied (13)