Commit Graph

21523 Commits

Author SHA1 Message Date
Philip Withnall
423b2bbc95 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-02-27 12:16:41 +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
Emmanuele Bassi
83c13e52d5 docs: Mention Meson's gnome.mkenums_simple()
The mkenums_simple() function generates idiomatic GObject code, and
avoids templates and custom command line arguments.
2020-02-24 16:14:33 +00:00
Emmanuele Bassi
79cdd531d0 Add example of using glib-genmarshal with Meson
We're using Meson for GLib itself, and we recommend people to use it
for their own projects, so it would be good to have our documentation
present examples on how to use Meson with our tools.
2020-02-24 16:14:33 +00:00
Emmanuele Bassi
040803b34d Add example of using glib-mkenums with Meson
We're using Meson for GLib itself, and we recommend people to use it
for their own projects, so it would be good to have our documentation
present examples on how to use Meson with our tools.

Let's move the template example into its own section while we're at it,
since it's referenced by both Meson and Autotools examples.

Fixes: #1783
2020-02-24 15:46:35 +00:00
Emmanuele Bassi
15a4cf4d3f Ensure that we use @basename@ in the glib-mkenums docs
The documentation for @filename@ is not accurate either.
2020-02-24 15:08:49 +00:00
Philip Withnall
b90eb15f3e 2.63.6
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 15:05:38 +00:00
Sebastian Dröge
360fb9dfbf Merge branch '2002-g-io-channel-read-line-nuls' into 'master'
giochannel: Fix read_line() when nul is not a line terminator

Closes #2002

See merge request GNOME/glib!1319
2020-02-24 14:35:52 +00:00
Philip Withnall
c8811da56a giochannel: Fix read_line() when nul is not a line terminator
And add a test for it.

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

Fixes: #2002
2020-02-24 14:12:30 +00:00
Sebastian Dröge
2b06b6498b Merge branch 'speed-up-actions-test' into 'master'
tests: Speed up the GIO actions test

See merge request GNOME/glib!1298
2020-02-24 13:16:09 +00:00
Sebastian Dröge
1b06461104 Merge branch '1515-gdbus-threading-timeout' into 'master'
tests: Bump the refcount timeout in gdbus-threading

See merge request GNOME/glib!1382
2020-02-24 13:11:40 +00:00
Sebastian Dröge
e3c69acf01 Merge branch '938-gdbus-tool-message-bus-connections' into 'master'
gdbus-tool: Require message bus connections for most commands

Closes #938

See merge request GNOME/glib!926
2020-02-24 12:53:57 +00:00
Sebastian Dröge
ff44c490d4 Merge branch 'sched_setattr-no-gerror' into 'master'
GThread: Don't g_error() if setting the thread scheduler settings fails

Closes #2039

See merge request GNOME/glib!1374
2020-02-24 12:29:26 +00:00
Emmanuele Bassi
ea461c430c Merge branch 'installed-tests-parallel' into 'master'
ci: Enable parallelisation when running installed tests

See merge request GNOME/glib!1383
2020-02-24 12:25:19 +00:00
Philip Withnall
238c774970 tests: Reduce iteration counts on gdbus-threading test
When running under CI, each iteration takes so long that the total test
time is around 200s. If the CI runner is highly loaded, this can tip it
over the timeout of 360s.

Reduce the iteration counts unless running the test thoroughly.

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

Helps: #1515
2020-02-24 12:24:02 +00:00
Emmanuele Bassi
f17ebdede5 Merge branch 'timezone-utc-cleanup' into 'master'
gtimezone: Tidy up UTC timezone creation

See merge request GNOME/glib!1185
2020-02-24 11:46:48 +00:00
Philip Withnall
cfe8d423d4 tests: Bump the refcount timeout in gdbus-threading
Currently the test waits for 1s before deciding that a refcount has been
leaked. But slow test machines might take longer than that between
scheduling different threads to sort out the refcount, so increase the
timeout.

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

Helps: #1515
2020-02-24 11:37:36 +00:00
Emmanuele Bassi
cf91f0dca9 Merge branch 'hash-table-docs' into 'master'
ghash: Document the iteration order over a hash table is not defined

