Further check-layer fixes
v2 cover Further check-layer fixes
Following on from recent changes merged to master, the patches here fix yocto-check-layer issues and clean up unnecessarily arch-dependent PACKAGECONFIG / SRC_URI values.
The vardep changes I had in v1 of this series were the wrong way to try to fix the remaining issues. Instead, the PACKAGECONFIG test in do_recipe_qa needs moving to a different point in the build process to allow for arch-dependent values. We can't eliminate all architecture dependencies from PACKAGECONFIG, it would be too difficult to support all valid use cases with that restriction.
Moving the PACKAGECONFIG QA test is left for another patch series. These patches can be taken independently while we continue to figure out the correct solution for the QA test.
---
Changes in v2:
- Dropped unnecessary changes to vardeps.
- Improved commit message for initscripts SRC_URI change.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Paul Barker (8):
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
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-multimedia/flac/flac_1.5.0.bb | 2 +- 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 +- 8 files changed, 10 insertions(+), 14 deletions(-)
---
base-commit: aeb2a667b93a14dec2fb9f564c77912b56803d2b
change-id: 20260318-fix-checklayer-2-af057a82ca74
Best regards,
Signature · 1 line
Paul Barker
PATCH v2 1/8 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 v2 2/8 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 v2 3/8 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 v2 4/8 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 v2 5/8 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 v2 6/8 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 v2 7/8 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 v2 8/8 initscripts: Make SRC_URI arch independent
In reply to Paul BarkerAvoid making SRC_URI unnecessarily dependent on the target architecture. The alignment.sh file will only be installed for relevant 32-bit ARM targets, but there's no benefit to making SRC_URI inclusion conditional.
--- 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
Quoted 18 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Paul Barker
Sent: den 19 mars 2026 17:05
To: [email protected]
Cc: Paul Barker <[email protected]>
Subject: [OE-core] [PATCH v2 0/8] Further check-layer fixesFollowing on from recent changes merged to master, the patches here fix yocto-check-layer issues and clean up unnecessarily arch-dependent PACKAGECONFIG /
SRC_URIvalues.The vardep changes I had in v1 of this series were the wrong way to try to fix the remaining issues. Instead, the PACKAGECONFIG test in
do_recipe_qaneeds moving to a different point in the build process to allow for arch-dependent values. We can't eliminate all architecture dependencies from PACKAGECONFIG, it would be too difficult to support all valid use cases with that restriction.
Quoted 3 lines
Moving the PACKAGECONFIG QA test is left for another patch series. These patches can be taken independently while we continue to figure out the correct solution for the QA test.
I have sent two patches that solve the PACKAGECONFIG QA problem.
Quoted 27 lines
---
Changes in v2:
- Dropped unnecessary changes to vardeps.
- Improved commit message for initscriptsSRC_URIchange.
- Link to v1: https://lore.kernel.org/r/[email protected]---
Paul Barker (8):
checklayer: Fix regex inget_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: MakeSRC_URIarch independentmeta/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-multimedia/flac/flac_1.5.0.bb | 2 +- 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 +- 8 files changed, 10 insertions(+), 14 deletions(-)
Quoted 7 lines
---
base-commit:aeb2a667b93a14dec2fb9f564c77912b56803d2b
change-id: 20260318-fix-checklayer-2-af057a82ca74Best regards,
--
Paul Barker
//Peter