Commit Graph

7164 Commits

Author SHA1 Message Date
Richard Hughes
6a3a637248 Don't force flatpakrepo files to haved signed content 2018-07-10 19:25:44 +02:00
Richard Hughes
b133d286d9 Post release version bump 2018-07-10 19:25:44 +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
Matthew Leeds
f16caf23af doc: Fix typos 2018-07-10 17:54:39 +02:00
Matthew Leeds
905d7ca096 doc: Fix grammar 2018-07-10 17:44:39 +02:00
Alexander Larsson
a568740b20 transaction: drop installation caches when needed
If a remote is added or modified in the cloned FlatpakDir
we also drop caches in the one in the installation.

Fixes #1882

Closes: #1883
Approved by: alexlarsson
2018-07-10 14:29:17 +00:00
Alexander Larsson
35786c9529 update-remote-config: Fix potential NULL dereference
This fixed coverity issue 1471683.

Closes: #1880
Approved by: mwleeds
2018-07-10 12:46:48 +00:00
Matthew Leeds
e3ec1ec537 dir: Use flatpak_dir_use_system_helper() more
Use the helper function to decide whether to use the system helper in
one more place.

Closes: #1874
Approved by: alexlarsson
2018-07-09 23:02:16 +00:00
Alexander Larsson
e4dbd107b3 system-helper: Fix race condition with idle exit
If the system helper process exits due to being idle the
FlatpakSystemHelper dbus proxy will return errors on
all calls, because it resolves the well known name to
a unique name on creation, which means it will try
to talk to the old idle-exited instance.

The fix is to not use GDBusProxy, but instead manually
call g_dbus_connection_call_sync().

Fixes #1845

Closes: #1873
Approved by: mwleeds
2018-07-09 17:22:00 +00:00
Piotr Drąg
93e1e19a70 Update Polish translation
Closes: #1872
Approved by: alexlarsson
2018-07-08 16:43:36 +00:00
Alexander Larsson
3f4518b15c Run uncrustify
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
c97b1d5202 uncrustify: Don't modify valgrind header.
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
f15d2937f0 uncrustify: Don't modify brackets
I don't think there is really an acceptable setting that does
the right thing always, so disable any adding/removing
of brackets.

Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
b5e6852a97 uncrustify.sh: We no longer have gvdb in the repo
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Simon McVittie
7179c12e22 Fix error handling while deploying AppStream
Setting an error with second_error->message is going to work poorly
when second_error has never been set non-NULL.

Related to #1845, although not necessarily the full solution.

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

Closes: #1867
Approved by: alexlarsson
2018-07-07 16:17:46 +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
Alexander Larsson
1ecca029a8 transaction: Add flatpak_transaction_set_default_arch
This will be used as the default when installing something that
doesn't specify a ref, such as a flatpakref file.

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
Matthew Leeds
1a79b46059 doc: Point to the source of the generated HTML
When you're looking at the Flatpak Command Reference on
docs.flatpak.org, it's not clear that it was generated from the flatpak
repo. So add a notice to the docbook that's used to generate the HTML.
This was pointed out by
https://github.com/flatpak/flatpak-docs/pull/134
2018-07-07 17:17:03 +02:00
Alexander Larsson
c0f9d81fb0 tests: Fix up ioctl suppressions for tests
The FICLONE ioctl suppression was hit via a different
codepath too, so tweak the callstack for the
suppression.
2018-07-07 16:38:24 +02:00
Alexander Larsson
0d19e60ce3 system-helper: Add EnsureRepo operation
This is used to create the /var/lib/flatpak repo if
needed so that other later operations work. We have
some partial support for it not working in various
operations (using the allow_empty argument) but
this is in no way complete. For example, this
can easily happen if you have a per-user installation
but no system one and then you run flatpak install
with no --user, then it will try to figure out
which one to use and die.
2018-07-07 16:37:44 +02:00
Simon McVittie
3ed522c057 testlibrary: Capture stderr from more commands
This is the equivalent of commit 86fd56dce for the commands added
in commit 2465cf4 to test #1587.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1864
Approved by: alexlarsson
2018-07-07 08:35:50 +00:00
Simon McVittie
07a225b90e testlibrary: Remove unused argv_str
This was left over after commit 86fd56d.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1864
Approved by: alexlarsson
2018-07-07 08:35:50 +00:00
Alexander Larsson
b999a785f2 flatpak_dir_deploy_appstream: Handle the no-local-commit exists case
For some reason I hit this with a test remote, and it crashes. Make
it return an error instead.

