Commit Graph

4095 Commits

Author SHA1 Message Date
Matthias Clasen
47cc37f174 Sync the document store interface description
There have been some minor edits in the official version
of this in xdg-desktop-portal. Sync up the version here.

Closes: #2064
Approved by: alexlarsson
2018-09-03 10:41:44 +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
8cfd175bb4 Print nicer errors
Without this call, we show monsters like:

error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code1: No such file or directory

With this call, it will be just:

error: No such file or directory

Closes: #2066
Approved by: alexlarsson
2018-09-03 10:19:28 +00:00
Rafael Fontenelle
d69893ea1f Update Brazilian Portuguese translation
Closes: #2069
Approved by: alexlarsson
2018-09-03 09:46:56 +00:00
Alexander Larsson
9cfef87e1b uninstall --unused: Don't ask for ok twice
When the uninstall operation was moved to FlatpakCliTransaction the
prompting moved there. Unfortunately some prompting was left over
in the main code, this just deletes that.

This fixes #1928

Closes: #2056
Approved by: alexlarsson
2018-09-03 09:36:52 +00:00
Alexander Larsson
5051f51da6 uninstall --unused: Consider SDKs used
If some app uses a particular runtime as an sdk, consider it used.
This means if you once downloaded the sdk for some app you're debugging
it will not be removed until that app is uninstalled.

Its unclear exactly whether this is "used", but lets error on
the side of not deleting stuff.

Closes: #2057
Approved by: alexlarsson
2018-09-03 09:25:14 +00:00
Matthias Clasen
e7f478c601 Merge pull request #2061 from mwleeds/fix-installation-docs-mistake
installation: Fix a mistake in the docs
2018-08-31 16:05:24 -04:00
Matthew Leeds
8ba74182bc installation: Fix a mistake in the docs 2018-08-31 10:34:54 -07: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
Kukuh Syafaat
537cab4927 Update Indonesian translation
Closes: #2054
Approved by: alexlarsson
2018-08-31 06:48:56 +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
b3c07c5397 Add private api to remove an override file
This uses the same logic as the other override
functions to determine where the file is.

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
07deb95c6a flatpak ps: Support child pid
The current pid column reports the pid of the bwrap
wrapper process running outside the sandbox. Add a
child-pid column that reports the pid of the main
sandbox process ("PID 1" on the inside).

Closes: #2039
Approved by: alexlarsson
2018-08-29 14:46:47 +00:00
Matthias Clasen
c3e0471133 Tell bubblewrap to write info
Create a bwrapinfo.json file and tell bubblewrap
to write its 'info' there. For now, this just contains
the child-pid. More may appear over time.

Closes: #2039
Approved by: alexlarsson
2018-08-29 14:46:47 +00:00
Alexander Larsson
e2a79a275d Fix build with glib < 2.50
G_PID_FORMAT was added in glib 2.50, but pids are always %d on linux,
so we can avoid using it.

Closes: #2042
Approved by: alexlarsson
2018-08-29 07:21:26 +00:00
AsciiWolf
29f7393e43 flatpak ps: Fix typo in error message
Closes: #2034
Approved by: alexlarsson
2018-08-28 12:53:06 +00:00
Alexander Larsson
e8d62a3aba Update pofiles 1.0.1 2018-08-28 11:40:13 +02:00
Alexander Larsson
8d5df23e85 Update version to 1.0.1 2018-08-28 11:32:00 +02:00
Alexander Larsson
476f167bc3 Update NEWS for 1.0.1 2018-08-28 11:31:30 +02:00
Alexander Larsson
fbdc42ff9d ps: Add pid file also for flatpak build
Otherwise these will not show up in flatpak ps

Closes: #2033
Approved by: alexlarsson
2018-08-28 09:19:34 +00:00
Matthew Leeds
e9d9f54ab8 common/installation: Search dynamic remotes for appstream2 also
Flatpak has API called flatpak_installation_list_remotes_by_type() which
can list dynamic (LAN/USB) remotes that mirror configured remotes in an
installation. It does this by searching them for the appstream/<arch>
ref, such as appstream/x86_64. But Flatpak now supports
appstream2/<arch> as a way to provide the appstream data as uncompressed
XML, and it's possible that a USB created with `flatpak create-usb` (or
a LAN peer) only has the appstream2 ref available for a certain
collection ID. So this commit changes
list_remotes_for_configured_remote() so that it looks for both
appstream/<arch> and appstream2/<arch>, which makes
flatpak_installation_list_remotes_by_type() robust to that scenario.
2018-08-28 10:05:18 +02:00
Matthias Clasen
3548932c92 Cosmetic formatting fixes
Closes: #2027
Approved by: alexlarsson
2018-08-28 07:51:12 +00:00
Matthias Clasen
9e0f5dd79e Don't throw an error if there's nothing to show
When the .flatpak directory doesn't exist,
there are no running instances.

