diff mbox series

[1/1] package/libglib2: bump version to 2.76.4

Message ID 20230726171923.334017-1-bernd@kuhls.net
State Changes Requested
Headers show
Series [1/1] package/libglib2: bump version to 2.76.4 | expand

Commit Message

Bernd Kuhls July 26, 2023, 5:19 p.m. UTC
From: James Knight <james.d.knight@live.com>

- Drop `iconv` option since it was obsolete and dropped [1][2].
- Ensure `nls` is explicitly configured based on `BR2_SYSTEM_ENABLE_NLS`
   being set.
- Cleanup configuration and dependency options (ordering, having a
   common variable to share between host/target builds, adding more
   explicit assignment of options).
- Drop "0002-Fix-error-format-in-gio-gunixconnection.c-part-2" since
   upstream patch was applied in this release.

Fixes:
 - http://autobuild.buildroot.net/results/f8b0e6f818297ce6a0c68e6e9dccc1eb4666cb73/
 - http://autobuild.buildroot.net/results/aa8560b919732ee597b18c3e9b3315fa325ed489/

[1]: https://gitlab.gnome.org/GNOME/glib/-/commit/e71ecc8771a4f13bc6046438ab0845944831b9a6
[2]: https://gitlab.gnome.org/GNOME/glib/-/commit/24ec80cfb4522d9819dbf5fd117665fef20b6418

Signed-off-by: James Knight <james.d.knight@live.com>
[Bernd: bumped to 2.76.4, renumbered patch 0003 to 0002]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 ...rmat-in-gio-gunixconnection.c-part-2.patch | 93 -------------------
 ...ocumentation-generation-with-gtk_do.patch} |  0
 package/libglib2/libglib2.hash                |  4 +-
 package/libglib2/libglib2.mk                  | 44 ++++-----
 4 files changed, 25 insertions(+), 116 deletions(-)
 delete mode 100644 package/libglib2/0002-Fix-error-format-in-gio-gunixconnection.c-part-2.patch
 rename package/libglib2/{0003-meson-wrap-html-documentation-generation-with-gtk_do.patch => 0002-meson-wrap-html-documentation-generation-with-gtk_do.patch} (100%)

Comments

Thomas Petazzoni July 28, 2023, 8:15 p.m. UTC | #1
Hello Bernd,

On Wed, 26 Jul 2023 19:19:23 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> From: James Knight <james.d.knight@live.com>
> 
> - Drop `iconv` option since it was obsolete and dropped [1][2].
> - Ensure `nls` is explicitly configured based on `BR2_SYSTEM_ENABLE_NLS`
>    being set.
> - Cleanup configuration and dependency options (ordering, having a
>    common variable to share between host/target builds, adding more
>    explicit assignment of options).
> - Drop "0002-Fix-error-format-in-gio-gunixconnection.c-part-2" since
>    upstream patch was applied in this release.
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/f8b0e6f818297ce6a0c68e6e9dccc1eb4666cb73/
>  - http://autobuild.buildroot.net/results/aa8560b919732ee597b18c3e9b3315fa325ed489/
> 
> [1]: https://gitlab.gnome.org/GNOME/glib/-/commit/e71ecc8771a4f13bc6046438ab0845944831b9a6
> [2]: https://gitlab.gnome.org/GNOME/glib/-/commit/24ec80cfb4522d9819dbf5fd117665fef20b6418

These commits don't really say that iconv is no longer used, only that
the option is gone because Meson now checks iconv.

> -ifneq ($(BR2_ENABLE_LOCALE),y)
> -LIBGLIB2_DEPENDENCIES += libiconv
> -endif

Did you do a test build with a BR2_ENABLE_LOCALE disabled configuration?

Thanks!

Thomas
Bernd Kuhls July 30, 2023, 10:54 a.m. UTC | #2
Hello Thomas,

Am Fri, 28 Jul 2023 22:15:09 +0200 schrieb Thomas Petazzoni via buildroot:

> Did you do a test build with a BR2_ENABLE_LOCALE disabled configuration?

building the patch with this defconfig

BR2_PACKAGE_LIBGLIB2=y

finished without errors:

                             arm-aarch64 [ 1/45]: OK
                   bootlin-aarch64-glibc [ 2/45]: OK
               bootlin-arcle-hs38-uclibc [ 3/45]: OK
                    bootlin-armv5-uclibc [ 4/45]: OK
                     bootlin-armv7-glibc [ 5/45]: OK
                   bootlin-armv7m-uclibc [ 6/45]: SKIPPED
                      bootlin-armv7-musl [ 7/45]: OK
                bootlin-m68k-5208-uclibc [ 8/45]: SKIPPED
               bootlin-m68k-68040-uclibc [ 9/45]: OK
             bootlin-microblazeel-uclibc [10/45]: OK
                bootlin-mipsel32r6-glibc [11/45]: OK
                   bootlin-mipsel-uclibc [12/45]: OK
                     bootlin-nios2-glibc [13/45]: OK
                 bootlin-openrisc-uclibc [14/45]: OK
        bootlin-powerpc64le-power8-glibc [15/45]: OK
           bootlin-powerpc-e500mc-uclibc [16/45]: OK
                   bootlin-riscv32-glibc [17/45]: OK
                   bootlin-riscv64-glibc [18/45]: OK
                    bootlin-riscv64-musl [19/45]: OK
                 bootlin-s390x-z13-glibc [20/45]: OK
                      bootlin-sh4-uclibc [21/45]: OK
                   bootlin-sparc64-glibc [22/45]: OK
                    bootlin-sparc-uclibc [23/45]: OK
                    bootlin-x86-64-glibc [24/45]: OK
                     bootlin-x86-64-musl [25/45]: OK
                   bootlin-x86-64-uclibc [26/45]: OK
                   bootlin-xtensa-uclibc [27/45]: OK
                            br-arm-basic [28/45]: SKIPPED
                    br-arm-full-nothread [29/45]: SKIPPED
                      br-arm-full-static [30/45]: OK
                   br-i386-pentium4-full [31/45]: OK
                br-i386-pentium-mmx-musl [32/45]: OK
                      br-mips64-n64-full [33/45]: OK
                 br-mips64r6-el-hf-glibc [34/45]: OK
               br-powerpc-603e-basic-cpp [35/45]: SKIPPED
               br-powerpc64-power7-glibc [36/45]: OK
                       linaro-aarch64-be [37/45]: OK
                          linaro-aarch64 [38/45]: OK
                              linaro-arm [39/45]: OK
                     sourcery-arm-armv4t [40/45]: OK
                            sourcery-arm [41/45]: OK
                     sourcery-arm-thumb2 [42/45]: OK
                         sourcery-mips64 [43/45]: OK
                           sourcery-mips [44/45]: OK
                          sourcery-nios2 [45/45]: OK
45 builds, 5 skipped, 0 build failed, 0 legal-info failed, 0 show-info 
failed

Regards, Bernd
Thomas Petazzoni July 30, 2023, 11:27 a.m. UTC | #3
Hello Bernd,

On Sun, 30 Jul 2023 12:54:00 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> BR2_PACKAGE_LIBGLIB2=y
> 
> finished without errors:
> 
>                              arm-aarch64 [ 1/45]: OK
>                    bootlin-aarch64-glibc [ 2/45]: OK
>                bootlin-arcle-hs38-uclibc [ 3/45]: OK
>                     bootlin-armv5-uclibc [ 4/45]: OK
>                      bootlin-armv7-glibc [ 5/45]: OK
>                    bootlin-armv7m-uclibc [ 6/45]: SKIPPED
>                       bootlin-armv7-musl [ 7/45]: OK
>                 bootlin-m68k-5208-uclibc [ 8/45]: SKIPPED
>                bootlin-m68k-68040-uclibc [ 9/45]: OK
>              bootlin-microblazeel-uclibc [10/45]: OK
>                 bootlin-mipsel32r6-glibc [11/45]: OK
>                    bootlin-mipsel-uclibc [12/45]: OK
>                      bootlin-nios2-glibc [13/45]: OK
>                  bootlin-openrisc-uclibc [14/45]: OK
>         bootlin-powerpc64le-power8-glibc [15/45]: OK
>            bootlin-powerpc-e500mc-uclibc [16/45]: OK
>                    bootlin-riscv32-glibc [17/45]: OK
>                    bootlin-riscv64-glibc [18/45]: OK
>                     bootlin-riscv64-musl [19/45]: OK
>                  bootlin-s390x-z13-glibc [20/45]: OK
>                       bootlin-sh4-uclibc [21/45]: OK
>                    bootlin-sparc64-glibc [22/45]: OK
>                     bootlin-sparc-uclibc [23/45]: OK
>                     bootlin-x86-64-glibc [24/45]: OK
>                      bootlin-x86-64-musl [25/45]: OK
>                    bootlin-x86-64-uclibc [26/45]: OK
>                    bootlin-xtensa-uclibc [27/45]: OK
>                             br-arm-basic [28/45]: SKIPPED

