Commit Graph

19550 Commits

Author SHA1 Message Date
Emmanuele Bassi
12adfcb602 Merge branch 'bookmark-file-leak' into 'master'
gbookmarkfile: Fix some minor leaks when metadata elements are repeated

See merge request GNOME/glib!216
2018-08-02 11:31:13 +00:00
Emmanuele Bassi
5e64ee3af7 Drop a questionable test from the refstring suite
Testing that an interned string is released once its last reference is
dropped is not possible without a hook into the interning machinery;
just checking that the returned pointer for the same string is going to
be different after the last release() is not guaranteed to work, as the
systema allocator is perfectly within its rights to recycle pointers, as
long as they are unique while valid.

Closes #1467
2018-08-02 12:21:38 +01:00
Ondrej Holy
3edc50498f glocalfilemonitor: Fallback to poll file monitor for NFS
GLib currently tries to use FAM volume monitor for monitoring files
within home on NFS. If FAM support is not available, it fallbacks by
default to GInotifyFileMonitor. I think we should fallback to
GPollFileMonitor instead, because inotify is not reliable on NFS,
which may cause issues for dconf. With this patch, it should be safe to
not build libgiofam and still be sure that dconf works properly if home
is mounted on NFS. I think this might be a first step to remove FAM
support from GLib completely, because gamin is buggy and dead for
several years already. Gamin just polls files on NFS anyway. This
change applies on files only, because GPollFileMonitor seems doesn't
support dirs, however it should be enough for dconf. The other
drawback is that one can't set poll timeout currently. Just a note
that this can still be overwritten by GIO_USE_FILE_MONITOR.
2018-08-02 13:14:10 +02:00
Philip Withnall
6c041ff283 gbookmarkfile: Fix some minor leaks when metadata elements are repeated
oss-fuzz#9674

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-02 11:20:15 +01:00
Ondrej Holy
88b8ebb5dd gio-tool: Hold GVolumeMonitor reference during operations
Releasing GVolumeMonitor before g_volume_mount finish cause that
g_volume_get_mount returns NULL, because the mount is not correctly
propagated to the volume.

https://gitlab.gnome.org/GNOME/glib/issues/1458
2018-08-02 11:35:48 +02:00
Philip Withnall
433770b681 Merge branch 'build-fix-mingw-libelf' into 'master'
gresource-tool: fix build in case libelf is available on Windows. Fixes #1466

Closes #1466

See merge request GNOME/glib!215
2018-08-01 23:18:53 +00:00
Christoph Reiter
70ad484508 gresource-tool: fix build in case libelf is available on Windows. Fixes #1466
The gresource code uses libelf if available but that also depends on mmap but isn't
guarded with HAVE_MMAP. This can make the build fail under MSYS2 where a mingw version
of libelf exists but there is no mmap.

Instead of guarting the libelf code with HAVE_LIBELF add a new macro named USE_LIBELF
which is only defined if libelf and mmap support are available.

Also install the mingw libelf version for CI so we catch similar errors in the future.
2018-08-01 19:08:39 +02:00
Philip Withnall
b2249bf33c tests: Don’t use a potentially-existent timezone in a test for failure
When checking that the timezone code falls back to UTC if a zone is
unknown, don’t use ‘PST’, because that can actually exist on some
systems.

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

https://gitlab.gnome.org/GNOME/glib/issues/1433
2018-07-31 19:54:56 +01:00
Philip Withnall
17df5c0b26 gtestutils: Mention G_DISABLE_ASSERT in documentation for g_test_init()
g_test_init() bails if G_DISABLE_ASSERT is defined. Mention that. This
is a follow-up to
https://gitlab.gnome.org/GNOME/glib/merge_requests/174.

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

https://gitlab.gnome.org/GNOME/glib/issues/1446
2018-07-31 19:49:37 +01:00
Philip Withnall
83a4cab12c 2.57.2 (actual release)
The previous 2.57.2 release failed. The tarball for this one will be
generated using `ninja dist`, but should still be good to be built using
autotools. `make distcheck` on it has been tested.

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

https://gitlab.gnome.org/GNOME/glib/issues/1436
2018-07-31 19:36:19 +01:00
Matthias Clasen
9460aeeed8 Merge branch '1436-please-for-the-love-of-things-just-build' into 'master'
Fix the stupid .Plo file errors

