libxml2: clean up xmlconf mode fixups
PATCH 1/12 libxml2: clean up xmlconf mode fixups
The xmlconf files are executable and there is a lot of them, which means in ptest builds every file is opened in case it's an ELF.
Currently we chmod -x the xmlconf tree in do_configure which modifies the source tree in every build. Instead, we can just tell the cp to not preserve the modes when copying the tree in do_install_ptest.
--- meta/recipes-core/libxml/libxml2_2.15.3.bb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
meta/recipes-core/libxml/libxml2_2.15.3.bb +2 -6
@@ -57,15 +57,11 @@ PACKAGE_BEFORE_PN += "${PN}-utils" FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" FILES:${PN}-utils = "${bindir}/*" -do_configure:prepend () { - # executables take longer to package: these should not be executable - find ${S}/xmlconf/ -type f -exec chmod -x {} \+ -} - do_install_ptest () { oe_runmake DESTDIR=${D} ptestdir=${PTEST_PATH} install-test-data - cp -r ${S}/xmlconf ${D}${PTEST_PATH} + # executables take longer to package: these should not be executable + cp -r --no-preserve=mode ${S}/xmlconf ${D}${PTEST_PATH} } # with musl we need to enable icu support explicitly for these tests
Signature · 1 line
2.43.0
PATCH 2/12 evdev: build with meson
Upstream has meson support, so use it.
Explicitly disable the tests and documentation to ensure deterministic builds as these float depending on whether check and doxygen are found at configure time.
--- meta/recipes-support/libevdev/libevdev_1.13.6.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-support/libevdev/libevdev_1.13.6.bb +4 -3
@@ -6,12 +6,13 @@ HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/" SECTION = "libs" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=80c550b3197bcb8da7d7557ebcc3fc46 \ - " +LIC_FILES_CHKSUM = "file://COPYING;md5=80c550b3197bcb8da7d7557ebcc3fc46" SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz" SRC_URI[sha256sum] = "73f215eccbd8233f414737ac06bca2687e67c44b97d2d7576091aa9718551110" -inherit autotools pkgconfig +inherit meson pkgconfig + +EXTRA_OEMESON = "-Dtests=disabled -Ddocumentation=disabled" UPSTREAM_CHECK_REGEX = "libevdev-(?P<pver>(\d+\.)+(?!90\d+)\d+)"
Signature · 1 line
2.43.0
PATCH 3/12 libpsl: use libidn2 instead of ICU
In reply to Ross BurtonThe default IDNA library was changed from libidn2 to ICU in 2021[1] with no rationale, and upstream has had libidn2 as the default since 2017.
Switch back to libidn2 to respect upstream's opinion, and because ICU is a monolithic dependency: this switch causes a minimal image containg libpsl to shrink by ~30MB.
[1] oe-core 20fc11919e2 ("libpsl: Add config knobs for runtime/builtin conversion choices")
--- meta/recipes-support/libpsl/libpsl_0.22.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libpsl/libpsl_0.22.0.bb +1 -1
@@ -19,7 +19,7 @@ GITHUB_BASE_URI = "https://github.com/rockdaboot/libpsl/releases" inherit autotools gettext gtk-doc manpages pkgconfig lib_package github-releases -PACKAGECONFIG ?= "icu" +PACKAGECONFIG ?= "idn2" PACKAGECONFIG[manpages] = "--enable-man,--disable-man,libxslt-native" PACKAGECONFIG[icu] = "--enable-runtime=libicu --enable-builtin=libicu,,icu" PACKAGECONFIG[idn2] = "--enable-runtime=libidn2 --enable-builtin=libidn2,,libidn2 libunistring"
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH 03/12] libpsl: use libidn2 instead of ICU
Quoted 4 lines · Ross Burton via lists.openembedded.org
The default IDNA library was changed from libidn2 to ICU in 2021[1] with no rationale, and upstream has had libidn2 as the default since 2017.
libidn2 default was switched to build non-GPL3 images conveniently by switching to use ICU, where ICU is used by embedded systems more commonly than libidn2.
Quoted 4 lines
Switch back to libidn2 to respect upstream's opinion, and because ICU is a monolithic dependency: this switch causes a minimal image containg libpsl to shrink by ~30MB.
Which production image are you building ?
Quoted 42 lines
[1] oe-core
20fc11919e2("libpsl: Add config knobs for runtime/builtin conversion choices")Signed-off-by Ross Burton <[email protected]>--- meta/recipes-support/libpsl/libpsl_0.22.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-support/libpsl/libpsl_0.22.0.bb +0
-0@@ -19,7 +19,7 @@ GITHUB_BASE_URI = "https://github.com/rockdaboot/libpsl/releases"
inherit autotools gettext gtk-doc manpages pkgconfig
lib_package
github-releasesmeta/recipes-support/libpsl/libpsl_0.22.0.bb +1
-4-PACKAGECONFIG ?= "icu" +PACKAGECONFIG ?= "idn2" PACKAGECONFIG[manpages] = "--enable-man,--disable-man,libxslt-native" PACKAGECONFIG[icu] = "--enable-runtime=libicu --enable-builtin=libicu,,icu" PACKAGECONFIG[idn2] = "--enable-runtime=libidn2 --enable-builtin=libidn2,,libidn2 libunistring" --2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#240962):
https://lists.openembedded.org/g/openembedded-core/message/240962
Mute This Topic: https://lists.openembedded.org/mt/120281289/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 03/12] libpsl: use libidn2 instead of ICU
Quoted 3 lines · Khem Raj
libidn2 default was switched to build non-GPL3 images conveniently by switching to use ICU, where ICU is used by embedded systems more commonly than libidn2.
Luckily the library is dual-licensed which should help this. Only the -bin package is v3-only.
Quoted 5 lines
Switch back to libidn2 to respect upstream's opinion, and because ICU is
a monolithic dependency: this switch causes a minimal image containg libpsl to shrink by ~30MB.Which production image are you building ?
Production images are obviously hard to compare, so I was comparing minimal. Basically ICU is large, libidn2 is likely already present (gnutls and curl use it by default), so if you’re not otherwise using ICU that’s a big saving.
Ross
Re: [OE-core] [PATCH 03/12] libpsl: use libidn2 instead of ICU
Quoted 30 lines · Ross Burton
Quoted 2 lines · Khem Raj
libidn2 default was switched to build non-GPL3 images conveniently by switching to use ICU, where ICU is used by embedded systems more
commonly
Quoted 1 line
than libidn2.
Luckily the library is dual-licensed which should help this. Only the -bin package is v3-only.
Yes that certainly helps and maybe its fine to use libidn2 as default. However there are valid use cases in real products of using ICU since ICU is used system wide as well by many other applications in those systems and ICU data can be regenerated to contain just the data you need default kitchen sink of 30MB is not real usecase.
Switch back to libidn2 to respect upstream's opinion, and because ICU is
Quoted 4 lines
a monolithic dependency: this switch causes a minimal image containg libpsl to shrink by ~30MB.
Which production image are you building ?
Production images are obviously hard to compare, so I was comparing minimal. Basically ICU is large, libidn2 is likely already present (gnutls and curl use it by default), so if you’re not otherwise using ICU that’s a big saving.
Ross
Re: [OE-core] [PATCH 03/12] libpsl: use libidn2 instead of ICU
Quoted 1 line · Khem Raj
Yes that certainly helps and maybe its fine to use libidn2 as default. However there are valid use cases in real products of using ICU since ICU is used system wide as well by many other applications in those systems and ICU data can be regenerated to contain just the data you need default kitchen sink of 30MB is not real usecase.
Sure, and the option to switch it back to ICU will remain.
Ross
PATCH 4/12 patchelf: build with meson
In reply to Ross BurtonUpstream has meson support, so use it.
--- meta/recipes-devtools/patchelf/patchelf_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
meta/recipes-devtools/patchelf/patchelf_git.bb +2 -3
@@ -4,15 +4,14 @@ HOMEPAGE = "https://github.com/NixOS/patchelf" LICENSE = "GPL-3.0-only" -SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master \ -" +SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master" SRCREV = "7688b17c18d16f67fa8d5a82a2404c2e3a18648d" PV = "0.19.1" LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" -inherit autotools +inherit meson PACKAGES += "${PN}-zsh-completion" FILES:${PN}-zsh-completion = "${datadir}/zsh"
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH 04/12] patchelf: build with meson
README "Compiling and Testing" documents them in order: Autotools first, then CMake, then Meson. It seems meson is still work in progress E.g. tests support is TODO I wonder if its too early for distros to use it
Quoted 45 lines · Ross Burton via lists.openembedded.org
Upstream has meson support, so use it.
Signed-off-by Ross Burton <[email protected]>--- meta/recipes-devtools/patchelf/patchelf_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)meta/recipes-devtools/patchelf/patchelf_git.bb +2
-4@@ -4,15 +4,14 @@ HOMEPAGE = "https://github.com/NixOS/patchelf" LICENSE = "GPL-3.0-only" -SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master \ -" +SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master" SRCREV = "7688b17c18d16f67fa8d5a82a2404c2e3a18648d" PV = "0.19.1" LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" -inherit autotools +inherit meson PACKAGES += "${PN}-zsh-completion" FILES:${PN}-zsh-completion = "${datadir}/zsh" --2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#240963):
https://lists.openembedded.org/g/openembedded-core/message/240963
Mute This Topic: https://lists.openembedded.org/mt/120281290/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 04/12] patchelf: build with meson
Quoted 2 lines · Khem Raj via lists.openembedded.org
README "Compiling and Testing" documents them in order: Autotools first, then CMake, then Meson. It seems meson is still work in progress E.g. tests support is TODO I wonder if its too early for distros to use it
I assure you, even experimental and incomplete meson is a better choice than autotools. Especialy 'mature' autotools which tends to grow so many custom warts that we have to figure various 'Inappropriate' ways to patch them out.
Alex
Re: [OE-core] [PATCH 04/12] patchelf: build with meson
Quoted 4 lines · Alexander Kanavin
Quoted 1 line · Khem Raj via lists.openembedded.org
README "Compiling and Testing" documents them in order: Autotools first,
Quoted 9 lines
then CMake, then Meson. It seems meson is still work in progress
Quoted 1 line
E.g. tests support is TODO I wonder if its too early for distros to use
it
I assure you, even experimental and incomplete meson is a better choice than autotools. Especialy 'mature' autotools which tends to grow so many custom warts that we have to figure various 'Inappropriate' ways to patch them out.
Perhaps it will be better to get a sense of it from patchelf developers upstream. If it is where they are headed that might justify early switch a little bit
Quoted 3 lines
Alex
PATCH 5/12 xorg-app-common: add builder class variable
In reply to Ross BurtonAdd a variable XORGBUILDCLASS to control which builder class is used.
Defaults to autotools for no change, but this lets recipes switch to Meson if they can.
--- meta/recipes-graphics/xorg-app/xorg-app-common.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-graphics/xorg-app/xorg-app-common.inc +4 -1
@@ -11,6 +11,9 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI_EXT = "bz2" SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.${SRC_URI_EXT}" -inherit autotools pkgconfig features_check +XORGBUILDCLASS ??= "autotools" +inherit_defer ${XORGBUILDCLASS} + +inherit pkgconfig features_check FILES:${PN} += " ${libdir}/X11/${BPN} ${datadir}/X11/app-defaults/"
Signature · 1 line
2.43.0
PATCH 6/12 mkfontscale: use meson
In reply to Ross BurtonAlso drop util-macros-native dependency, which is only needed by the configure scripts.
--- meta/recipes-graphics/xorg-app/mkfontscale_1.2.4.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-graphics/xorg-app/mkfontscale_1.2.4.bb +3 -1
@@ -8,7 +8,7 @@ font name (XLFD) is generated, and is written together with the file \ name to a file fonts.scale in the directory. The resulting fonts.scale \ is used by the mkfontdir program." -DEPENDS = "util-macros-native zlib libfontenc freetype xorgproto" +DEPENDS = "zlib libfontenc freetype xorgproto" PROVIDES += "mkfontdir" RPROVIDES:${PN} += "mkfontdir"
@@ -19,3 +19,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5a60c596d1b5f3dee9f005b703b3180d" SRC_URI_EXT = "xz" SRC_URI[sha256sum] = "a01492a17a9b6c0ee3f92ee578850e305315b9f298da5f006a1cd4b51db01a5e" + +XORGBUILDCLASS = "meson"
Signature · 1 line
2.43.0
PATCH 7/12 xdpyinfo: build with meson
In reply to Ross BurtonWe can drop disable-xkb.patch as meson.build checks for the existance of XKBlib.h.
--- .../xorg-app/xdpyinfo/disable-xkb.patch | 22 ------------------- .../xorg-app/xdpyinfo_1.4.0.bb | 4 +--- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 meta/recipes-graphics/xorg-app/xdpyinfo/disable-xkb.patch
meta/recipes-graphics/xorg-app/xdpyinfo/disable-xkb.patch deleted +0 -22
@@ -1,22 +0,0 @@ -Upstream-Status: Pending - -Index: xdpyinfo-1.3.0/configure.ac -=================================================================== ---- xdpyinfo-1.3.0.orig/configure.ac 2011-10-21 21:34:21.000000000 -0700 -+++ xdpyinfo-1.3.0/configure.ac 2011-11-28 20:06:56.554056935 -0800 -@@ -47,11 +47,15 @@ - AC_CHECK_HEADERS([X11/extensions/multibuf.h X11/extensions/XShm.h],,,[#include <X11/Xlib.h>]) - CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"]) - -+AC_ARG_ENABLE(xkb, AC_HELP_STRING([--disable-xkb], [Disable XKB support]), -+ XKB="$enableval", XKB="yes") -+if test "x$XKB" = "xyes" ; then - PKG_CHECK_MODULES(DPY_XKB, x11, - [SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $DPY_XKB_CFLAGS $DPY_X11_CFLAGS" - AC_CHECK_HEADERS([X11/extensions/XKB.h X11/XKBlib.h],,,[#include <X11/Xlib.h>]) - CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"]) -+fi - - PKG_CHECK_MODULES(DPY_XF86VIDMODE, xxf86vm, - [SAVE_CPPFLAGS="$CPPFLAGS"
meta/recipes-graphics/xorg-app/xdpyinfo_1.4.0.bb +1 -3
@@ -12,9 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f3d09e6b9e203a1af489e16c708f4fb3" DEPENDS += "libxtst libxext libxxf86vm libxi libxrender libxinerama libxau libxcomposite" PE = "1" -SRC_URI += "file://disable-xkb.patch" - SRC_URI_EXT = "xz" SRC_URI[sha256sum] = "dc1de6e6e091ed46c4837b0ae9811e8182f7be0d2af638cab3e530ff081a48b6" -EXTRA_OECONF = "--disable-xkb" +XORGBUILDCLASS = "meson"
Signature · 1 line
2.43.0
PATCH 8/12 xev: build with meson
In reply to Ross Burton--- meta/recipes-graphics/xorg-app/xev_1.2.7.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-graphics/xorg-app/xev_1.2.7.bb +2 -0
@@ -15,3 +15,5 @@ DEPENDS += "libxrandr xorgproto" SRC_URI[sha256sum] = "95167895924de58e34b1013b2b0c8476e90d0888c6c39e7ae9bc35e3a19dba04" SRC_URI_EXT = "xz" + +XORGBUILDCLASS = "meson"
Signature · 1 line
2.43.0
PATCH 9/12 xeyes: build with meson
In reply to Ross Burton--- meta/recipes-graphics/xorg-app/xeyes_1.3.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-graphics/xorg-app/xeyes_1.3.1.bb +2 -0
@@ -12,3 +12,5 @@ SRC_URI_EXT = "xz" SRC_URI[sha256sum] = "5608d76b7b1aac5ed7f22f1b6b5ad74ef98c8693220f32b4b87dccee4a956eaa" DEPENDS += "libxau libxt libxext libxmu libxrender libxi" + +XORGBUILDCLASS = "meson"
Signature · 1 line
2.43.0
PATCH 10/12 xkbcomp: build with meson
In reply to Ross BurtonThe meson.build requires that bison is present, even if it may not be needed.
Drop --disable-selective-error as this isn't an option in meson.
--- meta/recipes-graphics/xorg-app/xkbcomp_1.5.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/xorg-app/xkbcomp_1.5.0.bb +2 -2
@@ -9,11 +9,11 @@ be read directly by XKB-capable X servers or utilities." LIC_FILES_CHKSUM = "file://COPYING;md5=be5e191f04d3f2cd80aa83b928ba984c" -DEPENDS += "libxkbfile" +DEPENDS += "bison-native libxkbfile" BBCLASSEXTEND = "native" -EXTRA_OECONF += "--disable-selective-werror" +XORGBUILDCLASS = "meson" SRC_URI_EXT = "xz" SRC_URI[sha256sum] = "2ac31f26600776db6d9cd79b3fcd272263faebac7eb85fb2f33c7141b8486060"
Signature · 1 line
2.43.0
PATCH 11/12 xrandr: build with meson
In reply to Ross Burton--- meta/recipes-graphics/xorg-app/xrandr_1.5.4.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-graphics/xorg-app/xrandr_1.5.4.bb +2 -0
@@ -14,4 +14,6 @@ PE = "1" SRC_URI_EXT = "xz" SRC_URI[sha256sum] = "2cafccb2aaf2491a4068676117a0d4f90ab307724b96fffc54cd1da953779400" +XORGBUILDCLASS = "meson" + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.43.0
PATCH 12/12 xset: build with meson
In reply to Ross BurtonWe can drop disable-xkb.patch as meson.build checks for the existance of XKBlib.h.
Don't explicitly disable xkb and fontcache, these are automatically detected with meson.
--- .../xorg-app/xset/disable-xkb.patch | 32 ------------------- meta/recipes-graphics/xorg-app/xset_1.2.6.bb | 5 ++- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 meta/recipes-graphics/xorg-app/xset/disable-xkb.patch
meta/recipes-graphics/xorg-app/xset/disable-xkb.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From a9a90a95047a0a08bb0fd0823961ed9707f451d4 Mon Sep 17 00:00:00 2001 -From: Richard Purdie <[email protected]> -Date: Mon, 22 May 2006 22:15:57 +0000 -Subject: [PATCH] add "-disable-xkb" option - -Upstream-Status: Pending - -Rebase for 1.2.1 by: Yu Ke <[email protected]> ---- - configure.ac | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/configure.ac b/configure.ac -index e578bfe..1847258 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -52,11 +52,15 @@ PKG_CHECK_MODULES(SET_XEXT, xext, - AC_CHECK_HEADERS([X11/extensions/dpms.h X11/extensions/MITMisc.h],,,[#include <X11/Xlib.h>]) - CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"]) - -+AC_ARG_ENABLE(xkb, AC_HELP_STRING([--disable-xkb], [Disable XKB support]), -+ XKB="$enableval", XKB="yes") -+if test "x$XKB" = "xyes" ; then - PKG_CHECK_MODULES(SET_XKB, x11, - [SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $SET_XKB_CFLAGS $SET_X11_CFLAGS" - AC_CHECK_HEADERS([X11/XKBlib.h],,,[#include <X11/Xlib.h>]) - CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"]) -+fi - - AC_ARG_WITH(xf86misc, AS_HELP_STRING([--with-xf86misc],[Enable xf86misc support.]), - [USE_XF86MISC="$withval"], [USE_XF86MISC="no"])
meta/recipes-graphics/xorg-app/xset_1.2.6.bb +2 -3
@@ -10,11 +10,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=373a2cff5a5e58e7ccff069e0ce9fe74" DEPENDS += "libxext libxmu libxau" PE = "1" -SRC_URI += "file://disable-xkb.patch" - SRC_URI_EXT = "xz" SRC_URI[sha256sum] = "623837349ea887bc003f01ee2e4b6b8ddd9c2774f632c6d70eead1b56306b695" +XORGBUILDCLASS = "meson" + CFLAGS += "-D_GNU_SOURCE" -EXTRA_OECONF = "--disable-xkb --without-fontcache"
Signature · 1 line
2.43.0