4117 Commits

Author SHA1 Message Date
Alexander Larsson
2ec63469ec Update po/* 1.0.2 2018-09-13 14:00:56 +02:00
Alexander Larsson
d16b393a34 bundles: Fix leak
The collection id check that was added leaks if we were able
to read the collection-id, but then it was ignored.

Closes: #2093
Approved by: alexlarsson
2018-09-13 09:53:25 +00:00
Alexander Larsson
10fb620031 Update dbus-proxy version to get .gitignore 2018-09-13 11:00:31 +02:00
Alexander Larsson
c53b127048 Bump version to 1.0.2 2018-09-13 10:53:55 +02:00
Alexander Larsson
a3030845de Update NEWS 2018-09-13 10:51:47 +02:00
Alexander Larsson
a0a85d6aa8 Import dbus-proxy as a submodule instead
Since we now broke out dbus-proxy to a separate module, build
the in-tree copy as a submodule.

Closes: #2092
Approved by: alexlarsson
2018-09-13 07:58:36 +00:00
Alexander Larsson
1959f6bf75 Allow building with system version of xdg-dbus-proxy
Closes: #2092
Approved by: alexlarsson
2018-09-13 07:58:36 +00:00
Matthew Leeds
7b0e84f527 main: Don't spuriously print usage info
Currently if any command errors out with G_IO_ERROR_NOT_SUPPORTED,
flatpak prints the usage information (the output of --help), but this is
not correct. For example if the create-usb command hits that error when
trying to use extended attributes on a filesystem that doesn't support
them, the help output is printed as we saw here:
https://github.com/flatpak/flatpak/issues/2019#issuecomment-416798304

So this commit removes the check for G_IO_ERROR_NOT_SUPPORTED in
flatpak-main.c and the helper function it uses. The flatpak_run()
function handles printing usage info for the overall flatpak command,
and subcommands use the usage_error() function to print usage
information, so there's no need for it.

Closes: #2082
Approved by: alexlarsson
2018-09-12 07:17:29 +00:00
Matthew Leeds
e4befb12ac common: Better handle NULL collection IDs
Currently if you install from a flatpak bundle that doesn't have a
collection ID set or from a flatpakref file that has the CollectionID
key set to the empty sting, you end up with an invalid configuration on
the origin remote created. This is because the collection_id parameter
of flatpak_dir_create_origin_remote() is set to the empty string, not
NULL, and create_origin_remote_config() then only checks for NULL when
deciding whether to set gpg-verify-summary to true or false. Then
because there's no collection ID configured but gpg-verify-summary is
set to false, you get the error "Can't pull from untrusted non-gpg
verified remote" when trying to pull related refs or update the app.

This commit fixes the bug by checking for the empty string when the
collection ID is read from a bundle or ref file, and collapsing that
into NULL.

Closes: #2081
Approved by: alexlarsson
2018-09-12 07:07:13 +00:00
Matthew Leeds
dcbec03906 create-usb: Fix handling of appstream error messages
Remotes can provide appstream in both compressed form under the ref
appstream/<arch> and uncompressed form under the ref appstream2/<arch>.
Flatpak only pulls the legacy appstream ref for a remote if appstream2
is not available. But then the create-usb command prints a warning if
appstream is not available locally, even if appstream2 is available,
which is a bit misleading. So this commit changes create-usb so that it
only prints an error if both refs are missing.

Closes: #2084
Approved by: alexlarsson
2018-09-12 06:52:57 +00:00
Piotr Drąg
f54078ecd4 Update Polish translation
Closes: #2086
Approved by: alexlarsson
2018-09-12 06:41:58 +00:00
Matthias Clasen
dc7394dbd1 Merge pull request #2060 from matthiasclasen/instance-api
Add an instance api
2018-09-07 16:51:36 -06:00
Charlie Turner
15c8e26a91 flatpak-coredumpctl: -b option ignored the argument.
Due to a typo, the -b option was not placing the passed build directory
into the CoreDumper class.

Closes: #2076
Approved by: alexlarsson
2018-09-07 15:17:39 +00:00
Matthias Clasen
9edd0d9e66 Reinstate the --no-related option
The uninstall command was not looking at the opt_no_related
boolean at all. Pass it to the transaction.

Closes: #2077
Approved by: alexlarsson
2018-09-07 15:16:07 +00:00
Matthias Clasen
331a883b7b Clarify object paths and bus names for portals
These portals are under their own bus name and
object path, clarify this in the docs. For the
document portal, this is just a sync-up with
the master copy in the xdg-desktop-portal repo.

Closes: #2074
Approved by: alexlarsson
2018-09-05 06:58:34 +00:00
Alexander Larsson
a33efa69c5 install: Auto-pick installation based on remote
This changes install to use FLATPAK_BUILTIN_FLAG_STANDARD_DIRS, which
returns the default dirs. This is tweaked such that it returns the
system installaton first if no options were set, which is the default
in the old ONE_DIR case.

In the bundle and flatpakref install case we use the first element
of the dirs[], which now is the same as the old default, and
otherwise is the one the options picked.

However, if a remote is specified, we use
flatpak_resolve_duplicate_remotes() to pick the actual installation.

Closes: #2073
Approved by: mwleeds
2018-09-04 21:24:19 +00:00
Robert McQueen
060322b50b system-helper: set IO class to idle
Our benchmarks show this significantly reduces the interactivity impact of
ongoing Flatpak operations while the user is continuing other tasks on the
system. The effect is very pronounced with the default CFQ scheduler, and in
combination with BFQ, using the idle class improves the worst case to nearly
the same as an unloaded system.

Closes: #2071
Approved by: alexlarsson
2018-09-04 10:56:35 +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
129031a2e2 Stop exporting flatpak_run_gc_ids()
No longer used outside flatpak-run.c
2018-09-03 11:54:19 -04:00
Matthias Clasen
ef30ef4e88 flatpak ps: port to FlatpakInstance
FlatpakInstance is a new api for representing running instances,
its made just for cases like flatpak ps, so lets use it.
2018-09-03 11:54:19 -04:00
Matthias Clasen
336f887289 Add an instance api
This is made to let gnome-software enumerate all
running instances and get the same information
about them that flatpak ps provides.

For now, we keep it private. It will become library
api once we open new development
2018-09-03 11:54:19 -04:00
Alexander Larsson
bdec0f97ac lib: Strip gdbus error info from all passed on errors
Whenever we forward some error from a lower level dbus call to the
caller of the library we strip the extra gdbus error info via a call
to g_dbus_error_strip_remote_error(). We do this, because callers of
libflatpak has no idea that there were remote calls involved, so they
will not do this themselves.

Closes: #2070
Approved by: alexlarsson
2018-09-03 10:51:59 +00:00
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