Commit Graph

5123 Commits

Author SHA1 Message Date
Andre Moreira Magalhaes
37a7b6edfd transaction: Append bundle to correct list on flatpak_transaction_add_install_bundle()
Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>

Closes: #3025
Approved by: matthiasclasen
2019-07-23 14:54:59 +00:00
Matthew Leeds
9a0e45941a doc/flatpak-kill: Add a hint about flatpak ps 2019-07-21 12:50:50 -07:00
Matthew Leeds
5edafefa4b doc/flatpak-enter: Make a few minor improvements 2019-07-21 12:45:58 -07:00
Simon McVittie
75b5b7c763 Don't register polkit agent if we cannot connect to system bus
This works around an old polkit client library bug which would cause
a segfault in this situation. The bug was fixed long ago in upstream
polkit, but is still present in Debian 10 'buster', Ubuntu 19.04 'disco'
and all older releases, due to Debian/Ubuntu using a branch of polkit
to avoid the mozjs dependency. It should finally get fixed in Debian 11
and Ubuntu 19.10.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug-Debian: https://bugs.debian.org/923046

Closes: #2997
Approved by: matthiasclasen
2019-07-11 18:11:21 +00:00
Matthew Leeds
f1b8a4275f transaction: Fix "Can't load dependent file" error
Make the error message translatable, and add ": " between the URL and
the rest of the error.

Closes: #3003
Approved by: mwleeds
2019-07-05 15:41:56 +00:00
Matthew Leeds
9928ce757f libtest.sh: Delete unreachable exit command 2019-07-02 16:12:42 -07:00
Matthew Leeds
4fd7d7d209 main: Handle double slashes in $XDG_DATA_DIRS
When checking for Flatpak directories in $XDG_DATA_DIRS, treat
/example//path/ as equivalent to /example/path/.

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

Closes: #2990
Approved by: alexlarsson
2019-06-28 08:44:41 +00:00
Matthew Leeds
4a9ba3b346 .papr.yml: Add back -fsanitize=address
Let's see if the crash still happens which was keeping us from adding
this flag.

Closes: #2991
Approved by: alexlarsson
2019-06-28 08:42:51 +00:00
Matthew Leeds
d8e6bf425f .papr.yml: Update to Fedora 29
Fedora 28 is end-of-life, and ostree is already on F29.

Closes: #2991
Approved by: alexlarsson
2019-06-28 08:42:51 +00:00
Richard Hughes
7e62d01d9b Add 5 missing symbols to the generated GtkDoc output
Closes: #2982
Approved by: mwleeds
2019-06-25 20:44:16 +00:00
Kukuh Syafaat
6775c3eb0b Update Indonesian translation
Closes: #2971
Approved by: matthiasclasen
2019-06-24 19:25:51 +00:00
Rafael Fontenelle
407e6dcc2d Update Brazilian Portuguese translation
Closes: #2961
Approved by: matthiasclasen
2019-06-20 19:07:35 +00:00
Matthew Leeds
1ce250b5bd common/flatpak-dir-private.h: Fix order of arguments
This issue was introduced by commit 5da7a0411.

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

Closes: #2968
Approved by: matthiasclasen
2019-06-20 19:06:51 +00:00
Matthew Leeds
9d2b73d42b .gitignore: Ignore doc/reference/libflatpak-docs.html 2019-06-14 16:23:07 -07:00
Matthew Leeds
80ee0a79a6 README: Update docs links
Now that the libflatpak reference is on docs.flatpak.org, link to it.
And link to the Introduction section as well.
2019-06-14 16:17:53 -07:00
Antonio Larrosa
7898ffef96 Rename libflapak-docs.xml to fix a typo in its name
Note the missing 't'

Closes: #2963
Approved by: mwleeds
2019-06-14 23:02:10 +00:00
Kalev Lember
18a1622755 ref: Fix a memory leak
Closes: #2964
Approved by: mwleeds
2019-06-14 22:44:27 +00:00
Ryan Gonzalez
2b93928285 revokefs-fuse: Fix some build warnings
Closes: #2952
Approved by: alexlarsson
2019-06-13 07:16:33 +00:00
Richard Hughes
4f327649fd Do not break ABI and cause gnome-software to crash
This restores the ABI to the pre-1.4.0 version. This moves the new signal to
the *end* of the struct and also correctly decrements the padding.

Fixes https://github.com/flatpak/flatpak/issues/2957, although we probably need
a 1.4.1 release with this included pretty quickly to avoid chaos.

Closes: #2958
Approved by: alexlarsson
2019-06-13 06:59:41 +00:00
Alexander Larsson
1029f2b1d0 transaction: Add back support for file: uris in RuntimeRepo keys
This used to work, and the gnome-software test suite relies on it,
so add it back. I believe it regressed in
 https://github.com/flatpak/flatpak/pull/2740

This fixes https://github.com/flatpak/flatpak/issues/2955

