3105 Commits

Author SHA1 Message Date
Alexander Larsson
35744c3c27 Update pofiles 0.9.98 2017-09-25 17:27:51 +02:00
Alexander Larsson
d1b6d9b4b7 Update NEWS for release 2017-09-25 16:52:08 +02:00
Alexander Larsson
b873e9ed13 Update version to 0.9.98 2017-09-25 16:51:57 +02:00
Alexander Larsson
557803309b Disable min-free-space-percent by default
To many people are running into issues with this in the wild. We now
set this to zero by default. You can still manually override this.
2017-09-25 16:25:20 +02:00
Alexander Larsson
0b34a4ef6f OCI: Set arch when exporting oci bundle 2017-09-25 15:47:51 +02:00
Alexander Larsson
08aef072c9 Change how exposing symlinks are handled, allowing $HOME to be a symlink
We used to only expose symlinks if the path to one was explicitly exposed,
like --filesystem=/symlink, but if you did say --filesystem=/symlink/dir, then
we would make /symlink be a regular directory in the sandbox tmpfs.

This means all exports are fully resolved, which allows use to remove the
workaround for symlinks that we had with sorting by "level".

We also add a FAKE_MODE_DIR, which is used to ensure the homedir is there,
created on tmpfs if needed only, while handling symlinks correctly.

This means that flatpak works well even if $HOME is on a symlink.
2017-09-25 14:30:03 +02:00
Alexander Larsson
f1df5cb1d9 run: Fix some symlink handling issues
If the target of a direct bind, such as $home/.var/app/$appid/ is
a symlink, and the symlink contains absolute pathnames, then they
will not resolve correctly in the bwrap setup code due to the
fact that the final root is on /newroot, not /, so we resolve
the target paths before we call bwrap.
2017-09-25 14:08:19 +02:00
Alexander Larsson
5ca82643d2 flatpak-run: Correctly handle symlinks in flatpak_exports_path_is_visible
When we're resolving a symlink to see if the destination is visible, then
we have to actually append the rest of the path to look at the final
target, not just the intermediate symlinked directory.
2017-09-25 14:05:52 +02:00
Alexander Larsson
6d5beff5d3 Don't allow manual exports of /dev. These are handled by --dev= 2017-09-25 14:03:56 +02:00
Alexander Larsson
ac5f17203f Handle ~/.local/share/flatpak being a symlink
When we hide a directory like that and it is a symlink we need
to hide the symlink target. Additionally, when we're checking
whether we need to mount the tmpfs we need to check that the
target is an actual dir, rather than a symlink to a dir.

Fixes https://github.com/flatpak/flatpak/issues/1032
2017-09-25 11:05:32 +02:00
Alexander Larsson
c48d8f427f Add a repo-lock that protects against object removal
This is taken in exclusive mode whenever we prune the repo. Anything
that is not protected against object disappearing from the repo can
take the lock in a shared mode to avoid running at the same
time as a prune operation.

The two operations the are problematic in this respect is
Pull:
 * During the pull we see that some object we require is already available
   and doesn't need downloading. We can't have it be removed before we
   commit the transaction.
 * During the transaction commit we're moving the object to the
   repo, and they risk being pruned as unreachable until we have updated
   the ref.
Deploy:
 * Once we start checking out a particular ref we assume all the object
   from it is reachable. If the ref is updated in parallel some object
   can become unreachable and removed.

So, we take shared locks in these operations.

In the prune operation we take the block non-blocking, and skip
the prune entirely if some other operation is outstanding, because
we don't want to block a long time, and its likely that due to the other
operation we will run prune shortly anyway.

