Preconditions/Environment ------------------------- I think the setup isn't important in this case, but I'm building on Debian 9/ Ubuntu 19.04 for ARM (Cortex A8/A9) and x86-64 targets. Triggering Action/Cause ----------------------- Install into a home directory of a user(not system user) a file with the USER as owner. Expectation ----------- No warning should be trigger. Actual Result ------------- do_package_qa: QA Issue: package: /home/user/user.xml is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] Reproducibility --------------- 20/20 I think the check in the insane.bbclass is not correct: dest = d.getVar('PKGDEST') pn = d.getVar('PN') home = os.path.join(dest, 'home') if path == home or path.startswith(home + os.sep): return Because the path, as far as I checked, will never start with 'home/' and the other comparison will only be valid for the home directory on the target but not for anything inside of home. But the comment and the reference manual states: "host-user-contaminated: Checks that no package produced by the recipe contains any files outside of /home with a user or group ID that matches the user running BitBake."
Hi, Can you provide more info on the steps you took? It's not clear to me what your objective is.
My objective is to install a file into a user directory like /home/user/user.xml which has user ownership. It is similar to what is done in https://git.yoctoproject.org/cgit.cgi/poky/tree/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb The difference is that I don't set the user id and so it starts at 1000 and most of the time this is same user id as used on the build system.
In this case you *want* a non-root UID, so the solution would be to skip this QA test: INSANE_SKIP_${PN} += "host-user-contaminated"