Commit Graph

8043 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
a625aaa006 doc: Use post-release bumps in the checklist
As per suggestion in the Flatpak channel. This makes such
that the version built is always the version that will be
released.
2024-11-27 13:51:55 +01:00
Georges Basile Stavracas Neto
79b3372806 Post-release version bump to 1.15.12 2024-11-27 13:51:55 +01:00
Georges Basile Stavracas Neto
ae1c525311 Update translation files for 1.15.11 1.15.11 2024-11-26 16:09:08 +01:00
Georges Basile Stavracas Neto
9169a42ce1 NEWS, meson: Update for version 1.15.11 2024-11-26 16:09:08 +01:00
Georges Basile Stavracas Neto
51fec95f7d Update NEWS 2024-11-26 16:09:08 +01:00
Simon McVittie
b730771bd7 subprojects: Update bubblewrap to v0.11.0
<https://github.com/containers/bubblewrap/releases/tag/v0.11.0>

We don't use any of the new features yet, so the minimum required
version in the build system is still 0.10.0.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-31 10:03:52 -05:00
lumingzh
6bc8b6ade7 fix a translate string 2024-10-30 09:20:24 -03:00
lumingzh
61207666e8 update Chinese translation 2024-10-30 09:20:24 -03:00
Hubert Figuière
fd1b7e4440 po: Update POTFILES.in for usb
Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-10-25 10:36:50 -05:00
Maximiliano Sandoval
dc2ce2cb0b app: Check for component name when searching
We add the component name as part of the fallback search.

Before this patch, queries as

    flatpak search Element

or

    flatpak search d-spy

return no results even though the search term coincides with the
application name.
2024-10-17 18:20:07 -05:00
lumingzh
bb5c419290 update Chinese translation 2024-10-17 08:18:07 -03:00
Hubert Figuière
1beff8e577 flatpak-cli-transaction: show the USB portal permissions
Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-10-16 14:11:56 -03:00
Hubert Figuière
cced00fdb0 usb: Added tool examples to generate device lists
Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-10-16 14:11:56 -03:00
Hubert Figuière
1d56bd377e context: Implement device lists for usb
Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-10-16 14:11:56 -03:00
Hubert Figuière
19b447f49a flatpak: Add USB enumerables / hidden lists
Add '--usb' and '--nousb' to the FlatpakContext option group.

Map these parameters to either the enumarable list, or the hidden
list, of a new "USB Devices" group in the metadata key file. It looks
like this:

```
[USB Devices]
hidden-devices=cls:01:*;
enumerable-devices=vnd:0fd9+dev:0080;vnd:0fd9+dev:0080;
```

Flatpak itself does not use these values, they're meant to be used
by e.g. XDG Desktop Portal to filter which devices the app can see
through the USB portal.

Hidden devices must always take precedence over enumerable devices.

This is heavily inspired by https://github.com/flatpak/flatpak/pull/4083

Co-Authored-By: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
Co-Authored-By: Ryan Gonzalez <rymg19@gmail.com>
Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-10-16 14:11:56 -03:00
Sebastian Wick
7d6f3e8b6b run: Use the instance id in the cgroup name
The systemd Desktop Environments conventions for cgroup names is

  app[-<launcher>]-<ApplicationID>[@<RANDOM>].service

where RANDOM should ensure that multiple instances of the application
can be launched. Currently flatpak uses the PID of itself but the
instance fullfills this convention and is a bit more useful for matching
the cgroup to a flatpak instance.
2024-10-15 13:54:04 +01:00
Simon McVittie
3498ecf9ab app, common, tests: Avoid deprecated g_qsort_with_data()
For historical reasons g_qsort_with_data() "only" works with up to 2**31
items, so it won't necessarily work for pathologically large arrays
and therefore is deprecated.

One advantage of g_qsort_with_data() and its replacement g_sort_array()
is that GLib guarantees that they are a stable sort (will not permute
items that already compare equal), which is not a guarantee for glibc's
qsort() and qsort_r(). However, I don't think it's actually relevant
whether we are doing a stable sort in any of these places: most of the
time we are sorting an array of unique items (often the keys of a hash
table, which are necessarily unique), therefore the compare function
will not compare equal in any case.

