diff options
author | Matthew Leeds <matthew.leeds@endlessm.com> | 2018-10-17 12:55:38 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-10-21 19:11:43 +0000 |
commit | 3956fc885b39e0a0755547f07067b206606142eb (patch) | |
tree | d4c650ff9e08d9887ea8428ed516455fa020d309 /man/ostree.repo-config.xml | |
parent | a4a49724d6f898fd5e76bd6de49d36f7ed8d237e (diff) | |
download | ostree-3956fc885b39e0a0755547f07067b206606142eb.tar.gz |
Allow disabling pulling from LAN/USB/Internet
Currently libostree essentially has two modes when it's pulling refs:
the "legacy" code paths pull only from the Internet, and the code paths
that are aware of collection IDs try to pull from the Internet, the
local network, and mounted filesystems (such as USB drives). The problem
is that while we eventually want to migrate everyone to using collection
IDs, we don't want to force checking LAN and USB sources if the user
just wants to pull from the Internet, since the LAN/USB code paths can
have privacy[1], security[2], and performance[3] implications.
So this commit implements a new repo config option called "repo-finders"
which can be configured to, for example, "config;lan;mount;" to check
all three sources or "config;mount;" to disable searching the LAN. The
set of values mirror those used for the --finders option of the
find-remotes command. This configuration affects pulls in three places:
1. the ostree_repo_find_remotes_async() API, regardless of whether or
not the user of the API provided a list of OstreeRepoFinders
2. the ostree_repo_finder_resolve_async() /
ostree_repo_finder_resolve_all_async() API
3. the find-remotes command
This feature is especially important right now since we soon want to
have Flathub publish a metadata key which will have Flatpak clients
update the remote config to add a collection ID.[4]
This effectively fixes https://github.com/flatpak/flatpak/issues/1863
but I'll patch Flatpak too, so it doesn't pass finders to libostree only
to then have them be removed.
[1] https://github.com/flatpak/flatpak/issues/1863#issuecomment-404128824
[2] https://github.com/ostreedev/ostree/issues/1527
[3] Based on how long the "ostree find-remotes" command takes to
complete, having the LAN finder enabled slows down that step of the
pull process by about 40%. See also
https://github.com/flatpak/flatpak/issues/1862
[4] https://github.com/flathub/flathub/issues/676
Closes: #1758
Approved by: cgwalters
Diffstat (limited to 'man/ostree.repo-config.xml')
-rw-r--r-- | man/ostree.repo-config.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/man/ostree.repo-config.xml b/man/ostree.repo-config.xml index 8942a00b..49044b46 100644 --- a/man/ostree.repo-config.xml +++ b/man/ostree.repo-config.xml @@ -215,6 +215,20 @@ Boston, MA 02111-1307, USA. of -1 means block indefinitely. The default value is 30. </para></listitem> </varlistentry> + + <varlistentry> + <term><varname>repo-finders</varname></term> + <listitem><para>Semicolon separated default list of finders (sources + for refs) to use when pulling. This can be used to disable + pulling from mounted filesystems, peers on the local network, + or the Internet. However note that it only applies when a set + of finders isn't explicitly specified, either by a consumer of + libostree API or on the command line. Possible values: + <literal>config</literal>, <literal>lan</literal>, and + <literal>mount</literal> (or any combination thereof). If + unset, this defaults to <literal>config;lan;mount;</literal>. + </para></listitem> + </varlistentry> </variablelist> </refsect1> |