Commit Graph

7164 Commits

Author SHA1 Message Date
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
Matthew Leeds
272af0f8cc dir: Regenerate summary in child repo after pulls
After pulling multiple refs into the child repo using P2P code, the
summary file in the child repo will be the one from the last remote
used.  Since that remote might be a peer on the network or a USB drive,
it may not have the same set of refs as were pulled into the child repo.
This means that when the system helper tries to pull from the child repo
into the main repo it fails because the summary file is inaccurate.

This commit addresses the issue by regenerating the summary file in the
child repo after the pulls finish. This has to only occur on the P2P
code paths because non-P2P code uses the summary file and its signature
as the security check.

To check that this fixes the bug, I set up another computer on the local
network as an update server and made sure it had an updated
ostree-metadata ref for the remote I'm going to use. Then from this
computer with the patched flatpak I installed an app that's **not**
installed on the update server (all using collection IDs). Flatpak
fetched the app from the Internet, fetched the ostree-metadata ref from
the network peer, and then successfully pulled and deployed the app into
the system repo.

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

Closes: #1476
Approved by: pwithnall
2018-03-08 23:26:41 +00:00
Philip Withnall
ebcb5e3fbe common: Include arch in error message to clarify things
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://github.com/flatpak/flatpak/issues/1424

Closes: #1462
Approved by: mwleeds
2018-03-06 07:23:12 +00:00
Matthew Leeds
74e799f33f Merge pull request #1453 from AsciiWolf/patch-1
Update Czech translation
2018-02-28 14:21:40 -08:00
Patrick Griffis
82f993e1c7 Fix assertion when no gsettings schema installed
Fixes #1455

Closes: #1456
Approved by: mwleeds
2018-02-28 22:08:22 +00:00
Matthew Leeds
28f929f15e dir: Fix grammar in an error message 2018-02-25 16:21:57 -08:00
AsciiWolf
56e4053051 Update Czech translation
Fix small typo
2018-02-23 21:08:05 +01:00
Matthew Leeds
633a9cbfaf dir: Fix typos/grammar
I missed this comment in commit 0c3c42d8d.
2018-02-22 16:55:42 -08:00
Matthias Clasen
538a89fa59 Merge pull request #1442 from cho2/l10n
Update Indonesian translation
2018-02-22 06:46:13 -05:00
Kukuh Syafaat
92b7812295 Update Indonesian translation 2018-02-22 16:01:45 +07:00
Matthew Leeds
eaf052c7fd dir: Fix P2P build failure
Apparently when I rebased https://github.com/flatpak/flatpak/pull/1314
to master, git cleanly applied the patch in a different place than it
was originally. Commit c5ab9e22b moved the find_remotes_async() call to
find_latest_rev(), so all that needs to be done is pass along the
checksum in check_for_update(). This way when you're trying to downgrade
something the specified commit will be searched for instead of the
latest one.

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

Closes: #1435
Approved by: barthalion
2018-02-20 21:47:13 +00:00
Alexander Larsson
acc1df7acd Update pofiles 0.11.3 2018-02-19 14:29:17 +01:00
Alexander Larsson
1ff6bfdd4a Bump version to 0.11.3 2018-02-19 14:19:54 +01:00
Alexander Larsson
774c3dd047 Update NEWS 2018-02-19 14:19:46 +01:00
Alexander Larsson
b66243e26d Fix --file-forwarding
flatpak_context_append_bwrap_filesystem() didn't actually return the
exports so callers crashed dereferencing NULL.

This fixes https://github.com/flatpak/flatpak/issues/1428
2018-02-19 14:18:12 +01:00
David King
8be4b550f3 common: Include sys/mman.h for memfd_create()
Versions of glibc starting with 2.27 include support for memfd_create()
in sys/mman.h, and the included libglnx then drops its internal define.
2018-02-19 14:00:08 +01:00
Alexander Larsson
71cebc39d2 Update pofiles 0.11.2 2018-02-19 11:12:24 +01:00
Alexander Larsson
07b0c3eb72 Update to latest libglnx 2018-02-19 11:04:11 +01:00
Alexander Larsson
9c8ef4943e Bump version to 0.11.2 2018-02-19 11:03:22 +01:00
Alexander Larsson
1f9adc346c Update NEWS for release 2018-02-19 11:03:13 +01:00
Matthew Leeds
1af693d8c4 .gitignore: Ignore flatpak-document-dbus.[ch]
These targets were added in commit f2a6c1db8 and don't need to be
tracked by git.

