Commit Graph
7413 Commits
Author SHA1 Message Date
Simon McVittie ba367cb659 tests: Add macros to assert that a copied string has a desired value
Suggested by Patrick during review of #5691.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-25 17:23:25 +01:00
Simon McVittie 0de4f693d0 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-24 18:19:29 +01:00
Daniel Stone 18b85083b9 run: Unset more Vulkan layer/driver paths
Following on from b8d8d80c61, add more environment variables used by
the Vulkan loader which expect paths to be provided.

These paths are typically referencing the host filesystem; if the user
is referencing paths only available in the sandbox, they can use --env
or overrides for them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-04-24 18:13:17 +01:00
Daniel Stone 0f2661045d run: Unset EGL driver paths
Similar to how b8d8d80c61 inhibited passthrough of environment
variables pointing the Vulkan loader towards a specific ICD, do the same
for the EGL paths used by libglvnd to discover the GL driver to use, as
well as for NVIDIA's EGLStream shim.

These paths are typically referencing the host filesystem; if the user
is referencing paths only available in the sandbox, they can use --env
or overrides for them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-04-24 18:13:17 +01:00
Patrick Griffis abcc001da8 run: Don't inherit LD_PRELOAD/LD_AUDIT from the host
I don't think this env var makes much sense to pass into the sandbox
for similar reasons to LD_LIBRARY_PATH. Libraries from the host
just aren't relevant.

Users can still pass `--env=LD_PRELOAD=/foo` to use this functionality.
2024-04-24 10:03:59 -05:00
Simon McVittie d828116a12 workflows: Disable Microsoft-specific apt repository
We don't need anything from here, and its secure-apt signing is
currently broken.

Workaround-for: https://github.com/orgs/community/discussions/120966
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-24 13:03:05 +01:00
Simon McVittie 510da9e3b5 NEWS: Retroactively add 1.15.8 release date
The release was prepared under embargo and it wasn't immediately obvious
which day it was going to be released, so I left out the release date
at the time.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-19 11:05:35 +01:00
Simon McVittie 0982a4a93f tests: Fix a misleading comment
Arguably bwrap should exit with status 127 if it can't find the
executable, but right now it exits 1, so we accept any nonzero status.
The implementation was correct, but the comment was wrong.

Fixes: 84984e49 "test-run: Add a reproducer for CVE-2024-32462"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-18 20:06:35 -03:00
Simon McVittie 925c80f913 Update translation files for 1.15.8 release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.15.8
2024-04-17 19:08:17 +01:00
Simon McVittie 6273c375d2 Prepare v1.15.8
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:25:38 +01:00
Simon McVittie 4e54394cd2 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:11:24 +01:00
Simon McVittie 84984e4948 test-run: Add a reproducer for CVE-2024-32462
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:11:22 +01:00
Simon McVittie c777f818b9 validate-icon: For completeness, always add "--" to bwrap arguments
This particular bwrap invocation cannot cause a sandbox escape because
the command to run is hard-coded, but it's more clearly correct if we
pass "--" to every bwrap invocation.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:10:46 +01:00
Simon McVittie c95214b62b flatpak-dir: For completeness, always add "--" to bwrap arguments
This particular bwrap invocation cannot cause a sandbox escape because
the command to run is hard-coded, but it's more clearly correct if we
pass "--" to every bwrap invocation.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:10:43 +01:00
Alexander Larsson bbab7ed1e6 When starting non-static command using bwrap use "--"
This ensures that the command is not taken to be a bwrap option.

Resolves: CVE-2024-32462
Resolves: GHSA-phv6-cpc2-2fgj
Signed-off-by: Alexander Larsson <alexl@redhat.com>
[smcv: Fix DISABLE_SANDBOXED_TRIGGERS code path]
[smcv: Make flatpak_run_maybe_start_dbus_proxy() more obviously correct]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:10:31 +01:00
Simon McVittie f16e064fd9 tests: Make sure FUSERMOUNT gets set for "as-installed" tests
Otherwise, tests for OCI and the update portal fail with:

    /usr/libexec/installed-tests/Flatpak/libtest.sh: line 611: FUSERMOUNT: unbound variable

