| Summary: | useradd.bbclass: useradd_preinst not run when rebuilding on second MACHINE | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Richard Tollerton <rich.tollerton> | ||||
| Component: | core | Assignee: | Maxin B. John <maxin.john> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | Medium+ | CC: | jku, ken.sharp, leonardo.sandoval.gonzalez, meta.mr.watcher, meta.watcher, rich.tollerton, richard.purdie, sgw | ||||
| Version: | 1.8 | ||||||
| Target Milestone: | 2.3 M4 | ||||||
| Hardware: | All | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | Don't know | |||||
| Attachments: |
|
||||||
Recreated the failure on master branch (commit: 979de7703cf3e468aa2923da1445138e1c93d234 ) for qemux86: $ bitbake useraddtest-b NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks WARNING: QA Issue: useraddtest-b: /useraddtest-b/usr/share/foo is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] NOTE: Tasks Summary: Attempted 732 tasks of which 709 didn't need to be rerun and all succeeded. for qemuarm: $ MACHINE=qemuarm bitbake useraddtest-b NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: Function failed: do_install (log file is located at /home/maxin/poky/build/tmp/work/armv5e-poky-linux-gnueabi/useraddtest-b/1.0-r0/temp/log.do_install.16684) ERROR: Logfile of failure stored in: /home/maxin/poky/build/tmp/work/armv5e-poky-linux-gnueabi/useraddtest-b/1.0-r0/temp/log.do_install.16684 Log data follows: | DEBUG: Executing shell function do_install | chown: invalid user: 'foo:foo One ugly work-around is to add this line in useradd.bbclass: do_install[nostamp] = "1" Other obvious way will be not to use the users/groups created by useradd inheriting packages in other packages. As RP mentioned here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7724#c16 Reverting the commit 0aed04a49ec13c3331169ca4fd2c820b03faf19c help in resolving this bug: commit 0aed04a49ec13c3331169ca4fd2c820b03faf19c Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue Sep 23 20:01:28 2014 +0100 layer.conf: Add in useradd dependencies as ABISAFE dependencies Currently allarch recipes using useradd rebuild each time MACHINE changes which is not desireable. Adding the useradd dependencies to this list ensures they do not change under these circumstances. (From OE-Core rev: 7743a309017f0fb9286f00b1f6f546ee95c05303) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> This bug is quite similar to the issue already reported in #7724: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7724 Late for 2.1. Moving to 2.2 Moving to M2 As per the comment, tried to save copies of the original master/group entries. However, it is really difficult to keep track when we clean the "base-passwd" package. Couldn't resolve it on time. Moving to 2.3 Created attachment 3484 [details]
proposed fix
update sstate_rundepfilter in sstatesig.py by providing a special case for useradd packages
patch sent to oe-core mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130047.html I'd suggest this is retested now recipe specific sysroots has merged as I'm hoping this solves the problem. (In reply to comment #9) > I'd suggest this is retested now recipe specific sysroots has merged as I'm > hoping this solves the problem. Tested with both latest "master" and "rpurdie/wip-rss". Still the error seems to be there (reproducible in the first build itself - no need for second build which depends on sstate) Have also updated the "useraddtest-b.bb" from DEPENDS += "useraddtest-a" to RDEPENDS_${PN} += "useraddtest-a" This doesn't seems to have an effect on the build failure. # bitbake useraddtest-b ... | chown: invalid user: ‘foo:foo’ | WARNING: /home/maxin/clone/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/useraddtest-b/1.0-r0/temp/run.do_install.22893:1 exit 1 from 'chown foo:foo /home/maxin/clone/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/useraddtest-b/1.0-r0/image/usr/share/foo' | ERROR: Function failed: do_install (log file is located at /home/maxin/clone/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/useraddtest-b/1.0-r0/temp/log.do_install.22893) ERROR: Task (/home/maxin/clone/poky/meta/recipes-core/useraddtest/useraddtest-b.bb:do_install) failed with exit code '1' NOTE: Tasks Summary: Attempted 634 tasks of which 0 didn't need to be rerun and 1 failed. (In reply to comment #10) > (In reply to comment #9) > > I'd suggest this is retested now recipe specific sysroots has merged as I'm > > hoping this solves the problem. > > Tested with both latest "master" and "rpurdie/wip-rss". Still the error > seems to be there (reproducible in the first build itself - no need for > second build which depends on sstate) Can you test the scenario with https://patchwork.openembedded.org/series/6324/ ? > > Have also updated the "useraddtest-b.bb" from > DEPENDS += "useraddtest-a" > to > RDEPENDS_${PN} += "useraddtest-a" > > This doesn't seems to have an effect on the build failure. > > # bitbake useraddtest-b > ... > | chown: invalid user: ‘foo:foo’ > | WARNING: > /home/maxin/clone/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/ > useraddtest-b/1.0-r0/temp/run.do_install.22893:1 exit 1 from 'chown foo:foo > /home/maxin/clone/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/ > useraddtest-b/1.0-r0/image/usr/share/foo' > | ERROR: Function failed: do_install (log file is located at > /home/maxin/clone/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/ > useraddtest-b/1.0-r0/temp/log.do_install.22893) > ERROR: Task > (/home/maxin/clone/poky/meta/recipes-core/useraddtest/useraddtest-b.bb: > do_install) failed with exit code '1' > NOTE: Tasks Summary: Attempted 634 tasks of which 0 didn't need to be rerun > and 1 failed.
> Can you test the scenario with
> https://patchwork.openembedded.org/series/6324/ ?
>
Applying this patch and adding DEPENDS += "shadow-native" to useraddtest-b.bb (as per RP's suggestion) fixes this error.
|
I suppose this qualifies as a regression of [YOCTO #4739]. To reproduce: 1) Start with a clean unmodified oe-core, no layers (I used master but this reproduces on fido) 2) Create meta/recipes-core/useraddtest-a.bb: SUMMARY = "useradd test A" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" ALLOW_EMPTY_${PN} = "1" inherit allarch useradd USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = " --system foo" USERADD_PARAM_${PN} = "-N -g foo foo" 3) Create meta/recipes-core/useraddtest-b_1.0.bb: DEPENDS += "useraddtest-a" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" FILES_${PN} = "${datadir}/foo" do_install () { mkdir -p ${D}${datadir} echo foo > ${D}${datadir}/foo chown foo:foo ${D}${datadir}/foo } 4) Build useraddtest-b for qemux86: `bitbake useraddtest-b` 5) Build useraddtest-b for qemuarm: `MACHINE=qemuarm bitbake useraddtest-b` The qemuarm build fails when building useraddtest-b with: | DEBUG: Executing shell function do_install | chown: invalid user: 'foo:foo'