Because this one was skipped, none of the tested configurations had
BR2_ENABLE_LOCALE disabled I believe, so your test didn't actually
verify what I asked :-)

Thomas
Bernd Kuhls July 30, 2023, 12:09 p.m. UTC | #4
Am Sun, 30 Jul 2023 13:27:10 +0200 schrieb Thomas Petazzoni via buildroot:

> Because this one was skipped, none of the tested configurations had
> BR2_ENABLE_LOCALE disabled I believe, so your test didn't actually
> verify what I asked :-)

Hi Thomas,

building this defconfig

BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_LIBGLIB2=y

$ grep BR2_ENABLE_LOCALE= .config
$

was successful:

Configure snippet:
  Run-time dependency iconv found: YES

$ readelf -a output/per-package/libglib2/target/usr/lib/libglib-2.0.so | 
grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libiconv.so.2]
 0x00000001 (NEEDED)                     Shared library: [libpcre2-8.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

Regards, Bernd
Thomas Petazzoni Aug. 7, 2023, 9:54 p.m. UTC | #5
Hello Bernd,

On Wed, 26 Jul 2023 19:19:23 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> From: James Knight <james.d.knight@live.com>
> 
> - Drop `iconv` option since it was obsolete and dropped [1][2].

This fix has nothing to do with the version bump. The issue already
exists in 2.76.1 that we have today in Buildroot, so mixing this fix
with a version bump does not make sense.

So I've applied a commit that only fixes the libiconv issue:

  https://gitlab.com/buildroot.org/buildroot/-/commit/ff050de534eed1dab152890d748952fc659882a0

(I hope I didn't screw it up)

No, we will need a new commit on top of that to bump to 2.76.4. When
doing changes in the bump, always wonder if they are related to the
bump or not. If they are not, they should be a separate commit.

> - Ensure `nls` is explicitly configured based on `BR2_SYSTEM_ENABLE_NLS`
>    being set.
> - Cleanup configuration and dependency options (ordering, having a
>    common variable to share between host/target builds, adding more
>    explicit assignment of options).

For example this has nothing to do with the bump, so it should be a
separate commit. Except that neither Yann nor myself find the sharing
of config options in a "common" variable to be relevant, so we'd prefer
not to have this change.

Once again, really important: a bump should do a bump, and *only*
things related to the bump. If something is not related to the bump =>
separate commit.

Thanks!

Thomas
diff mbox series

Patch

diff --git a/package/libglib2/0002-Fix-error-format-in-gio-gunixconnection.c-part-2.patch b/package/libglib2/0002-Fix-error-format-in-gio-gunixconnection.c-part-2.patch
deleted file mode 100644
index 6075bacb06..0000000000
--- a/package/libglib2/0002-Fix-error-format-in-gio-gunixconnection.c-part-2.patch
+++ /dev/null
@@ -1,93 +0,0 @@ 
-From 4ae8606b6f80f9764e1f0a82cea7e23c8af487ae Mon Sep 17 00:00:00 2001
-From: James Knight <james.d.knight@live.com>
-Date: Thu, 20 Apr 2023 23:41:32 -0400
-Subject: [PATCH] Fix error format in gio/gunixconnection.c (part 2)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Update a series of error messages to use `g_set_error_literal` instead
-of `g_set_error`. This should prevent `format-nonliteral` compiler
-issues when `-Werror` is configured:
-
-    ../gio/gunixconnection.c: In function ‘g_unix_connection_receive_fd’:
-    ../gio/gunixconnection.c:183:9: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
-      183 |         nscm);
-          |         ^~~~
-    ../gio/gunixconnection.c:217:20: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
-      217 |                    nfd);
-          |                    ^~~
-    ../gio/gunixconnection.c: In function ‘g_unix_connection_receive_credentials’:
-    ../gio/gunixconnection.c:601:24: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
-      601 |                        nscm);
-          |                        ^~~~
-
-This is similar to a previous change [1] made to `gunixconnection.c`.
-
-[1]: 44b3d5d80445234041f6c59feb89645f7102c3a4
-
-Signed-off-by: James Knight <james.d.knight@live.com>
-Upstream: backport from upstream https://gitlab.gnome.org/GNOME/glib/-/commit/4ae8606b6f80f9764e1f0a82cea7e23c8af487ae
----
- gio/gunixconnection.c | 31 ++++++++++++++-----------------
- 1 file changed, 14 insertions(+), 17 deletions(-)
-
-diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c
-index b3f2b1c04b0abdf7136918585ae4cea8970a88bb..c012fcbfe00b69e9da609c7b626229db98e931ac 100644
---- a/gio/gunixconnection.c
-+++ b/gio/gunixconnection.c
-@@ -176,11 +176,10 @@ g_unix_connection_receive_fd (GUnixConnection  *connection,
-     {
-       gint i;
- 
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--        ngettext("Expecting 1 control message, got %d",
--                 "Expecting 1 control message, got %d",
--                 nscm),
--        nscm);
-+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                           ngettext ("Expecting 1 control message, got %d",
-+                                     "Expecting 1 control message, got %d",
-+                                     nscm));
- 
-       for (i = 0; i < nscm; i++)
-         g_object_unref (scms[i]);
-@@ -210,11 +209,10 @@ g_unix_connection_receive_fd (GUnixConnection  *connection,
-     {
-       gint i;
- 
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   ngettext("Expecting one fd, but got %d\n",
--                            "Expecting one fd, but got %d\n",
--                            nfd),
--                   nfd);
-+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                           ngettext ("Expecting one fd, but got %d\n",
-+                                     "Expecting one fd, but got %d\n",
-+                                     nfd));
- 
-       for (i = 0; i < nfd; i++)
-         close (fds[i]);
-@@ -592,13 +590,12 @@ g_unix_connection_receive_credentials (GUnixConnection      *connection,
-     {
-       if (nscm != 1)
-         {
--          g_set_error (error,
--                       G_IO_ERROR,
--                       G_IO_ERROR_FAILED,
--                       ngettext("Expecting 1 control message, got %d",
--                                "Expecting 1 control message, got %d",
--                                nscm),
--                       nscm);
-+          g_set_error_literal (error,
-+                               G_IO_ERROR,
-+                               G_IO_ERROR_FAILED,
-+                               ngettext ("Expecting 1 control message, got %d",
-+                                         "Expecting 1 control message, got %d",
-+                                         nscm));
-           goto out;
-         }
- 
--- 
-2.39.1.windows.1
-
diff --git a/package/libglib2/0003-meson-wrap-html-documentation-generation-with-gtk_do.patch b/package/libglib2/0002-meson-wrap-html-documentation-generation-with-gtk_do.patch
similarity index 100%
rename from package/libglib2/0003-meson-wrap-html-documentation-generation-with-gtk_do.patch
rename to package/libglib2/0002-meson-wrap-html-documentation-generation-with-gtk_do.patch
diff --git a/package/libglib2/libglib2.hash b/package/libglib2/libglib2.hash
index 07ed7635a6..bd4406d791 100644
--- a/package/libglib2/libglib2.hash
+++ b/package/libglib2/libglib2.hash
@@ -1,4 +1,4 @@ 
-# https://download.gnome.org/sources/glib/2.76/glib-2.76.1.sha256sum
-sha256  43dc0f6a126958f5b454136c4398eab420249c16171a769784486e25f2fda19f  glib-2.76.1.tar.xz
+# https://download.gnome.org/sources/glib/2.76/glib-2.76.4.sha256sum
+sha256  5a5a191c96836e166a7771f7ea6ca2b0069c603c7da3cba1cd38d1694a395dda  glib-2.76.4.tar.xz
 # License files, locally calculated
 sha256  fa6f36630bb1e0c571d34b2bbdf188d08495c9dbf58f28cac112f303fc1f58fb  COPYING
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index ecd7d5dbfe..aa38cf1644 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -5,7 +5,7 @@ 
 ################################################################################
 
 LIBGLIB2_VERSION_MAJOR = 2.76
-LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).1
+LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).4
 LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.xz
 LIBGLIB2_SITE = https://download.gnome.org/sources/glib/$(LIBGLIB2_VERSION_MAJOR)
 LIBGLIB2_LICENSE = LGPL-2.1+