Closes: #1854
Approved by: alexlarsson
2018-07-05 07:38:35 +00:00
Piotr Drąg
1df3f7a5ee Update Polish translation
Closes: #1849
Approved by: alexlarsson
2018-07-02 08:26:38 +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
Yuri Chornoivan
85375180aa Update Ukrainian translation
Closes: #1847
Approved by: alexlarsson
2018-07-02 08:07:52 +00:00
Matthew Leeds
dc3d86139d dir: Improve metadata fetch error message
In the case that the collection ID configured on a remote is NULL the
repo metadata comes from the summary file. But if there's an error
fetching the summary in _flatpak_dir_get_remote_state() and then
flatpak_remote_state_ensure_metadata() is called, the
metadata_fetch_error variable will be NULL and "unknown error" will be
returned as the error message. This commit returns the
summary_fetch_error message in that case so the user gets a slightly
more helpful error message.

Some Endless computers in Africa have recently been hitting this code
path and printing "unknown error" messages.

Closes: #1844
Approved by: alexlarsson
2018-07-02 07:57:37 +00:00
Grzegorz Antoniak
f9be8c0fcf Fixed a 'maybe uninitialized' warning and a code style change.
Closes: #1851
Approved by: alexlarsson
2018-07-02 07:48:39 +00:00
Grzegorz Antoniak
8155400fca NULL pointer check after calling getgrgid()
When the user runs with gid=X, but X doesn't have an entry in
/etc/groups, then a segmentation fault occured. This was happening
because flatpak-run.c didn't guard against a NULL pointer after calling
getgrgid() in flatpak_run_setup_base_argv.

Closes: #1850

Closes: #1851
Approved by: alexlarsson
2018-07-02 07:48:39 +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
Matthew Leeds
ed4dba55a3 doc/flatpak.xml: Add permission-* commands 2018-06-29 10:25:56 -07:00
Piotr Drąg
384edbdd44 Update POTFILES.in
Closes: #1842
Approved by: mwleeds
2018-06-29 16:31:20 +00:00
Matthew Leeds
2f287cec4e doc: Fix minor mistakes 2018-06-29 07:14:11 -07:00
Alexander Larsson
93ca5cdf45 transaction: Add get_installation()
Closes: #1841
Approved by: alexlarsson
2018-06-29 12:56:15 +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
848dd88a34 Fix a copy-paste error
RevokePermissions revokes permissions, not grants them.

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +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
Matthias Clasen
a8cca2ebe1 Add the permission store interface
This adds the xml interface definition for
org.freedesktop.impl.portal.PermissionStore.
Subsequent commits will use this interface.

Closes: #1837
Approved by: alexlarsson
2018-06-29 11:52:40 +00:00
Alexander Larsson
313707d9be CI: Don't build ostree
ostree 2018.6 is in updates-testing now, use that.

Closes: #1840
Approved by: alexlarsson
2018-06-29 10:29:16 +00:00
Alexander Larsson
fad723dbc4 tests: Run tests on /tmp (not /var/tmp)
Since we now are ok with no-xattrs this means we can run on tmpfs.

Closes: #1839
Approved by: alexlarsson
2018-06-29 09:59:50 +00:00
Alexander Larsson
aa55665ae1 tests: Don't skip if no user xattrs
We don't require these anymore

Closes: #1839
Approved by: alexlarsson
2018-06-29 09:59:50 +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
Piotr Drąg
79154b63fc Update Polish translation
Closes: #1836
Approved by: alexlarsson
2018-06-29 08:41:53 +00:00