Commit Graph

3494 Commits

Author SHA1 Message Date
Alexander Larsson
d3dee9f052 Better build fix 2018-04-04 17:50:06 +02:00
Alexander Larsson
c0862fcbb8 Fix builddir != srcdir build 2018-04-04 17:42:24 +02:00
Alexander Larsson
2cdb099ab3 Verify that the system cache directory supports user xattrs
Installation will fail with some weird error later if this is not true.
2018-04-04 17:31:31 +02:00
Alexander Larsson
a6ec434aed run: Escape : as \: in --filesystem= paths
This way we never get confused about which part of the argument
is the permission suffix, which could be exploitable if you can
control the --filesystem calls such as with sandboxed Spawns.
2018-04-04 17:25:59 +02:00
Alexander Larsson
11ef9999b6 Add flatpak portal
This listens to org.freedesktop.portal.Flatpak and lets flatpak
sandboxes do flatpak specific things.

Initially this only allows access to "Spawn", which lets you start a
new copy of the current or latest version of the calling app,
optionally with sandboxing.

This allows the app to re-start itself with the latest version after
an update, and the sandboxing is useful for apps that want to manually
sandbox part of themselves.

You can also expose one or more subdirectories of
~/.var/app/$appid/sandbox/ to the app, read-write or read-only. This is
useful to communicate with the sandbox.
2018-04-04 17:25:59 +02:00
Alexander Larsson
e9c6f30177 run: Add instance-path to .flatpak-info
This is the instance ~/.var/app/$appid dir
2018-04-04 17:25:59 +02:00
Alexander Larsson
74c4006dbe run: Add --sandbox
This runs the app in a very tight sandbox, with no access to anything
except /app and /run and some read-only host things like fonts and icons.

You can additionally add explicit permissions on the commandline,
like --share=network to actually grant some access.

This also sets $FLATPAK_SANDBOX_DIR to ~/.var/app/$appid/sandbox in the
environment.
2018-04-04 17:25:59 +02:00
Alexander Larsson
8570dcab85 run: Allow specifying an exact commit and runtime-commit
This also looks for removed but live deploys so that an app
can be re-started as long as it is live.
2018-04-04 17:25:59 +02:00
Alexander Larsson
21b9f3151b undeploy: Use predictable names for removed directories
This means if we undeploy something, but its still in use, then
we can find it later. This is interesting because it lets
us re-find it for spawning an instance of the same version.
2018-04-04 17:25:59 +02:00
Alexander Larsson
819a134506 flatpak-info: Add arch info 2018-04-04 17:25:59 +02:00
Alexander Larsson
43bcf38105 flatpak-info: Add instance-specific extra args
So, if you run your instance with e.g. flatpak run --filesystem=/some/dir
you can now see this. This will be useful in the restart yourself
portal as we can then inherit such permissions.
2018-04-04 17:25:59 +02:00
Alexander Larsson
513c0c36f5 update: Don't print appstream errors when quiet 2018-04-04 17:25:37 +02:00
Alexander Larsson
20c8420128 update: Fix updates of non-primary arches
When updating with no arch is specified we now update
appdata for all supported arches, and we don't look for
updates only of the primary arch.
2018-04-04 17:25:37 +02:00
Alexander Larsson
394130793c uninstall: Pick installation automatically
When uninstalling, if no specific installation was specified with e.g.
--user or --system, automatically chose any unique match, or error
out if there are multiple alternatives.

Fixes #1321
2018-04-04 17:25:20 +02:00
Alexander Larsson
3184a011c3 build-commit-from: Add --timestamp
This lets you override the timestamp from the source commits

Closes: #1538
Approved by: alexlarsson
2018-04-04 15:08:49 +00:00
Alexander Larsson
b9d8aeb175 build-export: Use parse_datetime() for --timestamp
This allows you more flexibility for defining the timestamp and
makes it compatilb with ostree commit.

Closes: #1538
Approved by: alexlarsson
2018-04-04 15:08:49 +00:00
Alexander Larsson
222d7e2382 Import parse_timestamp() from ostree
Closes: #1538
Approved by: alexlarsson
2018-04-04 15:08:49 +00:00
Matthew Leeds
4b002ebacd doc: Document --reinstall option
Closes: #1550
Approved by: alexlarsson
2018-04-04 14:55:14 +00:00
Matthew Leeds
aec0635869 Add a GitHub issue template 2018-04-03 10:08:35 +02:00
Rafael Fontenelle
53fd16da37 Update Brazilian Portuguese translation
Closes: #1534
Approved by: mwleeds
2018-04-02 22:54:49 +00:00
Alexander Larsson
bad8cc27f1 update: Complete from all installations
We currently auto-pick installation for update when you didn't pick
any specific one, so we should complete from all of them too.

