Commit Graph

19513 Commits

Author SHA1 Message Date
Xavier Claessens
f54b48b3e6 Merge branch 'master' into 'master'
meson: Turn selinux into a meson feature and make it auto by default

See merge request GNOME/glib!483
2018-11-20 19:14:52 +00:00
Thibault Saunier
8cc92bcca6 meson: Turn selinux into a meson feature and make it auto by default
Making it more user friendly when building on distro no deploying selinux
2018-11-20 15:58:58 -03:00
Xavier Claessens
7412011716 Meson: Add 'nls' option to disable translation
It is not always needed to generate and install gmo files, for example
when building for Android or Windows that often doesn't have libintl to
use them anyway.

At least all GStreamer modules have this same option.
2018-11-20 11:35:14 -05:00
Philip Withnall
23f286e040 Merge branch 'libz-fallback' into 'master'
Check for 'z' library before fallbacking to subproject

See merge request GNOME/glib!482
2018-11-19 22:38:57 +00:00
Xavier Claessens
e50f219462 Merge branch '1594-dbus-docs' into 'master'
gdbusconnection: Add missing (nullable) annotation to get_unique_name()

Closes #1594

See merge request GNOME/glib!475
2018-11-19 21:57:19 +00:00
Xavier Claessens
2ded434b40 Check for 'z' library before fallbacking to subproject 2018-11-19 15:22:16 -05:00
Philip Withnall
11847b831e Merge branch 'g-once-data-race' into 'master'
gthread: Remove unsynchronized access to g_once_init_list from assertion

See merge request GNOME/glib!477
2018-11-19 19:11:41 +00:00
Tomasz Miąsko
c2b22bd615 gthread: Synchronize access to g_once_init_list 2018-11-19 19:41:50 +01:00
Emmanuele Bassi
9874006e8f Merge branch 'patch-1' into 'master'
docs: add a missing semicolon

See merge request GNOME/glib!480
2018-11-18 12:29:56 +00:00
eyelash
fccce84d93 docs: add a missing semicolon 2018-11-18 08:05:28 +00:00
Philip Withnall
8a96fca390 Merge branch 'autolist-chainup' into 'master'
Add support for g_auto(s)list to G_DECLARE'd types

See merge request GNOME/glib!413
2018-11-15 10:25:41 +00:00
Philip Withnall
5cc6942eab gdbusconnection: Add missing (nullable) annotation to get_unique_name()
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1594
2018-11-15 09:42:33 +00:00
Philip Withnall
c2607ab321 glib.supp: Make a suppression less specific
Sometimes valgrind doesn’t count the calloc() call at the innermost
stack frame, and counts it as g_type_create_instance() instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-15 09:27:24 +00:00
Philip Withnall
0ff5e5cd32 gdbusmessage: Gracefully handle message signatures with invalid types
With the changes to limit GVariant type nesting (commit 7c4e6e9fbe),
it’s now possible to have a valid type signature which is not a valid
GVariant type when enclosed in parentheses (to make it a tuple).

Check for that when parsing the signature field in a D-Bus message.

Includes a unit test.

oss-fuzz#11120

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-15 09:22:38 +00:00
Marco Trevisan (Treviño)
8d42b0246b gobject, tests: add tests for autoptr (and lists) with declared
Add tests using an object declared with G_DECLARE_FINAL_TYPE, that is derived
from another, declared using G_DECLARE_DERIVABLE_TYPE, and that
thus uses _GLIB_DEFINE_AUTOPTR_CHAINUP to define cleanup functions.

And verify that both g_autoptr(Type) and g_auto(s)list(Type) work
2018-11-14 22:47:39 -06:00
Marco Trevisan (Treviño)
86c073dba9 gmacros: remove duplication on autoptr cleanup definition
Define _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS and reuse it for both
_GLIB_DEFINE_AUTOPTR_CHAINUP and G_DEFINE_AUTOPTR_CLEANUP_FUNC
2018-11-14 22:47:39 -06:00
Marco Trevisan (Treviño)
d58be1bda9 gmacros: make _GLIB_DEFINE_AUTOPTR_CHAINUP to define funcs for g_autolist
Also chainup to glib_(s)listautoptr_cleanup_* parent functions
to make g_autolist work with object defined in this way
2018-11-14 14:41:40 -06:00
Xavier Claessens
9534447eb0 Merge branch 'fix-gio-test-build' into 'master'
Meson: Fix build error in gdbus-example-objectmanager

See merge request GNOME/glib!461
2018-11-14 15:37:05 +00:00
Xavier Claessens
ba2c519819 Meson: Rename test_c_args to avoid confusion with gio tests c_args 2018-11-14 09:38:33 -05:00
Xavier Claessens
a72766bb9c Merge branch 'master' into 'master'
meson: add aarch64 memory barrier handling

