Commit Graph

32286 Commits

Author SHA1 Message Date
Philip Withnall
1e323b12b5 ci: Disable libffi subproject test suite on macos-arm64 CI runner
Currently two of the tests from libffi 3.5.2 fail on macos-arm64, and
this is not something I have any chance of debugging:
```
 481/1066 libffi:closures / closure_loc_fn0 -O0                           FAIL              0.54s   killed by signal 6 SIGABRT
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
Check failed:
memcmp(pcl, FFI_CL(codeloc), sizeof(*pcl)) == 0
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 485/1066 libffi:closures / cls_1_1byte -O0                               RUNNING
>>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_CHECK_=2 G_DEBUG=gc-friendly G_ENABLE_DIAGNOSTIC=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=147 LINT_WARNINGS_ARE_ERRORS=1 /Users/Shared/work/bgilbert/glib/_build/subprojects/libffi-3.5.2/testsuite/cls_1_1byte_O0

 482/1066 libffi:closures / closure_loc_fn0 -O2                           FAIL              0.55s   killed by signal 6 SIGABRT
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
Check failed:
memcmp(pcl, FFI_CL(codeloc), sizeof(*pcl)) == 0
```

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-21 19:58:33 +01:00
Philip Withnall
49baef41a7 build: Disable --werror for libffi subproject
Version 3.5.2 emits some deprecation warnings on macOS, and those are
out of our control to fix, and also not relevant to the GLib build.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-21 19:28:13 +01:00
Philip Withnall
9bcce3ae49 ci: Update CI images to use latest subproject versions
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-21 19:09:55 +01:00
Benjamin Gilbert
c462700752 subprojects: Switch libffi from gstreamer's pre-3.3 fork to WrapDB's 3.5.2
WrapDB now maintains a Meson port of current libffi.  Stop shipping a
fallback that diverged from libffi upstream in 2018.
2025-10-21 18:51:39 +01:00
Benjamin Gilbert
60492abfe7 subprojects: Update proxy-libintl to 0.5
This is the same commit we were already pinning to, but now that there's
a release, we can switch to the WrapDB wrap so `meson wrap update` will
pick up future releases.
2025-10-21 18:51:39 +01:00
Benjamin Gilbert
e31cbb09b3 subprojects: Update pcre2 to 10.46 2025-10-21 18:51:39 +01:00
Philip Withnall
f4980cfdf0 Merge branch 'macos-ntime' into 'main'
glocalfileinfo: implement _g_stat_{a,c,m}_nsec for macOS

Closes #3070 and #2608

See merge request GNOME/glib!4869
2025-10-21 17:08:24 +00:00
Philip Withnall
c703f8a561 Merge branch 'macos-ci-apfs-tmpdir' into 'main'
ci: use APFS for macOS TMPDIR

See merge request GNOME/glib!4874
2025-10-21 14:15:55 +00:00
André Barnabá Silva
9222f71753 glocalfileinfo: implement _g_stat_{a,c,m}_nsec for macOS
add implementations for these functions using st_{a,c,m}timespec when
__APPLE__ is defined. Also re-enable the g-file-info test for darwin.

Fixes #3070, #2608
2025-10-20 23:37:42 -03:00
André Barnabá Silva
07736dc3d2 ci: use APFS for macOS TMPDIR 2025-10-20 22:38:12 -03:00
Philip Withnall
e6c5288196 Merge branch 'dbus-interface-get-info-nullable' into 'main'
Mark return value of g_dbus_interface_get_info() as `nullable`

See merge request GNOME/glib!4856
2025-10-20 21:48:41 +00:00
Sebastian Dröge
bdd51aa8ca Mark return value of g_dbus_interface_get_info() as nullable
`GDBusProxy` implements this interface but allows construction with a
`NULL` interface info and also marks its getter/setter for the interface
info accordingly.

Callers of `g_dbus_interface_get_info()` need to assume that it can
return `NULL` unless they constructed the `GDBusInterface` in a way that
guarantees that the interface info is available.
2025-10-20 20:47:38 +00:00
Philip Withnall
e7a6f4664d Merge branch '3803-netlink-notify-connectivity' into 'main'
gnetworkmonitorbase: Add missing notify::connectivity signal

Closes #3803

See merge request GNOME/glib!4871
2025-10-20 20:42:17 +00:00
Philip Withnall
4b085a6853 Merge branch 'macos_ci' into 'main'
Fix macOS CI by providing working temp directory

Closes Infrastructure/Infrastructure#2091

See merge request GNOME/glib!4868
2025-10-20 15:32:57 +00:00
Philip Withnall
bbc508b78f gnetworkmonitorbase: Add missing notify::connectivity signal
The connectivity is directly derived from the `is_available` variable,
so if that changes, we need to notify of a change in `connectivity` too.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3803
2025-10-20 16:15:45 +01:00
Marco Trevisan
0c89c8532f Merge branch 'reenable-msys2-ci' into 'main'
Reenable MSYS2 CI

