Commit Graph

809 Commits

Author SHA1 Message Date
Simon McVittie
596216532d app: Don't distribute gdbus-codegen output in tarballs
Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1891
Approved by: alexlarsson
2018-07-11 18:32:54 +00:00
AsciiWolf
354d36f6b4 Fix typo in permission-remove command
Closes: #1894
Approved by: mwleeds
2018-07-11 12:55:06 +00:00
Alexander Larsson
0ac154e913 lib: Add FLATPAK_ERROR_REMOTE_NOT_FOUND error
And return it where we look up remotes.

Partial fix of #1855
2018-07-10 19:26:16 +02:00
Matthew Leeds
9c40725739 app: Drop some dead code
Since commit 096f7d4fb dropped flatpak_dir_check_for_appstream_update(),
this code can never be reached. Drop it to fix coverity issue 1471677.
2018-07-10 19:25:59 +02:00
Matthew Leeds
b35144a691 create-usb: Avoid invalidating the summary file
Since the create-usb command doesn't run as root (and if it did GNOME
Software wouldn't be able to call out to it), it can't update the
summary file in the source repo if the system installation is being
used. So the user is expected to run `ostree summary -u` before using
create-usb. But if the create-usb command then updates the appstream
data and repo metadata refs, the summary will no longer point to the
latest commits on those refs. As a short term fix, avoid updating the
appstream data and repo metadata, and mention in the manpage that the
user should do so. The better solution, not requiring any manual steps
on the user's part, will require a fix for
https://github.com/ostreedev/ostree/issues/1664.
2018-07-10 19:25:39 +02:00
Alexander Larsson
3f4518b15c Run uncrustify
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
98fd052695 transaction: Move the handling of bundle runtime remote from cli code
This allows libflatpak users to also add runtime remotes
as needed by bundles.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Alexander Larsson
c0ebd3a121 transaction: Move flatpakref installation to transaction code
This adds the flatpak_transaction_add_install_flatpakref method
to easily install from flatpakref files. It additionally
adds a new signal called add-new-remote which is called in two
cases:

 To ask if the user wants to add a "normal" remote for the url
 specified by a flatpakref file.

 When a new remote is required for the runtimes the application
 depends on.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Matthew Leeds
e959fd3db0 WIP: Add a create-usb command
Fixes https://github.com/flatpak/flatpak/issues/1672

Closes: #1828
Approved by: alexlarsson
2018-07-07 15:25:50 +00:00
Simon McVittie
1f99b36593 build: Include built files from app/
This fixes an out-of-tree build.

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

