From eaa6d03a724aa318730c949f3ee4320737a2588f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 27 Oct 2026 20:30:47 -0700 Subject: [PATCH] mariadb: Remove the pre-generated bison output from the source tree The release tarball ships sql/yy_{mariadb,oracle}.{cc,hh} generated on MariaDB's build host. The parser is regenerated in ${B} with bison-native, but sql/*.cc include "yy_mariadb.hh", which resolves to the stale copy next to them in ${S}. Its #line directives carry /home/buildbot/tarball-docker/... into the debug info and libmariadbd.a, which the buildpaths QA check reports since it matches the /home/build HOME of the yoe build container: QA Issue: File /usr/lib/libmariadbd.a in package libmysqlclient-staticdev contains a reference to the build host HOME directory. [buildpaths] It also silently mixes a header from one bison run with a parser from another. Delete the shipped files before configuring so that only the build's own bison output is used. Signed-off-by: Khem Raj --- meta-oe/recipes-dbs/mysql/mariadb.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 390f9853bc..434d176774 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -113,6 +113,14 @@ do_compile:prepend:class-target () { sed -i -e "s:CMAKE_SYSROOT:CMAKE_SYSROOT_PLACE_HOLDER:g" ${S}/libmariadb/mariadb_config/mariadb_config.c.in } +do_configure:prepend() { + # The parser is regenerated in ${B} with bison-native, but sql/*.cc + # would still #include the stale headers next to them in ${S}, whose + # #line directives carry /home/buildbot/... paths into the debug info. + rm -f ${S}/sql/yy_mariadb.cc ${S}/sql/yy_mariadb.hh \ + ${S}/sql/yy_oracle.cc ${S}/sql/yy_oracle.hh +} + do_configure:append() { # handle distros with different values of ${libexecdir} libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`