Closes: #1429
Approved by: alexlarsson
2018-02-19 08:22:05 +00:00
Patrick Griffis
45d1caa4cd search: Don't duplicate apps with different arches
Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Patrick Griffis
80d53028ba search: Minor cleanups
We don't need to duplicate the store for each arch only each
remote.

Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Matthew Leeds
1e479095b2 dir: Quiet messages about missing appstream data
Now that the search command is attempting to update appstream data for
all supported architectures, error messages get printed when it's
missing, which is often the case for i386. This commit changes
flatpak_dir_check_for_appstream_update() to only print an error if the
the appstream data for the host architecture is missing, but not if it's
a secondary architecture.

Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Matthew Leeds
d5b4443ef3 search: Search all supported architectures
Currently the search command only searches remotes for apps and runtimes
that match the host architecture. This commit makes flatpak include all
supported architectures so for example you can see a 32-bit app on a
64-bit computer.

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

Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Matthew Leeds
8767dc93bd dir: Allow downgrading when using collection IDs
Before the 2018.2 release of libostree there was no way to specify
commit IDs when using find_remotes_async(). The latest commit is always
pulled, so flatpak apps can't be downgraded when collection IDs are in
use. Now that an option is provided by libostree this commit uses it,
and updates the minimum required version to 2018.2 when P2P support is
enabled.

The effect is that `flatpak update --commit=HASH APP` will work when APP
comes from a repository that has a collection ID configured.

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

Closes: #1314
Approved by: pwithnall
2018-02-19 04:35:51 +00:00
Matthew Leeds
2d2a459523 dir: Remove outdated comment
P2P appstream updates were fixed by commit c5ab9e22b.
2018-02-18 20:02:43 -08:00
Alexander Larsson
6a6e25623a Fix flatpak build on atomic
On atomic, /home is a symlink to /var/home, which caused
problems in flatpak build when granting access to the homedir.
Due to a previous workaround (in 1aadc3ee40) we
make /var in the flatpak build sandbox be completely overridden
with $builddir/var so that the above symlink would not cause problems
in the persisted directory.

However, when we actually *want* to give access to that symlink this
causes problem.

In general, exposing /var in the sandbox has two uses:

 * Allowing persisting tmpfiles in /var/tmp between individual
   flatpak build commands (/tmp is per-build-command).
 * Creating flatpaks from packages, such as rpms, where
   we want to keep the rpm database (/var/lib/rpm) around during
   the entire build so that dependencies can be resolved.

In order to handle these /var/home issues while still allowing
the above issues we instead persist only /var/tmp and /var/lib.

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

Closes: #1421
Approved by: alexlarsson
2018-02-16 08:07:55 +00:00
Alexander Larsson
cbeb1716a9 appdata: Remove unnecessary spew when generating appdata
The process was printing a line for every mismatching component id
in the xml for each app, which is starting to get very large log files
on flathub.

Closes: #1426
Approved by: alexlarsson
2018-02-16 08:07:20 +00:00
Alexander Larsson
195976a1b8 Fix persisted directories on atomic
On atomic /home is a symlink to /var/home, so when we bind-mount
the persistent directories we need to early-resolve the symlinks
to avoid running into issues with /newroot.

In most cases we do this already by calling flatpak_bwrap_add_bind_arg,
but the persistent dir case did not, because that function required
the target to exist, and the persistent directoried might not.
However, these days flatpak_bwrap_add_bind_arg is fine if the base
dir doesn't exists but the target does, which is the case here,
so we can use it now.

This fixes e.g. steam: https://github.com/flatpak/flatpak/issues/1278

Closes: #1422
Approved by: cgwalters
2018-02-15 13:02:02 +00:00
Simon McVittie
4b754f3851 Remove unused FUSE build-dependency
This was needed for the document portal, which has been removed.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1417
Approved by: alexlarsson
2018-02-15 08:03:36 +00:00