Fixes: 2cb17b4e "Do not hard-code fusermount, add option or auto-detect instead"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-08 15:55:20 +01:00
Virtuti Militari 1f770f3d92 Fix export dynamic linker option
As of LLVM/Clang 18 and LLD18 linker with the -export-dynamic option compilation ends with an error:
cc: error: unknown argument: '-export-dynamic'

For GCC and the default compiler this is not a problem. The problem occurs in Clang/LLD 18.

Fix tested on Mandriva via https://github.com/OpenMandrivaAssociation/flatpak/commit/39f1c03e915ea20bb58ef9e8838823488f6a1e08
2024-04-08 14:44:08 +01:00
Sabri Ünal 9c059ebdd2 Update Turkish translation
Use Kapı translation for Portal strings.
2024-04-04 15:06:31 -03:00
Rafael Fontenelle f94370e10c Update Brazilian Portuguese translation 2024-04-04 14:57:52 -03:00
Sebastian Wick 0450c16fdb cli-transaction: Do not double free transaction ops
The transaction ops are a g_autolist(FlatpakTransactionOperation) which
means the list gets freed automatically. Calling g_list_free_full
without clearing the variable to NULL results in a double-free.

Closes: https://github.com/flatpak/flatpak/issues/5763
Fixes: 6e3cc82a ("Fix memory leaks")
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-04-04 14:49:34 -03:00
Simon McVittie f1088e3013 Regenerate translation files for 1.15.7 release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.15.7
2024-03-27 14:40:30 +00:00
Simon McVittie ddb651d1e4 Prepare v1.15.7
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 14:40:04 +00:00
Simon McVittie 762c50bb5e Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 14:38:58 +00:00
Chris Williams ff820e3106 app: Simplify table printing
These commands no longer need to use flatpak_table_printer_print_full().
2024-03-27 14:26:28 +00:00
Chris Williams 2aebcb117a table-printer: Ellipsize by terminal width by default
This fixes the display of ellipsized columns in `flatpak remotes -d`
with wide terminals.
2024-03-27 14:26:28 +00:00
Chris Williams be862f4989 tests: Add a test for a leftover eol-rebase symlink
This tests the fix in the previous commit.
2024-03-27 14:24:59 +00:00
Chris Williams d900529a24 run: Ignore leftover eol-rebase data dir symlink
If the current app data dir is removed, flatpak would try to migrate the
symlink that it had previously created, creating a symlink loop.

Fixes: #5668
2024-03-27 14:24:59 +00:00
Chris Williams 55283a062b locale-utils: Always get system locale languages from localed
This restores support for 'mixed' system locales where different locale
categories are configured with different languages. AccountsService
currently only includes the LC_MESSAGES language from the system locale.