Closes: #1537
Approved by: mwleeds
2018-04-02 20:33:09 +00:00
Alexander Larsson
b223590b6e Make flatpak remove an alias to flatpak uninstall
Yum, dnf and apt all use "remove" as the opposite of install, so
to make it easier for people coming from these.

Closes: #1536
Approved by: mwleeds
2018-03-30 07:06:00 +00:00
Alexander Larsson
2bf1bb3472 Add flatpak version to user agent
This uses the new ostree feature at:
  https://github.com/ostreedev/ostree/pull/1496

Note, this will only work with the current ostree master,
and does nothing on older versions.

Closes: #1533
Approved by: mwleeds
2018-03-28 20:19:10 +00:00
Matthew Leeds
3273e9923c dir: Improve "Can't find ref" error message
This commit adds the collection ID (if any) to the "Can't find ref"
error message produced by flatpak_dir_pull_untrusted_local(). This makes
the message more helpful if for example you run `flatpak update` when
some of the remotes are configured with the wrong collection IDs. It
also changes the wording to be consistent with other similar errors.

Closes: #1521
Approved by: mwleeds
2018-03-27 17:53:29 +00:00
Alexander Larsson
1840a7189c build-commit-from: Don't critical if commit has no commitmeta
Closes: #1524
Approved by: alexlarsson
2018-03-27 10:48:49 +00:00
Matthew Leeds
148b0ca245 doc: Update old command names
The add-repo command was renamed to remote-add, and repo-update was
renamed to build-update-repo, so update the man pages.
2018-03-26 21:54:25 -07:00
Nicholas Bishop
ab117ee250 Add all missing declarations to flatpak-sections.txt
Closes: #1505
Approved by: mwleeds
2018-03-23 22:55:11 +00:00
Matthew Leeds
8103a95a7f doc: Update name of repo-contents command
The repo-contents command was renamed to remote-ls in flatpak 0.4.0, so
rename it in the man pages.

Closes: #1516
Approved by: mwleeds
2018-03-23 22:42:26 +00:00
Matthew Leeds
f4acf169f2 doc: Fix typo in command name
Closes: #1515
Approved by: mwleeds
2018-03-23 22:25:47 +00:00
Matthew Leeds
e2c3157ea8 tests: Minor change to assertion ordering
Philip pointed out it's better to g_assert_no_error before g_assert_true
so the output shows the error message.

Closes: #1501
Approved by: pwithnall
2018-03-23 10:34:52 +00:00
Matthew Leeds
34c97c3d10 lib/remote: Make gpg-verify-summary dependent on collection-id
When a collection ID is set on a remote configuration,
gpg-verify-summary should be set to FALSE because flatpak uses signed
per-repo and per-commit metadata instead. The flatpak command line
already does this (use flatpak remote-modify --collection-id=... and
notice that gpg-verify-summary is then set to false). This commit
changes libflatpak to have the same behavior. Specifically, with a
collection ID set gpg-verify-summary is set to false and otherwise its
value matches that of gpg-verify. This commit also adds a test for this
in testlibrary.c.

Fixes https://github.com/flatpak/flatpak/issues/1479

Closes: #1501
Approved by: pwithnall
2018-03-23 10:34:52 +00:00
Matthew Leeds
751d5da702 README: Fix broken docs link 2018-03-22 21:45:45 -07:00
Matthew Leeds
869a6640c4 Merge pull request #1506 from nicholasbishop/typo-fox
Fix a documentation comment typo
2018-03-22 13:38:02 -07:00
Nicholas Bishop
8e73047464 Fix a documentation comment typo 2018-03-20 19:19:06 -04:00
Matthias Clasen
3f11e65e5e Merge pull request #1502 from cho2/l10n
Update Indonesian translation
2018-03-20 06:39:15 -04:00
Kukuh Syafaat
4d35ac1327 Update Indonesian translation 2018-03-20 14:18:18 +07:00
Nicholas Bishop
69fa452bed Add FlatpakRelatedRef to API documentation
Closes: #1497
Approved by: alexlarsson
2018-03-19 09:41:09 +00:00
Alexander Larsson
ffa73cbd83 flatpak-utils.c: Remove various unused functions
Most of these were used by flatpak-builder and should have been
dropped when it was split out.