Closes: #1848
Approved by: alexlarsson
2018-07-02 08:17:08 +00:00
Simon McVittie
63162411e6 build: Tell make how to build app/*-dbus-generated.h
This was already set up for common/, but not yet for app/.

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

Closes: #1848
Approved by: alexlarsson
2018-07-02 08:17:08 +00:00
Matthias Clasen
db1b39bdae Fix parallel builds
With the newly introduced generated sources in app/,
the (parallel) GNOME ci builds were failing. Add the
generated sources to BUILT_SOURCES to fix that. For
good measure, also add them to CLEAN_FILES.

Closes: #1843
Approved by: mwleeds
2018-06-29 17:53:00 +00:00
Alexander Larsson
f504656890 transaction: Mark error const in operation-error signal
Closes: #1841
Approved by: alexlarsson
2018-06-29 12:56:15 +00:00
Matthias Clasen
4c0662b03a Add a permission-reset command
This command removes all permissions for a given app
from the permission store.

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +00:00
Matthias Clasen
e9f5b1cf06 Add a permission-show command
This shows all the entries pertaining to a particular
app from the permission store.

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +00:00
Matthias Clasen
9867bb0cf5 Add a permission-remove command
This removes an item from the permission store.

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +00:00
Matthias Clasen
5d9bbeaed2 Add a permission-list command
This command dumps the content of the permission store
database(s).

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +00:00
Matthias Clasen
2a095814b5 Generate code for permission store proxy
This commit generates the code for the permission
store interface. Subsequent commits will use it.

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +00:00
Owen W. Taylor
8f73dbd32d Include appstream and icons in OCI bundles as annotations
Include annotations:

 org.freedesktop.appstream.appdata
 org.freedesktop.appstream.icon-{64,128}

into OCI bundles. This not only makes the bundle self-describing, but also
if the bundle is imported into a registry, it becomes possible to browse
the registry and recreate an appstream by only retrieving the annotations
for relevant images, without having to download the actual images.

The icon annotations are formatted as data: URI's with base64 data. The idea
is that a server-side process to collect annotations could extract the icons
to separate storage and rewrite the URI's to remote URL's.

Closes: #1834
Approved by: alexlarsson
2018-06-29 08:43:31 +00: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
491d174879 Make p2p build non-optional
Closes: #1800
Approved by: alexlarsson
2018-06-19 18:10:56 +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
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
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
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
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
Matthew Leeds
2df6916505 Fix a few mistakes in the docs 2018-06-15 12:31:40 -07:00
Alexander Larsson
a123c858a5 uninstall --unused: Don't prompt if no unused refs found
If there was no refs found to delete, we don't want to print the "ok?" prompt.
Instead we just say that nothing was found.

Closes: #1776
Approved by: alexlarsson
2018-06-11 09:22:55 +00:00
Alexander Larsson
27fe8dd6a3 build: Compute app_context before using it
This fixes a crash dereferencing a null app_context.

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

Closes: #1774
Approved by: alexlarsson
2018-06-11 08:24:08 +00:00
Philip Withnall
441fe25255 all: Use GMainContextPopDefault when handling thread defaults
Simplify some of the return logic when handling pushing/popping the
thread default main context by using g_autoptr(GMainContextPopDefault).

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1736
Approved by: alexlarsson
2018-06-04 12:22:30 +00:00
Alexander Larsson
cefe0a2e41 uninstall: Add --unused
This removes all runtimes that are not used by some app, or any sdk
used by a runtime that some app uses.

Closes: #1754
Approved by: alexlarsson
2018-06-04 12:08:59 +00:00
Alexander Larsson
4b119c41f0 info: Add show-runtime and show-sdk
Also show sdk in regular output

Closes: #1753
Approved by: alexlarsson
2018-06-04 11:46:07 +00:00
Alexander Larsson
798e8adfee remote-info: Add show-runtime and show-sdk
Also, print sdk in regular output

Closes: #1753
Approved by: alexlarsson
2018-06-04 11:46:07 +00:00
Alexander Larsson
1463c468e2 flatpak info: Add --show-location
This shows the location the ref is deployed to

Closes: #1753
Approved by: alexlarsson
2018-06-04 11:46:07 +00:00
Alexander Larsson
bc4a2d8dbf uninstall: Add --all
Closes: #1744
Approved by: alexlarsson
2018-06-01 10:59:14 +00:00
Alexander Larsson
715cc173ef Transactions: Add uninstall operation and handle no-pull correctly
In the no-pull case and when uninstalling, we never want to do any network
i/o for e.g. detecting depenedencies.

Closes: #1744
Approved by: alexlarsson
2018-06-01 10:59:14 +00:00
Alexander Larsson
ffe1b7e349 Make various operation work without a system installation
This makes info, list, remotes, and search work if there is no
system flatpak repo. Before it failed with EPERM.

Closes: #1742
Approved by: alexlarsson
2018-05-31 19:28:16 +00:00
Alexander Larsson
586f754eca repair: Remove refs that are not deployed
Closes: #1739
Approved by: alexlarsson
2018-05-31 15:37:09 +00:00
Alexander Larsson
15d2918255 repair: Update copyright year to 2018
LIVE IN THE NOW!

Closes: #1739
Approved by: alexlarsson
2018-05-31 15:37:09 +00:00
Alexander Larsson
f239a6e6a4 Add flatpak repair command
This is a fsck-like command that tries to automatically repair your
flatpak installations. It works by running an fsck on all the refs in
the local repo, and removing all refs that has an unexpectedly missing
(or deleted) object.

Then it runs a prune, which will remove all the object that were
referenced by these removed refs (that were not references by anything
else), so that any non-detected invalid objects are also removed.

Then it looks at all the deployed refs, and if they lack a ref in
the local repo, we `install --reinstall $origin $ref` them.

Closes: #1739
Approved by: alexlarsson
2018-05-31 15:37:09 +00:00
Alexander Larsson
91957b5c61 transaction: strdup progress status in getter
This way we're safe from reentrant use of the progress
2018-05-29 16:37:21 +02:00
Alexander Larsson
9fe81aaf90 Transaction: Add (and use) vfuncs for signals 2018-05-29 16:37:21 +02:00
Alexander Larsson
75ba77712a transaction: Derive FlatpakCliTransaction from FlatpakTransaction 2018-05-29 16:37:21 +02:00
Alexander Larsson
d2e419418b transaction: Change from installation_create_transaction() to transaction_new_for_installation()
This way is nicer because then the user can derive from FlatpakTransaction
2018-05-29 16:37:21 +02:00
Alexander Larsson
2642b55e91 libflatpak: Guard public headers for individual includes 2018-05-29 16:37:21 +02:00
Alexander Larsson
89e673ff70 Rename FlatpakTransactionError to FlatpakTransactionErrorDetails
This makes it more obvious that this is not a GError enum
2018-05-29 16:37:21 +02:00
Alexander Larsson
f5a8e2b856 logging: Use message_handler also for warnings 2018-05-29 16:37:21 +02:00
Alexander Larsson
bb62296785 Transaction: Move progress to FlatpakTransactionProgress object 2018-05-29 16:37:21 +02:00
Alexander Larsson
0685649763 Transaction: Move update_metadata() into transaction_run()
There is no real need to have to manually call this, we just
want it to happen automatically.
2018-05-29 16:37:21 +02:00