See merge request GNOME/glib!1381
2020-02-24 11:33:57 +00:00
Emmanuele Bassi
8bf3a662c8 Merge branch 'gapplication-docs-typo' into 'master'
gapplication: Fix a minor typo in the documentation

See merge request GNOME/glib!1299
2020-02-24 11:20:51 +00:00
Philip Withnall
97f9fc62c1 Merge branch 'fix-cpu-family-in-ci' into 'master'
gitlab-ci: 64-bit ARM is aarch64, not arm64

See merge request GNOME/glib!1376
2020-02-24 11:18:11 +00:00
Philip Withnall
177851c9b7 gdbus-tool: Require message bus connections for most commands
Previously, if the `--address` option was passed to `gdbus-tool`, it
would treat the connection as peer to peer. However, almost all the
commands `gdbus-tool` supports require a message bus (introspection,
calling a method with a destination, etc.). Only the `signal` command
would ever work on a peer-to-peer connection (if no `--dest` was
specified).

So change the `--address` option to generally create message bus
connections.

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

Fixes: #938
2020-02-24 11:17:31 +00:00
Philip Withnall
2d7b2a014b ci: Enable parallelisation when running installed tests
This should speed up CI runs significantly, as the installed tests are
currently running in series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 11:06:00 +00:00
Philip Withnall
d40275ceb7 Merge branch '2044-application-variant-docs' into 'master'
gapplication: Consistently use non-copying variant formats in docs

Closes #2044

See merge request GNOME/glib!1379
2020-02-24 10:49:31 +00:00
Philip Withnall
46f91a88b6 Merge branch 'cherry-pick-327-gmodule-cleanup' into 'master'
gmodule: change _g_module_close to only take a handle.

See merge request GNOME/glib!1283
2020-02-24 10:32:18 +00:00
Philip Withnall
a8ef5fdf8a gtimezone: Tidy up UTC timezone creation
Move the separate function inline using g_once_init_{enter,leave}(),
rather than g_once().

This marginally improves performance, taking 0.39s to create 10000000
UTC timezones, rather than 0.43s previously. (Who cares?)

Follow-up to !1105.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 10:26:01 +00:00
Nirbheek Chauhan
ba5a18ace4 gitlab-ci: 64-bit ARM is aarch64, not arm64
We also already have conditionals using `aarch64` in the build files,
so `arm64` is completely wrong.

https://mesonbuild.com/Reference-tables.html#cpu-families
2020-02-24 10:24:02 +00:00
Philip Withnall
d630c58021 ghash: Document the iteration order over a hash table is not defined
It’s quite surprising that this wasn’t documented already. Hash tables
are unordered, and any recognisable iteration ordering is not guaranteed
and might change in future releases.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 10:21:40 +00:00
Philip Withnall
f04e3077d9 gapplication: Fix a minor typo in the documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 10:20:33 +00:00
Philip Withnall
b604f008f7 gapplication: Improve formatting of variant formats in documentation
This makes the documentation a little easier to read.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 10:16:38 +00:00
Philip Withnall
325f1e3eb5 gapplication: Consistently use non-copying variant formats in docs
In particular, this fixes the invalid format string `&as`.

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

Fixes: #2044
2020-02-24 10:16:38 +00:00
Sebastian Dröge
965061797d GThread: Don't g_error() if setting the thread scheduler settings fails
Instead only do a g_critical(). This is something that has to be fixed
one way or another, but a g_critical() is less disruptive and makes sure
that code that worked in previous GLib versions still works as bad as
before.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/2039
2020-02-24 12:07:25 +02:00
Sebastian Dröge
73d557981d Merge branch '1515-gdbus-threading' into 'master'
Resolve "gio/gdbus-threading test sometimes fails in CI"

Closes #1515

See merge request GNOME/glib!1375
2020-02-24 10:00:57 +00:00
Philip Withnall
55eb360c65 tests: Skip g-file-info-filesystem-readonly test if bindfs fails
bindfs is part of the setup process, so if it fails (as can happen if
the `fuse` kernel module has not been loaded — not much we can do about
that) then skip the test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 09:08:20 +00:00