Note: Nothing protects the system-helper case when we download to a separate
repo. However, if there is a race we will get an error when importing this
to the system repo, so we'll never end up in an inconsistent state.
2017-09-22 16:35:18 +02:00
Alexander Larsson
98d3a58129 Update to latest libglnx and update tmpfile use for api change 2017-09-22 12:38:10 +02:00
Alexander Larsson
5158a622f6 Fix OCI tests by exporting FLATPAK_ENABLE_EXPERIMENTAL_OCI=1 2017-09-22 11:48:06 +02:00
Alexander Larsson
20fd641983 Disable flatpak remote-add --oci by default
There are some changes needed to who automatic installation from OCI
repositories work that need to happen in the future. In order to not
"break" this support in a future stable release, we disable the adding
of oci repos unless the FLATPAK_ENABLE_EXPERIMENTAL_OCI environment
variable is set.
2017-09-22 10:15:58 +02:00
Alexander Larsson
f31050e5cd Bump ostree requirement to 2017.11
There is an important rofiles-fuse fix in this that
really mainly affects flatpak-builder, but we might as well
require it for flatpak too, so that we're sync:ed on the dependencies.
2017-09-22 10:10:52 +02:00
Alexander Larsson
440389bc8e Add locale-subset property of extensions to match *.Locale behaviour
This way other types of extensions can also be subset by locale.
For instance, documentation.
2017-09-21 16:39:53 +02:00
handsome-feng
622a8d7cf6 add missing '[]' around AC_MSG_ERROR 2017-09-21 11:41:55 +02:00
Alexander Larsson
3e86ee750b run: Ensure the font cache dirs are never writable
Otherwise, if the host dirs don't exist we could end
up with a writable non-persistent directory where fontconfig
writes its caches.
2017-09-20 17:36:03 +02:00
Simon McVittie
2496dbb336 flatpak-metadata(5): Document when each field was introduced
This is useful for Flatpak runtime and app authors who want to know
which features they can use when targeting a particular branch,
or if they do not have a particular branch in mind, what value they
should put in the required-flatpak field.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-20 09:11:07 +02:00
Alexander Larsson
8677420e07 Fix since 0.9.12.12 (to be 0.9.13) 2017-09-20 09:07:51 +02:00
Sam Spilsbury
e72d4b8172 dir: Factor out find_ref_for_refs_set 2017-09-20 09:07:18 +02:00
Sam Spilsbury
5ecfd0ca66 lib: Add support for FLATPAK_INSTALL_FLAGS_NO_DEPLOY / NO_PULL
We have the same flags for flatpak_installation_update and we use
flatpak_dir_install from within FlatpakInstallation but always set
the no_pull/no_deploy flags to FALSE. Previously, passing
FLATPAK_INSTALL_FLAGS_NO_PULL and FLATPAK_INSTALL_FLAGS_NO_DEPLOY
wouldn't do anything because of that.

This has the unfortunate side effect of always returning an error
when FLATPAK_INSTALL_FLAGS_NO_DEPLOY is passed, because
flatpak_installation_install_full tries to get a FlatpakInstalledRef
for the flatpak when it is installed, but obviously it can't do that
since installing an app in an undeployed state doesn't "install" it
so much as just cloning it to the local repository.

As a result, when FLATPAK_INSTALL_FLAGS_NO_PULL is passed, the
FLATPAK_ERROR_ONLY_PULLED Will be set and the caller must respond
accordingly.
2017-09-20 09:07:18 +02:00
Sam Spilsbury
7be94770e3 builtins: Correctly support --no-pull option in install command
Previously we would still try to look up the remote information
to get the correct ref, this might not be supported in a case where
the user does not have an internet connection at the time that
applications are to be installed from the local repository.
2017-09-20 09:07:18 +02:00
Sam Spilsbury
0802d169bd dir: Add flatpak_dir_find_local_ref
Same thing as flatpak_dir_find_remote_ref except that it operates
on the local repo instead of the remote one.
2017-09-20 09:07:18 +02:00
Alexander Larsson
07d62fb86e generate_appstream: Add debug output when skipping commit
This might help us debug a weird behaviour on flathub where
it was never updating the appstream.
2017-09-19 16:34:26 +02:00
Alexander Larsson
66df733814 Expose fontconfig caches as well as fonts
This is the first step in increasing the startup performance for
font use in flatpak. Right now every app has its own cache
for the system font dirs, which means they must be fully regenerated
the first time the app starts.

With this we now expose the host system and per-use fontconfig caches
in the sandbox (read-only). This allows the sandbox to re-use caches
from the host, if the runtime fontconfig configuration is correct.

Unfortunately, this doesn't currently work, because the font caches
are looked up based on absolute paths to the font directories and they
are different in the host and the sandbox. There is some work in
progress to fix this in fontconfig here:
 https://bugs.freedesktop.org/show_bug.cgi?id=101889
2017-09-19 12:39:35 +02:00
Alexander Larsson
7316fffffe Post release version update 2017-09-19 11:52:59 +02:00
Alexander Larsson
7eece97d3c build: Add --with-appdir
If specified, this exposes the ~/.var/app/$appid to the build
sandbox. Useful when testing uninstalled builds.
2017-09-19 11:52:27 +02:00
Aitor González Fernández
0af7e237e3 Spanish translation added 2017-09-18 15:37:00 +02:00
Philip Withnall
2faffecc42 common/utils: Fix is_number("") to return FALSE
Previously, it was possible to enter ‘ ’ (a space) at a number prompt,
and it would be stripped, passed to is_number() (which would erroneously
return TRUE), then passed to strtol() and the return value used
unconditionally.