Another advantage of the GLib functions is that they are portable,
unlike qsort_r(). However, Flatpak is Linux-only, so we can freely use
useful functions like qsort_r().

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-15 13:53:07 +01:00
Hubert Figuière
b520ec5961 Fix a memory leaks
When iterating more than one group, the variable got clobbered.
Narrowing their scope helps.
This was triggered installing an Inkscape test build

Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-10-07 09:33:43 -05:00
Cajus Pollmeier
9b4f5baa95 Fix spelling in comment
Co-authored-by: Simon McVittie <smcv@collabora.com>
2024-10-07 09:31:47 -05:00
Cajus Pollmeier
e398b1a5ec Use set_boolean instead of writing strings 2024-10-07 09:31:47 -05:00
Cajus Pollmeier
fb37012475 Add support for KDE search completion
KDE krunner supports DBus plugins that allow search completion
comparable to the already supported gnome-shell searchprovider.

Exporting the contents of the runner directory enables us to enable
search results from within flatpack applications.
2024-10-07 09:31:47 -05:00
Georges Basile Stavracas Neto
117c825fb8 portal: Fix 'sandboxed' → 'sandbox'
The original intention was to add 'sandbox-a11y-own-names', which would
match the prefix of other arguments, and it's what was documented in the
D-Bus XML and in flatpak-spawn too.

Fixes 8ec21a28f2
2024-10-03 07:58:25 -03:00
Georges Basile Stavracas Neto
3d04db0734 context: Consider a11y policies too
When merging, marking a context as sandboxed, etc, also propagate and
apply the a11y policies stored.

Fixes 915bbfb294
2024-10-03 07:58:25 -03:00
Georges Basile Stavracas Neto
0785f890af context: Remove duplicated hash table loop
It loops twice and adds the same values, which is unnecessary.
2024-10-03 07:58:25 -03:00
Sebastian Wick
1561e0f39c run: Unset $TZDIR environment variable
We now resolve the zoneinfo and always make it available at
/usr/share/zoneinfo in the sandbox so we unset TZDIR to get flatpak apps
looking at the right directory.
2024-09-23 22:52:08 -03:00
Sebastian Wick
aa03174e14 run: Sync the list of unset environment variables
More variables got added but the documentation was not updated.
2024-09-23 22:52:08 -03:00
Piotr Drąg
f5564f35b8 Update Polish translation 2024-09-20 17:35:59 +01:00
AsciiWolf
ec49509006 Update Czech translation 2024-09-20 17:34:49 +01:00
Pablo Correa Gómez
2368c6d056 dir: do not pass a GError to g_file_enumerate_children if ignoring it
We seem to have no interest in the specific error, as we are using it
locally just to "return". So there's no point in having the error in
the first place. In consequence, the error is only used in the loop
and can be declared locally to it.
2024-09-20 17:30:56 +01:00
Pablo Correa Gómez
0313df972a dir: search for repositories also under FLATPAK_BASEDIR
This is more compliant with FHS specification. Most notably, /etc
is not appropriate to hold distro configuration, which is a common
use for the remotes.d feature. It is better practice to put things
under /usr/share, and let the system administrator modify /etc to
their will, of course giving them priority.

Update documentation to reflect this change.

In the process, move to use g_build_filename
2024-09-20 17:30:56 +01:00
Pablo Correa Gómez
943690dba7 dir: split flatpakrepos dir scanning logic into a different function
This a preparatory commit for the follow-up changes, where we will be
looking at more directories.
2024-09-20 17:30:56 +01:00
Pablo Correa Gómez
076780c625 dir: remove unused variable passed to g_file_enumerator_iterate 2024-09-20 17:30:56 +01:00
Pablo Correa Gómez
9c0c9cb4fb dir: use a more clear distinction between some local variables
conf_dir vs. config_dir tell us nothing. conf_dir vs. conf_dir_str is
certainly more clear.
2024-09-20 17:30:56 +01:00
lumingzh
79abc960a6 update Chinese translation 2024-09-09 10:29:30 -03:00
Hubert Figuière
843a0eeec2 context: Fix a memory leak
Because flatpak_get_real_xdg_runtime_dir() return an allocated string
we have to return strduped.