Helps #5497
2024-03-27 14:22:45 +00:00
Shun Wang fd33a5a4db i18n: update Chinese simplified translation 2024-03-27 14:21:20 +00:00
Simon McVittie 44037d552e NEWS: Fix version number
We don't assign any special significance to the micro version being
odd or even.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 14:17:24 +00:00
Simon McVittie cabafd2e85 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 14:16:00 +00:00
Simon McVittie 3477f6ccff Update submodule: xdg-dbus-proxy 0.1.5
* Fix handling of long object paths

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 14:14:32 +00:00
Simon McVittie 2a135ac4b3 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 13:55:08 +00:00
Simon McVittie a1bb18561f Update submodule: bubblewrap 0.9.0
* `--symlink` is now idempotent, meaning it succeeds if the
  symlink already exists and already has the desired target
  (containers/bubblewrap#549, flatpak/flatpak#2387,
  flatpak/flatpak#3477, flatpak/flatpak#5255)
* Report a better error message if `mount(2)` fails with `ENOSPC`
  (containers/bubblewrap#615, ValveSoftware/steam-runtime#637)
* Fix a double-close on error reading from `--args`, `--seccomp` or
  `--add-seccomp-fd` argument (containers/bubblewrap#558)
* Improve memory allocation behaviour
  (containers/bubblewrap#556, containers/bubblewrap#624)
* Silence various compiler warnings (containers/bubblewrap#559)

Resolves: flatpak/flatpak#2387
Resolves: flatpak/flatpak#3477
Resolves: flatpak/flatpak#5255
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 12:43:40 +00:00
Simon McVittie 3bff0b2b76 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-27 12:08:33 +00:00
Simon McVittie f9cbfe1fd6 flatpak-prune: Make sure to calculate hash in the unsigned domain
Otherwise, an out-of-bounds left shift can occur, as diagnosed by
UBSan here:

    ../../../../src/flatpak/common/flatpak-prune.c:387:14: runtime error: left shift of 253 by 24 places cannot be represented in type 'int'

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-21 20:20:29 +00:00
Simon McVittie 2fc71b1f80 Fix missing declaration for g_fdwalk_set_cloexec() with GLib 2.80.x
With older GLib, it's provided by libglnx, but with newer GLib, we need
to include the correct header.

Fixes: 7b1cd206 "Replace flatpak_close_fds_workaround() with g_fdwalk_set_cloexec()"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-21 20:20:15 +00:00
Sebastian Wick 9532c8d333 dir: Reload DBus daemon config to ensure services get picked up
This is best effort. There is a 2s timeout and if something fails
everything continues on.

This is called from flatpak_dir_run_triggers because it gets called
whenever we might have changes to the exported service files.

Fixes #3342

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-20 20:08:58 +00:00
Hubert Figuière 56438bf542 doc: Fix multiple validation errors in docbook.
Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-03-20 19:43:49 +00:00
Chris Williams cf76cb61ba ps: Add gnome to background portal backend list
This is used for the active and background columns.
2024-03-20 19:42:33 +00:00
Simon McVittie ef2c66b900 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-20 18:56:19 +00:00
Chris Williams 955d0c091a profile: Unset temporary variable
Fixes: #5574
2024-03-15 13:32:48 -05:00
Simon McVittie 26f740f67b Update NEWS with changes to date
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-15 18:23:54 +00:00
Chris Williams 886462b811 tests: Check appdata name parsing via flatpak info
Add a basic test for the extraction of appdata name and summary values
that are displayed in the flatpak UI. Also use the new developer name
syntax in the test app. This tests the fix made in previous commit.
2024-03-12 08:31:08 -05:00
Chris Williams 73d4a3b062 appdata: exclude <name> element inside <developer>
<developer_name> has been deprecated in favor of <developer> with a
<name> child. We need to ensure that this developer name isn't parsed
as the application name.

Fixes: #5700
2024-03-12 08:31:08 -05:00
Pablo Correa Gómez 2cb17b4eb8 Do not hard-code fusermount, add option or auto-detect instead
The hard-coding is not appropriate. According to libfuse 3.0.0 release
notes: "The fusermount and mount.fuse binaries have been renamed to
fusermount3 and mount.fuse3 to allow co-installation of libfuse 2.x
and 3.x". Some distributions seem to install a symlink, but this is
not upstream's default behavior.

In addition, fusermount might be provided from non-distro sources. So
a build-time option takes precedence over auto-detection logic.

Fixes #5104

Fixes #5694
2024-02-19 12:05:05 +00:00
Simon McVittie 8e63eda867 Remove Autotools build system
As discussed in #5695, I think we're reaching a point where removing
Autotools is preferable to fixing it.

1.14.x continues to use Autotools, so platforms whose Meson version is
too old can stay on that branch until it becomes unsupported. We have
a very conservative Meson dependency (Ubuntu 20.04).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 19:30:32 +00:00
Simon McVittie a9ad688d03 workflows: Exclusively build using Meson
Enabler for removing the Autotools build system.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 19:30:32 +00:00
Simon McVittie fe09a3437b workflows: Tidy up coding style of pre-existing Meson invocations
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 19:30:32 +00:00
Simon McVittie 5114df1fcb workflows: Remove confusing relic from Ubuntu 18.04
Before commits 97768cea and cb655ab3, we were upgrading GLib to a
post-Ubuntu-18.04 version before running tests, to work around a GLib
bug. We no longer need to do that now that we're running everything on
Ubuntu 20.04 or later.

Fixes: cb655ab3 "check.yml: remove glib260 ppa"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 19:30:32 +00:00