See merge request GNOME/glib!462
2018-11-13 18:47:29 +00:00
Philip Withnall
6375476743 Merge branch 'gmain-tsan' into 'master'
gmain: Fix data races in GUnixSignalWatchSource and GChildWatchSource

See merge request GNOME/glib!446
2018-11-13 16:04:12 +00:00
Niclas Moeslund Overby
704522c5fd meson: add aarch64 memory barrier handling
memory barriers for aarch64 ref: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/CJAIAJFI.html
2018-11-13 17:00:09 +01:00
Philip Withnall
9e5a8ba22e Merge branch 'gdate-parse-month' into 'master'
gdate: Use longest matching month name in g_date_set_parse

Closes #1343

See merge request GNOME/glib!433
2018-11-13 15:00:36 +00:00
Tomasz Miąsko
dd36cf3a8b gmain: Indicate atomic fields with a comment 2018-11-13 14:57:45 +01:00
Tomasz Miąsko
969b0e00b3 gmain: Guarantee handler dispatch after receiving UNIX signal
Guarantee that user signal callback is dispatched _after_ receiving a
signal as long as the handler expresses continued interest in receiving
such a notification.

Previously if a signal has been received during user callback dispatch
but before pending flag had been cleared then the signal would be
irrevocably lost.

This is a very useful guarantee to have in cases where signals are used
to signify a need for synchronization with external resources. For
example: reloading configuration file after SIGUSR1 or retrieving a
terminal size after SIGWINCH.
2018-11-13 14:57:27 +01:00
Tomasz Miąsko
9e652f94d2 gmain: Make GUnixSignalWatchSource pending field atomic
Ensure synchronization between prepare / check /dispatch of
GUnixSignalWatchSource and UNIX signal dispatcher by making operations
on `pending` field atomic.

Issue #1312.
2018-11-13 14:57:22 +01:00
Philip Withnall
6f84f6823b Merge branch 'mr285-subscription-docs' into 'master'
docs: Clarify return/error behaviour of D-Bus signal subscriptions

See merge request GNOME/glib!470
2018-11-13 13:57:02 +00:00
Tomasz Miąsko
d2fd53df03 gmain: Make GChildWatchSource child_exited field atomic
Ensure synchronization between prepare / check of GChildWatchsource and
UNIX signal dispatcher by making operations on `child_exited` field
atomic. Use `child_exited` as publication flag for `child_status`.

Issue #1312.
2018-11-13 14:52:50 +01:00
Tomasz Miąsko
1c8f3c67c3 gmain: Remove redundant volatile from unix_signal_refcount
Acesss to unix_signal_refcount is protected by unix_signal_lock.
2018-11-13 14:52:50 +01:00
Tomasz Miąsko
ba18822f35 gdate: Use longest matching month name in g_date_set_parse
There are languages where a name of one month is a substring of another.
Instead of stopping search on the first match use the month that
constitutes the longest match.

Fixes #1343.
2018-11-13 14:43:34 +01:00
Philip Withnall
e0148985f3 Merge branch 'tests-tsan' into 'master'
tests: Fix some data races in tests

See merge request GNOME/glib!453
2018-11-13 13:12:38 +00:00
Philip Withnall
2a52ff1c7c Merge branch 'settings-list-does-not-exist' into 'master'
Clarify docs for g_settings_list_children

Closes #1362

See merge request GNOME/glib!465
2018-11-13 12:54:41 +00:00
Philip Withnall
c63d37fdc2 docs: Clarify return/error behaviour of D-Bus signal subscriptions
Based on a patch by David Sommerseth, from
https://gitlab.gnome.org/GNOME/glib/merge_requests/285/.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-13 12:44:34 +00:00
Philip Withnall
b323635d79 Merge branch 'wjt/g-file-info-filesystem-readonly-fails' into 'master'
Improve tests/g-file-info-filesystem-readonly, and run it in CI.

Closes #1590

See merge request GNOME/glib!466
2018-11-13 12:38:18 +00:00
Will Thompson
1520afb451
ci: document how to update the Docker image
By making run-docker.sh to `cd` to the correct directory, we don't need to
document that step.
2018-11-13 10:40:44 +00:00
Will Thompson
ab892acf11
ci: add bindfs and fuse to Fedora CI image
Without `bindfs` and `fusermount`, all tests in
g-file-info-filesystem-readonly.c are skipped.
2018-11-13 10:37:46 +00:00
Will Thompson
a2f32f6a11
tests/g-file-info-filesystem-readonly: remove output stream stuff
This test is intended to verify the fix for
https://bugzilla.gnome.org/show_bug.cgi?id=787731, which was that
g_file_query_filesystem_info() would return stale information for the
mount. After replacing a read-only mount with a read-write mount, this
test used to only fail if G_FILE_ATTRIBUTE_FILESYSTEM_READONLY was TRUE
and yet the file could be opened for writing. In particular, if (due to
a test bug) the file really was still on a read-only filesystem, the
test would pass.

