Commit Graph

19317 Commits

Author SHA1 Message Date
Philip Withnall
2b15b436c7 docs: Ignore some private/uninstalled header files
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 13:24:24 +00:00
Philip Withnall
49fe320909 docs: Add indexes for symbols added in 2.60
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 13:23:40 +00:00
Philip Withnall
93f3202a61 docs: Add various missing symbols to glib-sections.txt
As listed in glib-unused.txt.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 12:37:27 +00:00
Philip Withnall
e51ed49ac3 docs: Ignore some private header files
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 12:37:09 +00:00
Philip Withnall
1a46bf88bb docs: Add missing documentation for warnings and assertions
These symbols were listed in glib-undocumented.txt. Thanks gtk-doc.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 12:19:19 +00:00
Philip Withnall
0c7492750a Merge branch 'wip/rishi/gdbus-codegen-deprecated' into 'master'
gdbus-codegen: Tag interfaces and properties so annotated with G_PARAM_DEPRECATED

See merge request GNOME/glib!485
2018-11-23 10:02:09 +00:00
Debarshi Ray
326a7fafe2 gio/tests/gdbus-test-codegen: Ensure that G_PARAM_DEPRECATED is present
https://gitlab.gnome.org/GNOME/glib/merge_requests/485
2018-11-23 10:38:28 +01:00
Debarshi Ray
53573d98f5 gdbus-codegen: Tag interfaces so annotated with G_PARAM_DEPRECATED
If a D-Bus interface was annotated with o.fd.DBus.Deprecated, then the
corresponding GObject property, in the common GInterface implemented
by the generated GDBusObjectProxies and GDBusObjectSkeletons, to
access the generated code for the D-Bus interface was not being marked
with G_PARAM_DEPRECATED, even though the gtk-doc snippet had the
'Deprecated: ' tag.

G_PARAM_DEPRECATED is older than gdbus-codegen, 2.26 and 2.30
respectively, hence it can be used unconditionally.

https://gitlab.gnome.org/GNOME/glib/merge_requests/485
2018-11-23 10:38:28 +01:00
Philip Withnall
10be7824a1 Merge branch 'zlib' into 'master'
Check for zlib header

See merge request GNOME/glib!486
2018-11-23 09:28:03 +00:00
Debarshi Ray
52ce05aaa7 gdbus-codegen: Tag properties so annotated with G_PARAM_DEPRECATED
If a D-Bus interface has a property that's annotated with
o.fd.DBus.Deprecated, then the corresponding GObject property was not
being marked with G_PARAM_DEPRECATED, even though the gtk-doc snippet
had the 'Deprecated: ' tag.

G_PARAM_DEPRECATED is older than gdbus-codegen, 2.26 and 2.30
respectively, hence it can be used unconditionally.

https://gitlab.gnome.org/GNOME/glib/merge_requests/485
2018-11-23 10:18:52 +01:00
Xavier Claessens
c49ed610ed Check for zlib header
It is not enough to check for the library, we also need zlib.h installed
to be able to use it. Autotools were also checking for the header.
2018-11-22 20:14:30 -05:00
Philip Withnall
b660a67cb3 Merge branch 'mcatanzaro/tls1.3-handshake' into 'master'
Deprecate TLS rehandshaking

See merge request GNOME/glib!478
2018-11-21 12:09:22 +00:00
Michael Catanzaro
85f7d493d7 Deprecate TLS rehandshake APIs
Allowing unsafe rehandshakes used to be required for web compatibility,
but this is no longer a concern in 2018. So there should no longer be
compatibility benefits to calling this function. All it does is make
your TLS connection insecure.

Also, rehandshaking no longer exists at all in TLS 1.3.

At some point (maybe soon!) glib-networking will begin ignoring the
rehandshake mode, so let's deprecate it now.
2018-11-20 22:07:58 -06:00
Michael Catanzaro
2031e37dfc Update documentation of g_tls_connection_handshake() one last time
Let's entirely deprecate calling this function for rehandshaking. The
current documentation is OK, but guarantees defined behavior (to attempt
a rehandshake) when TLS 1.2 is in use. But there's no way to force TLS
1.2, and also no way to check which version of TLS is in use. I really
should have deprecated use of this function for rehandshaking entirely
last time I updated it.

Fortunately, there should be no compatibility risk for existing code,
because rehandshaking has no visible effects at the API level.
2018-11-20 22:04:50 -06:00
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
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
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