If the mode is 'strict', download rsync URI if it hasn't been explicitly visited before.
],
"<a href="#rsyncarguments-flat">arguments-flat</a>": [
"--times",
+ "--dirs",
"$REMOTE",
"$LOCAL"
]
- **Type:** String array
- **Availability:** JSON only
-- **Default:** `[ "--times", "--contimeout=20", "$REMOTE", "$LOCAL" ]`
+- **Default:** `[ "--times", "--contimeout=20", "--dirs", "$REMOTE", "$LOCAL" ]`
Arguments needed by [`rsync.program`](#rsyncprogram) to perform a single-file rsync.
.B rsync.program
to perform a single-file rsync. The arguments are specified as a JSON string
array; its default value is:
-[ "--times", "--contimeout=20", "$REMOTE", "$LOCAL" ]
+[ "--times", "--contimeout=20", "--dirs", "$REMOTE", "$LOCAL" ]
.P
FORT will replace "$REMOTE" with the remote URL it needs to download, and
"$LOCAL" with the target local directory where the file is supposed to be
"arguments-flat": [
"--times",
"--contimeout=20",
+ "--dirs",
"$REMOTE",
"$LOCAL"
]
.RS 4
.IR getaddrinfo(3) ", " services(5) ", " listen(2) ", " rsync(1)
.RE
+.P
+
.B FORTs official documentation
.RS 4
More documentation about FORT validator can be consulted at github repository
static int
set_default_values(void)
{
- static char const *default_rsync_args[] = {
+ static char const *recursive_rsync_args[] = {
"--recursive",
"--delete",
"--times",
"$LOCAL",
};
+ static char const *flat_rsync_args[] = {
+ "--times",
+ "--contimeout=20",
+ "--dirs",
+ "$REMOTE",
+ "$LOCAL",
+ };
+
int error;
/*
}
error = string_array_init(&rpki_config.rsync.args.recursive,
- default_rsync_args, ARRAY_LEN(default_rsync_args));
+ recursive_rsync_args, ARRAY_LEN(recursive_rsync_args));
if (error)
goto revert_rsync_program;
/* Simply remove --recursive and --delete. */
error = string_array_init(&rpki_config.rsync.args.flat,
- default_rsync_args + 2, ARRAY_LEN(default_rsync_args) - 2);
+ flat_rsync_args, ARRAY_LEN(flat_rsync_args));
if (error)
goto revert_recursive_array;
string_tokenizer_init(&descendant_tokenizer, uri_get_global(descendant),
uri_get_global_len(descendant), '/');
+ if (config_get_sync_strategy() == SYNC_STRICT)
+ return strcmp(uri_get_global(ancestor),
+ uri_get_global(descendant)) == 0;
+
do {
if (!string_tokenizer_next(&ancestor_tokenizer))
return true;