See merge request GNOME/glib!211
2018-07-31 18:13:43 +00:00
Philip Withnall
ca0110c34d build: Conditionally add spawn and IO channel without using EXTRA_ prefix
See previous commit; same reasoning behind the commit, except that these
sources weren’t (yet) causing `make distcheck` to fail.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-31 18:52:37 +01:00
Philip Withnall
862fe11f90 build: Conditionally add gwin32.c to sources without using EXTRA_ prefix
Instead of messing around with EXTRA_*_SOURCES and manually handling .lo
files, why not just add gwin32.c to the GLib sources conditionally?

This will hopefully fix `make distcheck` failing due to gwin32.Plo not
being generated in the sub-builddir≠srcdir stage, due to depcomp
inexplicably not generating it. (Note that it is correctly generated in
non-distcheck builds.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-31 18:52:37 +01:00
Daniel Mustieles
bcafcc5b54 Updated Spanish translation 2018-07-31 12:42:21 +02:00
Emmanuele Bassi
158f07c223 Merge branch 'gio-enum-install' into 'master'
Install gioenumtypes.h

See merge request GNOME/glib!210
2018-07-31 09:03:22 +00:00
Emmanuele Bassi
26c3f2f1b1 Install gioenumtypes.h
We're re-defining nodist_gioinclude_HEADERS and Automake will use the
last definition of the target.
2018-07-31 09:40:22 +01:00
Philip Withnall
83c69fa77d Merge branch '1035-bookmarks-state-machine' into 'master'
gbookmarkfile: Fix error reporting with unexpected nesting of elements

Closes #1035

See merge request GNOME/glib!207
2018-07-30 22:50:52 +00:00
Matthias Clasen
dbf9959d15 Merge branch '1436-docs-muckery' into 'master'
Fix various documentation issues and man page issues with autotools

See merge request GNOME/glib!209
2018-07-30 22:24:26 +00:00
Philip Withnall
376234f9b2 gbookmarkfile: Fix error reporting with unexpected nesting of elements
The parser state machine for bookmark files did not handle unexpected
nesting of elements, such as a <bookmark> element inside a <title>
element — it would print a critical warning rather than returning a
GError.

Fix that, and add various unit tests for it. The set of tests includes
various other general markup tests as provided by Jussi Judin.

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

https://gitlab.gnome.org/GNOME/glib/issues/1035
2018-07-30 21:59:26 +01:00
Philip Withnall
2500dfe3b3 docs: Fix a documentation link
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:57 +01:00
Philip Withnall
b4734d3b5b docs: Add some more backtick quotation
That should format these character classes correctly in the
documentation, and prevent them being interpreted by gtk-doc as (broken)
Markdown hyperlinks.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:22 +01:00
Philip Withnall
fba8d7a48a docs: Fix case of a type used in a gtk-doc comment
This fixes the automatic linking of that type.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:15:03 +01:00
Philip Withnall
4cd7f769ae gconvert: Adjust an argument name in the header to match the source
This fixes a gtk-doc complaint about the argument name not matching
what’s used in the gtk-doc comment.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:14:16 +01:00
Philip Withnall
c0f8792d6b docs: Add missing API indexes for old versions
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:13:48 +01:00
Philip Withnall
0e0b18e0cd docs: Fix a minor syntax error in a documentation comment
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:13:28 +01:00
Philip Withnall
40fc18521b docs: Fix glib-sections.txt includes for g_atomic_rc_* API
These were not changed when g_arc_*() was renamed to g_atomic_rc_*().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 21:12:43 +01:00
Philip Withnall
f9705f7a0c docs: Don’t distribute generated man pages
They should either be generated at build time, or ignored completely,
depending on the presence of --[enable|disable]-man.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 20:04:13 +01:00
Philip Withnall
2a69cdb1cd build: Stop distributing generated files in autotools tarballs
It is a bug if we distribute files which are generated at build time —
they should be built on the machine which is compiling GLib, not be
shipped in the tarball.

This brings the autotools-generated tarball in line with the
ninja-generated one, with the exception of man pages and gtk-doc HTML
output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:58:24 +01:00
Philip Withnall
47dcbd318f build: Remove a pointless intermediate variable in glib/Makefile.am
This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:47:15 +01:00
Matthias Clasen
4127c84c3a Merge branch '1461-bookmarks-nullptr' into 'master'
gmarkup: Fix crash in error handling path for closing elements

Closes #1461

See merge request GNOME/glib!205
2018-07-30 18:44:48 +00:00
Matthias Clasen
f424a0c2d3 Merge branch '1462-bookmark-overflow' into 'master'
gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths

Closes #1462

See merge request GNOME/glib!204
2018-07-30 17:56:21 +00:00
Mohammed Sadiq
f0ce956f73 grefstring: Avoid an unnecessary NUL assignment
The duped string is already NUL-terminated.
There is no need to do it again.
2018-07-30 23:06:23 +05:30
Philip Withnall
fccef3cc82 gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.

Includes a test case, courtesy of pdknsk.

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

https://gitlab.gnome.org/GNOME/glib/issues/1461
2018-07-30 18:33:39 +01:00
Philip Withnall
cec7170540 gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths
When formatting the error messages for markup parsing errors, the parser
was unconditionally reading a UTF-8 character from the input buffer —
but the buffer might end with a partial code sequence, resulting in
reading off the end of the buffer by up to three bytes.

Fix this and add a test case, courtesy of pdknsk.

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

https://gitlab.gnome.org/GNOME/glib/issues/1462
2018-07-30 18:10:25 +01:00
Philip Withnall
b5b0485bfe Merge branch '1459-async-queue-precondition' into 'master'
Resolve "Missing g_return_val_if_fail in g_async_queue_timeout_pop"

Closes #1459

See merge request GNOME/glib!201
2018-07-30 17:03:54 +00:00
Philip Withnall
ef1d24974d gasyncqueue: Add missing precondition to g_async_queue_timeout_pop()
And g_async_queue_timeout_pop_unlocked().

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

https://gitlab.gnome.org/GNOME/glib/issues/1459
2018-07-30 17:18:03 +01:00
Philip Withnall
2d7423b986 Merge branch 'wip/sadiq/fixes' into 'master'
gio/tests: Use the right format specifier

See merge request GNOME/glib!203
2018-07-30 16:01:27 +00:00
Mohammed Sadiq
24f5dbca2c gio/tests: Use the right format specifier
dev_t - the type of st_dev - is always 8 byte.
Use G_GUINT64_FORMAT to ensure 8 byte and thus not fail on i386.
2018-07-30 20:53:15 +05:30
Ondrej Holy
9b6b282e0a gio: Update mounts after g_volume_mount
The documentation claims that g_volume_get_mount should	succeed	after
g_volume_mount. Let's update mounts before releasing g_volume_mount to
be sure that the mount is added to the corresponding volume. The same
is done in GVfsUDisks2VolumeMonitor.

https://gitlab.gnome.org/GNOME/glib/issues/1458
2018-07-30 16:05:41 +02:00
Mohammed Sadiq
e91da3fc77 grcbox: Fix typo in doc 2018-07-30 12:39:27 +05:30
Aurimas Černius
2f26cf0b8d Updated Lithuanian translation 2018-07-28 17:27:45 +03:00
Michael Catanzaro
94a99ae917 Update documentation of g_tls_connection_handshake
Rehandshaking is not a thing in TLS 1.3. In that case,
g_tls_connection_handshake() should instead perform a re-key.
2018-07-27 10:48:50 -05:00
Christoph Reiter
7b5b77271e Merge branch 'binding-unbind-annotation' into 'master'
Fix annotation of g_binding_unbind() to transfer-full

See merge request GNOME/glib!197
2018-07-26 06:25:11 +00:00
Sebastian Dröge
c66c277e24 Fix annotation of g_binding_unbind() to transfer-full
It takes ownership of the binding reference passed in as described in
the documentation already.
2018-07-25 15:52:04 +03:00
Matthias Clasen
56092b8529 Revert "Add a gnet utility"
This reverts commit 1db3b6def6.

I had forgotten to remove this from the branch before merging.
2018-07-25 07:18:38 -04:00
Matthias Clasen
2480ece23d Merge branch 'new-network-portal' into 'master'
New network portal

See merge request GNOME/glib!192
2018-07-25 11:16:51 +00:00
Christoph Reiter
93261e307b build: Drop Python 2 support and require Python 3.4+
See https://mail.gnome.org/archives/desktop-devel-list/2018-July/msg00004.html
for a discussion on if/when we can start relying on Python 3 only.

Use Python 3.4 as a new requirement because that's the version used in
SLES 12 and Debian 8 and there is no good reason to require something newer
right now.
2018-07-24 12:30:25 +02:00
Daniel Mustieles
16d51d7609 Updated Spanish translation 2018-07-24 12:30:09 +02:00
Daniel Mustieles
3e0f765b73 Updated Spanish translation 2018-07-24 09:55:05 +02:00
Christian Hergert
0c7dc75844 garray: add overflow checks before expanding array
We should bail when we detect that adding a number of items to an array
would cause it to overflow. Since we can't change to using gsize for ABI
reasons we should protect the integrity of the process even if that means
crashing.
2018-07-23 21:05:11 -07:00