3863 Commits

Author SHA1 Message Date
Alexander Larsson
5b07ece977 Update pofiles 0.99.2 2018-06-27 14:58:18 +02:00
Alexander Larsson
313d566f46 Update version to 0.99.2 2018-06-27 14:21:22 +02:00
Alexander Larsson
236dbef630 Update NEWS for release 2018-06-27 14:21:02 +02:00
Alexander Larsson
5754208b19 Fix lock in instance id creation
When allocating an instance id we create a unique directory
in $XDG_RUN_DIR/.flatpak/$id and create a .ref file in it which
we then read-lock (with F_SETLK). This lock is also taken by
the bwrap pid 1, so it will be taken for as long as the
app lives.

To clean up old is we remove any directories where we can successfully
write-lock the .ref file. As long as the sandbox lives this should
make it safe against removal.

However, there is a tiny race in the sandbox setup between the inital
O_CREAT of the .ref file and the F_SETLK fcntl. A GC at this point
may find the .ref file existing but not locked and then remove the
directory.

We work around this by only trying to lock .ref files that are more
than 3 seconds old.
2018-06-27 14:07:07 +02:00
AsciiWolf
268ccb2278 Update Czech translation 2018-06-27 13:53:45 +02:00
Christian Hergert
2ada826e74 build: work around guard changes in libsoup 2018-06-27 13:06:37 +02:00
Matthew Leeds
7b87bc302e Update to latest libglnx
This prevents compile time errors relating to copy_file_range being
defined twice.[1]

[1] 03e16afa7f

Closes: #1827
Approved by: alexlarsson
2018-06-27 11:05:48 +00:00
Matthew Leeds
d5606cd43a doc: Fix documentation of shared options
The --verbose and --ostree-verbose options are global to all
subcommands, but --version can only be used with the main "flatpak"
command, so fix the man pages to reflect that.
2018-06-26 00:10:55 -07:00
Matthew Leeds
3ac2672d5d doc: Minor fixes
The positional argument for the uninstall command is now called REF
rather than NAME, so update the docs to reflect that, and fix a typo in
the flatpak-list man page.
2018-06-25 23:14:25 -07:00
Matthew Leeds
0c27279895 doc: Add missing commands to flatpak(1) 2018-06-25 22:02:06 -07:00
Kukuh Syafaat
3bc0ab97d1 Update Indonesian translation
Closes: #1819
Approved by: alexlarsson
2018-06-25 07:40:56 +00:00
Matthew Leeds
f8577e0791 Remove outdated ostree version check
Now that flatpak depends on ostree 2018.6 we don't need to check if we
have 2018.5. Remove the check and update a comment.

Closes: #1813
Approved by: alexlarsson
2018-06-23 11:26:26 +00:00
Alexander Larsson
f9af050a81 utils: Add g_key_file_load_from_bytes fallback for old glib 2018-06-21 18:52:01 +02:00
Alexander Larsson
0979b4fdf3 Update pofiles 0.99.1 2018-06-21 17:15:29 +02:00
Alexander Larsson
8d07ee5393 build: Respect extensions when building an extension
When building a runtime extension we still want to allow other
extensions to be used.

This fixes https://github.com/flatpak/flatpak-builder/issues/156
2018-06-21 10:47:37 +02:00
Alexander Larsson
c93601adb9 Update NEWS for release 2018-06-20 13:50:50 +02:00
Alexander Larsson
fc941c6212 Update version to 0.99.1 2018-06-20 11:23:56 +02:00
Alexander Larsson
54e958d202 Transaction: Use flatpak_dir_resolve_p2p_refs to resolve p2p refs
This allows us to resolve as many operations as possible in parallel
which is much faster than doing the p2p queries for each potential
update.

Fixes #1592

Closes: #1796
Approved by: alexlarsson
2018-06-20 09:10:31 +00:00
Alexander Larsson
c647c315ef dir: Add flatpak_dir_resolve_p2p_refs()
This takes a list of refs + remotes and optional commit, all
which need to be p2p (i.e. have collection-id != NULL) refs, and
uses the p2p API to resolve the refs to the latest available commit
it and the matching metadata for that version.

It does this by doing a find_remotes() and then a pull_from_remotes
with PULL_FLAG_COMMIT_ONLY and then extracting the metadata
from the commit object.

We also do some checking before pulling so that if we have the latest
reported commit already available locally then we don't pull anything
for that ref (instead resolving to the locally available metadata).

We always pull to a child repo so that we have write-rights even as a
user (in the system case) and so we can properly clean up the temporary
results.

Note, this unconditionally uses the p2p APIs, and it relies on the latest
ostree master which has a fix that allows us to read the latest refs from
the transaction.

Closes: #1796
Approved by: alexlarsson
2018-06-20 09:10:31 +00:00
Alexander Larsson
d15fe7f5b2 dir: Break out flatpak_dir_create_child_repo
This is broken out of latpak_dir_create_system_child_repo and now
allows you to create user child repos too.

Closes: #1796
Approved by: alexlarsson
2018-06-20 09:10:31 +00:00
Alexander Larsson
9901ce875f dir: Never fsync child repos
There is no need to force a fsync after pulling into the child repo,
because we will anyway copy/verify it into the system repo. It is
never used for stable storage.

This makes system installation faster.

Closes: #1808
Approved by: alexlarsson
2018-06-20 08:40:28 +00:00
Matthew Leeds
71d4539d5d transaction: Fix wording in docs for "ready" signal
Closes: #1802
Approved by: alexlarsson
2018-06-20 08:27:19 +00:00
Matthew Leeds
012e47cb7d doc: Uncomment and tweak P2P docs
Now that P2P support is enabled unconditionally, uncomment the
P2P-related parts of the man pages.