See merge request GNOME/glib!4870
2025-10-20 15:31:27 +02:00
Luca Bacci
93c8884761 CI/MSYS2: Set GitLab submodule strategy to recursive
Workaround for #3715
2025-10-20 10:51:32 +02:00
Luca Bacci
aa9a861225 Revert "ci: Temporarily disable msys2-mingw32 CI"
This reverts commit 558a34d619.
2025-10-20 10:50:33 +02:00
René de Hesselle
54eb8a81fb ci: Setup ramdisk for temp dir redirection
This step is no longer "hidden away in the infrastructure" but now in
the open.

Background: some GLib tests can fail with timeouts because of some
assumptions regarding the temporary directory that don't work out on
macOS. Until this is properly investigated and resolved, the
workaround is to redirect it to a ramdisk.

Also add ORKA_RUNNER variable as the macOS CI infrastructure evolves.
Future changes to the image can be controlled this way.

Fixes https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/2091
2025-10-17 19:21:06 +02:00
Philip Withnall
855326b5bf Merge branch 'win32-app-info-cleanup' into 'main'
GIO/Win32: Remove custom definitions of system interfaces

See merge request GNOME/glib!4753
2025-10-17 12:25:56 +00:00
Philip Withnall
74f0c6d7cd Merge branch 'add-back-type-refs' into 'main'
gtype: Define copy and free functions for GTypeClass and GTypeInterface

See merge request GNOME/glib!4792
2025-10-17 10:08:09 +00:00
Luca Bacci
5a3231dbda GIO/Win32: Remove custom definitions of system interfaces 2025-10-17 10:46:01 +02:00
Marco Trevisan (Treviño)
2ce48fcb0c gtype: Use transfer none for types (un)ref functions
We have some (deprecated) methods that technically still return
transfer-full instances of GTypeClass's and GTypeInterface's.

The introspection scanner cannot generate bindings for them though since
it does not know how to manage their lifecycle, and we end up skipping
these symbols.

This is breaking some language bindings, and in particular gjs [1] and
lua-lgi, that were using the .ref methods.

While we should not use deprecated functions in the language bindings,
these symbols should still be introspected.

[1] https://gitlab.gnome.org/GNOME/gjs/-/issues/711

Partially reverts commit cad84d5e27.
2025-10-17 04:15:03 +02:00
Marco Trevisan
618d45cc83 Merge branch 'snap-document-portal-launch' into 'main'
GDesktopAppInfo: Use document portal to open all the URIs for snaps

See merge request GNOME/glib!4822
2025-10-17 04:00:20 +02:00
Marco Trevisan
6c980a1242 Merge branch 'bump-fedora-ci' into 'main'
ci: Update Fedora CI image to Fedora 41

See merge request GNOME/glib!4864
2025-10-17 03:54:21 +02:00
Marco Trevisan (Treviño)
bc35a1496d gio/gdesktopappinfo: Also use document portal for desktop file snaps
When a snap is launched from its non-dbus-activable desktop file we may
still need to use the portal to pass the URIs to the program, so that it
can access to them even if confined.

In fact most snaps are not dbus-activable, but they rely on the classic
desktop file activation.
2025-10-17 03:48:55 +02:00
Marco Trevisan
bd4b57e811 Merge branch 'scan-build-fixes' into 'main'
Fix various scan-build errors

See merge request GNOME/glib!4866
2025-10-17 03:47:16 +02:00
Philip Withnall
0eb35e8032 compiler: Fix a scan-build false positive about a file handle leak
Seems scan-build is incorrectly assuming that `output != NULL` at the start
of the function (so `file` is opened), and then later assuming that
`output == NULL` (so `file` is not closed).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-17 00:30:18 +01:00
Philip Withnall
d904f77770 gunixmounts: Silence a scan-build false positive about a file handle leak
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-17 00:27:02 +01:00
Philip Withnall
ff9b245b6a gspawn-posix: Fix error reporting if dup(child_err_report_fd) fails
Keep the old error reporting FD around until duping it has worked,
otherwise we don’t have an FD to report errors on.

Spotted by scan-build.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-17 00:10:16 +01:00
Marco Trevisan (Treviño)
29fdcec8f3 gio/tests/desktop-app-info: Check child exit status
We need to ensure that the child we launch is not failing otherwise it
won't be possible to catch any assertion failure that it may happen
2025-10-17 01:07:33 +02:00
Philip Withnall
daf3bd7f0a gmappedfile: Avoid calling mmap() with a length of zero
We were previously relying on it returning `EINVAL` so we could return
an error message, but scan-build doesn’t like that, so let’s just
explicitly return the same error anyway to shut scan-build up.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-17 00:03:04 +01:00
Philip Withnall
ca1e32f067 grand: Avoid reading an undefined value from errno
The value of `errno` can apparently be undefined after a successful
function call (according to scan-build), so only check `errno` on
failure.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-16 23:56:43 +01:00
Philip Withnall
3e1176e4b8 Merge branch 'socket-control-docs' into 'main'
gsocketcontrolmessage: Fix a minor typo in a doc comment