Fix that by fixing is_number() to return FALSE for the empty string.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-09-18 15:36:24 +02:00
Alexander Larsson
2d0ceef446 flatpak_installed_ref_load_metadata: Find correct deploy directory
We're scoping the deploy directory by the subpaths these days, so
we need to take that into account when finding the metadata file.

Fixes https://github.com/flatpak/flatpak/issues/1014
2017-09-15 16:02:50 +02:00
Alexander Larsson
75c2db1a73 Fix some leaks
g_variant_dict_end() returns a floating reference, we have to
sink it before using it with a g_autoptr.
2017-09-14 13:07:12 +02:00
Alexander Larsson
4fc7107ab9 Update pofiles 0.9.12 2017-09-14 09:06:51 +02:00
Alexander Larsson
42fab7b258 Update NEWS and version for release 2017-09-14 09:01:59 +02:00
Alexander Larsson
66670cca4b Don't use an a11y bus proxy for flatpak build
This is unnecessarily expensive and very unlikely to be used.
2017-09-14 08:56:43 +02:00
Alexander Larsson
40126c3e6f Fix crash when installing extra-data
We pass FLATPAK_RUN_FLAG_NO_A11Y_BUS_PROXY when running the
sandboxed apply_extra_data script, because otherwise we run into
a crash due to the lack of an .flatpak-info file (and also, because
it is not needed).
2017-09-14 08:55:30 +02:00
Alexander Larsson
2533626291 Update pofiles 0.9.11 2017-09-13 15:55:11 +02:00
Alexander Larsson
42dd7b5033 Update version to 0.9.11 2017-09-13 15:49:56 +02:00
Alexander Larsson
0dec1ec7ba Update NEWS for release 2017-09-13 15:49:49 +02:00
Alexander Larsson
1ee74fc5ea Expose host icons readonly in sandbox
Icons are really only a bunch of pngs, and the icon theme specification
has been stable since forever and never broke ABI. So, exposing the
host fonts should be pretty safe, comparable to the fonts that we
already expose.

This ends up being kind of important since a lot of things pick up the
icon theme from the host. In particular, it means that libXcursor can pick up
the correct cursor icons for the current cursor theme.
2017-09-13 14:54:49 +02:00
Alexander Larsson
4e97018bc6 Properly check the tmp dir mode
This was using a boolean && instead of a bitwise mask. Reported
by covertity.
2017-09-13 12:11:51 +02:00
Alexander Larsson
0b1e45c47f Add comment about why we're allowing xa.ref discrepancies sometimes
See https://github.com/flatpak/flatpak/pull/1013 for discussion.
2017-09-13 11:56:59 +02:00
Cosimo Cecchi
643f9d6e14 dir: relax requirements around xa.ref matching deployed commit
In case the summary file is GPG-signed, we already have other better
ways of verifying expectations around the installed ref.
If the deployed branch does not match xa.ref, simply warn instead of
aborting.

Based on a patch by Dan Nicholson <nicholson@endlessm.com>
2017-09-13 11:45:00 +02:00
Matthew Leeds
ee8101f9ee install: Use bash completion for file names
Since flatpak can now install from *.flatpak and *.flatpakref files
rather than just remotes, show those files in the bash completion of a
"flatpak install ..." command.

Fixes https://github.com/flatpak/flatpak/issues/672
2017-09-12 16:14:43 +02:00
Matthew Leeds
037a13cde0 completion: Make filename completions smarter
Many flatpak commands only work on *.flatpak or *.flatpakref files, so
the bash auto completion showing every file is distracting and
unnecessary. This commit makes flatpak only show relevant files when
possible by using the "-G globpattern" compgen option.
2017-09-12 16:14:43 +02:00
AsciiWolf
2f01d550a0 Update Czech translation 2017-09-12 16:12:30 +02:00
Jelle van der Waa
68ad3c84c1 Fix segfault on flatpak update
When ret is NULL object_path is filled with garbage and causes a
segfault g_dbus_proxy_new_for_bus_sync.
2017-09-12 16:12:05 +02:00
Matthias Clasen
43af4acb34 Merge pull request #1005 from rffontenelle/patch-3
Update Brazilian Portuguese translation
2017-09-09 08:03:58 -04:00
Matthias Clasen
ec6dbdb5d0 Merge pull request #1008 from AsciiWolf/cs-update
Update Czech translation
2017-09-09 08:03:46 -04:00
Matthias Clasen
329ee9faaf Merge pull request #1004 from hanklank/UpdatedSweTrans
Swedish translation - fixed minor typos after review
2017-09-09 08:03:32 -04:00