21554 Commits

Author SHA1 Message Date
Martin Storsjö
43c826021a meson: Add -Wno-format-zero-length for gcc/clang builds
Zero length format strings isn't something that needs to be warned
about.
2020-05-01 17:59:33 +01:00
Christian Kirbach
acefe859e6 Update German translation 2020-04-14 13:33:57 +00:00
Philip Withnall
e264e6fcf7 2.64.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.64.2
2020-04-09 14:40:24 +01:00
Sebastian Dröge
6bebadace6 Merge branch 'backport-1442-gfile-content-type-glib-2-64' into 'glib-2-64'
Backport !1442 “gfile: Fallback to fast-content-type if content-type is not set” to glib-2-64

See merge request GNOME/glib!1447
2020-04-09 13:16:38 +00:00
Ondrej Holy
35953b5371 gfile: Fallback to fast-content-type if content-type is not set
The G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE attribute doesn't have to be
always set. See https://gitlab.gnome.org/GNOME/gvfs/-/merge_requests/68
for more details. In that case, the g_file_query_default_handler function
fails with the "No application is registered as handling this file" error.
Let's fallback to the "standard::fast-content-type" attribute instead to
fix issues when opening such files.

https://gitlab.gnome.org/GNOME/nautilus/-/issues/1425
2020-04-09 13:30:53 +01:00
Sebastian Dröge
204b4dc285 Merge branch 'backport-various-glib-2-64' into 'glib-2-64'
Backport various patches to glib-2-64

See merge request GNOME/glib!1438
2020-04-03 16:42:21 +00:00
Ondrej Holy
39dc7f07d5 docs: Mention new gio tool options
New features were added for gio tool, but they are not mentioned in
man pages as it is not generated from GOptionEntry in contrast to the
help output. Let's update the man pages to reflect the recent changes.
2020-04-03 16:59:24 +01:00
Philip Withnall
72e1d3c964 gdbusmessage: Fix swapped signatures in error messages
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2081
2020-04-03 13:42:00 +01:00
Chris Mayo
4523f75625 docs: Fix configuration with gtk_doc=true and installed_tests=false
Skip the gdbus-object-manager-example which is generated as part of
testing.

Program xsltproc found: YES (/usr/bin/xsltproc)
Run-time dependency gtk-doc found: YES 1.32

docs/reference/gio/gdbus-object-manager-example/meson.build:1:0: ERROR:
Unknown variable "libgdbus_example_objectmanager_dep".
2020-04-03 13:29:55 +01:00
Alexander Kanavin
4d95cb5cb6 glib-unix.c: fix heap corruption in g_unix_get_passwd_entry
malloc() was given too small value (size of pointer,
rather than struct it points to), and subsequent call
getpwnam_r() wrote past the end of allocated block - easily
seen with valgrind.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
2020-04-03 13:24:40 +01:00
Martin Storsjö
d50ea2a34f Fix arch detection ifdefs in glib/valgrind.h
Don't assume that __MINGW32__ implies x86; Windows runs on ARM/ARM64
as well, and there are mingw toolchains that target those architectures.

This mirrors how the MSVC part of the same expressions are written,
as (defined(_WIN32) && defined(_M_IX86)) and
(defined(_WIN64) && defined(_M_X64)) - not relying on _WIN32/_WIN64
or __MINGW32__/__MINGW64__ alone to indicate architecture.
2020-04-03 13:06:18 +01:00
Martin Storsjö
73148e2242 Add missing 'extern' to the dllexport version of GLIB_VAR/GOBJECT_VAR
The __declspec(dllexport) attribute in itself doesn't imply
'extern' - thus any intended variable declaration with
GLIB_VAR/GOBJECT_VAR would actually be a variable definition. With
C compilers defaulting to -fcommon, this isn't an issue, but
upcoming compilers (GCC 10 and Clang 11) will default to -fno-common,
ending up with duplicate definitions of these variables.
2020-04-03 12:48:11 +01:00
Yosef Or Boczko
2443c6bb46 Update Hebrew translation 2020-03-30 17:38:17 +00:00
Daniel Șerbănescu
e62cd323c3 Update Romanian translation 2020-03-19 10:53:37 +00:00
Simon McVittie
9d46d9d457 Merge branch 'backport-1420-gmacros-cpp-glib-2-64' into 'glib-2-64'
Backport !1420 “gmacros.h: avoid using _Static_assert in C++17 mode” to glib-2-64

