27759 Commits

Author SHA1 Message Date
Philip Withnall
00edb7f745
2.78.4
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2.78.4
2024-01-21 19:48:20 +00:00
Michael Catanzaro
e93fd4cfc3 Merge branch 'backport-3750-regex-status-glib-2-78' into 'glib-2-78'
Backport !3750 “gregex: clean up usage of _GRegex.jit_status” to glib-2-78

See merge request GNOME/glib!3766
2023-12-18 21:58:47 +00:00
James Haggerty
d2d898d17b gregex: clean up usage of _GRegex.jit_status 2023-12-18 11:33:51 +00:00
Michael Catanzaro
d034b672ff Merge branch 'backport-3753-gdb-plugin-glib-2-78' into 'glib-2-78'
Backport !3753 “gobject_gdb.py: Do not break bt on optimized build” to glib-2-78

See merge request GNOME/glib!3759
2023-12-12 19:30:12 +00:00
Jens Georg
30efe593a1 gobject_gdb.py: Do not break bt on optimized build
Symptom:
20 0x00007ffff756337b in gtk_widget_size_allocate_with_baseline (widget=0xd7a0c0 [DirectWindow], allocation=, baseline=) at
gdb.error: value has been optimized out
2023-12-12 18:01:49 +00:00
Michael Catanzaro
f3ff370d1b Merge branch 'gtkdoc' into 'glib-2-78'
docs/reference: depend on a native gtk-doc

See merge request GNOME/glib!3756
2023-12-11 21:08:59 +00:00
Michael Catanzaro
f786d276e1 Merge branch 'backport-3751-rst-anchors-glib-2-78' into 'glib-2-78'
Backport !3751 “Fix generated RST anchors for methods, signals and properties” to glib-2-78

See merge request GNOME/glib!3754
2023-12-11 17:48:50 +00:00
Philip Withnall
a714556b3e tests: Re-format codegen.py with black
This is just the result of running `black $(git ls-files '*.py')`.

For some reason, the `sh-and-py-check` CI job didn’t run on merge
request !3751, so this non-standard formatting slipped through onto
`main`.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3754#note_1939914

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-12-11 16:56:14 +00:00
Philip Withnall
737b08e96f tests: Use textwrap.dedent to indent expected strings pleasingly
This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-12-11 16:56:14 +00:00
Ross Burton
54b081248a docs/reference: depend on a native gtk-doc
In a cross-compiled environment we don't need a target gtk-doc, but a
native gtk-doc.
2023-12-11 16:28:17 +00:00
tytan652
4e4471663c tests: Add tests for gdbus-codegen generated RST
Those tests check if methods, signals and properties documentation are
properly generated.
2023-12-11 14:21:29 +00:00
tytan652
a3189ec5c8 Fix generated RST anchors for methods, signals and properties 2023-12-11 14:21:29 +00:00
Philip Withnall
03f7c1fbf3
2.78.3
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2.78.3
2023-12-06 18:03:55 +00:00
Michael Catanzaro
171d65dffa Merge branch 'backport-3742-xdgmime-glib-2-78' into 'glib-2-78'
Backport !3742 “xdgmime: Update to upstream commit c2c814d4051f232” to glib-2-78

See merge request GNOME/glib!3747
2023-12-06 17:55:01 +00:00
Philip Withnall
facc4f06a3 xdgmime: Update to upstream commit c2c814d4051f232
(Modulo the changes in
https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/10 which are
still under discussion. Plus the proposed warning fixes from
https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/33.)

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

Fixes: #3191
2023-12-06 16:33:39 +00:00
Philip Withnall
eb14755943
2.78.2
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2.78.2
2023-12-05 14:22:57 +00:00
Michael Catanzaro
e1aef8bfea Merge branch 'backport-3725-collate-checks-glib-2-78' into 'glib-2-78'
Backport !3725 “collate: Don't segfault on bad input” to glib-2-78

See merge request GNOME/glib!3727
2023-11-26 22:58:03 +00:00
Matthias Clasen
312352ed34 collate: Don't segfault on bad input 2023-11-26 22:46:04 +00:00
Michael Catanzaro
d8e89043c8 Merge branch 'backport-3714-xdgmime-glib-2-78' into 'glib-2-78'
Backport !3714 “xdgmime: Handle buggy type definitions with circular inheritance” to glib-2-78

See merge request GNOME/glib!3718
2023-11-22 16:04:33 +00:00
Alex Henrie
b382d059ee xdgmime: Add continue statements after goto labels in_xdg_mime_(cache_)mime_type_subclass
To fix the Android build.
2023-11-22 10:37:50 +00:00
Alex Henrie
e03abe7457 xdgmime: Handle buggy type definitions with circular inheritance
This fixes a stack overflow reported by a user who had both the
definition of text/javascript from shared-mime-info 2.3 and the
definition of text/javascript from shared-mime-info 2.4 installed at the
same time. In 2.3, text/javascript is a subtype of
application/ecmascript, but in 2.4 application/ecmascript is a subtype
of text/javascript. Having both at the same time resulted in circular
inheritance.