Closes: #1803
Approved by: alexlarsson
2018-06-20 08:05:02 +00:00
Matthew Leeds
1a240ac686 transaction: Fix g-ir-scanner warnings
Closes: #1801
Approved by: alexlarsson
2018-06-20 07:52:55 +00:00
Matthew Leeds
85726180a1 tests: Run P2P tests unconditionally
Now that Flatpak always has P2P support enabled, the tests that are
dependent on it can always run.

Closes: #1804
Approved by: alexlarsson
2018-06-20 07:40:53 +00:00
Matthew Leeds
4e73b51a0b dir: Avoid unnecessary fetches of ostree-metadata
This commit removes fetches of ostree-metadata from
flatpak_dir_install() and flatpak_dir_update(), which both pull it into
the child repo when doing system-helper deployments. Both functions have
a FlatpakRemoteState object passed in and when that is initialized,
_flatpak_dir_fetch_remote_state_metadata_branch() pulls and deploys
ostree-metadata so it can be queried against for repo metadata and
served onto LAN and USB peers. So there's no need to pull it again here.

The issue of resolving a ref and its metadata atomically remains, but
that will be addressed by https://github.com/flatpak/flatpak/pull/1796.

Closes: #1806
Approved by: alexlarsson
2018-06-20 07:40:21 +00:00
Alexander Larsson
ac2d51b1c7 CI: Build ostree master (for p2p stuff)
Closes: #1800
Approved by: alexlarsson
2018-06-19 18:10:56 +00:00
Alexander Larsson
491d174879 Make p2p build non-optional
Closes: #1800
Approved by: alexlarsson
2018-06-19 18:10:56 +00:00
Alexander Larsson
0801f0cb13 configure: Require ostree 2018.6
This is the release with the stable p2p API

Closes: #1800
Approved by: alexlarsson
2018-06-19 18:10:56 +00:00
Alexander Larsson
065053775b run: Never inherit permissions from the runtime
We want inherit environment variables, but not actual permissions,
those need to be requested by the app only.

Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Alexander Larsson
80a33e6a1b CliTransaction: Print permissions in ready callback
This is a pretty lowlevel version of the permissions, and there
is no nice API for the library to produce these. However its got
the basics of permission tracking.

Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Alexander Larsson
23f1df8a5b Transaction: Add operation getters for metadata and old_metadata
Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Alexander Larsson
b1a7930cc7 TablePrinter: Add span cells
These can be used to print rows that are not cell-aligned.

Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Alexander Larsson
35615cbe54 Transaction: Track old metadata (for updates)
Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Alexander Larsson
db305f7287 Transaction: Keep metadata as GBytes
This makes it more easy to expose these without constantly
duplicating the memory.

Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Thibault Saunier
c0ef5aadcb scripts: Add a flatpak-coredumpctl to debug crashed application in gdb
Closes: #1784
Approved by: alexlarsson
2018-06-19 08:39:31 +00:00
Alexander Larsson
1e7e6376ff gtk-doc: Add all missing symbols to flatpak.sections
Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
0515e49140 transaction: Add APIs to set dependency sources
Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
5e8b5e5319 Transaction: Use flatpakTransactionOperation in signals
This changes the signals to use a FlatpakTransactionOperation
argument instead of a bunch of arguments in the signal, making
this easier to extend in the future.

This is an API break, but nobody is using this API yet, and it
was only available in one unstable release.

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
462204462e Transaction: Add flatpak_transaction_operation_get_bundle_path
This is to match what you can get from the new_operation arguments.

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
ffaf2d5386 Cli transaction: Print the full uninstall/install/update lists in ready
This lets you see what operations will happen and you can confirm
it before starting the heavy operations.

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
f9ad4e3eee transaction: Add ready signal
This signal is emitted after all the added operations and their dependencies
are resolved and we have the full list of things that will be
done as part of the transaction. At this point you can call
flatpak_transaction_get_operations() and decide if you want to
continue with the operation.

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
3367938432 update: Don't update appdata if transaction was aborted by user
Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
4c8f788ecd transaction: Make FlatpakTransactionOperation a (public) GObject
Only the type itself is exposed atm, not members, etc.

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
16c097ce7a transaction: Rename FlatpakTransactionOp to FlatpakTransactionOperation
This is in preparation for exposing it a bit publically

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
79d43a3c1a transaction: Drop the internal FlatpakTransactionOpKind type
Instead use FlatpakTransactionOperationType internally too,
but extend it with a INSTALL_OR_UPDATE value which is not public.

Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Joonas Sarajärvi
59ecad0f29 Add ssh-auth socket support
SSH authentication sockets can be placed in a number of places, so it
is difficult for applications to just mount a fixed directory or
directories, hoping that SSH_AUTH_SOCK points somewhere inside the
mounted content.

Closes: #1764
Approved by: alexlarsson
2018-06-19 07:11:36 +00:00
Will Thompson
cd87b542ba doc/flatpak-info: update machine-readable output list
I generated this list mechanically from the big if () condition in
flatpak-builtins-info.c, which is why they're one per line, and I think
it's more maintainable in this layout. (Whitespace has no effect on the
HTML or manpage output.)

Closes: #1788
Approved by: alexlarsson
2018-06-19 07:02:15 +00:00
Will Thompson
4fdefefb06 doc/flatpak-info: add missing options
Compared to `flatpak info --help` (which is what actually counts), 6
options were not documented, and one (--version) was documented but
doesn't exist.

Closes: #1788
Approved by: alexlarsson
2018-06-19 07:02:15 +00:00
Alexander Larsson
b6d63eaa9a Remove unused variable
Closes: #1787
Approved by: alexlarsson
2018-06-18 08:11:29 +00:00