Close flatpak/flatpak#5920

Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-09-07 18:11:31 -05:00
Kalev Lember
dce9ccb3d7 builtin-utils: Remove dead code branch and simplify
Commit f268f4a870 that changed
flatpak_resolve_matching_remotes() to automatically pick the remote if
it's the only matching one, missed an opportunity to clean up the rest
of the function.

Now that `remote_dir_pairs->len == 1` is handled as a first case, we can
drop the old, dead code that handled it differently, and simplify the
nested conditionals.
2024-09-05 16:54:49 -03:00
Hubert Figuière
bdc96ee152 flatpak-run: Mount /dev/bus/usb with --device=usb
This adds a new `usb` device in the list to grant access to the whole
USB bus. This is narrower than `all` and should be enough for
anything accessing the USB directly (i.e. using libusb or equivalent).

This doesn't grant access to synthesized devices, i.e those exposed
in `/dev` but using USB, including but not limited to USB serial, webcams,
hidraw, hid, sound.

Close #4405

Signed-off-by: Hubert Figuière <hub@figuiere.net>
2024-09-02 10:00:53 -03:00
Simon McVittie
e2e980efe2 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-30 12:19:50 +01:00
Georges Basile Stavracas Neto
0bbb2bf746 Allow org.a11y.atspi.Socket.Embedded() calls to subsandboxes
This is required for AT-SPI plugs and sockets to be able to connect.
2024-08-29 14:11:50 -03:00
Georges Basile Stavracas Neto
8ec21a28f2 portal: Add 'sandboxed-a11y-own-names' option
In context of the previous commit, this allows Flatpak apps to spawn
subsandboxes with `--a11y-own-name=DBUS_NAME`, where `DBUS_NAME` must
have the app id as prefix.

For example, `org.webkitgtk.MiniBrowser` would be able to spawn a Web
process using the Flatpak portal, and by passing
`org.webkitgtk.MiniBrowser.Sandboxed.WebProcess0`, this Web process
would be able to own this name in the a11y bus. This allows the Web
process and the main WebKit process to connect their a11y trees across
sandboxes.
2024-08-29 14:11:50 -03:00
Georges Basile Stavracas Neto
915bbfb294 context: Add --a11y-own-name
This option allows the application (or subsandbox) to own the specified
name on the a11y bus. This will be useful for WebKit, that has a strict
security need that the Web processes cannot talk or see each other.

An alternative approach would be to make xdg-dbus-proxy permissions
modifiable at runtime, but that seems a lot riskier than this. Owning
a well known name based on the app id has proven to be a robust and
secure approach after all.
2024-08-29 14:11:50 -03:00
Georges Basile Stavracas Neto
29bddbde3e context: Add a new FlatpakBus enum
This helps keep this particular function sane, and will allow adding
an a11y bus variant in the future.
2024-08-29 14:11:50 -03:00
Simon McVittie
7ee98dc97a Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-28 13:42:02 +01:00
Georges Basile Stavracas Neto
31b8557365 Merge pull request #5918 from smcv/libglnx-20240420
Update subtree: libglnx 2024-08-23
2024-08-27 10:53:08 -03:00
Simon McVittie
db5f037020 Update subtree: libglnx 2024-08-23
* Fix function detection when using -Werror=return-type
  (Resolves: flatpak/flatpak#5778)
* Add a fallback definition for G_PID_FORMAT
* Avoid warnings for g_steal_fd() when targeting older GLib
* Include <glib-unix.h> from glnx-backports.h

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-23 14:55:26 +01:00
Simon McVittie
87f2768fab Merge branch 'wip/smcv/glib-unix' into 'master'
glnx-backports: Include `<glib-unix.h>`

See merge request GNOME/libglnx!59
2024-08-23 13:53:06 +00:00
Simon McVittie
690295950c Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-23 14:04:26 +01:00
Simon McVittie
31291dc9a6 run: Use CVE identifiers to reference former vulnerabilities
These are more globally-recognised than GHSA IDs.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-23 13:58:30 +01:00
Simon McVittie
368cf26f8d subprojects: Update dbus-proxy.wrap to v0.1.6
We still only require a system xdg-dbus-proxy to be v0.1.0 or later,
although a newer release is recommended.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-23 09:44:46 -03:00
Simon McVittie
7dcb96b56e Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-23 13:15:35 +01:00