19006 Commits

Author SHA1 Message Date
Marco Trevisan
4f14e614fa Merge branch 'gdbus-peer-again' into 'master'
gdbus-peer: Make sure to not include objectmanager-gen.c source

See merge request GNOME/glib!416

(cherry picked from commit 4d48e020278b6be64ba84be7b8ab388f5ff2b358)

7c70bef8 gdbus-peer: Make sure to not include objectmanager-gen.c source
2018-10-25 12:35:04 +00:00
Philip Withnall
c5ea31846f Merge branch 'objectmanager-src-dep' into 'master'
gio, tests: ensure objectmanager sources are generated

See merge request GNOME/glib!414

(cherry picked from commit 5263b54a06d6289cf8bbaa7870e1eed8b4cd8626)

11e4fcca gio, tests: ensure objectmanager sources are generated
2018-10-25 12:32:28 +00:00
Matej Urbančič
17519e039f Updated Slovenian translation 2018-10-23 16:34:02 +02:00
Simon McVittie
f86cdf7d11 Merge branch 'backports-glib-2-58' into 'glib-2-58'
A couple of minor glib-2-58 backports

See merge request GNOME/glib!409
2018-10-23 10:05:56 +00:00
Philip Withnall
1161ac3bdb Merge branch 'wip/oholy/bind-mounts-stable' into 'glib-2-58'
gunixmounts: Filter out mounts with device path that was repeated

See merge request GNOME/glib!365
2018-10-23 01:53:30 +00:00
Colin Walters
452eb1df01 build-sys: Pass CFLAGS to $(DTRACE)
Fedora is using https://fedoraproject.org/wiki/Changes/Annobin
to try to ensure that all objects are built with hardening flags.
Pass down `CFLAGS` to ensure the SystemTap objects use them.
2018-10-23 14:28:14 +13:00
Fabrice Fontaine
57efb14f05 grefcount: add missing gatomic.h
Without gatomic.h, build fails on:
In file included from garcbox.c:24:0:
garcbox.c: In function ‘g_atomic_rc_box_acquire’:
grefcount.h:101:13: error: implicit declaration of function ‘g_atomic_int_get’; did you mean ‘__atomic_store’? [-Werror=implicit-function-declaration]
     (void) (g_atomic_int_get (rc) == G_MAXINT ? 0 : g_atomic_int_inc ((rc))); \
             ^
garcbox.c:292:3: note: in expansion of macro ‘g_atomic_ref_count_inc’
   g_atomic_ref_count_inc (&real_box->ref_count);

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-10-23 14:26:40 +13:00
Xavier Claessens
a03083ee17 Meson: Fix linking of gdbus-peer test 2018-10-19 10:34:02 -04:00
Xavier Claessens
dcc12e0311 Merge branch 'cherry-pick-5c22b2dd' into 'glib-2-58'
Merge branch '1bit-emufutex-slow' into 'master'

See merge request GNOME/glib!408
2018-10-19 14:04:34 +00:00
Xavier Claessens
4aca783bd7 Merge branch '1bit-emufutex-slow' into 'master'
meson: Mark 1bit-emufutex test as slow

See merge request GNOME/glib!406

(cherry picked from commit 5c22b2ddde21c9080d1a9a090e1945f7a1d4c5f2)

442b54f0 meson: Mark 1bit-emufutex test as slow
2018-10-19 13:37:58 +00:00
Xavier Claessens
8c6ec7615c Merge branch '1543-glib-2-58-backports' into 'glib-2-58'
Resolve "Backport recent Meson/pkg-config/test fixes to glib-2-58"

See merge request GNOME/glib!392
2018-10-19 13:37:17 +00:00
Ondrej Holy
ed88b23fdf gunixmounts: Filter out mounts with device path that was repeated
libmount-based implementation doesn't filter out mounts with device
path that was repeated as it is done with mntent-based implementation.
It causes problems to our volume monitors which are not able to handle
multiple mounts for one device path properly without additional API.
Let's filter out the same mounts as are filtered out with mntent-based
implementation.

This is intended only for stable branches to prevent current issues.

https://gitlab.gnome.org/GNOME/glib/issues/1271
2018-10-17 14:29:45 +02:00
Simon McVittie
34a3ba72c9 m4macros: Fix detection of glib-2.0 alone
We unconditionally appended ">= $min_glib_version" to the modules to
look for, even though we had already included
"glib-2.0 >= $min_glib_version" in our list. When requesting additional
modules, this was fine, for example

    AM_PATH_GLIB_2_0([2.58], [:], [:], [gobject gio])

ended up asking pkg-config for

    glib-2.0 >= 2.58 gobject-2.0 gio-2.0 >= 2.58

which is redundant (since they all share a version number) but
otherwise OK.

However,

    AM_PATH_GLIB_2_0([2.58], [:], [:], [])

ended up asking pkg-config for

    glib-2.0 >= 2.58 >= 2.58

which is not OK; the second ">=" was parsed as a bizarrely-named package
to check for, and obviously few people have ">=.pc" installed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Fixes: 4bb16f48 "m4macros: Allow information from pkg-config to be overridden"
2018-10-11 10:19:52 -04:00
Simon McVittie
19c9081773 m4macros: Allow information from pkg-config to be overridden
By using PKG_CHECK_VAR, we declare $GLIB_COMPILE_SCHEMAS,
$GLIB_GENMARSHAL, $GOBJECT_QUERY, $GLIB_MKENUMS and
$GLIB_COMPILE_RESOURCES as Autoconf "precious variables" with AC_ARG_VAR,
similar to $PKG_CONFIG and $CC, so that they can be put on a configure
command line:

    ./configure GLIB_COMPILE_RESOURCES=my-glib-compile-resources

If they are set to a non-empty value, PKG_CHECK_VAR will use that
instead of auto-detecting from pkg-config, so that builders can
override them, for example when cross-compiling.

Similarly, use the standard PKG_CHECK_MODULES macro to get GLib's CFLAGS
and LIBS.

It's possible that most of the rest of each macro can also disappear,
but for the moment I've given them the benefit of the doubt.

This does result in printing "checking for GLIB" twice (once for
PKG_CHECK_MODULES and once for GLib's custom checks), but if you're
using Autotools, you probably don't have a strong objection to overly
verbose output.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-11 10:19:52 -04:00
Simon McVittie
55b17dccfc Autotools: Move libmount from Libs.private to Requires.private
libmount depends on libblkid, so if we statically link a trivial
executable to GIO, we need to pull in both libmount and libblkid.
Linking with -lmount is not enough to achieve that, but recursing
into mount.pc is.

This makes the Autotools build a bit more like the Meson build,
which already puts mount in Requires.private.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 20:37:49 -04:00
Simon McVittie
c9f5eefa10 Autotools: Always run glib-genmarshal, even if cross-compiling
glib-genmarshal is now written in Python rather than C, so we can
always run it directly, even if we're cross-compiling for an
architecture whose binaries we can't run. This matches the behaviour
of the Meson build system.

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1546
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908334
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 20:37:24 -04:00
Ryan Schmidt
6f3241f010 Fix build failure on systems without spawn.h 2018-10-10 13:51:07 -04:00
Simon McVittie
d757bd84d1 Meson: Extract objects from convenience libraries to link them
This avoids the convenience library being treated as though it was
an installed static library (objects not included in the dependent
static library, and convenience library being listed in the pkg-config
metadata), both of which would make static linking impossible.
This is a workaround for meson not having
https://github.com/mesonbuild/meson/pull/3939 merged yet.

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1536
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
c733f161a1 Tests: Mark printf wrappers with G_GNUC_PRINTF
If we tell clang that we're passing the arguments on to a compatible
printf call, it can see that we're doing it right, and won't warn us
about -Wformat-nonliteral. This follows up from commit abac67c0.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Xavier Claessens
067d4b47c4 Meson: appinfo tests are racy if run in parallel 2018-10-10 13:51:07 -04:00
Simon McVittie
41bd74dfa4 Generate gtester-report from .in file
Previously, it was installed unmodified by the Meson build system.

We don't need to define @bindir@, because gtester-report never
actually referred to it. We also don't need a definition of
GTESTER_REPORT for use by GLib itself, because its last use was removed
in 2013 (https://bugzilla.gnome.org/show_bug.cgi?id=709995).

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1544
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
e704c23c21 Spelling: Fix spelling of "interpreted"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
6c806c2a60 Spelling: avoid the "allows to" pattern
This is detected by Debian's Lintian tool, which suggests
"allows one to" as a replacement. I've rephrased the documentation
in question to avoid both of those.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
31d2273163 Spelling: Fix spelling of "unknown"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
cc3d955536 Spelling: Fix spelling of "constructed"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
ff2b5d3383 Spelling: Fix spelling of "similarly"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
a915c7b3dd Spelling: Fix a common en_FR spelling of "information"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
8e62a5d4ad Spelling: fix spelling of specify
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Simon McVittie
419d823977 Spelling: fix "every time"
Detected by Debian's Lintian tool.

Also fix the spelling of "linking" in one error message.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Xavier Claessens
ae5bca2394 Meson: Do not run tests/refcount with --tap
This is a partial revert of a change introduced in cbc7fbbf7.
2018-10-10 13:51:06 -04:00
Simon McVittie
59f8519ba9 meson: Run build-time tests with --tap where supported
This makes it easier to debug test failures, by ensuring that g_debug()
and g_test_message() are printed as TAP diagnostics.

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1528
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Xavier Claessens
7723eba45e Meson: Install timeloop-closure test 2018-10-10 13:51:06 -04:00
Xavier Claessens
2c5bc252dd Meson: doc: fix cross references 2018-10-10 13:51:06 -04:00
Xavier Claessens
ac7534fe10 Meson: Run in TAP mode installed tests that support it 2018-10-10 13:51:06 -04:00
Xavier Claessens
aa02dac84f Meson: define G_HAVE_GROWING_STACK to 0 or 1 2018-10-10 13:51:06 -04:00
Simon McVittie
9cde3b2709 Remove unnecessary +x permissions
None of these files starts with a #! line, and they are not native
binary executables, so if a user attempts to execute them as a program,
Unix shells will run them as /bin/sh scripts. This is not going to end
well, since none of them are shell scripts (the gio bash completion
is for bash, which is not a lowest-common-denominator POSIX shell, and
in any case is designed to be sourced rather than executed).

Fixes: #1539
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Xavier Claessens
5038346035 Tests: Fix -Wformat-nonliteral causing build failure with clang 2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
e459e7bdf7 tests W32: ifdef a variable not used on Windows 2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
063148e098 tests W32: Move timeloop test to the non-Windows section
It just doesn't work on Windows, and that can't be fixed with a quick patch.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
c6d1f68fe8 tests W32: ugly fix for sscanf() format
As we recently established, G_G*_FORMAT macros are for glib
functions *only*. It's not guaranteed that they will work for
C runtime printf() or scanf() variants, and indeed - in this case
they do not (GCC thinks that MSVCRT sscanf() requires %I64 prefix
for 64-bit values; whether that is true or not is irrelevant at this
point - we need to make the werror go away).
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
c5ad1caa8d tests W32: include process.h for getpid()
At least, MinGW has POSIX names. No idea if this works in MSVC.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
b22f3bfa23 tests W32: Fix Windows values casting
LPARAM is LONG_PTR which is the same as INT_PTR on Windows.
WPARAM is UINT_PTR.
HWND is a pointer.
(%p prints pointers without 0x prefix, hence the extra 0x).
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
12fe2cb7ea tests W32: Cast the MSG struct as (gchar *) for g_io_channel_read 2018-10-10 13:51:06 -04:00
Xavier Claessens
ba62f9acd6 Rename cxx-test.C to cxx-test.cpp
Meson checks file extension case-insentively, and compiles ".C" as C
source instead of C++.
2018-10-10 13:51:06 -04:00
Xavier Claessens
8d7f506169 Meson: build and install remaining tests 2018-10-10 13:51:06 -04:00
Xavier Claessens
100a85300f Meson: Fix missing files when installing tests
Closes #1527
2018-10-10 13:51:06 -04:00
Philip Withnall
faaf0fb83c tests: Mark two more tests as slow
These keep on taking just longer than 30s on my local machine when run
in parallel with the rest of the tests (i.e. with `ninja test`). Testing
them individually, they do terminate correctly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-10 13:51:06 -04:00
Bernhard Walle
6e1311c977 gio: automake: Add libgmodule dependency
Otherwise I get following compile error:

 libtool: link: /home/builduser/toolchains/linux/tc/2017-12/x86-ncp-linux-gnu/bin/i686-ncp-linux-gnu-gcc -Wall -Wstrict-prototypes -Wmisleading-indentation -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -O2 -Wall -pipe -Wformat -g -fstack-protector-strong -fPIC -fno-strict-aliasing -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-rpath-link=/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/zlib/lib -Wl,-rpath-link=/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/libffi/lib -o .libs/gio gio-tool.o gio-tool-cat.o gio-tool-copy.o gio-tool-info.o gio-tool-list.o gio-tool-mime.o gio-tool-mkdir.o gio-tool-monitor.o gio-tool-mount.o gio-tool-move.o gio-tool-open.o gio-tool-rename.o gio-tool-remove.o gio-tool-save.o gio-tool-set.o gio-tool-trash.o gio-tool-tree.o  -L/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/zlib/lib -L/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/libffi/lib ./.libs/libgio-2.0.so ../gobject/.libs/libgobject-2.0.so ../glib/.libs/libglib-2.0.so -Wl,-rpath -Wl,/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/glib/lib
 /home/builduser/toolchains/linux/tc/2017-12/x86-ncp-linux-gnu/bin/../lib/gcc/i686-ncp-linux-gnu/6.3.0/../../../../i686-ncp-linux-gnu/bin/ld: warning: libgmodule-2.0.so.0, needed by ./.libs/libgio-2.0.so, not found (try using -rpath or -rpath-link)
 ./.libs/libgio-2.0.so: undefined reference to `g_module_error'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_close'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_open'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_supported'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_symbol'
 collect2: error: ld returned 1 exit status
 Makefile:2300: recipe for target 'gio' failed

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
6e75d3cf17 test_internal_enhanced_stdio: don't use g_assert()
g_assert() can be disabled, use more specific assertion macros.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
13c088df13 W32: extend the g-file-info test with new DOS attributes 2018-10-10 13:51:06 -04:00