Commit Graph

3276 Commits

Author SHA1 Message Date
Matthew Leeds
f651d40b06 remotes: Delete rogue comment 2017-11-24 18:20:25 -08:00
Patrick Griffis
50fbafa202 search: Try to support appstream-glib as old as 0.5.10 (Ubuntu LTS)
This disables some less than essential features and re-implements
the rest.

Closes: #1199
Approved by: alexlarsson
2017-11-24 15:44:11 +00:00
Alexander Larsson
8fbd442c9d Update pofiles 0.10.1 2017-11-24 14:44:46 +01:00
Alexander Larsson
b6a7655ea8 Update version to 0.10.1 2017-11-24 14:19:40 +01:00
Alexander Larsson
87b14c302c Update NEWS for release 2017-11-24 14:19:02 +01:00
Patrick Griffis
3b78dc66c3 Add "have-intel-gpu" check, useful for VAAPI extension
Closes: #1198
Approved by: alexlarsson
2017-11-24 11:17:47 +00:00
Alexander Larsson
6bb0196ffd Make flatpak remote-add --system work with an empty /var/lib/flatpak
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
2017-11-24 10:54:25 +00:00
Alexander Larsson
55bc8c904f main: Add new flag FLATPAK_BUILTIN_FLAG_OPTIONAL_REPO
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
2017-11-24 10:54:25 +00:00
Alexander Larsson
742913856e common: Add flatpak_dir_maybe_ensure_repo
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
2017-11-24 10:54:25 +00:00
Alexander Larsson
2c41aa5203 Use systemwide config also when running as root
We want to look for remotes in /etc/flatpak also when not
using the system helper

Closes: #1195
Approved by: alexlarsson
2017-11-24 10:54:25 +00:00
Alexander Larsson
9eedc60cd2 run: Expose /usr and /etc if --filesystem=host
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
2017-11-24 10:47:36 +00:00
Alexander Larsson
7493b9f6de document-portal: Fix exports of files in runtime
The check for /usr prefixed checked against the wrong variable.

Closes: #1193
Approved by: alexlarsson
2017-11-24 10:47:36 +00:00
Alexander Larsson
87b6aeec16 info: Add fields to match remote-info
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
2017-11-24 07:54:26 +00:00
Robert McQueen
6475f7663c session-helper: refactor creation and updating of real path monitors
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
2017-11-23 14:47:12 +00:00
Robert McQueen
46fa8492ac session-helper: avoid theoretical GFile leaks with g_autoptr
Closes: #1194
Approved by: pwithnall
2017-11-23 14:47:12 +00:00
Robert McQueen
bdf0f8c554 session-helper: add comment documenting rationale for two monitors
Closes: #1194
Approved by: pwithnall
2017-11-23 14:47:12 +00:00
Robert McQueen
2b516e5df1 session-helper: remove unused file_monitor_hash
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
2017-11-23 14:47:12 +00:00
Robert McQueen
dc6a880238 session-helper: monitor canonical files for changes
Closes: #1190
Approved by: alexlarsson
2017-11-23 10:39:44 +00:00
Robert McQueen
c59f41a5f4 session-helper: store file monitor & source in a hash table
Closes: #1190
Approved by: alexlarsson
2017-11-23 10:39:44 +00:00
Robert McQueen
b31773b097 session-helper: remove un-needed file monitor actions on CREATED
CHANGES_DONE always fires after CREATED.

Closes: #1190
Approved by: alexlarsson
2017-11-23 10:39:44 +00:00
Matthew Leeds
cb57c599dd .gitignore: Ignore unit test artifacts
Running "make check" creates all these artifacts that we want git to
ignore.

Closes: #1191
Approved by: alexlarsson
2017-11-23 10:30:12 +00:00
Matthew Leeds
3b434a9673 search: Log access of flatpak directory
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
2017-11-22 06:44:56 +00:00
Matthew Leeds
d9061fa276 search: Support --installation=NAME option
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
2017-11-22 06:36:37 +00:00
Piotr Drąg
a9e2387a95 Update POTFILES.in
Closes: #1183
Approved by: mwleeds
2017-11-22 05:01:28 +00:00
Matthew Leeds
b3cb71222b remote-info: Fix help string
flatpak remote-info works for available apps and runtimes. They don't
have to be installed.

