Skip to contentSkip to conversation

pkgconf: bump to version 1.6.1

PATCH Superseded aduskett at gmail.com 3 participants 5 messages Apr 9, 2019 – Apr 10, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pkgconf: bump to version 1.6.1

From: Adam Duskett <[email protected]>

This version properly works with the --variable argument.

Other changes:
- Change the URL to https://git.dereferenced.org/pkgconf/pkgconf/archive as the current URL has a bad https certificate.
- Add PKGCONF_AUTORECONF = YES because the tar.gz from the above URL change does not have a configure file.
- Add a hash for the license file.

Tested against:
- libsoup
- X11r7
- dbus-glib
- atk

---
 package/pkgconf/pkgconf.hash | 3 ++-
 package/pkgconf/pkgconf.mk   | 7 +++----
 2 files changed, 5 insertions(+), 5 deletions(-)
package/pkgconf/pkgconf.hash +2 -1
index 7ea7ff57a8..00965a071d 100644
@@ -1,2 +1,3 @@
 # Locally calculated
-sha256	d3468308553c94389dadfd10c4d1067269052b5364276a9d24a643c88485f715	pkgconf-1.5.3.tar.xz
+sha256	736494ae9e6222f56ab2fdc3346f78a3b76cadf0e8d6ea8308ee7245ccd7b894	pkgconf-1.6.1.tar.gz
+sha256	07ee94b50a41ee3fc4e13a9b9c60b26fc28488494c465639f7e5f07a3952ec04	COPYING
package/pkgconf/pkgconf.mk +3 -4
index e3c73fd405..d7f1de0f73 100644
@@ -4,12 +4,11 @@
 #
 ################################################################################
 
-PKGCONF_VERSION = 1.5.3
-PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf
-PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.xz
+PKGCONF_VERSION = 1.6.1
+PKGCONF_SITE = https://git.dereferenced.org/pkgconf/pkgconf/archive
 PKGCONF_LICENSE = pkgconf license
 PKGCONF_LICENSE_FILES = COPYING
-
+PKGCONF_AUTORECONF = YES
 PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/bin/pkg-config
 
 define PKGCONF_LINK_PKGCONFIG
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 package/libglib2: bump to version 2.60.0

From: Adam Duskett <[email protected]>

Changes include:
- Moving to the meson build system, as autoconf is no longer supported.
- Add 0002-Add-bool-option-for-tests.patch to allow disabling building tests.
- Add 0003-make-cpp-optional.patch because c++ is not needed.
- Add 0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch to prevent a false error when compiling against older gcc versions.
(https://gitlab.gnome.org/GNOME/glib/issues/1744)

All tests except one pass:
./utils/test-pkg -c ./defconfig

           br-arm-full [1/6]: OK
br-arm-cortex-a9-glibc [2/6]: OK
 br-arm-cortex-m4-full [3/6]: SKIPPED
        br-x86-64-musl [4/6]: OK
    br-arm-full-static [5/6]: FAILED
          sourcery-arm [6/6]: OK

The br-arm-full-static fails because of the precompiled uclibc toolchain erroring out during the build with undefined reference to `__fini_array_start'.

Building the same config file and compiling the toolchain from scratch allows the build to pass.

---
 .../0002-Add-bool-option-for-tests.patch      |  70 +++++++++++
 package/libglib2/0002-disable-tests.patch     |  60 ---------
 package/libglib2/0003-make-cpp-optional.patch | 119 ++++++++++++++++++
 ...mat-nonliteral-to-compiler-arguments.patch |  28 +++++
 package/libglib2/libglib2.hash                |   2 +-
 package/libglib2/libglib2.mk                  | 108 +++-------------
 6 files changed, 236 insertions(+), 151 deletions(-)
 create mode 100644 package/libglib2/0002-Add-bool-option-for-tests.patch
 delete mode 100644 package/libglib2/0002-disable-tests.patch
 create mode 100644 package/libglib2/0003-make-cpp-optional.patch
 create mode 100644 package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch
package/libglib2/0002-Add-bool-option-for-tests.patch new file +70 -0
new file mode 100644
index 0000000000..f905a60f31
@@ -0,0 +1,70 @@
+From bf811098f10e2486fe9076e8953fd003b707010b Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Tue, 9 Apr 2019 12:34:44 -0400
+Subject: [PATCH] Add bool option for tests
+
+Currently, there is no way to prevent tests from building using meson.
+When cross-compiling, building the tests isn't necessary.
+
+Signed-off-by: Adam Duskett <[email protected]>
+Upstream status: Pending https://gitlab.gnome.org/GNOME/glib/merge_requests/774
+---
+ gio/meson.build   | 4 +++-
+ meson.build       | 5 ++++-
+ meson_options.txt | 5 +++++
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/gio/meson.build b/gio/meson.build
+index 88575ec..30de1a6 100644
+--- a/gio/meson.build
++++ b/gio/meson.build
+@@ -993,4 +993,6 @@ if enable_systemtap
+ endif
+ 
+ subdir('fam')
+-subdir('tests')
++if with_tests
++    subdir('tests')
++endif
+diff --git a/meson.build b/meson.build
+index af0103c..423c3f4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -74,6 +74,7 @@ installed_tests_execdir = join_paths(glib_libexecdir, 'installed-tests', meson.p
+ installed_tests_enabled = get_option('installed_tests')
+ installed_tests_template = files('template.test.in')
+ installed_tests_template_tap = files('template-tap.test.in')
++with_tests = get_option('tests')
+ 
+ add_project_arguments('-D_GNU_SOURCE', language: 'c')
+ 
+@@ -1987,7 +1988,9 @@ subdir('gthread')
+ subdir('gmodule')
+ subdir('gio')
+ subdir('fuzzing')
+-subdir('tests')
++if with_tests
++  subdir('tests')
++endif
+ 
+ # xgettext is optional (on Windows for instance)
+ if find_program('xgettext', required : get_option('nls')).found()
+diff --git a/meson_options.txt b/meson_options.txt
+index 5c5b4df..e87bd9e 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -79,6 +79,11 @@ option('fam',
+        value : false,
+        description : 'Use fam for file system monitoring')
+ 
++option('tests',
++       type : 'boolean',
++       value : true,
++       description : 'Build the tests')
++
+ option('installed_tests',
+        type : 'boolean',
+        value : false,
+-- 
+2.20.1
+
package/libglib2/0002-disable-tests.patch deleted +0 -60

60 lines not on this page · raw message

package/libglib2/0003-make-cpp-optional.patch new file +119 -0

119 lines not on this page · raw message

package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +28 -0
new file mode 100644
index 0000000000..ca81b5263a
@@ -0,0 +1,28 @@
+From 9e0f11a4981737f98bac93a22b6f2ff1a3887b63 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Tue, 9 Apr 2019 13:03:51 -0400
+Subject: [PATCH] Add '-Wno-format-nonliteral' to compiler arguments.
+
+This warning is a false positive on older versions of gcc.
+See https://gitlab.gnome.org/GNOME/glib/issues/1744 for more details.
+
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index 3c615b7..7cae4e8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -363,6 +363,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
+     '-Wno-cast-function-type',
+     # Due to function casts through (void*) we cannot support -Wpedantic:
+     # https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
++    '-Wno-format-nonliteral',
+     '-Wno-pedantic',
+     '-Werror=declaration-after-statement',
+     '-Werror=format=2',
+-- 
+2.20.1
+
package/libglib2/libglib2.hash +1 -1
index faa01ef563..4dea10933c 100644
@@ -1,4 +1,4 @@
 # https://download.gnome.org/sources/glib/2.56/glib-2.56.4.sha256sum
-sha256  27f703d125efb07f8a743666b580df0b4095c59fc8750e8890132c91d437504c  glib-2.56.4.tar.xz
+sha256  20865d8b96840d89d9340fc485b4b1131c1bb24d16a258a22d642c3bb1b44353  glib-2.60.0.tar.xz
 # License files, locally calculated
 sha256	dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING
package/libglib2/libglib2.mk +18 -90

153 lines not on this page · raw message

Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/2 package/libglib2: bump to version 2.60.0

Hi Adam,

Quoted 9 lines · aduskett at gmail.com

From: Adam Duskett <[email protected]>

Changes include:
- Moving to the meson build system, as autoconf is no longer supported.
- Add 0002-Add-bool-option-for-tests.patch to allow disabling building tests.
- Add 0003-make-cpp-optional.patch because c++ is not needed.
- Add 0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch to prevent a false error when compiling against older gcc versions.
(https://gitlab.gnome.org/GNOME/glib/issues/1744)

What is the upstream status of patch 0001?

Is patch 0004 still needed? I would expect this to have changed with meson.

Not very important, but it would make sense to renumber the patches so that the
older ones are first, i.e. 0004 -> 0002.

[snip]

Quoted 4 lines
package/libglib2/0003-make-cpp-optional.patch new file +4 -0
+From ee5ed1385bd6c36123ff970a8fff89a811798421 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Tue, 9 Apr 2019 12:59:36 -0400
+Subject: [PATCH] make cpp optional

package/libglib2/0003-make-cpp-optional.patch line 14

Quoted 10 lines
package/libglib2/0003-make-cpp-optional.patch new file +10 -0
+
+C++ isn't actually necessary to build libglib2. The fuzzing folder only has
+c files in it, and there is only a single test that is written in c++.
+
+Check if a C++ compiler exists, and if it does, then add the cxx-test.cpp file
+to tests/meson.build.
+
+Also change cxx.find_library to cc.find_library in fuzzing/meson.build
+
+Signed-off-by: Adam Duskett <[email protected]>

Did you send this one upstream? If not, why not?

[snip]

Quoted 6 lines
package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +0 -0
new file mode 100644
index 0000000000..ca81b5263a

package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch line 9

Quoted 9 lines
package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +9 -0
@@ -0,0 +1,28 @@
+From 9e0f11a4981737f98bac93a22b6f2ff1a3887b63 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Tue, 9 Apr 2019 13:03:51 -0400
+Subject: [PATCH] Add '-Wno-format-nonliteral' to compiler arguments.
+
+This warning is a false positive on older versions of gcc.
+See https://gitlab.gnome.org/GNOME/glib/issues/1744 for more details.
+
+Signed-off-by: Adam Duskett <[email protected]>

So what's the upstream status of this one?

package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch line 22

Quoted 13 lines
package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +13 -0
+---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index 3c615b7..7cae4e8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -363,6 +363,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
+     '-Wno-cast-function-type',
+     # Due to function casts through (void*) we cannot support -Wpedantic:
+     # https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
++    '-Wno-format-nonliteral',

Small nit: this should go before the comment just above it.

Quoted 6 lines
package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +6 -0
+     '-Wno-pedantic',
+     '-Werror=declaration-after-statement',
+     '-Werror=format=2',
+-- 
+2.20.1
+

[snip]

package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch

Quoted 5 lines

ifeq ($(BR2_PACKAGE_ELFUTILS),y)

package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +0 -3
-LIBGLIB2_CONF_OPTS += --enable-libelf
 LIBGLIB2_DEPENDENCIES += elfutils
-else
-LIBGLIB2_CONF_OPTS += --disable-libelf

So there is no longer a way to turn this off explicitly? That's unfortunate...

But basically looks good to me. Well, I didn't look into the details of all the
patches.

Regards,
Arnout

Quoted 29 lines

endif

ifeq ($(BR2_PACKAGE_LIBICONV),y)

package/libglib2/0005-Add-Wno-format-nonliteral-to-compiler-arguments.patch new file +5 -5
-LIBGLIB2_CONF_OPTS += --with-libiconv=gnu
+LIBGLIB2_CONF_OPTS += -Diconv=gnu
 LIBGLIB2_DEPENDENCIES += libiconv
 endif
 
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
-LIBGLIB2_CONF_OPTS += --enable-selinux
+LIBGLIB2_CONF_OPTS += -Dselinux=enabled
 LIBGLIB2_DEPENDENCIES += libselinux
 else
-LIBGLIB2_CONF_OPTS += --disable-selinux
+LIBGLIB2_CONF_OPTS += -Dselinux=disabled
 endif
 
 # Purge gdb-related files
@@ -181,7 +109,7 @@ endef
 LIBGLIB2_TARGET_FINALIZE_HOOKS += LIBGLIB2_REMOVE_TARGET_SCHEMAS
 LIBGLIB2_TARGET_FINALIZE_HOOKS += LIBGLIB2_COMPILE_SCHEMAS
 
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))
+$(eval $(meson-package))
+$(eval $(host-meson-package))
 
 LIBGLIB2_HOST_BINARY = $(HOST_DIR)/bin/glib-genmarshal
#3 lore raw

PATCH 1/2 pkgconf: bump to version 1.6.1

In reply to aduskett at gmail.com
Quoted 3 lines · On Tue, 9 Apr 2019 13:59:18 -0400 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

This version properly works with the --variable argument.

What do you mean by "properly works with the --variable argument" ?

The pkg-config issue with variables being sometimes prefixed by the sysroot sometimes not simply cannot be fixed, because pkg-config has no idea whether the variable is meant to be used a build time (needs to be prefixed by the sysroot) or at run time (must NOT be prefixed by the sysroot).

Quoted 49 lines

Other changes:
- Change the URL to https://git.dereferenced.org/pkgconf/pkgconf/archive as the current URL has a bad https certificate.
- Add PKGCONF_AUTORECONF = YES because the tar.gz from the above URL change does not have a configure file.
- Add a hash for the license file.

Tested against:
- libsoup
- X11r7
- dbus-glib
- atk

---
 package/pkgconf/pkgconf.hash | 3 ++-
 package/pkgconf/pkgconf.mk   | 7 +++----
 2 files changed, 5 insertions(+), 5 deletions(-)
package/pkgconf/pkgconf.hash +2 -1
index 7ea7ff57a8..00965a071d 100644
@@ -1,2 +1,3 @@
 # Locally calculated
-sha256	d3468308553c94389dadfd10c4d1067269052b5364276a9d24a643c88485f715	pkgconf-1.5.3.tar.xz
+sha256	736494ae9e6222f56ab2fdc3346f78a3b76cadf0e8d6ea8308ee7245ccd7b894	pkgconf-1.6.1.tar.gz
+sha256	07ee94b50a41ee3fc4e13a9b9c60b26fc28488494c465639f7e5f07a3952ec04	COPYING
package/pkgconf/pkgconf.mk +3 -4
index e3c73fd405..d7f1de0f73 100644
@@ -4,12 +4,11 @@
 #
 ################################################################################
 
-PKGCONF_VERSION = 1.5.3
-PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf
-PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.xz
+PKGCONF_VERSION = 1.6.1
+PKGCONF_SITE = https://git.dereferenced.org/pkgconf/pkgconf/archive
 PKGCONF_LICENSE = pkgconf license
 PKGCONF_LICENSE_FILES = COPYING
-
+PKGCONF_AUTORECONF = YES
 PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/bin/pkg-config
 
 define PKGCONF_LINK_PKGCONFIG
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/2 pkgconf: bump to version 1.6.1

Hello,

Sorry, I hit Ctrl+Enter too early :-/

Quoted 5 lines · On Tue, 9 Apr 2019 23:23:00 +0200 Thomas Petazzoni…

The pkg-config issue with variables being sometimes prefixed by the sysroot sometimes not simply cannot be fixed, because pkg-config has no idea whether the variable is meant to be used a build time (needs to be prefixed by the sysroot) or at run time (must NOT be prefixed by the sysroot).

So I don't really understand what you mean by "works properly for --variable".

Of course, besides that the patch itself looks OK.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com