@@ -22,19 +22,32 @@  ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
 LIBGLIB2_CFLAGS += -marm
 endif
 
-HOST_LIBGLIB2_CONF_OPTS = \
+LIBGLIB2_COMMON_CONF_OPTS = \
 	-Ddtrace=false \
 	-Dglib_debug=disabled \
+	-Dgtk_doc=false \
 	-Dlibelf=disabled \
-	-Dselinux=disabled \
+	-Dman=false \
+	-Dmultiarch=false \
+	-Doss_fuzz=disabled \
+	-Dsysprof=disabled \
 	-Dsystemtap=false \
-	-Dxattr=false \
-	-Dtests=false \
-	-Doss_fuzz=disabled
+	-Dtests=false
+
+HOST_LIBGLIB2_CONF_OPTS = \
+	$(LIBGLIB2_COMMON_CONF_OPTS) \
+	-Dnls=disabled \
+	-Dselinux=disabled \
+	-Dxattr=false
 
 LIBGLIB2_DEPENDENCIES = \
-	host-pkgconf host-libglib2 \
-	libffi pcre2 zlib $(TARGET_NLS_DEPENDENCIES)
+	host-pkgconf \
+	host-libglib2 \
+	libffi \
+	pcre2 \
+	zlib \
+	$(TARGET_NLS_DEPENDENCIES) \
+	$(if $(BR2_ENABLE_LOCALE),,libiconv)
 
 HOST_LIBGLIB2_DEPENDENCIES = \
 	host-gettext \