Closes: #1184
Approved by: mwleeds
2017-11-21 17:34:34 +00:00
Matthew Leeds
817da55d38 docs: Fix grammar in remote-info man page
Closes: #1184
Approved by: mwleeds
2017-11-21 17:34:34 +00:00
Alexander Larsson
0a9ae464f6 Add remote-info command
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
2017-11-21 11:16:06 +00:00
Alexander Larsson
a026da8027 Add flatpak_dir_fetch_remote_commit
Closes: #1174
Approved by: alexlarsson
2017-11-21 11:16:06 +00:00
Patrick Griffis
bc3e464051 Automatically install active Gtk theme if found
Closes: #1181
Approved by: alexlarsson
2017-11-21 09:56:05 +00:00
Alexander Larsson
3660292c45 Remove unused variables
Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
f7c55b0887 OCI: Drop the last references to org.opencontainers.ref.name
We now only use org.flatpak.ref, except in the index.

Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
f61febd785 Drop OCI install tests
Its hard to test these since they rely on a registry to work.

Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
bd118ff528 OCI: Add support for system-helper with new OCI approach
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
2017-11-16 20:50:34 +00:00
Alexander Larsson
c6c3775bbe Default to no gpg for --oci remotes
OCI doesn't really support this atm anyway, instead it relies on TLS.

Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
d6ea398dd5 Remove GPG signatures handling for OCI images
This is not really standardized for now, and most registries
depend on TLS security instead.

Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
c3b155b09a Use the new metastore index API for OCI remotes
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
2017-11-16 20:50:34 +00:00
Alexander Larsson
ec08f26e17 Optionally return summary from flatpak_dir_lookup_ref_from_summary
Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
549250a5f9 Add FlatpakJson subclass for oci indexes
Closes: #1171
Approved by: alexlarsson
2017-11-16 20:50:34 +00:00
Alexander Larsson
914084d9da Handle runtimes without ldconfig
We fall back to LD_LIBRARY_PATH in this case, as we can't
regenerate ld.so.cache.

Closes: #1180
Approved by: alexlarsson
2017-11-16 16:31:19 +00:00
Alexander Larsson
12e68e7cec Add --readonly switch to flatpak build
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
2017-11-16 16:13:48 +00:00
Matthew Leeds
d725d83585 docs: Fix ref in remote-ls manpage
The remote-list command was renamed to remotes, so change it in the
manpage and make it a link.

Closes: #1179
Approved by: alexlarsson
2017-11-16 12:53:10 +00:00
Alexander Larsson
4c91eeeada Change debug prefix from XA to F
We're not xdg-app anymore

Closes: #1173
Approved by: mwleeds
2017-11-16 08:15:15 +00:00
Matthew Leeds
b73e8476a7 docs: Fix a few mistakes
Some of these are grammatical errors, and some are mistakes caused by
copying phrases from the flatpak-install manpage.

Closes: #1177
Approved by: alexlarsson
2017-11-16 08:00:05 +00:00
Matthew Leeds
a218bdb282 docs: Document "flatpak update --appstream" better
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
2017-11-16 08:00:05 +00:00
Alexander Larsson
763c27b008 Initialize variable for the !FLATPAK_ENABLE_P2P case
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
2017-11-16 07:58:46 +00:00
Patrick Griffis
61daf53674 docs: Add flatpak-search man page
Closes: #1176
Approved by: mwleeds
2017-11-16 07:26:28 +00:00
Matthew Leeds
c15d29f9d0 docs: Fix typo 2017-11-15 21:28:54 -08:00
Alexander Larsson
105f00b918 Update appstream data on "flatpak update" (#1169)
* 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"
2017-11-15 21:23:55 -08:00
Matthew Leeds
c429951755 common: Improve output for empty remote URLs
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
2017-11-15 09:05:37 +00:00
Matthew Leeds
737b1b0950 common: Print debug info when fetching summaries
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
2017-11-15 09:05:37 +00:00