Now that we have fixed that bug in the test, we can make a stronger
assertion.
2018-11-13 10:34:09 +00:00
Will Thompson
5b106cdc56
tests/g-file-info-filesystem-readonly: unmount lazily
fusermount -z behaves like umount --lazy, which is documented thus:

> Detach the filesystem from the file hierarchy now, and clean up all
> references to this filesystem as soon as it is not busy anymore.

Without this, the call to `fusermount -u` often fails with:

  /usr/bin/fusermount: failed to unmount /home/wjt/src/gnome/glib/_build/dir_bindfs_mountpoint: Device or resource busy

which causes the subsequent call to bindfs to fail:

  fuse: mountpoint is not empty
  fuse: if you are sure this is safe, use the 'nonempty' mount option

It's not clear what is causing the mount to be busy. Inserting a
g_usleep (100 * 1000) before the calls to `fusermount -u` also works to
make the problem go away, but for the purposes of this test the
important point is that the mount is detached from the directory, for
which a lazy unmount is fine.

Fixes #1590.
2018-11-13 10:34:09 +00:00
Will Thompson
3821ba06b1
tests/g-file-info-filesystem-readonly: assert subcommands succeed
In practice, fusermount -u often fails:

  /usr/bin/fusermount: failed to unmount /home/wjt/src/gnome/glib/_build/dir_bindfs_mountpoint: Device or resource busy

which causes the subsequent calls to bindfs to fail:

  fuse: mountpoint is not empty
  fuse: if you are sure this is safe, use the 'nonempty' mount option

This may or may not cause the current test run to fail, but it reliably
causes a repeat run of the test to fail. This change causes the current
run to fail instead.
2018-11-13 10:34:09 +00:00
Philip Withnall
cb174e6600 Merge branch 'wip/tintou/gio-symbols-index-update' into 'master'
docs: add index of new symbols for gio > 2.52

See merge request GNOME/glib!469
2018-11-13 10:11:21 +00:00
Philip Withnall
e8359619d1 Merge branch '1261-settings-documentation' into 'master'
gsettings: Add an example of a <default> with an empty string

Closes #1261

See merge request GNOME/glib!468
2018-11-13 10:10:32 +00:00
Corentin Noël
c7ac6f3ae0 docs: add index of new symbols for gio > 2.52 2018-11-13 08:08:14 +01:00
Philip Withnall
bc320d9fca gsettings: Add an example of a <default> with an empty string
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1261
2018-11-13 00:31:54 +00:00
Philip Withnall
f81a2b3de2 Merge branch 'mcatanzaro/tls1.3-handshake' into 'master'
Update documentation of g_tls_connection_handshake() again

See merge request GNOME/glib!467
2018-11-12 23:50:16 +00:00
Michael Catanzaro
68878ab50b Update documentation of g_tls_connection_handshake() again
I made a mistake when last updating the documentation in 94a99ae9. I
wrote that, with TLS 1.3, this would perform a rekey instead of a
rehandshake. In fact, that's only true for client connections. For
server connections, it's a no-op.

I was a bit nervous about how to document the behavior anyway, because
we really don't know what behavior will be reasonable with non-GnuTLS
crypto backends. This behavior is reasonable for the GnuTLS backend, but
might not necessarily make sense for OpenSSL. Ideally, we would
discourage API users from doing things which could have unexpected
effects, so instead of documenting what the GnuTLS backend does, I think
it'd be better to document that this is "undefined but not dangerous,"
since of course we want to make sure that existing code that doesn't
know about TLS 1.3 is not broken.
2018-11-12 14:49:30 -06:00
Matthias Clasen
bb1f765df3 Clarify docs for g_settings_list_children
The docs sound like settings list is a thing, and
a ::children-changed signal exists. That is not the
case, and will never be the case at this point, so
stop pretending.

Closes: #1362
2018-11-12 08:07:52 -05:00
Philip Withnall
e990a9ff8e Merge branch '107-key-file-comment-line-breaks' into 'master'
gkeyfile: Fix parsing of new lines in comments

Closes #107

See merge request GNOME/glib!432
2018-11-12 12:57:24 +00:00
Philip Withnall
378be29185 Merge branch 'dont-memoize-in-g_log_writer_is_journald' into 'master'
gmessages: don't memoize in g_log_writer_is_journald()

Closes #1589

See merge request GNOME/glib!464
2018-11-12 12:54:49 +00:00
Philip Withnall
4ea56957db Merge branch 'issues/1310' into 'master'
gdbusproxy: make g-name-owner property useful with unique names

See merge request GNOME/glib!454
2018-11-12 12:43:27 +00:00
Philip Withnall
4af8edb57d Merge branch 'master' into 'master'
gio, tests: fix leak of dbus connection.

See merge request GNOME/glib!463
2018-11-12 12:13:55 +00:00