This means flatpak can bootstrap itself from an empty /var on stateless
systems, which fixes https://github.com/flatpak/flatpak/issues/113, at
least for the CLI case.
Closes: #1195
Approved by: alexlarsson
This replaces the old unused FLATPAK_BUILTIN_FLAG_NO_REPO with a
version that tries to init the repo, but doesn't fail otherwise.
Also, we drop the explicit flatpak_dir_ensure_path() call, because
flatpak_dir_ensure_repo() calls that anyway.
Closes: #1195
Approved by: alexlarsson
This tries to ensure that FlatpakDir->repo is set, but if the
repo doesn't exists and we're unable to create it that is fine
and we continue running with repo == NULL.
This is useful because there are only a few operations that really
are useful/make sense with no repo set up, and we can ensure these
handle this well.
In particular, we want to allow flatpak remote-add using the
system-helper to work even if /var/lib/flatpak doesn't exist, so that
we can bootstrap a working flathub from a fresh /var.
Closes: #1195
Approved by: alexlarsson
Some apps, such as gnome-builder wants to access data from the
host, for instance in builders case the system includes. If you
have full filesystem access it is not really a loss of security
to also have /ect and /usr access, but for technical reasons
we can't expose them in the normal locations. However, we
can expose them in /run/host, so do that.
Closes: #1193
Approved by: alexlarsson
This adds the Date, Subject and Parent fields that are shown
by remote-info so these match for the fields where it makes sense.
Closes: #1192
Approved by: alexlarsson
I think this enhances readability significantly, reduces code duplication
and allows you to follow the rationale behind why monitors are being
added/removed a lot more clearly than the previous nested/ad-hoc logic in
file_changed. Also adds debug printouts in the case that file monitors
are not created successfully.
Closes: #1194
Approved by: pwithnall
The monitor data structures are never replaced in the hash table, so
it's not necessary. Keep MonitorData pointers in scope in main() and
set up g_autoptr instead.
Closes: #1194
Approved by: pwithnall
This changes the search command to print debug output when accessing a
flatpak directory, to match the behavior of other commands.
Closes: #1186
Approved by: TingPing
The other commands that support --user and --system allow you to specify
an installation using --installation, so this makes search consistent
with that.
Closes: #1185
Approved by: TingPing
This shows information about a ref in a remote. Of particular interest
is the --log option which gives you a history which can be used
with update --commit=XXX to roll back an update.
Closes: #1174
Approved by: alexlarsson
Since we don't have GPG signatures for the OCI images we verify
the data sent by the client by doing a query to the index from
the helper to ensure that the ref/digest tuple is correct.
Closes: #1171
Approved by: alexlarsson
This means the url of the remote is a service supporting:
https://github.com/owtaylor/metastore/blob/master/docs/protocol.md
And we use that to find all flatpak images and the repository url
itself.
This also add support for docker-v2 registries that support OCI
images.
Closes: #1171
Approved by: alexlarsson
This makes /app (or other destinations) read-only, which will be
later used by flatpak-builder when running tests, that should not
affect the build.
Closes: #1172
Approved by: alexlarsson
Some of these are grammatical errors, and some are mistakes caused by
copying phrases from the flatpak-install manpage.
Closes: #1177
Approved by: alexlarsson
The manpage description for flatpak-update's --appstream option says it
updates appstream data for the remote, but it's unclear that the remote
should be passed on the command line instead of a ref. This commit
updates the manpage to document that form of the command.
Closes: #1177
Approved by: alexlarsson
This variable is never actually read, as it is protected by
the ostree_metadata_checksum check, but some compilers warn about it.
Closes: #1178
Approved by: mwleeds
* Update appstream data on "flatpak update"
This is especially useful since we now have flatpak search which uses
this data.
* fixup! Update appstream data on "flatpak update"
If a remote has an empty url (which can happen for automatically created
remotes from some bundle files) we can't fetch from it. So for example
if you use "flatpak remote-ls --updates" it gives you a cryptic error
message from OSTree ("Failed to parse uri: "). This commit changes
flatpak to instead print an error message that mentions the remote name.
For backwards compatibility reasons, a remote with an empty url is
considered disabled, so say so.
Closes: #1165
Approved by: alexlarsson
Sometimes fetching a remote repository's summary file fails and it can
be hard to tell what went wrong because even with --verbose flatpak
doesn't tell you which remote it's fetching from. Add a debug statement
to fix that.
Closes: #1165
Approved by: alexlarsson