Closes: #2027
Approved by: alexlarsson
2018-08-28 07:51:12 +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
1831ac1974 Flatpak portal: Documentation improvement
Explain what exposes are allowed.

Closes: https://github.com/flatpak/flatpak/issues/1955

Closes: #2029
Approved by: alexlarsson
2018-08-28 07:50:13 +00:00
Matthias Clasen
a1f82fd256 spawn: More precise error messages
Explain why exposes are invalid.

Closes: #2029
Approved by: alexlarsson
2018-08-28 07:50:13 +00:00
Piotr Drąg
30f7ac9218 Update POTFILES.in
Closes: #2028
Approved by: mwleeds
2018-08-27 20:38:27 +00:00
Matthias Clasen
3f5ce0e945 Document flatpak ps
Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Matthias Clasen
e6f8b564cb Add a --column option
Allow the user to specify what fields to show.
This is ps, after all :)

Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Matthias Clasen
a9d4cc5838 Add a flatpak ps command
This enumerates running Flatpak instances.
For now, we just print the app ID and the PID.
More details can be added in the future.

Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Matthias Clasen
2d26cc07c2 Export flatpak_run_gc_ids()
Currently, we only remove stale instance directories
when a new instance ID is allocated. A future 'flatpak ps'
command will want to remove stale instances before
enumerating them, so make this function available.

Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Matthias Clasen
95e5b394c2 Save a pid for running sandboxes
Store the pid of the bwrap process which gets spawned or exec'ed
by flatpak inside the instance directory. This can be useful
for others, such as gnome-software, or a future 'flatpak ps'
command.

We write the pid to a file named 'pid'. It will get cleaned
up together with the instance directory.

Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Matthias Clasen
06e8830377 Keep the .flatpak-info file accessible
The information in this file is of interest to other
users outside the sandbox, like gnome-software, or
a possible future 'flatpak ps' command.

We use the already existing instance directory, and
put the file at /run/user/$UID/.flatpak/$INSTANCE/info

The existing logic for cleaning up instance directories
will clean up the file.

Closes: #2023
Approved by: alexlarsson
2018-08-27 14:25:15 +00:00
Alexander Larsson
b8d594e390 OCI summary generation: Fix generation of summary on 32bit
The "t" variant type is guint64, so we must cast "0" to it when using
it in a varargs.

Closes: #2024
Approved by: alexlarsson
2018-08-27 14:07:55 +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
Kukuh Syafaat
c4a5a7a634 Update Indonesian translation
Closes: #2017
Approved by: alexlarsson
2018-08-27 11:27:07 +00:00
AsciiWolf
3506002e92 Update Czech translation
Closes: #2016
Approved by: alexlarsson
2018-08-27 11:17:27 +00:00
Patrick Griffis
738c11324a Add /proc to blacklist
This doesn't make sense to ever be in the sandbox

Closes: #2008
Approved by: alexlarsson
2018-08-27 11:06:56 +00:00
Will Thompson
9e02d51737 docs: fix title of FlatpakBundleRef section
Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:16 +00:00
Will Thompson
b0f8736467 installation: document nullability of some arch/branch params
I've inferred this by walking through the code, which ultimately calls
one of flatpak_build_[app|runtime]_ref() which both implement these
defaults.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:16 +00:00
Will Thompson
9cc72ed08f transaction: improve cross-refs for signal parameter docs
Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:16 +00:00
Will Thompson
98ee688b84 docs: make FlatpakTransactionOperation appear
There were two reasons why no docs for this class appeared in the HTML
documentation:

* flatpak-transaction-operation.xml was not included by
  flatpak-docs.xml.
* all its symbols were listed in <SUBSECTION Standard>, which is hidden
  from the HTML output. It appears that if a section has no visible
  symbols, it's omitted.

Many symbols which belong to FlatpakTransaction were erroneously grouped
with FlatpakTransactionOperation and so also hidden; fix this too.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00
Will Thompson
04846e24b2 transaction: fix signal parameter documentation
I guess these predate the creation of FlatpakTransactionOperation.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00
Will Thompson
a710f36e31 transaction: validate refs
Without this, it's not safe to use 'pref': if there are no slashes in
'ref', 'pref == 0x1', and any attempt to dereference it later in the
function will crash.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00
Will Thompson
6e270190c8 transaction: add docs & introspection annotations
Without explicit annotation, all optional parameters are assumed to be
mandatory, and 'const gchar **locales' is assumed to be a scalar string
input parameter (rather than an array or an in/out) for some reason.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00
Will Thompson
ae269ba390 transaction: add NULL guards in API entry points
Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00
Will Thompson
61107c56ce transaction: don't critical in finalize if initable_init() failed
If no installation path is specified at construct time, or if it doesn't
exist, priv->dir will be NULL even after initable_init() has been
called.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00