Commit Graph

4919 Commits

Author SHA1 Message Date
Umang Jain
e544c40f5b common/dir: Add reply_type parameter to system helper dbus calls
Make flatpak_dir_system_helper_call capable of dealing with a GUnixFDList
parameter and subsequently call g_dbus_connection_call_with_unix_fd_list_sync
for those methods.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Alexander Larsson
80249b5f4d revokefs: Add demo to show how to revoke permissions
The demo starts two instances by the same users so
the revoke doesn't really enforce any separation, but
it demos how you would do it.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Alexander Larsson
aeecbb7d2b revokefs: Split out the writing part from the fuse implementation
By default we just spawn a writer from the fuse implementation,
but you can also do it manually with --backend and --socket,
allowing you to start the two in different contexts.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:14 +00:00
Alexander Larsson
4716ce8f2e revokefs: Initial non-revoking version
This is just a copy of rofiles-fuse with the write limits removed.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:14 +00:00
Rafael Fontenelle
98352b01d5 Update Brazilian Portuguese translation
Closes: #2809
Approved by: matthiasclasen
2019-04-08 18:45:39 +00:00
Rafael Fontenelle
95e692794b Fix misspellings
Closes: #2807
Approved by: matthiasclasen
2019-04-08 12:50:42 +00:00
Matthew Leeds
af97b3db2f tests: Fix missing end quote of regex pattern
Not sure how this didn't cause a unit test failure

Closes: #2803
Approved by: matthiasclasen
2019-04-05 14:23:07 +00:00
Matthew Leeds
78b7ae75d7 tests: Escape periods when appropriate
Don't match any character in a regular expression when we only want to
match a period.

Closes: #2803
Approved by: matthiasclasen
2019-04-05 14:23:07 +00:00
Matthew Leeds
0b20f3d48f run: Try to determine the branch if unspecified
Currently when the user doesn't specify a branch to the run command, for
apps it will use the current branch and for runtimes it just tries to
use "master" and fails if that doesn't work. Since runtimes don't have
current branches, it would be nice if we could determine the right one
to use rather than just erroring out. So this commit changes the
implementation so that it looks at each installed runtime and if only
one matches it is used. If there's more than one match the user is
prompted to choose. This is the first interactivity added to the run
command but I don't think that's an issue; any time it's run in a
non-interactive shell it will error out upon encountering ambiguity.

Also, add a couple unit tests for the success path and error paths.

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

Closes: #2788
Approved by: matthiasclasen
2019-03-30 13:02:10 +00:00
Matthew Leeds
3d74d4b37f tests: Add ability to test a branch other than master
This commit makes it so that a unit test can create the test app and
runtime using a branch other than master, and changes test-run.sh to use
the branch "stable". This will allow the run command to be tested better
in the following commit.

Closes: #2788
Approved by: matthiasclasen
2019-03-30 13:02:10 +00:00
Matthew Leeds
1ce532dad7 tests: Delete make-test-bundles.sh
This script doesn't work anymore and it's not clear that it's worth
maintaining since no one seems to be using it.

Closes: #2788
Approved by: matthiasclasen
2019-03-30 13:02:10 +00:00
Matthew Leeds
ec234d7d6c app: Rename a variable for clarity
Calling this variable disable_interaction doesn't make sense because
there's still interaction if there's more than one option, so rename it
to assume_yes.

Closes: #2788
Approved by: matthiasclasen
2019-03-30 13:02:10 +00:00
Matthew Leeds
d3b7bfa92d doc: Fix capitalization of gedit
It's gedit not GEdit[1][2].

[1] https://wiki.gnome.org/Apps/Gedit
[2] https://flathub.org/apps/details/org.gnome.gedit

Closes: #2788
Approved by: matthiasclasen
2019-03-30 13:02:10 +00:00
Kukuh Syafaat
da4ca20e08 Update Indonesian translation
Closes: #2792
Approved by: matthiasclasen
2019-03-30 12:38:22 +00:00
Alexander Larsson
0711d2eb7a Update pofiles 1.3.1 2019-03-27 11:06:45 +01:00
Alexander Larsson
2d2ad94ea2 appstream: Fix permission of compat symlink 2019-03-27 11:02:07 +01:00
Alexander Larsson
0b05fd155f Update NEWS for release 2019-03-27 10:40:18 +01:00
Alexander Larsson
c9198af3f0 Bump version to 1.3.1 2019-03-27 10:40:10 +01:00
Alexander Larsson
4c8409ed6a appstream: Create symlinks for the icons/$origin subdirectory
For compatibility with libappstream we create a $origin ("flatpak")
subdirectory with symlinks to the size directories thus matching the
standard merged appstream layout if we assume the appstream has
origin=flatpak, which flatpak-builder creates.

