Commit aa307ae8 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

WIP: try to upgrade glib and gobject-introspection

parent 58f925fc
......@@ -4,6 +4,7 @@ extends =
../pkgconfig/buildout.cfg
../libexpat/buildout.cfg
../zlib/buildout.cfg
../pcre/buildout.cfg
parts =
dbus
......@@ -27,13 +28,13 @@ environment =
[dbus-glib]
recipe = slapos.recipe.cmmi
shared = true
url = https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.110.tar.gz
md5sum = d7cebf1d69445cbd28b4983392145192
url = https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.112.tar.gz
md5sum = 021e6c8a288df02c227e4aafbf7e7527
configure-options =
--disable-static
--disable-gtk-doc-html
environment =
PATH=${pkgconfig:location}/bin:${glib:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include
LDFLAGS=-L${libexpat:location}/lib -L${gettext:location}/lib -Wl,-rpath=${zlib:location}/lib
PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${glib:location}/lib/x86_64-linux-gnu/pkgconfig:${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${glib:location}/lib/x86_64-linux-gnu/glib-2.0/include
LDFLAGS=-L${libexpat:location}/lib -L${gettext:location}/lib -Wl,-rpath=${zlib:location}/lib -L${glib:location}/lib/x86_64-linux-gnu/ -L${pcre:location}/lib -lpcre
......@@ -11,6 +11,7 @@ extends =
../dbus/buildout.cfg
../flex/buildout.cfg
../nftables/buildout.cfg
../meson/buildout.cfg
[firewalld]
recipe = slapos.recipe.cmmi
......@@ -65,10 +66,13 @@ environment =
[gobject-introspection]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/gobject-introspection-1.50.0.tar.xz
md5sum = 5af8d724f25d0c9cfbe6df41b77e5dc0
configure-options =
--disable-static
url = https://download.gnome.org/core/42/42.1/sources/gobject-introspection-1.72.0.tar.xz
md5sum = 13cbf9bca8f906ee275c8b107311d815
configure-command = ${meson:location}/bin/meson builddir --libdir=lib -Dprefix=@@LOCATION@@ --toto
#configure-options =
# --disable-static
# --disable-cairo
# --toto
environment =
PATH=${pkgconfig:location}/bin:${gettext:location}/bin:${glib:location}/bin:${xz-utils:location}/bin:${flex:location}/bin:${bison:location}/bin:%(PATH)s
......@@ -79,14 +83,13 @@ environment =
GLIB_LIBS=-L${glib:location}/lib -lglib-2.0 -lintl -lgobject-2.0
FFI_CFLAGS=-I${libffi:location}/include
FFI_LIBS=-L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
GIR_DIR=${buildout:parts-directory}/${:_buildout_section_name_}/share/gir-1.0
PYTHON=${buildout:executable}
[pygobject3]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/pygobject-3.22.0.tar.xz
url = https://download.gnome.org/core/42/42.1/sources/pygobject-3.42.1.tar.xz
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages
md5sum = ed4117ed5d554d25fd7718807fbf819f
md5sum = 8b2fa857229aaf526781376a20367ba8
pre-configure =
sed -i 's#/usr/local#${gobject-introspection:location}#g' ${gobject-introspection:location}/lib/pkgconfig/gobject-introspection-1.0.pc
configure-options =
......
In Ubuntu 19.10, we use GCC 9.2.1 and glib was failing to compile with
the following message:
CC libgio_2_0_la-gdbusauth.lo
gdbusauth.c: In function '_g_dbus_auth_run_server':
gdbusauth.c:1302:11: error: '%s' directive argument is null [-Werror=format-overflow=]
1302 | debug_print ("SERVER: WaitingForBegin, read '%s'", line);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
So we apply this MR:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/626
corresponding to this commit:
https://gitlab.gnome.org/GNOME/glib/-/commit/2a9ddc630341789c629c17c17565f5a7a7db8a8e
"gdbus: Avoid printing null strings"
This patch should then be removed when we upgrade glib version.
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index 1f8ea80570cf910a45f3c7f4bb678789145b5d33..752ec23fccaec4b67ec470a9f04c1f2ce99e9809 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -1272,9 +1272,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
&line_length,
cancellable,
error);
- debug_print ("SERVER: WaitingForBegin, read '%s'", line);
if (line == NULL)
goto out;
+ debug_print ("SERVER: WaitingForBegin, read '%s'", line);
if (g_strcmp0 (line, "BEGIN") == 0)
{
/* YAY, done! */
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 3221b925d3ef4eff0b063f5f56cc0629131faf42..3a1a1f9e9101a3773620403d2cb6faf6209a1b64 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -2731,7 +2731,6 @@ g_dbus_message_to_blob (GDBusMessage *message,
if (message->body != NULL)
{
gchar *tupled_signature_str;
- tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
if (signature == NULL)
{
g_set_error (error,
@@ -2739,10 +2738,10 @@ g_dbus_message_to_blob (GDBusMessage *message,
G_IO_ERROR_INVALID_ARGUMENT,
_("Message body has signature “%s” but there is no signature header"),
signature_str);
- g_free (tupled_signature_str);
goto out;
}
- else if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
+ tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
+ if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
{
g_set_error (error,
G_IO_ERROR,
......@@ -2,9 +2,10 @@
extends =
../gettext/buildout.cfg
../libffi/buildout.cfg
../patch/buildout.cfg
../ninja/buildout.cfg
../pcre/buildout.cfg
../perl/buildout.cfg
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
parts =
......@@ -12,27 +13,27 @@ parts =
[glib]
recipe = slapos.recipe.cmmi
patches =
${:_profile_base_location_}/2a9ddc630341789c629c17c17565f5a7a7db8a8e.diff
patch-options = -p1
shared = true
url = https://ftp.gnome.org/pub/gnome/sources/glib/2.56/glib-2.56.4.tar.xz
md5sum = 17c3dca43d99a4882384f1a7b530b80b
configure-options =
--disable-libmount
--disable-static
--disable-selinux
--disable-fam
--disable-xattr
--disable-man
url = https://download.gnome.org/sources/glib/2.72/glib-2.72.0.tar.xz
md5sum = 46a8e04b1b42b64cbef2ea434923e704
location = @@LOCATION@@
configure-command =
meson setup builddir \
--wrap-mode=nofallback \
--prefix=${:location} \
-Dlibmount=disabled \
-Dselinux=disabled \
-Dfam=false \
-Dxattr=false \
-Dman=false && \
meson compile -C builddir && \
meson install -C builddir
make-binary = true
environment =
PATH=${gettext:location}/bin:${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${meson:location}/bin:${ninja:location}/bin:${gettext:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH = ${pcre:location}/lib/pkgconfig:${libffi:location}/lib/pkgconfig
CPPFLAGS=-I${gettext:location}/include -I${zlib:location}/include
LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LIBFFI_CFLAGS=-I${libffi:location}/include
LIBFFI_LIBS= -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
PCRE_CFLAGS=-I${pcre:location}/include
PCRE_LIBS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -lpcre
LDFLAGS=-L${gettext:location}/lib -lintl -Wl,-rpath=${gettext:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
post-install = rm %(location)s/bin/gtester-report
[x86-cygwin-glib]
......
......@@ -8,8 +8,8 @@ parts =
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/mesonbuild/meson/releases/download/${:version}/meson-${:version}.tar.gz
version = 0.57.2
md5sum = 4a07b6d42d7a46a6b6e9604fae7da9aa
version = 0.62.1
md5sum = 2f5301d0e7fd5544ab0004393ba44cbe
configure-command = true
make-binary = true
post-install =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment