Commit Graph

7140 Commits

Author SHA1 Message Date
Simon McVittie
4e7bb4bfef Revert ".gitmodules: Temporarily fetch from Github mirror of libglnx"
This reverts commit 7cb9eb3ebc.
2022-11-18 12:42:33 +00:00
Simon McVittie
e8728f7f91 Revert ".gitmodules: Temporarily fetch from my Github fork of v-s-c"
This reverts commit bdfebb44da.
2022-11-18 12:42:27 +00:00
Simon McVittie
47ea3934c0 Update translation files for release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.15.1
2022-11-17 18:34:12 +00:00
Simon McVittie
7db1db0673 Prepare v1.15.1
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 18:25:15 +00:00
Simon McVittie
bdfebb44da .gitmodules: Temporarily fetch from my Github fork of v-s-c
gitlab.gnome.org is currently down, so use a mirror.
The specific commit we are using has not changed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 18:24:57 +00:00
Simon McVittie
7cb9eb3ebc .gitmodules: Temporarily fetch from Github mirror of libglnx
gitlab.gnome.org is currently down, so use a mirror.
The specific commit we are using has not changed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 18:24:41 +00:00
Simon McVittie
f9a7d12014 .gitmodules: Canonicalize URL of bubblewrap
The project was moved to a new namespace a while ago, and is now using
the main branch rather than master.

The specific commit we are using has not changed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 18:24:23 +00:00
Simon McVittie
cad1bf63c6 Update NEWS for #5168
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 18:02:31 +00:00
Simon McVittie
db77992b28 doc: Update flatpak-metadata(5) for #5155
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 17:57:43 +00:00
Simon McVittie
6096159e2b NEWS: Update
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 17:51:35 +00:00
Simon McVittie
26fbf692cd doc: Update flatpak-run(1) for #5168
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-17 17:44:18 +00:00
Philip Withnall
9ec783f029 flatpak-dir: Clean up old leaked deploy dirs at start of deploy
Following on from commit 85a83a06f9, add some code to clean up old
leaked deploy tmpdirs when we next try to deploy the same app
(successfully or not).

This should free up disk space leaked by failed deploys pre-85a83a06f95.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-16 18:46:01 +00:00
Philip Withnall
6c7eb34dd6 flatpak-dir: Add a debug message to remove_old_appstream_tmpdirs()
This should make it a bit clearer when `rm -rf` is being used in the
debug logs.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-16 18:46:01 +00:00
Simon McVittie
d28495d54f build: Simplify detection of GPGME when using Meson
In theory we could have ended up linking a non-threadsafe version of
GPGME, since the version without the -pthread suffix has only been
thread-safe since 1.8.0.

In practice we require version 0.53 of Meson (available in Ubuntu 20.04,
Debian 11, etc.) so it seems reasonable to require a contemporary
version of GPGME (1.8.0 is available in Ubuntu 18.04, Debian 10, etc.)
and drop the complexity of handling this in a fully-backwards-compatible
way. Users of older LTS distributions like Ubuntu 16.04 should continue
to build Flatpak with Autotools.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-10 15:23:58 +00:00
Simon McVittie
9b87e4c0d4 build: Accept gpgme >= 1.8.0 as equivalent to gpgme-pthread
Before 1.8.0 (2016), gpgme used to have two different thread-safe builds,
one for use with POSIX-style pthread and one for use with GNU Portable
Threads (libpth), plus a non-thread-safe version. Since 1.8.0, this
complexity has gone away and there is only libgpgme, which is thread-safe.

In practice this meant that on modern distros since 2016, we would always
fail to detect gpgme via pkg-config and fall back to calling gpgme-config.

