-
Notifications
You must be signed in to change notification settings - Fork 827
Description
Hi all,
I encounter so many QA issues about contains reference to TMPDIR, and I can use WARN_QA:remove = "buildpaths" disable this warning message, but I'm still curious about this issue.
I tried tracking down the issue and came to the following conclusions, but not sure if is it right or not.
I check this guideline
This check ensures that build system paths (including TMPDIR) do not appear in output files, which not only leaks build system configuration into the target, but also hinders binary reproducibility as the output will change if the build system configuration changes.
I guess this warning message is because we use some relevant env. So I check openembedded-core/bitbake/conf/bitbake.conf file
- TMPDIR = "${TOPDIR}/tmp" -> WORKDIR = "${TMPDIR}/work/${PF}" -> …
I think if we use relevant env that will get this warning message.
and I think we can use this method avoid this issue e.g.
SRC_URI = "file://example.c"
...
FILES_${PN} += "${bindir}/example"
...
# Remove the TMPDIR reference from the output binary
do_install_append() {
sed -i -e "s|${TMPDIR}|/tmp|g" ${D}${bindir}/example
}
Does anyone have a better solution? Or is my deduction wrong?