Closes: #2956
Approved by: alexlarsson
2019-06-12 07:21:26 +00:00
Ryan Gonzalez
71fcf99b2e remote-delete: Manually delete origin remotes if no refs were removed
There are a few cases where -origin remotes don't get removed when
their refs are uninstalled, most notably when xa.noenumerate is set, or
somehow the uninstall gets interrupted at the wrong time. Regardless
of the reason, the remote could never be removed after this, unless a
new ref is installed from it and then removed, or noenumerate is set.

Closes: #2920

Closes: #2953
Approved by: alexlarsson
2019-06-12 07:07:30 +00:00
Simon McVittie
8deef94f9d icon-validator: Remove remnants of GSpawn error handling
Now that validate-icon uses execvpe(), status and error were never set,
so rerun_in_sandbox() would have crashed while dereferencing a NULL
error if execvpe() failed. This is reproducible with, for example:

    FLATPAK_BWRAP=/bin/nope flatpak-validate-icon --sandbox 48 48 /path/to/icon

execvpe() does not return on success (the process image is replaced),
and sets errno on failure, so behave accordingly.

Also print the error message to stderr, even if G_MESSAGES_DEBUG is not
set, since it's our only opportunity to indicate to a caller what has
gone wrong.

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

Closes: #2950
Approved by: alexlarsson
2019-06-12 06:51:53 +00:00
朝歌
0bb64e9a88 Update flatpak-run.c
Closes: #2936
Approved by: alexlarsson
2019-06-12 06:37:23 +00:00
Ryan Gonzalez
da62f665da doc: Document ExtensionOf.runtime
Closes: #2954
Approved by: alexlarsson
2019-06-12 06:23:07 +00:00
Ryan Gonzalez
9cd682b057 dir: Use ExtensionOf.runtime for apply_extra
Closes: #2954
Approved by: alexlarsson
2019-06-12 06:23:07 +00:00
Ryan Gonzalez
c87c480a18 transaction: Install an extension's required runtime
Closes: #2954
Approved by: alexlarsson
2019-06-12 06:23:07 +00:00
Ryan Gonzalez
7222a83678 build-init: Export an extension's runtime in the metadata
Without this, extensions cannot use extra-data, as there is no
indication of what runtime to run apply_extra in.

