Commit Graph

32297 Commits

Author SHA1 Message Date
Philip Withnall
e0818cd12c Merge branch 'markup-byte-pos' into 'main'
Add g_markup_parse_context_get_offset

See merge request GNOME/glib!4879
2025-10-23 06:19:52 +00:00
Matthias Clasen
ea848032c2 Add g_markup_parse_context_get_offset
This is a small, helpful api that helps for finding error
locations in xml files, along the same lines as
g_markup_parse_context_get_position.
2025-10-22 15:24:10 -04:00
Philip Withnall
29e9549e2a Merge branch 'ug-translation' into 'main'
Update Uyghur translation

Closes #3808

See merge request GNOME/glib!4882
2025-10-22 13:45:26 +00:00
Philip Withnall
3b20cc978b Merge branch 'wip/3v1n0/fd-query-path' into 'main'
glib-unix: Add API to lookup file path from FD

Closes #3806

See merge request GNOME/glib!4876
2025-10-22 12:44:34 +00:00
Abduqadir Abliz
cf4fdeb01c Uyghur language translation updated. 2025-10-22 13:36:22 +01:00
Michael Catanzaro
921d3ac2de Merge branch 'pgriffis/localhost-only-ipv6' into 'main'
gresolver: Fix loopback detection of IPv6 addresses

See merge request GNOME/glib!4877
2025-10-21 16:16:27 -05:00
Patrick Griffis
549ed21ea1 gresolver: Fix loopback detection of IPv6 addresses
Previously the len passed to g_socket_address_new_from_native() was only
for IPv4 addresses and the constructor would fail.

This was reported and discussed here:
fe0139ee98 (note_2581394)
2025-10-21 15:43:21 -05:00
Philip Withnall
6ed80113f9 Merge branch 'wraps' into 'main'
subprojects: Update libffi, pcre2, proxy-libintl

See merge request GNOME/glib!4764
2025-10-21 20:23:30 +00:00
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
Marco Trevisan (Treviño)
dda9b9cc79 gio/tests/fake-document-portal: Use g_unix_fd_query_path()
Fixes: bc35a149
Closes: #3806
2025-10-21 19:17:46 +02:00
Marco Trevisan (Treviño)
10e9072634 gio/fake-desktop-portal: Use g_unix_fd_query_path 2025-10-21 19:17:46 +02:00
Marco Trevisan (Treviño)
d44c0f2ff7 glib-unix: Add API to lookup file path from FD
We have various APIs that return FDs (such as g_mkstemp) but we do not
have a generic way to get the file name from it.

As per this, provide a simple and cross-platform way to lookup the file
path for an open FD.

This is marked as an unix-only API, although it could be technically be
implemented for windows too
2025-10-21 19:17:44 +02: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