Closes: #1492
Approved by: alexlarsson
2018-03-19 09:33:53 +00:00
Matthias Clasen
3294e51926 Merge pull request #1495 from yurchor/master
Update Ukrainian translation
2018-03-18 09:21:36 -04:00
Yuri Chornoivan
bd8a35bd8f Update Ukrainian translation 2018-03-18 11:17:50 +02:00
Corentin Noël
9bc5b72457 app: Do not share the Error object in all completion tasks
Completion on my system was triggering an assertion error:
`ostree_repo_open: assertion 'error == NULL || *error == NULL' failed`

command:
`flatpak build-init build-dir bar.foo.Baz org.freedesktop.Sdk//1.6 org.freedesktop.Platform//1.6

Closes: #1491
Approved by: alexlarsson
2018-03-16 16:08:08 +00:00
Alexander Larsson
f7ad95e772 info --file-access: Handle case where the last element does not exist
As per https://github.com/flatpak/xdg-desktop-portal/pull/166, an access
check to a non-existant file should succeed if the parent directory
exists, and we have write access to it, because we can then just create the
file. This is needed for the "save" file chooser portal.

Closes: #1488
Approved by: alexlarsson
2018-03-16 07:42:44 +00:00
Alexander Larsson
07668fcd08 Pull: Set Flatpak-Ref http header
We set the Flatpak-Ref http header to the ref we're pulling, thus
allowing the server to log this for per-ref download statistics, as
otherwise the ref being downloaded is not visible in the log (only
the commit id).

Closes: #1487
Approved by: alexlarsson
2018-03-15 10:49:12 +00:00
Matthew Leeds
2051c77d27 remote-ls: Skip disabled remotes
The remote-ls command should skip remotes that have "xa.disable" set to
true or have no URL set, which can happen for remotes added for flatpak
bundle files.

Fixes https://github.com/flatpak/flatpak/issues/1427

Closes: #1457
Approved by: alexlarsson
2018-03-15 10:20:11 +00:00
Matthew Leeds
03387a7b58 remotes: Show the collection ID for each remote
If the --show-details option is passed to the remotes command, show the
collection ID for each remote, which the user might need to know if
they're using flatpak's P2P support.

Closes: #1458
Approved by: alexlarsson
2018-03-15 10:12:50 +00:00
Corentin Noël
1ea7cdf148 common: Check for NULL summary sig
Closes: #1472
Approved by: alexlarsson
2018-03-15 09:59:12 +00:00
Matthew Leeds
cd4aeab261 dir: Rename repo_pull functions for clarity
repo_pull_one_dir() and repo_pull_one_local_untrusted() used to only
support pulling one directory at a time, but now support more than one,
so rename them so the names are less misleading.

Closes: #1475
Approved by: alexlarsson
2018-03-15 09:50:39 +00:00
Sam Spilsbury
817f020db3 run: Add option to disallow a11y bus proxying
This isn't needed for servers and starting the a11y bus on a
fresh session bus takes upwards of 15 seconds.

Fixes #1471

Closes: #1486
Approved by: alexlarsson
2018-03-15 09:43:00 +00:00
Balázs Úr
2f4e7f6421 Updated Hungarian translation
Closes: #1481
Approved by: mwleeds
2018-03-15 02:44:44 +00:00
Matthew Leeds
bcd850ca8b dir: Regenerate summary in child repo in more cases
Similarly to commit 272af0f8c, this commit makes sure the child repo
used by the system helper has an accurate summary file so it can be
pulled from. This time it's for the fetches of the ostree-metadata ref
and the appstream data.

This fixes a bug that occurs if a remote has a collection ID set and
uses the "branches" key as well. Under those conditions, `flatpak
remote-ls -d REMOTE` and `flatpak update --appstream REMOTE` can fail
with "Error pulling from repo: No summary found".

Until recently, the /ostree/repo/config in Endless contained a remote
that was shared between flatpak and ostree, which had "branches" set. So
that's a use case where this helps.

Fixes https://github.com/flatpak/flatpak/issues/1440

Closes: #1478
Approved by: pwithnall
2018-03-13 10:40:14 +00:00