Further check-layer fixes
cover Further check-layer fixes
This series follows on from the two patches I sent earlier this week [1], and Richard's patch to fix [2]. With all these applied, most of the check-layer failures in openembedded-core are resolved, with two exceptions:
- mesa:do_recipe_qa signature changes based on MACHINE due to use of VULKAN_DRIVES in PACKAGECONFIG. However, adding VULKAN_DRIVERS to PACKAGECONFIG[vardeps] doesn't fix the issue.
- lttng-ust:do_recipe_qa signature changes based on MACHINE due to use of PYTHON_OPTION (-> PYTHON_SITEPACKAGES_DIR -> libdir) in PACKAGECONFIG. However, adding PYTHON_OPTION or PYTHON_SITEPACKAGES_DIR to PACKAGECONFIG[vardeps] doesn't fix the issue.
There may be a couple of other things that need investigating to make everything pass, but I wanted to get validation on this initial set of fixes now. In particular, is setting PACKAGECONFIG[vardeps] the right thing to do?
[1]: https://lore.kernel.org/openembedded-core/[email protected]/
[2]: https://lore.kernel.org/openembedded-core/[email protected]/
---
Paul Barker (12):
checklayer: Fix regex in get_signatures
curl: Drop arch dependent search paths
ghostscript: Drop arch dependent search paths
libssh2: Drop arch dependent search paths
flac: Use arch independent search path
gettext: Use arch independent search paths
gnutls: Use arch independent search paths
initscripts: Make SRC_URI arch independent
linux-yocto: Avoid arch dependent vardeps for SRC_URI
libsdl2: Explicitly set PACKAGECONFIG vardeps
graphene: Explicitly set PACKAGECONFIG vardeps gstreamer1.0-plugins-good: Explicitly set PACKAGECONFIG vardeps
meta/recipes-core/gettext/gettext_1.0.bb | 4 ++-- meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +--- meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb | 3 +-- meta/recipes-graphics/graphene/graphene_1.10.8.bb | 3 +++ meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb | 3 +++ meta/recipes-kernel/linux/linux-yocto.inc | 5 +++++ meta/recipes-multimedia/flac/flac_1.5.0.bb | 2 +- .../recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.9.bb | 3 +++ meta/recipes-support/curl/curl_8.19.0.bb | 2 +- meta/recipes-support/gnutls/gnutls_3.8.12.bb | 4 ++-- meta/recipes-support/libssh2/libssh2_1.11.1.bb | 3 +-- scripts/lib/checklayer/__init__.py | 2 +- 12 files changed, 24 insertions(+), 14 deletions(-)
---
base-commit: 531f87111d83430615f2e20dd41a3dd5fc25c7ab
change-id: 20260318-fix-checklayer-2-af057a82ca74
Best regards,
Signature · 1 line
Paul Barker
PATCH 1/12 checklayer: Fix regex in get_signatures
After commit 11373def3171 ("sstatesig/populate_sdk_ext: Improve unihash cache handling") in openembedded-core, the locked-sigs.inc file may contain unihash map entries as well as a list of locked sigs. The unihash map entries consist of four fields separated by : - pn, task, task hash and unihash. The current regex in get_signatures cannot parse these correctly, it grabs the first 3 elements into <task> when there should only be two elements, leading to an error:
Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/check-layer/build/layers/openembedded-core/scripts/yocto-check-layer", line 252, in <module>
ret = main()
File "/srv/pokybuild/yocto-worker/check-layer/build/layers/openembedded-core/scripts/yocto-check-layer", line 215, in main
td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/srv/pokybuild/yocto-worker/check-layer/build/layers/openembedded-core/scripts/lib/checklayer/__init__.py", line 340, in get_signatures
(recipe, task) = s.group('task').split(':')
^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
Modify the regex so that it doesn't accidentally pick up the third field of the unihash map entries.
--- scripts/lib/checklayer/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/checklayer/__init__.py +1 -1
@@ -324,7 +324,7 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None): else: raise - sig_regex = re.compile(r"^(?P<task>.*:.*):(?P<hash>.*) .$") + sig_regex = re.compile(r"^(?P<task>[^:]*:[^:]*):(?P<hash>.*) .$") tune_regex = re.compile(r"(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*") current_tune = None with open(sigs_file, 'r') as f:
Signature · 1 line
2.43.0
PATCH 2/12 curl: Drop arch dependent search paths
In reply to Paul BarkerSince the creation of the curl recipe in this repo in 2010, the search path has been specified relative to STAGING_LIBDIR. This causes the a dependency from the task hash of do_recipe_qa on baselib, which may be 'lib' or 'lib64' depending on the target architecture. This dependency trips up yocto-check-layer.
Somewhere between the depths of history and today, the need for this search path has gone away. Simply using '--with-zlib' now works.
--- meta/recipes-support/curl/curl_8.19.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/curl/curl_8.19.0.bb +1 -1
@@ -73,7 +73,7 @@ PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" PACKAGECONFIG[websockets] = "--enable-websockets,--disable-websockets" -PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" # Use host certificates for non-target builds. As libcurl doesn't honor any of the env vars (like
Signature · 1 line
2.43.0
PATCH 3/12 ghostscript: Drop arch dependent search paths
In reply to Paul BarkerThe value of STAGING_LIBDIR depends on baselib, which may be "lib" or "lib64" depending on the target architecture. To avoid making PACKAGECONFIG unnecessarily arch-dependent, we can use drop the search prefix for x11 libraries as the configure script is capable of finding them without this information.
--- meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-extended/ghostscript/ghostscript_10.06.0.bb +1 -2
@@ -33,8 +33,7 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3" PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn" PACKAGECONFIG[libpaper] = "--with-libpaper,--without-libpaper,libpaper" -PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ - --without-x, virtual/libx11 libxext libxt" +PACKAGECONFIG[x11] = "--with-x, --without-x, virtual/libx11 libxext libxt" EXTRA_OECONF = "--with-jbig2dec \ --with-fontpath=${datadir}/fonts \
Signature · 1 line
2.43.0
PATCH 4/12 libssh2: Drop arch dependent search paths
In reply to Paul BarkerThe value of STAGING_LIBDIR depends on baselib, which may be "lib" or "lib64" depending on the target architecture. To avoid making PACKAGECONFIG unnecessarily arch-dependent, we can use drop the search prefix for libz and openssl as the configure script is capable of finding them without this information.
--- meta/recipes-support/libssh2/libssh2_1.11.1.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-support/libssh2/libssh2_1.11.1.bb +1 -2
@@ -18,14 +18,13 @@ inherit autotools pkgconfig ptest EXTRA_OECONF += "\ --with-libz \ - --with-libz-prefix=${STAGING_LIBDIR} \ --disable-rpath \ " DISABLE_STATIC = "" # only one of openssl and gcrypt could be set PACKAGECONFIG ??= "openssl" -PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl" +PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.43.0
PATCH 5/12 flac: Use arch independent search path
In reply to Paul BarkerThe value of STAGING_LIBDIR depends on baselib, which may be "lib" or "lib64" depending on the target architecture. To avoid making PACKAGECONFIG unnecessarily arch-dependent, we can use STAGING_DIR_HOST as the search prefix for libogg instead.
The search prefix is necessary here, removing it completely results in compilation errors.
--- meta/recipes-multimedia/flac/flac_1.5.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-multimedia/flac/flac_1.5.0.bb +1 -1
@@ -34,7 +34,7 @@ PACKAGECONFIG ??= " \ ogg \ " PACKAGECONFIG[avx] = "--enable-avx,--disable-avx" -PACKAGECONFIG[ogg] = "--enable-ogg --with-ogg-libraries=${STAGING_LIBDIR} --with-ogg-includes=${STAGING_INCDIR},--disable-ogg,libogg" +PACKAGECONFIG[ogg] = "--enable-ogg --with-ogg=${STAGING_DIR_HOST},--disable-ogg,libogg" PACKAGES += "libflac libflac++" FILES:${PN} = "${bindir}/*"
Signature · 1 line
2.43.0
PATCH 6/12 gettext: Use arch independent search paths
In reply to Paul BarkerThe value of STAGING_LIBDIR depends on baselib, which may be "lib" or "lib64" depending on the target architecture. To avoid making PACKAGECONFIG unnecessarily arch-dependent, we can use STAGING_DIR_HOST as the search prefix for libunistring & ncurses instead.
--- meta/recipes-core/gettext/gettext_1.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/gettext/gettext_1.0.bb +2 -2
@@ -63,8 +63,8 @@ PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0" PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2" # Need paths here to avoid host contamination but this can cause RPATH warnings # or problems if $libdir isn't $prefix/lib. -PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring" -PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," +PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_DIR_HOST},--with-included-libunistring,libunistring" +PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_DIR_HOST},--disable-curses,ncurses," PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux --disable-acl,attr libselinux" do_install:append:libc-musl () {
Signature · 1 line
2.43.0
PATCH 7/12 gnutls: Use arch independent search paths
In reply to Paul BarkerThe value of STAGING_LIBDIR depends on baselib, which may be "lib" or "lib64" depending on the target architecture. To avoid making PACKAGECONFIG unnecessarily arch-dependent, we can use STAGING_DIR_HOST as the search prefix for libseccomp & libdl instead.
--- meta/recipes-support/gnutls/gnutls_3.8.12.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/gnutls/gnutls_3.8.12.bb +2 -2
@@ -34,12 +34,12 @@ PACKAGECONFIG ??= "libidn libtasn1 ${@bb.utils.filter('DISTRO_FEATURES', 'seccom # You must also have CONFIG_SECCOMP enabled in the kernel for # seccomp to work. -PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp" +PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_DIR_HOST},ac_cv_libseccomp=no,libseccomp" PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2" PACKAGECONFIG[libtasn1] = "--without-included-libtasn1,--with-included-libtasn1,libtasn1" PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit" PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers" -PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}" +PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_DIR_HOST}" PACKAGECONFIG[dane] = "--enable-libdane,--disable-libdane,unbound" # Certificate compression PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
Signature · 1 line
2.43.0
PATCH 8/12 initscripts: Make SRC_URI arch independent
In reply to Paul BarkerAvoid making SRC_URI unnecessarily dependent on the target architecture.
--- meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -3
@@ -32,14 +32,12 @@ SRC_URI = "file://functions \ file://save-rtc.sh \ file://dmesg.sh \ file://logrotate-dmesg.conf \ + file://alignment.sh \ ${@bb.utils.contains('DISTRO_FEATURES','selinux','file://sushell','',d)} \ " S = "${UNPACKDIR}" -SRC_URI:append:arm = " file://alignment.sh" -SRC_URI:append:armeb = " file://alignment.sh" - KERNEL_VERSION = "" DEPENDS:append = " update-rc.d-native"
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH 08/12] initscripts: Make SRC_URI arch independent
Quoted 22 lines · Paul Barker via lists.openembedded.org
Avoid making
SRC_URIunnecessarily dependent on the target architecture.Signed-off-by Paul Barker <[email protected]>---
meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +---1 file changed, 1 insertion(+), 3 deletions(-)meta/recipes-core/initscripts/initscripts_1.0.bb +1
-0@@ -32,14 +32,12 @@ SRC_URI = "file://functions \ file://save-rtc.sh \ file://dmesg.sh \ file://logrotate-dmesg.conf \ + file://alignment.sh \ ${@bb.utils.contains('DISTRO_FEATURES','selinux','file://sushell','',d)} \"
S = "${UNPACKDIR}"
meta/recipes-core/initscripts/initscripts_1.0.bb SRC_URI = "file://functions \ · line 42
Quoted 3 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +0
-3-SRC_URI:append:arm = " file://alignment.sh" -SRC_URI:append:armeb = " file://alignment.sh" -
alignment.sh is pointless outside of arm. The commit message needs to mention that the installation of it is still conditional on the arm arch.
Cheers,
Richard
PATCH 9/12 linux-yocto: Avoid arch dependent vardeps for SRC_URI
In reply to Paul Barkeryocto-check-layer will fail if SRC_URI is dependent on the target architecture. Usually we would try to remove the dependency, but for the linux-yocto recipe it's necessary in order to select the appropriate branch from the source repository.
As none of the checks performed by yocto-check-layer actually depend on the selected branch, we can discard this depedency by specifying a generic vardepvalue for the branch name.
--- meta/recipes-kernel/linux/linux-yocto.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-kernel/linux/linux-yocto.inc +5 -0
@@ -93,3 +93,8 @@ do_devshell:prepend() { d.setVar("HOSTPKG_CONFIG", "pkg-config-native") d.appendVar("OE_TERMINAL_EXPORTS", " HOSTPKG_CONFIG") } + +# Avoid potentially architecture dependent value when evaluating vardeps of +# SRC_URI. This does mean do_recipe_qa may not re-run when KBRANCH changes, but +# that should not invalidate the QA test. +KBRANCH[vardepvalue] = "master"
Signature · 1 line
2.43.0
PATCH 10/12 libsdl2: Explicitly set PACKAGECONFIG vardeps
In reply to Paul BarkerThe variable dependencies are discarded for PACKAGECONFIG, which may cause tasks which use the value of PACKAGECONFIG to be considered arch-independent, even when the value is actually different depending on the target architecture.
In this case, we use the value of TUNE_FEATURES in PACKAGECONFIG, which is obviously arch-dependent so we should explicitly list this dependency.
--- meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb +3 -0
@@ -80,6 +80,9 @@ PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_VULKAN=OFF" PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon" PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender" +# PACKAGECONFIG dependencies are not automatically carried forwards +PACKAGECONFIG[vardeps] += "TUNE_FEATURES" + CFLAGS:append:class-native = " -DNO_SHARED_MEMORY" FILES:${PN} += "${datadir}/licenses/SDL2/LICENSE.txt"
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH 10/12] libsdl2: Explicitly set PACKAGECONFIG vardeps
Quoted 22 lines · Paul Barker via lists.openembedded.org
The variable dependencies are discarded for PACKAGECONFIG, which may cause tasks which use the value of PACKAGECONFIG to be considered arch-independent, even when the value is actually different depending on the target architecture.
In this case, we use the value of
TUNE_FEATURESin PACKAGECONFIG, which is obviously arch-dependent so we should explicitly list this dependency.Signed-off-by Paul Barker <[email protected]>---
meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb | 3 +++1 file changed, 3 insertions(+)meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb +0
-0@@ -80,6 +80,9 @@ PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_VULKAN=OFF"PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon" PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender"
meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_VULKAN=OFF" · line 84
Quoted 2 lines
meta/recipes-graphics/libsdl2/libsdl2_2.32.10.bb +2
-0+# PACKAGECONFIG dependencies are not automatically carried forwards +PACKAGECONFIG[vardeps] += "TUNE_FEATURES"
I'm not understanding the issue here.
I added a vardepvalue for PACKAGECONFIG but the usage of TUNE_FEATURES here shouldn't matter, the expanded value will differ and that should be all we need for the taskhashes to work properly.
What issue are you trying to solve here?
Cheers,
Richard
PATCH 11/12 graphene: Explicitly set PACKAGECONFIG vardeps
In reply to Paul BarkerThe variable dependencies are discarded for PACKAGECONFIG, which may cause tasks which use the value of PACKAGECONFIG to be considered arch-independent, even when the value is actually different depending on the target architecture.
In this case, we use the value of TUNE_FEATURES in PACKAGECONFIG, which is obviously arch-dependent so we should explicitly list this dependency.
--- meta/recipes-graphics/graphene/graphene_1.10.8.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-graphics/graphene/graphene_1.10.8.bb +3 -0
@@ -16,6 +16,9 @@ PACKAGECONFIG ?= "gobject-types ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', PACKAGECONFIG[gobject-types] = "-Dgobject_types=true,-Dgobject_types=false,glib-2.0" PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false," +# PACKAGECONFIG dependencies are not automatically carried forwards +PACKAGECONFIG[vardeps] += "TUNE_FEATURES" + GIR_MESON_ENABLE_FLAG = 'enabled' GIR_MESON_DISABLE_FLAG = 'disabled'
Signature · 1 line
2.43.0
PATCH 12/12 gstreamer1.0-plugins-good: Explicitly set PACKAGECONFIG vardeps
In reply to Paul BarkerThe variable dependencies are discarded for PACKAGECONFIG, which may cause tasks which use the value of PACKAGECONFIG to be considered arch-independent, even when the value is actually different depending on the target architecture.
In this case, we use the value of TUNE_FEATURES in PACKAGECONFIG, which is obviously arch-dependent so we should explicitly list this dependency.
--- meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.9.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.9.bb +3 -0
@@ -27,6 +27,9 @@ PACKAGECONFIG ??= " \ bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \ " +# PACKAGECONFIG dependencies are not automatically carried forwards +PACKAGECONFIG[vardeps] += "TUNE_FEATURES" + X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled" X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
Signature · 1 line
2.43.0