Commit Graph

3136 Commits

Author SHA1 Message Date
Alexander Larsson
bbdf2d11c8 build: Export FLATPAK_ID and FLATPAK_ARCH
These are useful to have when building things.

Closes: #1052
Approved by: alexlarsson
2017-09-29 09:35:26 +00:00
AsciiWolf
bc2d72adeb Update Czech translation
Closes: #1050
Approved by: alexlarsson
2017-09-28 17:17:44 +00:00
Sam Spilsbury
88be75cbb3 lib: Add flatpak_installation_prune_local_repo
This is a method to explicitly prune the local repo, which
users might want to use if they had explicitly removed refs from
the underlying flatpak repo and want to ensure that the objects
referred to by those refs are cleared to save on disk space.

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
d0af046a2f system-helper: Add PruneLocalRepo method
We might want to prune the repo from within the library or
the command line and may not be in a privileged context, so
we'll need to jump through the system helper to prune the refs.

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
27a76acb5d dir: Don't prune refs immediately after calling flatpak_dir_remove_ref
It might be more efficient to perform this operation at the end of
removing a batch of refs, so perform it there instead.

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
96b4c5ed13 dir: Add gtkdoc comment for flatpak_dir_remove_ref
Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
f05e87d6bf dir: No need to query remote in filter_out_deployed_refs
Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
284138fa61 dir: Add FindMatchingRefsFlags flag argument find_matching_refs
In some cases, we want to include the repo part of the refspec,
for instance, if we are to pass refs directly to flatpak_dir_remove_ref

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
3f91b4d883 system-helper: Add RemoveLocalRef helper function
This depends on the modify-repo privilege

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
6236a60a1b lib: Add methods to clean up refs in the local repository
In some cases, a user might pull a ref into the local repository and
not deploy it by using FLATPAK_INSTALL_FLAGS_NO_DEPLOY. Later on, that
user might decide that they don't want to deploy the ref after all,
but there was no way to remove that ref from the local repository
in the public API, so it takes up disk space.

Add flatpak_installation_remove_local_ref_sync to remove a given
ref from the local repository if the ref is known and
flatpak_installation_cleanup_local_refs_sync to remove all undeployed
refs.

Fixes #1031

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
cdbfb001df lib: Fix copy-paste errors in documentation
Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Sam Spilsbury
99611aed52 dir: Add flatpak_dir_cleanup_undeployed_refs
This can be used to remove any undeployed refs from the local repo
in order to save on disk space.

Closes: #1034
Approved by: alexlarsson
2017-09-28 15:39:05 +00:00
Colin Walters
747f66158d tree-wide: Bump libglnx
A few fixes worth having, also just testing Homu.

```
Colin Walters (2):
      fdio: Open target dirname for glnx_file_copy_at()
      lockfile: Use an `initialized` member rather than explicit init

Jonathan Lebon (1):
      macros: use size_t for glnx_strjoina len

Philip Withnall (1):
      shutil: Fix assertion failure in glnx_shutil_mkdir_p_at()
```

Closes: #1046
Approved by: alexlarsson
2017-09-27 18:53:46 +00:00
Alexander Larsson
a77b96faec Use packaged ostree from updates-testing
This is faster than always rebuilding it

Closes: #1047
Approved by: alexlarsson
2017-09-27 18:12:32 +00:00
Alexander Larsson
d97f6dbf24 Whitespace change
Closes: #1045
Approved by: cgwalters
2017-09-27 14:26:05 +00:00
Alexander Larsson
ab27dfc014 Update pofiles 0.9.98.2 2017-09-27 00:36:51 +02:00
Alexander Larsson
6e49640eeb Update release to 0.9.98.2 2017-09-27 00:29:46 +02:00
Alexander Larsson
69d7474bcd Don't lock the system repo when pulling to a child repo
This causes permission denied when installing to the system
repo using the helper.
2017-09-26 23:24:18 +02:00
Alexander Larsson
de26d28a17 Update pofiles 0.9.98.1 2017-09-26 22:28:55 +02:00
Alexander Larsson
53977aa364 Update NEWS for release 2017-09-26 22:25:10 +02:00
Alexander Larsson
237d91e1da Bump version to 0.9.98.1 2017-09-26 22:25:10 +02:00
Fran Diéguez
248da89117 Add Galician translations (#1041) 2017-09-26 20:15:07 +02:00
Alexander Larsson
a265436574 run: Fix exporting the homedir if also exporting host
The FAKE_MODE_DIR support did not work correctly because of
a MAX() with a fallback value of 0, which is greater than
FAKE_MODE_DIR.
2017-09-26 20:12:19 +02:00
Alexander Larsson
b35177e4bf appstream update: Don't skip all arches if one is unchanged
Move skip_commit from a function global to a per-loop variable so
that it is reset for each architecture.
2017-09-26 16:34:30 +02:00
Piotr Drąg
7f289ca5e2 Fix Spanish in LINGUAS as well 2017-09-26 12:07:41 +02:00
Piotr Drąg
ee7bb8b066 Fix Spanish language code 2017-09-26 11:59:31 +02:00
Alexander Larsson
c3cfc4aa78 Remove unused variables 2017-09-26 11:58:44 +02:00
Alexander Larsson
531f9dbf24 CI: Install gettext-devel for autopoint 2017-09-26 11:58:44 +02:00
Alexander Larsson
ea8ba7597e CI: Use exactly ostree 2017.11 2017-09-26 11:58:44 +02:00
Piotr Drąg
5da86fd102 Update Polish translation 2017-09-26 11:58:19 +02:00
Simon McVittie
f8e5c200bc tests: Use a more realistic bwrap invocation to check for support
The kernel used on some autobuilders for the Debian PA-RISC port
can do "bwrap --ro-bind / / /bin/true", but not the bwrap invocations
made during the actual testing, which fail with "Creating new namespace
failed: Invalid argument". Make the trial bwrap invocation more like
what Flatpak actually does, so that these tests will hopefully be
skipped on such kernels.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876743
Signed-off-by: Simon McVittie <smcv@debian.org>
2017-09-26 10:41:49 +02:00
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