See https://github.com/ximion/appstream/pull/224 for details.

Fixes https://github.com/flatpak/flatpak/pull/2779

Closes: #2789
Approved by: alexlarsson
2019-03-27 09:38:57 +00:00
Alexander Larsson
7df32ae388 utils: Add flatpak_mtree_create_symlink()
Closes: #2789
Approved by: alexlarsson
2019-03-27 09:38:57 +00:00
Umang Jain
dcde1473d3 trivial: Use g_autoptr to automatically free GErrors
Closes: #2785
Approved by: matthiasclasen
2019-03-26 12:10:52 +00:00
Ryan Gonzalez
a9107feeb4 run: Only compare the lowest 32 ioctl arg bits for TIOCSTI
Closes #2782.

Closes: #2783
Approved by: alexlarsson
2019-03-26 09:42:36 +00:00
Matthew Leeds
e8e8611d26 tests: Add a test for flatpak list --arch
Seems worth adding a test since this broke recently

Closes: #2769
Approved by: alexlarsson
2019-03-20 09:22:51 +00:00
Kukuh Syafaat
d40dfd17d8 Update Indonesian translation
Closes: #2766
Approved by: mwleeds
2019-03-19 19:16:11 +00:00
Alexander Larsson
c9a7dd9425 Fix flatpak-list --arch
It was looking at the wrong part of the ref...

Closes: #2765
Approved by: mwleeds
2019-03-19 18:43:11 +00:00
Matthew Leeds
3cbad4369d transaction: Don't check dependency installations' remotes
Currently a FlatpakTransaction object only operates on one installation,
but uses others (by default the system installations) for dependencies
such as runtimes. In addition to checking those dependency installations
for runtimes we check their configured remotes when deciding whether to
add a new remote as an origin for a flatpakref or as a runtime remote
for a flatpakref. This commit changes the behavior so that we only check
the installation being operated on to find out if a remote already
exists. This is the correct behavior in both cases: the origin remote
and the runtime remote. Otherwise the installation can error out when it
fails to find the runtime, or it can fail to respect the
SuggestRemoteName key which is supposed to dictate the name for the
origin remote.

One side effect of this is that a remote might be duplicated in the user
installation which already exists in the system installation, even if
the runtime it provides is already installed. But if you don't want
remotes in multiple installations you can just stick to using one
installation consistently.

Also, add a unit test for this in testlibrary.c (which required a bit of
refactoring).

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

Closes: #2761
Approved by: alexlarsson
2019-03-19 13:44:29 +00:00
Matthew Leeds
d690497549 cli transaction: Fix "required runtime found" prompt
On the next lines after this prompt we list each remote so it doesn't
make much sense to mention the first one in the prompt.

Closes: #2761
Approved by: alexlarsson
2019-03-19 13:44:29 +00:00
Matthew Leeds
6cd4b4c484 transaction: Fix typos
Closes: #2761
Approved by: alexlarsson
2019-03-19 13:44:29 +00:00
Matthew Leeds
12d5ee74f3 doc/flatpakref: Fix description of Name key
The Name key specifies the ID of the app or runtime, not the ID of the
app's runtime.

Closes: #2760
Approved by: matthiasclasen
2019-03-15 18:16:54 +00:00
Alexander Larsson
ea48f68749 Update NEWS 1.3.0 2019-03-12 15:37:26 +01:00
Alexander Larsson
b6f404ff8c Update pofiles 2019-03-12 15:35:24 +01:00
Alexander Larsson
0cb124c15c Update NEWS for 1.3.0 2019-03-12 15:28:05 +01:00
Alexander Larsson
32fc8dacb3 Merge pull request #2756 from alexlarsson/delta-ignore-refs
Add support for build-update-repo --static-delta-ignore-ref=PATTERN
2019-03-12 15:03:55 +01:00
Alexander Larsson
d0026af959 build-update-repo: Add --static-delta-ignore-ref=PATTERN
This is useful if you don't want to e.g. generate deltas for debug
or source refs.
2019-03-12 14:53:36 +01:00
Alexander Larsson
aa978ea88a build-update-repo: Fix typo delete -> delta 2019-03-12 14:53:36 +01:00
Bastien Nocera
32c5b15326 icon-validator: Don't check SVG size
The size is just a number, but the resulting GdkPixbuf could still be
quite big compared to the amount of data we're processing, so keep
4096x4096 as maximum dimensions.

