From 17fb07cf799cc98205c63c2d2cc956fc8d12b533 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 Nov 2026 17:50:55 -0800 Subject: [PATCH] mongodb: Keep build paths out of buildInfo By default buildInfo embeds the compiler version string and CCFLAGS, CXXFLAGS and LINKFLAGS, which carry --sysroot and -ffile-prefix-map paths into mongod and mongos and trigger buildpaths QA warnings. Pass a variables file that drops those entries from MONGO_BUILDINFO_ENVIRONMENT_DATA. Signed-off-by: Khem Raj --- .../recipes-dbs/mongodb/mongodb/oe-buildinfo.vars | 11 +++++++++++ .../meta-python/recipes-dbs/mongodb/mongodb_git.bb | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/oe-buildinfo.vars diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/oe-buildinfo.vars b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/oe-buildinfo.vars new file mode 100644 index 0000000000..950dc4baa2 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/oe-buildinfo.vars @@ -0,0 +1,11 @@ +# Keep the compiler and its flags, which carry build paths, out of +# the buildInfo command and --version output +from mongo.generators import default_buildinfo_environment_data + +MONGO_BUILDINFO_ENVIRONMENT_DATA = { + k: v for k, v in default_buildinfo_environment_data().items() + if k not in ('cc', 'ccflags', 'cxx', 'cxxflags', 'linkflags') +} + +# SConstruct rejects unknown names left in a variables file +del default_buildinfo_environment_data diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 22169ddd64..6c4fdf91a9 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb @@ -41,6 +41,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ file://0003-boost-Fix-build-with-clang-23.patch \ file://0004-ssl-Fix-build-with-OpenSSL-4.patch \ file://0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch \ + file://oe-buildinfo.vars \ " SRC_URI:append:libc-musl = "\ file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ @@ -87,6 +88,7 @@ EXTRA_OESCONS = "PREFIX=${prefix} \ TARGET_ARCH=${MONGO_ARCH} \ MONGO_VERSION=${PV} \ OBJCOPY=${OBJCOPY} \ + --variables-files=${UNPACKDIR}/oe-buildinfo.vars \ --ssl \ --disable-warnings-as-errors \ --use-system-zlib \