aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-12 19:59:04 +0000
committertv <tv@krebsco.de>2026-11-13 03:24:19 +0100
commit1ab4473cddcf8c95956b22c3e6d5c9720a62925e (patch)
tree43e040632b33420222e5089e38d9a12c7427b12d /README.md
parent9f824e06ee72fcb2cdacf9b90885f5cd0606a180 (diff)
populate file: check the .rsync-filter files that really apply
rsync reads .rsync-filter files in the directories above a source as well, and their rules apply to the transfer. The check for files that rsync 3.5.0 and later can't read only starts if the source itself contains one, so a subdirectory of a repository with a filter file at its top gets synced without it, silently. The check also starts for filter files above the source. The check's dry run is the transfer it stands for, as far as filtering goes: - It gets the source's exclude and filters, so it doesn't enter directories the transfer skips. - It doesn't run for transfers that apply no .rsync-filter files, i.e. uploads of flakes and patches. - A filter file the user may not read anyway doesn't count: rsync fails on its own when it gets to transfer that file, and --insecure-links changes nothing about it. - rsync prints bytes it takes for unprintable as \#ooo, which depends on the locale. File names get decoded before checking that they exist, so files below, e.g., directories with umlauts in their names don't pass for missing in the C locale. - If rsync doesn't tell which filter files it reads at all, populate warns that it can't tell either. The README mentions that --insecure-links also affects the way to the target path on local targets, and that only rsync 3.5.0 ignores filter files below directories that may be entered but not read. Phases of scenarios can set environment variables for populate. New file scenarios sync a subdirectory whose filter file is above it, and a source with a filter file below a directory with an umlaut in its name, in the C locale.
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 10 insertions, 8 deletions
diff --git a/README.md b/README.md
index 9f1b760..7fdd8eb 100644
--- a/README.md
+++ b/README.md
@@ -356,15 +356,17 @@ Supported attributes:
of rsync. Defaults to `true`.
* `insecureLinks` (optional) -
- what to do if rsync can't read `.rsync-filter` files in `path`. rsync 3.5.0
+ what to do if rsync can't read `.rsync-filter` files that apply to `path`:
+ the ones therein, and the ones in the directories above it. rsync 3.5.0
and later open them more strictly than the files they transfer, and ignore
- the ones they can't open, e.g. because a directory on the way may be
- entered but not read, like a home directory with mode 711, or because a
- symlink on the way belongs to neither root nor the user deploying. By
- default, with `null`, populating fails with an error naming the file. With
- `true`, rsync reads such files anyway (`--insecure-links`); with `false`,
- rsync syncs without them. Both print a warning. Older versions of rsync
- aren't affected.
+ the ones they can't open, e.g. because a symlink on the way belongs to
+ neither root nor the user deploying, or, with rsync 3.5.0, because a
+ directory on the way may be entered but not read, like a home directory
+ with mode 711. By default, with `null`, populating fails with an error
+ naming the file. With `true`, rsync reads such files anyway
+ (`--insecure-links`), which also lets it pass such symlinks on the way to
+ the target path of a local target; with `false`, rsync syncs without them.
+ Both print a warning. Older versions of rsync aren't affected.
* `inputs` (optional) -
inputs of the flake in this source to draw from other sources, see