Closes: #2954
Approved by: alexlarsson
2019-06-12 06:23:07 +00:00
Ross Timson
a48f46f314 profile: Fix for openbsd ksh.
When using OpenBSD ksh `flatpak.sh` gives the following error:

	/etc/profile.d/flatpak.sh[16]: syntax error: `;;' unexpected

By adding in the POSIX compliant optional opening parentheses for the
case statement branches the profile can be made more portable.  This
still works with them more common shells such as bash and zsh and also
still passes `shellcheck` checks.

Aware that using OpenBSD ksh on Linux might be an edge case but there
are probably BSD users who need to use Linux for work such as myself but
still want to use the OBSD shell which has been ported to Linux:
https://github.com/dimkr/loksh

Many thanks to @gumnos for pointing out the fix here via Twitter.

Closes: #2947
Approved by: mwleeds
2019-06-11 19:20:25 +00:00
Simon McVittie
423cb7d053 testlibrary: Remove unused variables
Detected by compiling with clang.

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

Closes: #2951
Approved by: matthiasclasen
2019-06-10 15:59:33 +00:00
AsciiWolf
524f1c429b Update Czech translation
Closes: #2939
Approved by: mwleeds
2019-06-07 04:03:35 +00:00
Ryan Gonzalez
cd231503f2 app: Avoid a potential segfault when skipping columns
Closes: #2942
Approved by: mwleeds
2019-06-07 03:48:33 +00:00
Ryan Gonzalez
6cfd399c45 app: Fix a typo
Closes: #2942
Approved by: mwleeds
2019-06-07 03:48:33 +00:00
Matthew Leeds
2e4da3dad5 Merge pull request #2943 from wjt/fix-deploy_install-dir-log
dir: include NULL url in flatpak_dir_log() call
2019-06-06 20:48:28 -07:00
Will Thompson
dbc90df513 dir: include NULL url in flatpak_dir_log() call
I spotted this line in the output from `flatpak history`:

    Jun  4 16:17:20	deploy install	com.discordapp.Discord	x86_64	stable	system	flathub	8a0fc700c701		Installed %s from %s	root (test)	flatpak-system-helper (gnome-software)	1.3.3

This is because the format string is passed as the 'url' parameter, the
first format parameter (the ref) is passed as the 'format' parameter,
and 'origin' is ignored because (fortunately) as far as I know, no
character significant to printf (like '%') is permitted in ref names.

Fix this by passing a NULL 'url', like the neighbouring call in
flatpak_dir_deploy_update().
2019-06-05 10:58:14 +01:00
Piotr Drąg
2ee92dd188 Update Polish translation
Closes: #2927
Approved by: matthiasclasen
2019-05-31 11:38:58 +00:00
Matthew Leeds
d8853f424c doc: Improve docs for --arch options
It's not obvious what values are valid, so add a hint.

Closes: #2930
Approved by: matthiasclasen
2019-05-30 12:12:12 +00:00
Matthew Leeds
3af605dd39 app: Don't show arch column if it's not interesting
Flatpak already doesn't show the architecture column in the output of
"flatpak list" if every flatpak has the same architecture. This commit
does the same for the table printed for install/update/uninstall
operations, except if the user specifies an arch on the command line.

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

Closes: #2930
Approved by: matthiasclasen
2019-05-30 12:12:12 +00:00
Matthew Leeds
c29d9ebcf7 transaction: Minor docs improvements
Closes: #2930
Approved by: matthiasclasen
2019-05-30 12:12:12 +00:00
Alexander Larsson
57a6887352 Bump version to 1.5.0, 1.4.x is on flatpak-1.4.x branch 2019-05-28 15:47:12 +02:00
Alexander Larsson
170b0e2b8e Update pofiles 1.4.0 2019-05-28 15:07:09 +02:00
Alexander Larsson
3e8c42c823 Bump version to 1.4.0 2019-05-28 14:55:02 +02:00
Alexander Larsson
f8c13c8007 Update NEWS for 1.4.0 2019-05-28 14:54:44 +02:00
Valentin David
8d82a3e5f7 app/flatpak-builtins-build-commit-from.c: Recalculate download-size metadata
Download size of object depends on the compression used in the ostree
repository.  When a different source repository is specified, download
size might change.  So this metadata needs to be recalculated.

This issue happens with Freedesktop SDK which for build time
optimization reason run an intermediate build-export on a bare
repository.

See issue https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/787

Closes: #2925
Approved by: alexlarsson
2019-05-28 12:46:13 +00:00
Debarshi Ray
bf96de941b session-helper: Relax directory permission for Toolbox containers
Toolbox [1] containers, like Flatpak containers, need to keep some
configuration files synchronized with the host. eg., /etc/localtime,
/etc/resolv.conf, etc.. The easiest way to keep them updated is to bind
mount the entire /etc from the host at some location inside the
container, and then replace the container's copy of the files with
symbolic links to the bind mounted copies.

However, this doesn't work when the host's copy of a configuration file
is itself a symbolic link to a location outside /etc. eg.,
/etc/localtime, which points somewhere inside /usr/share/zoneinfo. In
that case the host needs to be actively monitored via inotify(7) and
an updated copy of the file needs to maintained in a separate
directory, which can be bind mounted into the container.

This monitoring infrastructure is already present in Flatpak and it
makes sense to leverage it for Toolbox containers too.

However, Flatpak containers have only one user, the current one logged
into the host, whereas Toolbox containers have a longer list of users
like the host itself. Therefore, if the directory getting bind mounted
(ie., $XDG_RUNTIME_DIR/.flatpak-helper/monitor) isn't world readable,
then some users inside the container won't be able to read the
configuration file. eg., this will fail:
  $ sudo -u operator cat /run/host/monitor/localtime

Relaxing the directory permissions on the host shouldn't pose a
security risk. They are copies of originals that are world readable
anyway.

[1] https://github.com/debarshiray/toolbox

Closes: #2916
Approved by: alexlarsson
2019-05-28 07:37:13 +00:00
Matthew Leeds
3164c68e31 common: Fix double free of GError
Closes: #2919
Approved by: alexlarsson
2019-05-27 10:58:33 +00:00
Kukuh Syafaat
b0ad7003bc Update Indonesian translation
Closes: #2915
Approved by: matthiasclasen
2019-05-23 11:20:20 +00:00
Matthew Leeds
c028e0dc1b installation: Use FLATPAK_ERROR_REF_NOT_FOUND in one more place
I missed this when adding FLATPAK_ERROR_REF_NOT_FOUND.

Closes: #2914
Approved by: matthiasclasen
2019-05-21 02:06:00 +00:00
Matthew Leeds
584edb67d5 README: Add LGTM badge for Python
Hopefully we can get the one for C working too.

Closes: #2894
Approved by: matthiasclasen
2019-05-16 23:56:24 +00:00
Matthew Leeds
f9a4b44c64 flatpak-bisect: Remove unused variable
This fixes a warning pointed out by lgtm.com. I checked that the following
still works:
$ PAGER=more flatpak-bisect -b stable org.gnome.Builder log

Closes: #2894
Approved by: matthiasclasen
2019-05-16 23:56:24 +00:00
Alexander Larsson
b53f937d7e Fix installable tests when running on a tty
This sets FLATPAK_FANCY_OUTPUT=0 in most tests and then special cases
the test_fancy_output() test in case the installable tests are running
on an actual tty. This was causing failures because the added bold escapes
caused some test cases to not generate the expected output.

Closes: #2907
Approved by: alexlarsson
2019-05-16 15:24:47 +00:00