See merge request GNOME/glib!4858
2025-10-16 21:10:46 +00:00
Philip Withnall
0ab1866145 Merge branch '3798-appinfo-portal-crash' into 'main'
gopenuriportal: Fix a crash when the file can’t be opened

Closes #3798

See merge request GNOME/glib!4859
2025-10-16 21:04:12 +00:00
Philip Withnall
3179f9b57c Merge branch 'gvariant-diagram-reuse-data' into 'main'
Docs: Migrate gvariant-*.svg licenses to comments

See merge request GNOME/glib!4857
2025-10-16 20:26:49 +00:00
Marco Trevisan (Treviño)
23c2483703 gio/gdesktopappinfo: Use document portal to open URIs for dbus-started snaps
Snap applications like flatpak apps may need to use the portals to open
files, so use the same logic that we have for flatpaks but using the
snap ID that matches portal expectations
2025-10-16 22:12:00 +02:00
Philip Withnall
21179497cf Merge branch 'zero-terminated-annotations' into 'main'
gio: add some nullable / zero-terminated annotations

See merge request GNOME/glib!4789
2025-10-16 20:10:49 +00:00
Marco Trevisan (Treviño)
85ec0256fe gio/tests/dbus-appinfo: Ensure that a dbus application has been opened
We were checking the results of opening an sandboxed application, but
never if the open was actually invoked.

So if another desktop file was used in tests, we were never getting any
failure, at least not related to the lack of a file being opened
2025-10-16 22:10:14 +02:00
Marco Trevisan (Treviño)
3159c3f806 dbus-appinfo: Generalize the flatpak appplication as a sandboxed app
So that we can use it for both flatpaks and snaps
2025-10-16 22:05:27 +02:00
Philip Withnall
fda9ab69f9 Merge branch 'gapplication-test-check-parameters' into 'main'
gio/tests/gapplication: Check the values received on action activation

See merge request GNOME/glib!4861
2025-10-16 19:51:45 +00:00
FeRD (Frank Dana)
fabe2113c3 Docs: Migrate gvariant-*.svg licenses to comments
Remove the overrides in `.reuse/dep5`, and instead store the license
information in a comment near the top of each file.
2025-10-16 19:37:00 +00:00
FeRD (Frank Dana)
4906e179c1 REUSE: Add missing AFL-2.0 and CC-BY-SA-3.0 texts 2025-10-16 19:37:00 +00:00
François Laignel
7d032f2fde gio: add some nullable / zero-terminated annotations 2025-10-16 19:36:56 +00:00
Philip Withnall
5917bce3de gopenuriportal: Fix a crash when the file can’t be opened
Rather than reporting an error via a new `GTask`, report it via the
`GTask` we’ve already created. This avoids a critical warning about
destroying the `GTask` without returning a result.

Also ensure to disconnect the D-Bus signal subscription first, to avoid
an assertion failure in `call_data_free()`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3798
2025-10-16 20:28:19 +01:00
Philip Withnall
9b03809a16 gsocketcontrolmessage: Fix a minor typo in a doc comment
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-16 20:28:01 +01:00
Philip Withnall
f695a6156c gmacros: Use 202000L as __STDC_VERSION__ for C23
202311L is the canonical value for C23 (as per
https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html), but
gcc 14 implemented almost all of the spec (see
https://en.cppreference.com/w/c/compiler_support/23) and it defines
`__STDC_VERSION__` to `202000L` when building with `c_std=c23`, so we’d
better go with that.

Fixes the `macros-c-23` test on gcc 14.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-16 20:25:09 +01:00
Marco Trevisan (Treviño)
b3a7c087ee gio/tests/gapplication: Check the values received on action activation
As per commit 0144feb41 the activate action paramter may pack multiple
values but while the behavior was checked we did not check the content
of the values we were receiving in the action callback.

So, also ensure that the variant values we receive are matching the
expectations.
2025-10-16 19:16:26 +00:00
Marco Trevisan
6c7193acb3 Merge branch 'document-portal-fix-symlink-names' into 'main'
gio/gdocumentportal: Use the target name when opening a symlink

See merge request GNOME/glib!4823
2025-10-16 21:11:01 +02:00
Philip Withnall
c8d56c10ce tests: Add debug for G_C_STD_VERSION
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-10-16 19:40:17 +01:00