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 /apidoc | |
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 'apidoc')
-rw-r--r-- | apidoc/ostree-sections.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index 440fe0c3..a91663ed 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -298,6 +298,7 @@ ostree_repo_get_mode ostree_repo_get_min_free_space_bytes ostree_repo_get_config ostree_repo_get_dfd +ostree_repo_get_repo_finders ostree_repo_hash ostree_repo_equal ostree_repo_copy_config |