Closes: #2747
Approved by: alexlarsson
2019-03-12 13:07:41 +00:00
Bastien Nocera
8008fe38a1 icon-validator: Check image format first
Closes: #2747
Approved by: alexlarsson
2019-03-12 13:07:41 +00:00
Alexander Larsson
f3e3147d78 triggers: Use FlatpakBwrap helpers
This makes the code cleaner and more flexible for changes later.

Closes: #2755
Approved by: alexlarsson
2019-03-12 11:31:26 +00:00
Alexander Larsson
2bb84cc522 More efficient appstream generation
Rather than creating a real temp directory and
then commiting that we generate an in-memory mtree
which mostly refers to pre-existing icon file
objects, and then the newly created appdata xml.

Closes: #2753
Approved by: alexlarsson
2019-03-12 09:08:12 +00:00
Alexander Larsson
e3357bacad utils: Add some mtree helpers and rename create_root to something more correct
Closes: #2753
Approved by: alexlarsson
2019-03-12 09:08:12 +00:00
Alexander Larsson
8054dbbed1 Merge pull request #2752 from yurchor/master
Update Ukrainian translation
2019-03-12 10:05:42 +01:00
Yuri Chornoivan
6e5a00289a Update Ukrainian translation 2019-03-11 15:36:14 +02:00
Yuri Chornoivan
dba337044d Merge remote-tracking branch 'upstream/master' 2019-03-11 15:16:58 +02:00
Yuri Chornoivan
7b3ded2998 Sync Ukrainian translation with master 2019-03-11 15:15:14 +02:00
Matthew Leeds
cdb3407c59 doc/flatpak-install: Tweak examples
The gnome-apps repo is not being kept up to date so we don't want to
imply that people should use it, and make a few other tweaks to the
install command examples.

Closes: #2743
Approved by: matthiasclasen
2019-03-07 14:38:38 +00:00
Piotr Drąg
63def7a251 Update Polish translation
Closes: #2745
Approved by: matthiasclasen
2019-03-07 14:37:23 +00:00
Matthew Leeds
fece775029 Fix a leak of SoupSession
Closes: #2740
Approved by: matthiasclasen
2019-03-06 23:44:50 +00:00
Matthew Leeds
807f2baa53 Move interpretation of OSTREE_DEBUG_HTTP
It makes more sense to have this in flatpak_create_soup_session() so
every caller of that interprets the env var.

Closes: #2740
Approved by: matthiasclasen
2019-03-06 23:44:50 +00:00
Matthew Leeds
4e81789167 Consistently use flatpak_load_http_uri()
Currently Flatpak has a few different implementations of helper
functions to download a URI using libsoup, but the best one seems to be
in common/flatpak-utils-http.c. So this commit deletes the others and
makes use of flatpak_load_http_uri() in place of download_uri() in a
few places. This has a couple consequences:
1) It means that we're now properly checking HTTP status codes rather
than assuming that the request was successful, in the install command,
remote-add command, and in FlatpakTransaction. This fixes an assertion
failure seen by a user when they tried to use a flatpakref URL that hit
a 404.
2) It means that in the places where we're using flatpak_load_http_uri()
we are only supporting http:// and https:// URLs not, say, file:// ones.
For the install and remote-add commands this was already being enforced.
For the handling of flatpakref files and bundles in FlatpakTransaction,
I believe it's just convention because it doesn't make much sense to
do anything else; this commit enforces that convention.

Also, add a unit test for the case of trying to install a flatpakref at
a URL that hits a 404 error.

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

Closes: #2740
Approved by: matthiasclasen
2019-03-06 23:44:50 +00:00
Matthew Leeds
7a5c024695 dir: Fix GError handling in flatpak_load_deploy_data()
Commit b20ee7e26 introduced a bug where flatpak_load_deploy_data()
returns NULL without setting @error in the case that there's a problem
reading the deploy file. I think this is causing a seg fault in
flatpak_installation_list_installed_refs() which tries to print the
error message after calling get_ref() (which indirectly loads the deploy
file).

I didn't personally verify that this fixes the GNOME Builder seg fault
that was reported, but it seems almost certain looking at the provided
stack trace, since get_ref() only returns NULL if
flatpak_dir_get_deploy_data() returns NULL, and that function clearly
sets the error pointer on failure except in flatpak_load_deploy_data().

I'm not sure why the deploy file doesn't exist (or is unreadable) for
the user who reported this seg fault.

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

Closes: #2733
Approved by: matthiasclasen
2019-03-04 17:38:10 +00:00