Commit Graph

551 Commits

Author SHA1 Message Date
Matthew Leeds
0cac27fd87 doc/flatpak-uninstall: Fix leftover xdg-app typo 2018-12-04 23:26:34 -08:00
Matthias Clasen
754d68c74a Rename list commands
Rename permission-list and document-list to
permissions and documents, for consistency with
how we handle remotes. The old command names
are kept as hidden aliases.

Closes: #2131

Closes: #2366
Approved by: mwleeds
2018-12-03 19:46:09 +00:00
Matthias Clasen
676b2943cf Improve flatpak-config docs
Include a list of keys.

Closes: #2360

Closes: #2364
Approved by: mwleeds
2018-12-01 01:53:53 +00:00
Matthew Leeds
5266600b5f doc/flatpak-config: Improve synopsis
Make it clear that the command can be used a few different ways, and the
option used determines the needed positional arguments.

Closes: #2361
Approved by: matthiasclasen
2018-12-01 00:04:38 +00:00
Matthew Leeds
6111b81bb6 doc/flatpak-config: Fix example command
The key is "languages" not "language", and the value needs to be quoted.

Closes: #2361
Approved by: matthiasclasen
2018-12-01 00:04:38 +00:00
Patrick Griffis
5bbdb0628e doc: Update download-if/enable-if docs
Closes: #1436
Approved by: matthiasclasen
2018-11-17 23:42:49 +00:00
Matthew Leeds
5fe2a0aabe uninstall: Add support for fuzzy matching
This adds support for fuzzy matching ref names (AKA "typo helper") to
the uninstall command to mirror what the install command has. In short,
this means you can do "flatpak uninstall gedit" instead of "flatpak
uninstall org.gnome.gedit". Flatpak will prompt you to choose between
similarly named installed refs, and will only make the choice for you if
--assumeyes was used and there's only one match.

Note that this commit does have the side effect that if there are
multiple matching refs with the same ID (e.g. with different branches or
in different installations) you are prompted to choose between them.
Previously you were shown an error message.

Closes: #2330
Approved by: matthiasclasen
2018-11-17 13:00:33 +00:00
Matthew Leeds
348fcc3f97 Add a DeployCollectionID key to replace CollectionID
This commit adds a key called DeployCollectionID to the flatpakref and
flatpakrepo file formats, which is intended to replace the CollectionID
key (which is still supported but deprecated). The reason for the change
is the same as for the metadata key change from xa.collection-id to
ostree.deploy-collection-id, which is that old versions of Flatpak
(roughly 0.9.8 through 1.0.1 depending on compile time options) hit
various bugs when collection IDs are in use. Flathub will soon enable
the metadata key to deploy collection IDs, and this change means Flathub
can also deploy the collection ID in flatpakref and flatpakrepo files
without affecting old clients.

Adding DeployCollectionID to the flatpakref and flatpakrepo files will
mean the flathub remote can be automatically configured with a
collection ID without depending on the metadata key to do that.

Closes: #2329
Approved by: alexlarsson
2018-11-16 09:17:07 +00:00
Matthew Leeds
eda5dee589 doc/flatpakref: Fix a typo 2018-11-15 15:35:47 -08:00
Matthew Leeds
af8da20426 doc: Fix a mistake in the RuntimeRepo docs 2018-11-15 14:07:24 -08:00
Matthias Clasen
9e6287aa0e Document the --delete-data option
Useful functionality should be documented.

Closes: #2314
Approved by: matthiasclasen
2018-11-14 17:15:42 +00:00
Matthias Clasen
fc77535212 Remove a wrong statement from uninstall docs
We do not have code to remove the apps data directory.

Closes: #2309

Closes: #2312
Approved by: matthiasclasen
2018-11-13 14:12:28 +00:00
Matthias Clasen
bf7af547aa Small fixes to many man pages
Make synopses more concise in various place, improve
consistency of formatting, and fix some small mistakes
and oversights.

Closes: #2307
Approved by: matthiasclasen
2018-11-12 14:28:41 +00:00
Umang Jain
94969d5057 Installation: Add flatpak_installation_get_min_free_space_bytes
A convenience wrapper around ostree_repo_get_min_free_space_bytes().
Clients programs like gnome-software can get the value of minimum free
space as defined in the OSTree repo. This can be useful in various
disk-space checks these client program can implement.

At Endless, we have downstream heuristics in gnome-software which
determine the success/failure likelihood of an install/update
operation to some extend. Depending upon the likelihood of the
success/failure we dispatch install/update/auto-update operations.

With client programs gaining features such as auto-updates, it makes
sense to have a min-free-space API so that these programs can check
free-space availablity vs minimum free space defined by user inside
OSTree's repo before auto-updating. Although, OSTree will certainly
fail operations over-stepping min-free-space's value; It's just a
matter of convenience to provide a way to query the value to client
programs as well.