Library-specific -config scripts are generally considered problematic
for multiarch, multilib and cross-compiling, and the gpgme-config script
recently disappeared from GPGME's Debian packaging
(see https://bugs.debian.org/1022348 and https://bugs.debian.org/1023601),
so it's better if we can prefer to use pkg-config.

If gpgme >= 1.8.0 is not found, fall back to gpgme-pthread >= 1.1.8,
either discovered via pkg-config or via gpgme-config.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-10 15:23:58 +00:00
Simon McVittie
751d2b110b workflows: Enable CI for flatpak-1.14.x branch
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-10 13:13:22 +00:00
Erick555
d8695f3071 Clear more temporary file paths from env
This supplements clearing TMPDIR env variable which is only one among variables used for storing temporary files. Any of those leaking from host may confuse flatpak apps which try to save temporary files under non-existing directory in sandbox.

See https://github.com/flathub/com.logseq.Logseq/issues/29 for real world example.
2022-11-10 12:34:01 +00:00
Jan Alexander Steffens (heftig)
d83b262ded app/meson.build: Add missing dep
Since we include the base private headers, we need the common base
sources to be generated.
2022-11-03 15:27:58 -05:00
Philip Withnall
ce1829a703 flatpak-dir: Use FD-relative operations in a few more places
These are the easy places to use the new `deploy_base_dfd` from to make
some more operations relative to an already-open dirfd in
`flatpak_dir_deploy()`.

This should introduce no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-01 14:29:28 +00:00
Philip Withnall
85a83a06f9 flatpak-dir: Clean up temp deploy dir on failure of flatpak_dir_deploy()
This already happens for installs due to the cleanup path in
`flatpak_dir_deploy_install()`, but it doesn’t happen for other calls to
`flatpak_dir_deploy()`. Notably, during updates of already installed
apps.

Specifically, this means that if an app update is cancelled due to being
blocked by a parental controls policy, the temp deploy dir for that app
(such as
`~/.local/share/flatpak/app/com.corp.App/x86_64/stable/.somehex-XXXXXX`)
will be leaked. It will never be automatically cleaned up, as it’s not
in `/var/tmp` either.

Fix that by using `glnx_mkdtempat()` to create a scoped temporary
directory.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-01 14:29:28 +00:00
Gaël Donval
397c97de9f Add /efi in the hidding list when (fs=host)
When filesystem=host access is provided, some root folders are hidden, including /boot.

The bootloader specification now recommends mounting the system EFI filesystem in /efi
(currently visible) instead of /boot/efi (currently hidden). This hides /efi for the same 
reasons /boot is already hidden.
2022-11-01 10:06:05 +00:00
Simon McVittie
61566a9337 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-28 10:26:45 +01:00
Simon McVittie
de4de4dc44 automake: Consistently include $(AM_CFLAGS) in target-specific CFLAGS
When built for i386 with Autotools, this would have detected the format
string issue fixed in #5148.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-27 09:59:43 +01:00
Simon McVittie
190bad06d2 revokefs: Remove incorrect libglnx include directory
revokefs already gets the correct include directory from the AM_CPPFLAGS.
This would also break the build with -Werror=missing-include-dirs.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-27 09:59:43 +01:00
Simon McVittie
959910f933 revokefs: Use correct format string for a ssize_t
This fixes the build on ILP32 architectures such as i386 with the Meson
build system. The Autotools build system accidentally didn't build
revokefs with -Werror=format, because it sets the target-specific CFLAGS
for revokefs but does not include the $(AM_CFLAGS) in them.

Fixes: aeecbb7d "revokefs: Split out the writing part from the fuse implementation"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-25 10:32:50 +02:00
Simon McVittie
e084a4f14b Update translation files for release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.15.0
2022-10-24 19:27:23 +01:00
Simon McVittie
b30f5b96ac Release v1.15.0
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 19:27:23 +01:00
Simon McVittie
9409d3d28d Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 18:12:28 +01:00
Simon McVittie
bb7240c2ef Update release checklist for merge of Meson build system
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:19:53 +01:00
Simon McVittie
861d2b41e6 build: Require Meson 0.53.0
This lets us drop some fallback code paths.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
12140e9a8a meson: Depend on Meson 0.51.0
This lets us drop the complicated fallback logic for libgpgme.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
435be4da14 meson: Depend on Meson 0.50.0
This sacrifices compatibility with Debian 10 to let us simplify how
tests are set up.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
d98b745d43 workflows: Use Meson for the main build
This is somewhat faster than Autotools. We still use Autotools for
the alt, clang and valgrind builds, to make sure we cover both.

As a bonus, the use of undefined behaviour and address sanitizers here
actually works (unlike in Autotools, see #4844) so we're getting test
coverage with detection of common issues like use-after-free.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
f85097a427 Run a Meson build during distcheck
This verifies that all the necessary files for the Meson build are in
the Autotools-built tarball.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
9eb824f863 Add a Meson build system
Resolves: https://github.com/flatpak/flatpak/issues/2241
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Simon McVittie
ad1dc62f26 testlib: Remove local backport of g_assert_no_errno()
libglnx now provides this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:10:49 +01:00
Simon McVittie
b0580b79b7 Update libglnx to commit e701578c
In particular, this version has more gtestutils backports, including a
version of g_test_message() that preserves correct TAP syntax for
multi-line messages.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:10:49 +01:00
Jan Tojnar
a0505f52d9 profile.d: Do not destroy XDG_DATA_DIRS in fish
The profile script previously nuked `XDG_DATA_DIRS` and then
“helpfully” re-populated it with FHS paths. This was especially
bad for systems like NixOS, which do not have `/usr`
and rely on `XDG_DATA_DIRS` heavily.

Quoting from https://fishshell.com/docs/current/cmds/set.html

> If a variable is set to zero elements, it will become a list with zero elements.

And indeed, that is what the `set -x --path XDG_DATA_DIRS` command does.
We need to list the value explicitly, if we want to preserve it
while setting variable options.
2022-10-14 12:24:21 +01:00
Rafael Fontenelle
e5bb9af250 Update Brazilian Portuguese translation 2022-10-14 12:22:01 +01:00
Piotr Drąg
9d44a27d79 Update Polish translation 2022-10-14 12:21:18 +01:00
Kukuh Syafaat
b26e9efb1d Update Indonesian translation 2022-10-14 12:20:39 +01:00
AsciiWolf
ea57deb891 Update Czech translation 2022-10-14 12:19:41 +01:00
Alberto Garcia
c1f0370958 session-helper: Run default signal handler after handle_sigterm()
Exiting the process with a custom exit status (1) after systemctl stop
(SIGTERM) makes systemd treat the flatpak-session-helper service as if
it had failed.

Signed-off-by: Alberto Garcia <berto@igalia.com>
2022-10-06 13:48:31 +01:00
Jakub Steiner
a88d971792 README: update logo
See https://github.com/flatpak/flatpak.github.io/issues/537
2022-09-26 14:35:40 +01:00
Michael Catanzaro
1c32317841 Block KRB5CCNAME from inheriting into sandbox
If this environment variable is set on the host, it's going to mess up
authentication in the sandbox. For example, if the host has:

KRB5CCNAME=KCM:

then the sandboxed process will try to use the host KCM socket, which is
not available in the sandboxed environment, rather than the gssproxy
socket that we want it to use. We need to unset it to ensure that
whatever configuration we ship in the runtime gets used instead. We have
switched the GNOME runtime to use an empty krb5.conf and it works as
long as we don't break it with this environment variable meant for the
host.
2022-09-19 09:03:48 +02:00
Michael Catanzaro
0184e542c5 Bind gssproxy socket into sandbox environment
We're using a directory rather than binding a socket directly for
increased robustness. In theory, if gssproxy crashes on the host, a new
socket that a new gssproxy process creates should be immediately visible
inside the sandbox. Nifty.

Previously, applications that wanted to use Kerberos authentication
would have to punch a sandbox hole for the host's KCM socket. In
contrast, this gssproxy socket is designed for use by sandboxed apps.

See also: https://github.com/gssapi/gssproxy/issues/45
2022-09-19 09:03:48 +02:00
Simon McVittie
3a93ef4842 enum-types: Make generated files more reproducible
`@filename@` expands to the relative or absolute path to the source
file, which varies between build systems and build directories.
`@basename@` expands to the basename of the file, which stays constant
across more build configurations.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-07 09:21:58 +02:00
Simon McVittie
8a52187145 workflows: Compile with Ubuntu 18.04's GLib, but use 2.60 to run tests
This avoids a race condition in versions older than 2.60, while still
verifying that we can compile successfully with GLib 2.56.

Not having GLib 2.60 means we can't compile libmalcontent on Ubuntu 18.04,
so move the libmalcontent dependency to the main build job (on Ubuntu
22.04, which is new enough). This also means we don't have to compile
it from source every time.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-07 09:21:19 +02:00
Simon McVittie
3591ba08f6 uri: Don't rely on g_time_zone_new_offset()
g_time_zone_new_offset() was new in GLib 2.58, but Ubuntu 18.04 'bionic'
only has GLib 2.56, and in theory we still claim to support versions
all the way back to GLib 2.46. If that function isn't available,
reimplement it in terms of the deprecated g_time_zone_new().

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-07 09:21:19 +02:00
Simon McVittie
3b37d69226 build: Bump version to 1.14.99 for 1.15.0 development
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-06 14:32:31 +01:00