lib/pull: Default checksum for archive mirror, add TRUSTED_HTTP flag
authorColin Walters <walters@verbum.org>
Sat, 23 Sep 2017 14:23:47 +0000 (10:23 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 26 Sep 2017 18:07:43 +0000 (18:07 +0000)
commit25a7c4bd4e8aeaf68689fcd2ddc2f907f2f76f1f
treee56ab005f95f454507919c7dfbd3ef93ad7b6a0d
parentb6507a930e2604602f9911794c54dc7ba48832a3
lib/pull: Default checksum for archive mirror, add TRUSTED_HTTP flag

I now think commit fab1e113db558cb7d6754e243919558df92d4864 was a mistake;
because it breaks the mental model that at least I'd built up that "local repos
don't have checksums verified, HTTP does".

For example, a problem with this is (with that mental model in place) it's easy
for people who set up mirrors like this to then do local pulls, and at that
point we've done a deployment with no checksum verification.

Further, since then we did PR #671 AKA commit 3d38f03 which is really most of
the speed hit.

So let's switch the default even for this case to doing checksum verification,
and add `ostree pull --http-trusted`. People who are in situations where they
know they want this can find it and turn it on.

Closes: https://github.com/ostreedev/ostree/issues/1211
Closes: #1212
Approved by: jlebon
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo.h
src/ostree/ot-builtin-pull.c
tests/pull-test.sh