Closes: #2274
Approved by: matthiasclasen
2018-11-07 12:02:14 +00:00
Matthew Leeds
27a611d4eb doc/flatpak-install: Make arg name consistent throughout
Closes: #2113
Approved by: matthiasclasen
2018-10-31 22:48:56 +00:00
Matthew Leeds
02d1a4ed30 install: Make the REMOTE arg optional
Currently the install command requires the user to specify the remote
name in addition to each ref that is to be installed. This commit
implements an auto-detection feature so that the user can specify only
refs (or partial refs) and Flatpak will try to determine the remote to
use.

The Flatpak security model does not consider all remotes equally
trustworthy, but that's okay because the user is asked to confirm the
remote choice before it's used.

The way it's implemented is that we look at only the first ref (even if
there are several) and iterate through each remote in each installation
trying to find it, stopping at the first one where it's found and asking
for confirmation of it. There's a trade-off here between efficiency and
accuracy, since it could be pretty costly to search every remote in
every installation. I think this should be good enough for most use
cases, and the user is still free to specify a remote and avoid that
code path.

This should hopefully save people a bit of typing and make the Flatpak
CLI a bit friendlier.

Closes: #2113
Approved by: matthiasclasen
2018-10-31 22:48:56 +00:00
Matthew Leeds
7fb57f7221 install: Implement a typo helper
This commit implements a "typo helper" for the install command, so that
if you don't get the app ID exactly correct you're prompted with
similarly named apps available in the remote that you can choose from.
Essentially this allows you to do "flatpak install flathub devhelp"
instead of "flatpak install flathub org.gnome.Devhelp".

The choice is only made for you in two cases: 1. If it's an exact match
and there's only one match, it is used as before this commit.  2. If the
-y/--assume-yes option was used and there's only one match, it is used.
Presumably scripts would always specify the full app ID, so this should
only affect users on the command line who choose to use that option.

In the future we may want to use the groundwork laid in this commit to
add similar functionality to other commands, like perhaps remote-info
and run.

This is a partial fix for https://github.com/flatpak/flatpak/issues/1258

Closes: #2113
Approved by: matthiasclasen
2018-10-31 22:48:56 +00:00
Matthias Clasen
6daf195e42 Instance: mitigate races, add new launch api
Avoid the 3-second 'afterlife' of instances by using
kill (pid, 0) instead of checking the file lock. We
trade pid for lock races, but this seems more reliable.

Also add flatpak_installation_launch_full that returns
a FlatpakInstance for the launched app, and lets us
avoid races around killing the app, by using a child
watch.

Closes: #2221
Approved by: matthiasclasen
2018-10-23 07:15:39 +00:00
Matthias Clasen
afc87ad1e5 Add a history command
The history command pulls the transaction log entries
out of the journal, and presents them nicely.

We use the sd-journal api for this, so we need to
link against libsystemd now, but we make the dependency
optional. If libsystemd is not available, the history
command will simply print an error.
2018-10-11 14:51:51 +02:00
Alexander Larsson
99fbbc25c6 build-finish: Inherit permissions from runtime by default
In version 0.99.1 (065053775b) flatpak
stopped inheriting permissions from the runtime, because that made
the story about application permissions way to complicated. What
we want is to have a static set of permissions for the app that
is frozen at install time.

However, inheriting permissions from the runtime makes a lot of sense
as certain permissions are required from the runtime, in particular this
is used by the kde runtime to read the kdeglobals file, etc.

So, to combine the best of the two worlds, we now do inherit permissions,
but at build-time (and you can disable it if you want). This way
kde apps don't have to repeat themselves, but we still get static
application permissions.

Closes: #2230
Approved by: alexlarsson
2018-10-10 15:40:58 +00:00
Matthias Clasen
e5d74a7d74 docs: Fix alphabetic ordering of commands
The permissions were misplaced.

Closes: #2218
Approved by: alexlarsson
2018-10-10 15:26:23 +00:00
Matthias Clasen
24141bd093 Remove --show-columns leftovers
When I decided to add --columns without --show-columns,
I remove the option everywhere. Almost. These are the
leftovers I forgot.

Closes: #2227
Approved by: alexlarsson
2018-10-10 14:56:57 +00:00
Matthias Clasen
e9ffa9dda6 remote-ls: Show runtimes
Add a runtime column that shows the runtime an application
is using, and add an --app-runtime option to allow filtering
by the used runtime.

Closes: #2224
Approved by: alexlarsson
2018-10-10 10:29:08 +00:00
Matthias Clasen
f79c9c7539 Document the SuggestRemoteName key
Found it missing from the docs while writing tests.

Closes: #2199
Approved by: alexlarsson
2018-10-10 08:03:35 +00:00
Matthias Clasen
36d5134e97 enter: Allow giving application ID
With the instance infrastructure, we can go from
the ID of a running application to its monitor PID,
so we can accept the application ID here. Whats more,
we can offer completion for it.

Note that completion only works if you use sudo -E,
since the flatpak used for complcations needs to see
the session environment to find running instances.

Closes: #2181
Approved by: alexlarsson
2018-10-10 06:28:28 +00:00
Matthias Clasen
9c84b88e46 Add a kill command
This sends SIGKILL to a running sandbox process.
The command has completion for running applications,
for both application IDs and instance IDs.

Closes: #2180

