Commit Graph

570 Commits

Author SHA1 Message Date
Matthias Clasen
4f915388a5 Document --installations
Closes: #2122
Approved by: matthiasclasen
2019-01-08 00:26:17 +00:00
Matthias Clasen
4fad2de113 Generate a single-file api reference
Add a rule to generate a single-file html version of the
libflatpak api reference, for integration into readthedocs.

This is pretty plain, but serves the purpose.

Closes: #2526
Approved by: matthiasclasen
2019-01-07 22:56:43 +00:00
Matthias Clasen
efcf48f295 Rename library docs main xml file
We already have a flatpak-docs.xml file one level up.
This can only lead to confusion.

Closes: #2526
Approved by: matthiasclasen
2019-01-07 22:56:43 +00:00
Matthias Clasen
7c79fcc197 build-export: Document --end-of-life
This option was added without documentation.

Closes: #2524
Approved by: mwleeds
2019-01-04 19:25:32 +00:00
Matthew Leeds
5238dd4f4b doc: Update wording for verbose options
This more closely matches the recently changed --help output for these
options, and distinguishes them from the options that only print some
information and exit.

Closes: #2537
Approved by: matthiasclasen
2019-01-04 03:53:19 +00:00
Matthias Clasen
5bb7d9aec6 docs: Small improvements
Make it clear that flatpak(1) only lists global options,
and individual commands have their own.

Add a reference to flatpak-installation(5)

Closes: #2513
Approved by: mwleeds
2019-01-03 22:38:55 +00:00
Matthias Clasen
1ab6bb027a build-bundle: Document --from-commit
This option was missing from the docs.

Closes: #2528
Approved by: mwleeds
2019-01-03 22:22:48 +00:00
Matthias Clasen
f453544aaa Document the --cwd option
Closes: #2443
Approved by: alexlarsson
2018-12-20 15:35:23 +00:00
Matthias Clasen
1f64886c6e remote-ls: Update the docs
Add the new columns, and match column order
with --help output.

Closes: #2409
Approved by: alexlarsson
2018-12-19 15:45:34 +00:00
Matthias Clasen
f53ad59ccf list: Update the docs
Add new columns, and update the example.

Closes: #2409
Approved by: alexlarsson
2018-12-19 15:45:34 +00:00
Matthias Clasen
cca8355b72 search: Update the docs
Document the --columns option as we do everywhere.

Closes: #2409
Approved by: alexlarsson
2018-12-19 15:45:34 +00:00
Matthias Clasen
1bab520197 Document FLATPAK_ID
Mention this environment variable in flatpak-run(1).

Closes: #2447
Approved by: alexlarsson
2018-12-19 14:35:39 +00:00
Matthias Clasen
dc5a451389 Add docs for flatpak-spawn
Add a flatpak-spawn(1) man page. While it is not ideal
to have the docs live separately from the code, having
it here ensures that it will be available everywhere
all the other flatpak documentation is.

Closes: #2437
Approved by: alexlarsson
2018-12-17 08:29:52 +00:00
Matthias Clasen
07a0fd2811 Document the new env vars
Closes: #2440
Approved by: alexlarsson
2018-12-17 08:14:43 +00:00
Matthias Clasen
df5b705941 Merge pull request #2419 from matthiasclasen/env-docs
doc: Mention xdg vars
2018-12-12 16:15:41 -05:00
Alexander Larsson
90dad12697 build-update-repo: Add --static-delta-jobs option
We ran into some issues on flathub where a build with very large
files caused the parallel delta generation to use a lot of paging,
essentially blocking progress. This option can at least allow you
to make progress in that case, although we should ideally have
a better solution.

Closes: #2416
Approved by: alexlarsson
2018-12-12 16:15:16 +00:00
Matthew Leeds
aa19b18ee0 fixup! doc: Mention xdg vars 2018-12-11 21:32:00 -08:00
Matthias Clasen
f3748affc4 doc: Mention xdg vars
When I made the list of overridden environment variables,
I forgot the 3 most important ones, XDG_{DATA,CACHE,CONFIG}_HOME.
2018-12-11 23:36:19 -05:00
Matthias Clasen
d613bc0532 Minor revisions of flatpak(1)
Capitalize Flatpak in text, add a paragraph about building
that references flatpak-builder, and add a reference to
www.flatpak.org.

Closes: #2410
Approved by: alexlarsson
2018-12-10 07:15:12 +00:00
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