Commit Graph

7164 Commits

Author SHA1 Message Date
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
Matthew Leeds
61d1c69836 docs: Fix broken references
These commands were renamed a while back.

Closes: #1167
Approved by: alexlarsson
2017-11-14 12:04:59 +00:00
Alexander Larsson
a6f65d3b7c Add --log-*-bus to flatpak build
Closes: #1160
Approved by: alexlarsson
2017-11-14 11:57:30 +00:00
AsciiWolf
b2548f34d2 Update Czech translation
Closes: #1162
Approved by: alexlarsson
2017-11-13 14:17:58 +00:00
AsciiWolf
b0cf7baefd Add colon to the Uninstalling string
Closes: #1163
Approved by: alexlarsson
2017-11-13 14:17:30 +00:00
AsciiWolf
6f186e5987 Make the Uninstalling string translatable
Closes: #1163
Approved by: alexlarsson
2017-11-13 14:17:30 +00:00
Matthew Leeds
686d7cfccc search: Check substrings of app IDs, not just prefixes
Due to the way as_app_search_matches() works, "flatpak search" only
checks if the search text is a prefix of an element of the app ID, not
if it's any substring. Add a substring check, so for example you can
find SuperTuxKart using "flatpak search tuxkart".

Closes: #1161
Approved by: TingPing
2017-11-11 02:23:56 +00:00
AsciiWolf
ac04e5fca7 Update Czech translation
Closes: #1158
Approved by: mwleeds
2017-11-09 23:55:28 +00:00
Alexander Larsson
ec40383e5f Better phrasing for remote add prompt
As proposed in https://github.com/flatpak/flatpak/issues/1141

Closes: #1157
Approved by: mwleeds
2017-11-09 23:49:36 +00:00
AsciiWolf
8d2326fd77 Update Czech translation
Closes: #1148
Approved by: mwleeds
2017-11-08 22:55:24 +00:00
Philip Withnall
58157e7ec7 ls-remote: Fix crash when ostree-metadata ref exists in remote
The code assumes that *all* refs in a remote contain a slash, which
technically is not the case, and pragmatically is definitely not the
case once the remote has an ostree-metadata ref.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1153
Approved by: mwleeds
2017-11-08 22:48:12 +00:00
Philip Withnall
321b931bb2 repo: Improve error messages if no repository metadata is available
If `flatpak repo --info` is run on a repository which doesn’t have a
summary file, or an ostree-metadata branch, it previously printed a very
unhelpful, unadorned, ‘No such file or directory’. Add a bit more
context to that error message.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1155
Approved by: cgwalters
2017-11-08 19:55:08 +00:00
Alexander Larsson
28229056d2 Remove C99 loop initialization
On RHEL7 compiler I got things like:

app/flatpak-builtins-search.c:196:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (guint j = 0; j < remote_stores->len; ++j)

Maybe we should allow this and tweak the warnings, but for now, just make it build.

Closes: #1151
Approved by: alexlarsson
2017-11-06 09:03:50 +00:00
Piotr Drąg
c59bacd054 Update Polish translation
Closes: #1145
Approved by: mwleeds
2017-11-03 19:02:00 +00:00