@@ -49,21 +62,15 @@  HOST_LIBGLIB2_DEPENDENCIES = \
 # ${libdir} would be prefixed by the sysroot by pkg-config, causing a
 # bogus installation path once combined with $(DESTDIR).
 LIBGLIB2_CONF_OPTS = \
-	-Dglib_debug=disabled \
-	-Dlibelf=disabled \
+	$(LIBGLIB2_COMMON_CONF_OPTS) \
 	-Dgio_module_dir=/usr/lib/gio/modules \
-	-Dtests=false \
-	-Doss_fuzz=disabled
+	-Dnls=$(if $(BR2_SYSTEM_ENABLE_NLS),enabled,disabled)
 
 LIBGLIB2_MESON_EXTRA_PROPERTIES = \
 	have_c99_vsnprintf=true \
 	have_c99_snprintf=true \
 	have_unix98_printf=true
 
-ifneq ($(BR2_ENABLE_LOCALE),y)
-LIBGLIB2_DEPENDENCIES += libiconv
-endif
-
 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
 LIBGLIB2_DEPENDENCIES += elfutils
 endif
@@ -73,11 +80,6 @@  ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 LIBGLIB2_LDFLAGS += -latomic
 endif
 
-ifeq ($(BR2_PACKAGE_LIBICONV),y)
-LIBGLIB2_CONF_OPTS += -Diconv=external
-LIBGLIB2_DEPENDENCIES += libiconv
-endif
-
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 LIBGLIB2_CONF_OPTS += -Dselinux=enabled -Dxattr=true
 LIBGLIB2_DEPENDENCIES += libselinux