See merge request GNOME/glib!1421
2020-03-18 10:23:08 +00:00
Alexander Pyhalov
ce8e0aa4b9 gmacros.h: avoid using _Static_assert in C++17 mode
Closes #2067
2020-03-18 08:50:30 +00:00
Yuri Chornoivan
d87597158f Update Ukrainian translation 2020-03-17 15:13:41 +00:00
Philip Withnall
24d272511c 2.64.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.64.1
2020-03-11 12:20:07 +00:00
Sebastian Dröge
41e37de3ac Merge branch 'backport-socks5-fixes-glib-2-64' into 'glib-2-64'
Backport SOCKS5 fixes to glib-2-64

See merge request GNOME/glib!1412
2020-03-10 16:10:51 +00:00
Philip Withnall
400cd0a2e8 gsocks5proxy: Fix SOCKS5 username/password authentication
It was checking for the main SOCKS5 version number, rather than the
subnegotiation version number. The username/password authentication
protocol is described in https://tools.ietf.org/html/rfc1929.

Spotted and diagnosed by lovetox.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1986
2020-03-10 15:20:48 +00:00
Philip Withnall
4ca89d7807 gsocks5proxy: Return G_IO_ERROR_PROXY_NEED_AUTH if anonymous auth fails
If a username and password are specified by the caller, `GSocks5Proxy`
tells the server that it supports anonymous *and* username/password
authentication, and the server can choose which it prefers.

Otherwise, `GSocks5Proxy` only says that it supports anonymous
authentication. If that’s not acceptable to the server, the code was
previously returning `G_IO_ERROR_PROXY_AUTH_FAILED`. That error code
doesn’t indicate to the caller that authentication might succeed were
they to provide a username and password.

Change the error handling to make that clearer. A fuller solution would
be to expose more of the method negotiation in the `GSocks5Proxy` API,
so that the caller can specify ahead of time which authentication
methods they want to use. That can follow in issue #2059 though.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1988
2020-03-10 15:20:48 +00:00
Sebastian Dröge
68e18c6ec8 Merge branch 'backport-various-to-glib-2-64' into 'glib-2-64'
Backport various patches from master to glib-2-64

See merge request GNOME/glib!1407
2020-03-09 21:56:37 +00:00
Patrick Griffis
7f697640fd gdummytlsconnection: Add missing overrides for ALPN properties 2020-03-09 20:23:48 +00:00
Simon McVittie
3704d53b43 tests: Skip MemoryMonitor test if GObject-Introspection is too old
Distributions will likely want to update GLib before
GObject-Introspection, to avoid circular dependencies.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-03-09 20:20:01 +00:00
Jan Alexander Steffens (heftig)
921f27bbb5 tests: Move memory_monitor_tests under installed_tests_enabled
So they're not installed when the latter is disabled.
2020-03-09 20:20:01 +00:00
Bastien Nocera
0869713dae gcontenttype: Fix crash in _get_generic_icon_name()
Guard against NULL type being passed to
g_content_type_get_generic_icon_name() just as we protect
g_content_type_get_description(), otherwise it will cause a crash.

See https://gitlab.gnome.org/GNOME/gtk/issues/2482
2020-03-09 20:20:01 +00:00
Марко Костић
255a5be57b Update Serbian translation 2020-03-08 20:49:14 +00:00
Nathan Follens
7015b4f921 Update Dutch translation 2020-03-06 15:33:18 +00:00
Milo Casagrande
c9e3de8f93 Update Italian translation 2020-03-06 14:24:42 +00:00
Philip Withnall
369626e310 2.64.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.64.0
2020-02-27 16:11:22 +00:00
Sebastian Dröge
21471b4258 Merge branch '2049-array-crash' into 'master'
garray: Fix copying an array with reserved elements

Closes #2049

See merge request GNOME/glib!1390
2020-02-27 15:20:52 +00:00
Philip Withnall
d22c762221 garray: Fix copying an array with reserved elements
Spotted by Mohammed Sadiq. `g_array_copy()` was doing a `memcpy()` of
the data from the old array to the new one, based on the reserved
elements in the old array (`array->alloc`). However, the new array was
allocated based on the *assigned* elements in the old array
(`array->len`).

So if the old array had fewer assigned elements than allocated elements,
`memcpy()` would fall off the end of the newly allocated data block.
This was particularly obvious when the old array had no assigned
elements, as the new array’s data pointer would be `NULL`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2049
2020-02-27 14:48:36 +00:00
Philip Withnall
67610c7c0f Merge branch 'shell-ci-fixes' into 'master'
ci: Correctly propagate exit status in run-style-check-diff.sh

See merge request GNOME/glib!1387
2020-02-27 11:20:14 +00:00
Philip Withnall
5292efdc75 Merge branch 'sam/use-g-define-quark' into 'master'
Update GError docs to use G_DEFINE_QUARK

See merge request GNOME/glib!1389
2020-02-27 11:07:58 +00:00
Philip Withnall
c5d661b4c4 build: Fix shellcheck warnings in various old build and test scripts
Most of these scripts can probably just be deleted (see issue #2045),
but for now it was easier to just mechanically fix the shellcheck
warnings in them, rather than think about whether we actually needed the
script.

Fixes done using shellcheck 0.7.0 with default options. I haven’t tested
any of the changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 10:33:45 +00:00
Philip Withnall
00dfb1de0f ci: Ensure run-check-todos.sh exits on the first error it encounters
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 10:33:45 +00:00
Philip Withnall
23d26cfe7e ci: Fix various shellcheck warnings in the shell scripts
I haven’t tested any of them. This is entirely mechanical. I used
shellcheck 0.7.0 with default options.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 10:33:45 +00:00
Sam Thursfield
dcbaae4fa2 Update GError docs to use G_DEFINE_QUARK 2020-02-26 20:06:13 +01:00
Simon McVittie
70c5fd53e9 Merge branch 'test-dbus-posix_spawn' into 'master'
gtestdbus: Use posix_spawn() to spawn dbus-daemon

See merge request GNOME/glib!1388
2020-02-26 13:57:47 +00:00
Marek Černocký
2bd7ade25d Updated Czech translation 2020-02-26 14:07:19 +01:00
Philip Withnall
eb867c3d2f gtestdbus: Use posix_spawn() to spawn dbus-daemon
This speeds up tests which use `GTestDBus` significantly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-26 10:45:45 +00:00
Alan Mortensen
c01517644b Updated Danish translation 2020-02-25 20:45:40 +01:00
Emmanuele Bassi
f55ff88531 Merge branch 'document-generated-headers-caveats-for-genmarshal-too' into 'master'
docs: Document generated headers caveats for genmarshal

See merge request GNOME/glib!1386
2020-02-25 11:45:41 +00:00
Philip Withnall
95479256df ci: Correctly propagate exit status in run-style-check-diff.sh
Spotted by Daniel Stone: the addition of the `echo` commands in commit
65541f1ad meant that the exit status from `clang-format-diff.py` was
being lost.

The incorrect use of `set +e` rather than `set -e` meant that
intermediate commands could fail without the failure being noticed.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-25 11:11:42 +00:00
Sebastian Dröge
cf72043ade Merge branch 'warning-fixes' into 'master'
Some minor clang warning fixes

See merge request GNOME/glib!1384
2020-02-24 21:52:57 +00:00
Nirbheek Chauhan
3732f9bd07 docs: Document generated headers caveats for genmarshal
And also link to the Meson FAQ that explains why this is needed so
people aren't just cargo-culting code.
2020-02-25 03:14:50 +05:30
Philip Withnall
276fff2b96 Merge branch 'issue-1783' into 'master'
Document Meson use for GLib tools

Closes #1783

See merge request GNOME/glib!861
2020-02-24 17:25:38 +00:00
Philip Withnall
37a3da891b tests: Add some assertions to avoid unused variable warnings on Clang
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 16:18:58 +00:00
Philip Withnall
99a325356d tests: Fix a compiler warning about string+int arithmetic
Clang warns about string+int not appending to the string (to try and
catch newbie mistakes). While this test didn’t expect that to happen, it
was substituting the same constant string in multiple places for no good
reason. Switch to a single static const string, which should also fix
the compiler warning.

We have to define the string length since it’s used in various
stack-allocated array lengths. This is the easiest fix without more
major refactoring of the test to be less 90s.

Also make things a bit more static.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 16:18:58 +00:00
Emmanuele Bassi
653e0f0813 Add links to Meson docs for genmarshal and mkenums 2020-02-24 16:14:33 +00:00