The new logic keeps a list of all parents that have already been
checked, which is more comprehensive than the old workaround that was
implemented in commit 38869ece2 ("xdgmime: Prevent infinite loops from
badly-formed MIME registrations").

https://bugs.archlinux.org/task/80279
2023-11-22 10:37:50 +00:00
Philip Withnall
b8ef341a93 Merge branch 'backport-3685-sh-exec-glib-2-78' into 'glib-2-78'
Backport !3685 “tests: Don't assume that sh optimizes simple commands into exec” to glib-2-78

See merge request GNOME/glib!3686
2023-11-01 22:57:28 +00:00
Simon McVittie
82e4bfa134 tests: Don't assume that sh optimizes simple commands into exec
Depending on the operating system, /bin/sh might either be bash (for
example on Fedora or Arch) or dash (for example on Debian or Ubuntu)
or some other POSIX shell.

When bash is asked to run a simple command with no shell keywords or
metacharacters, like this one, it replaces itself with the program
via execve(), but dash does not have that optimization and treats it
like any other program invocation in a larger script: it will fork,
exec the program in the child, and wait for the child in the parent.

This seems like it conflicts with sleep_and_kill() assuming that it can
use the subprocess's process ID as the sleep(1) process ID. Specifically,
if it sends SIGKILL, it will go to the sh(1) process and not the sleep(1)
child, which could result in the sh(1) process being terminated and
its sleep(1) child being leaked.

To get the bash-like behaviour portably, explicitly use the exec builtin
to instruct the shell to replace itself with sleep(1), so that the
process ID previously used for the shell becomes the process ID of the
sleep process.

This appears to resolve an intermittent hang and test timeout on Debian
machines (especially slower ones), although I'm not 100% clear on the
mechanics of how it happens.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/3157
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-11-01 22:35:22 +00:00
Michael Catanzaro
910916189a Merge branch 'backport-3669-ptrace-check-again-glib-2-78' into 'glib-2-78'
Backport !3669 “meson: Improve PTRACE_O_EXITKILL presence check” to glib-2-78

See merge request GNOME/glib!3673
2023-11-01 16:51:18 +00:00
Michael Catanzaro
1a275aeb11 Merge branch 'backport-3678-signalgroup-side-effects-glib-2-78' into 'glib-2-78'
Backport 3678 “gsignalgroup: Avoid function call with side effect in g_return_* macro” to glib-2-78

See merge request GNOME/glib!3681
2023-11-01 15:16:49 +00:00
Michael Catanzaro
42348e657a Merge branch 'backport-3677-quark-leak-glib-2-78' into 'glib-2-78'
Backport !3677 “Make GQuark register intentional leaks” to glib-2-78

See merge request GNOME/glib!3680
2023-11-01 15:16:01 +00:00
Kleis Auke Wolthuizen
a5ea4d4c74 gsignalgroup: Avoid function call with side effect in g_return_* macro 2023-11-01 10:56:05 +00:00
Seppi Wilhelmi
7713f37678 Make GQuark register intentional leaks 2023-11-01 10:35:12 +00:00
Alessandro Bono
1fe18a72f5 meson: Improve PTRACE_O_EXITKILL presence check
The PTRACE_O_EXITKILL symbol in sys/ptrace.h is an enum member, not
a macro. The #ifdef check added to the GSubprocess test-case in
272ec5dbca8ec957ced2cdca45bde69f47fb4df9 will not detect it.

Use cc.has_header_symbol() to properly detect it. According to the
documentation: "Symbols here include function, variable, #define,
type definition, etc.".

Fixes: 272ec5dbca8ec957ced2cdca45bde69f47fb4df9
Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/3156
2023-10-29 20:30:48 +00:00
Yuri Chornoivan
ea71087141 Update Ukrainian translation 2023-10-29 12:09:11 +00:00
Philip Withnall
21624e78f0
2.78.1 2.78.1 2023-10-25 12:33:59 +01:00
Michael Catanzaro
85f3135a75 Merge branch 'backport-3650-file-truncate-glib-2-78' into 'glib-2-78'
Backport !3650 “gfileutils: Add a missing ftruncate() call when writing files” to glib-2-78

See merge request GNOME/glib!3659
2023-10-22 23:28:57 +00:00
Philip Withnall
addda9e7ac gfileutils: Add a missing ftruncate() call when writing files
When calling `g_file_set_contents_full()` without
`G_FILE_SET_CONTENTS_CONSISTENT`, the file is written by opening it,
`write()`ing to it, then closing it.

This is fine as long as the file is not longer than the new content you
want to set its contents to. If it is, the last bit of the old content
remains, because `g_file_set_contents_full()` was missing an
`ftruncate()` call.

Fix that, and change the tests to catch truncation failures in future.

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

Fixes: #3144

(Backport 2.78: Unmark new translatable string as translatable, to avoid
adding need for translations.)
2023-10-22 23:44:56 +01:00
Ekaterine Papava
005c4c6d12 Update Georgian translation 2023-10-20 05:51:40 +00:00
Daniel Șerbănescu
6bbb106e4a Update Romanian translation 2023-10-18 18:28:41 +00:00
Daniel Șerbănescu
9c7e03989f Update Romanian translation 2023-10-18 18:26:37 +00:00
Michael Catanzaro
391636880c Merge branch 'backport-3648-libelf-disabling-glib-2-78' into 'glib-2-78'
Backport !3648 “build: Fix -Dlibelf=disabled on Linux” to glib-2-78

See merge request GNOME/glib!3649
2023-10-17 16:54:04 +00:00
Philip Withnall
810e233320 build: Fix -Dlibelf=disabled on Linux
Commit f6c40b1d fixed libelf detection on FreeBSD (where the library has
no pkg-config file and needs to be found via `find_library()`), but
broke `-Dlibelf=disabled` on Linux, as `get_option('libelf')` was no
longer checked.

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

Fixes: #3120
2023-10-17 15:26:03 +01:00
Philip Withnall
9e919c290c Merge branch 'backport-3633-task-return-in-threads-glib-2-78' into 'glib-2-78'
Backport !3633 “Use g_task_return in task threads” to glib-2-78

See merge request GNOME/glib!3644
2023-10-16 21:41:36 +00:00
Khalid Abu Shawarib
0351bc1bec Use g_task_return in task threads 2023-10-16 16:20:51 +01:00
Emmanuele Bassi
bfd3fab128 Merge branch 'backport-3587-mtime-glib-2-78' into 'glib-2-78'
Backport !3587 “glocalfileinfo: Preserve microseconds for access/modify times” to glib-2-78

See merge request GNOME/glib!3608
2023-10-09 16:59:12 +00:00
Michael Catanzaro
4b39ae7b6e Merge branch 'backport-3624-wakeup-eintr-glib-2-78' into 'glib-2-78'
Backport !3624 “wakeup: Fix g_wakeup_acknowledge if signal comes in” to glib-2-78

See merge request GNOME/glib!3625
2023-10-05 17:57:11 +00:00
Ray Strode
794d792e23 wakeup: Fix g_wakeup_acknowledge if signal comes in
It's not very likely, but there is a small chance that an
incoming signal could disturb the non-blocking read calls in
g_wakeup_acknowledge, leading to a subsequent spurious wake up.

This commit addresses the problem by doing the usual EINTR
loop (which is already present on the write side incidentally)
2023-10-05 17:55:25 +01:00
Michael Catanzaro
e3ff3b5a24 Merge branch 'backport-3621-wakeup-performance-glib-2-78' into 'glib-2-78'
Backport !3621 “wakeup: do single read when using eventfd()” to glib-2-78

See merge request GNOME/glib!3622
2023-10-05 01:10:41 +00:00
Christian Hergert
28a0563098 wakeup: do single read when using eventfd()
Previously, this would loop as long as read() got the expected number of
bytes back, which is 8. That means every successful read() of the eventfd
would perform an additional syscall() as a followup.

This is not ideal because eventfd (unless used as an EFD_SEMAPHORE) will
reset the counter as part of the read(). So that means that we either do
an additional throw-away syscall() or potentially race against a producer
generating new events before this change.
2023-10-05 00:13:55 +01:00
Michael Catanzaro
fa88f3952d Merge branch 'backport-3617-subprocess-ptrace-glib-2-78' into 'glib-2-78'
Backport !3617 “tests: Drop unnecessary include from gsubprocess-testprog.c” to glib-2-78

See merge request GNOME/glib!3619
2023-10-04 18:36:54 +00:00
Philip Withnall
763f1c9b56 tests: Drop unnecessary include from gsubprocess-testprog.c
It’s not actually needed on any platform, and causes compilation
problems on platforms where it’s not available.

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

Fixes: #3111
2023-10-04 15:16:19 +01:00
Michael Catanzaro
970ffa0d64 Merge branch 'backport-3590-sign-conversion-glib-2-78' into 'glib-2-78'
Backport !3590 “gtestutils.h: Fix warning with -Wsign-conversion caused by g_assert_cmpint” to glib-2-78

See merge request GNOME/glib!3616
2023-10-04 13:21:22 +00:00
Hannes Müller
9560e149b5 gtestutils.h: Fix warning with -Wsign-conversion caused by g_assert_cmpint
With gcc and clang using -Wsign-conversion a related warning is generated
if code using glib 2.78.0 contains function g_assert_cmpint().

Warning is fixed by adding related casts. Related tests have been also
updated and will be also compiled with -Wsign-conversion to detect
related problems in future.
2023-10-04 09:41:00 +01:00
Philip Withnall
0b72e54c49 Merge branch 'backport-3582-dirent-alignment-glib-2-78' into 'glib-2-78'
Backport !3582 “Buffer needs to be aligned correctly to receive linux_dirent64.” to glib-2-78

See merge request GNOME/glib!3614
2023-10-04 08:28:12 +00:00