Closes: #2181
Approved by: alexlarsson
2018-10-10 06:28:28 +00:00
Matthew Leeds
36bce67618 Merge pull request #2204 from matthiasclasen/repair-docs
repair: Refer to ostree fsck
2018-10-09 17:13:18 -07:00
Matthew Leeds
df19efe1b2 doc/build-update-repo: Fix a typo 2018-10-09 14:17:31 -07:00
Matthias Clasen
dd546ad365 Make FlatpakInstance api public
This can be of use in frontends like GNOME Software.

Closes: #2201
Approved by: alexlarsson
2018-10-08 08:36:23 +00:00
Matthias Clasen
ec49776416 repair: Refer to ostree fsck
Add a mention of ostree fsck to the flatpak repair man page,
so people know there are more alternatives.
2018-10-06 16:53:52 -04:00
Matthias Clasen
170a8774bc remote-ls: Add --columns option
This is more flexible than --show-details.

Closes: #2090
Approved by: alexlarsson
2018-10-05 15:19:43 +00:00
Matthias Clasen
f8c69e5b01 remotes: Add a --columns option
This is more flexible than --show-details.

Closes: #2090
Approved by: alexlarsson
2018-10-05 15:19:43 +00:00
Matthias Clasen
c0d858748b list: Add a --columns option
This is more flexible than --show-details.

Closes: #2090
Approved by: alexlarsson
2018-10-05 15:19:43 +00:00
Matthias Clasen
6a199ddeb4 ps: Port to column helpers
Closes: #2090
Approved by: alexlarsson
2018-10-05 15:19:43 +00:00
Matthias Clasen
789cc1ea60 repo: Update the docs
Mention --commits, and refer to build-update-repo
and ostree as alternative commands for repo management.

Closes: #2156
Approved by: alexlarsson
2018-10-05 13:49:52 +00:00
Matthias Clasen
f3a3ea9c67 list: Add an option to filter by runtime
This lets you use list --app --app-runtime=org.gnome.Platform//3.24
to see which apps on your system still depend on this old runtime.

Closes: #2175
Approved by: alexlarsson
2018-10-05 13:36:33 +00:00
Alexander Larsson
35b92d7237 Support --allow=canbus for AF_CAN access
This fixes https://github.com/flatpak/flatpak/issues/2176

Closes: #2179
Approved by: alexlarsson
2018-10-03 14:31:30 +00:00
Robert McQueen
8bd22682f7 installation: nitpicks
Make the new _run_triggers function appear correctly in GtkDoc and cross-link.

Closes: #2164
Approved by: alexlarsson
2018-10-02 06:22:27 +00:00
Matthias Clasen
dd7a163a28 run: Document new options
Document --user, --system nd --installation.

Closes: #2158
Approved by: alexlarsson
2018-10-01 13:05:12 +00:00
Matthias Clasen
d83adbc71a docs: Document environment variable handling
Mention how flatpak run handles environment variables,
and include the blacklist of variables we always override.

Closes: #2141
Approved by: alexlarsson
2018-09-27 07:29:18 +00:00
Matthias Clasen
ff55756478 Explain fallback-x11
This socket option was not explained anywere. Add
a sentence to flatpak-build-finish.1 to explain it.

Closes: #2063
Approved by: alexlarsson
2018-09-04 10:10:51 +00:00
Matthias Clasen
c284777d61 Add more api docs for libflatpak
Bring the library docs much closer to completion.

Closes: #2053
Approved by: alexlarsson
2018-09-03 10:31:51 +00:00
Matthias Clasen
be36b88def Document all known .flatpak-info keys
Some of the keys in the Instance group were missing.
Add them to the man page.

Closes: #2051
Approved by: alexlarsson
2018-08-31 06:58:32 +00:00
Matthias Clasen
e832e7d5c2 override: Add a --show option
This option shows the contents of an override file. If an appid
is given, it shows overrides for that app, otherwise
the global overrides.

Closes: #2041
Approved by: alexlarsson
2018-08-29 14:58:15 +00:00
Matthias Clasen
b8daf08ea8 override: Add a --reset option
This option removes an override file. If an appid
is given, it removes overrides for that app, otherwise
the global overrides.

Closes: #2041
Approved by: alexlarsson
2018-08-29 14:58:15 +00:00
Matthias Clasen
a2e57cb6aa Document the child-pid column
Make the world a better place, with docs.

Closes: #2039
Approved by: alexlarsson
2018-08-29 14:46:47 +00:00
Matthias Clasen
03bb003f0f flatpak ps: Match uniqe prefixes of column names
So much more convenient to say 'app' than 'application'.

Closes: #2027
Approved by: alexlarsson
2018-08-28 07:51:12 +00:00
Matthias Clasen
ad49ca758c flatpak ps: Support commit as field
Add support for commit and runtime-commit.
We shorten these to 12 characters, as we do
elsewhere.

Closes: #2027
Approved by: alexlarsson
2018-08-28 07:51:12 +00:00
Matthias Clasen
3f5ce0e945 Document flatpak ps
Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Matthias Clasen
a2069e75df Fix up the flatpak-create-usb man page
There were some copy-paste leftovers here.

Closes: #2018
Approved by: alexlarsson
2018-08-27 11:36:56 +00:00