| Summary: | rpm fails to generate root file system when /bin/traceroute6 is included | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Khem Raj <raj.khem> |
| Component: | devtools / tool chain | Assignee: | Saul Wold <sgw> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | corneliux.stoicescu, jessica.zhang, liang.li2, mark.hatle, meta.mr.watcher, meta.watcher, richard.purdie, sgw |
| Version: | 1.3 | ||
| Target Milestone: | 1.3 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
Can you reproduce this? I just tried to build core-image-basic which contains iputils with the RPM Package management and was not able to get the same failure. Did you check log.do_rootfs No I had not orignally, now I do see the chown issue, I am working to get better details. I have tracked into the pkg_postinst processing, it occurs with both RPM and IPK which makes me think it might be related to pseudo. The paths in the pkg_postinst functions (in the recipes) are target relative and that's also the paths that are being used for the chmod. Not sure if there should be some processing of the paths when run on the host system or if the packaging systems/pseudo need a chroot someplace. I have a patch http://patches.openembedded.org/patch/35187/ $ rpm -pq --scripts iputils-traceroute6-s20101006-r5.i586.rpm
warning: iputils-traceroute6-s20101006-r5.i586.rpm: Header V4 DSA signature: NOKEY, key ID e03cb778
postinstall scriptlet (using /bin/sh):
# iputils-traceroute6 - postinst
chmod 4555 /bin/traceroute6
^-- I think this is the problem.
So, thinking about this a bit:
pkg_postinst_${PN}-traceroute6 () {
chmod 4555 ${base_bindir}/traceroute6
}
It's pretty obvious that the *intent* of this is to somehow make sure the file gets the right mode. I'm pretty sure we just plain don't need this, though -- if do_install works, RPM will take care of that anyway.
Khem's patch looks reasonable to me, but I'm a bit unsure about one thing. These scripts will be expanded at build time, then embedded in RPMs. Will they work if the RPM is then used with another build directory or target?
I'm wondering whether just removing these would work...
(In reply to comment #6) > $ rpm -pq --scripts iputils-traceroute6-s20101006-r5.i586.rpm > warning: iputils-traceroute6-s20101006-r5.i586.rpm: Header V4 DSA signature: > NOKEY, key ID e03cb778 > postinstall scriptlet (using /bin/sh): > # iputils-traceroute6 - postinst > chmod 4555 /bin/traceroute6 > > ^-- I think this is the problem. > > So, thinking about this a bit: > > pkg_postinst_${PN}-traceroute6 () { > chmod 4555 ${base_bindir}/traceroute6 > } > > It's pretty obvious that the *intent* of this is to somehow make sure the > file gets the right mode. I'm pretty sure we just plain don't need this, > though -- if do_install works, RPM will take care of that anyway. > > Khem's patch looks reasonable to me, but I'm a bit unsure about one thing. > These scripts will be expanded at build time, then embedded in RPMs. Will > they work if the RPM is then used with another build directory or target? > > I'm wondering whether just removing these would work... see its $D and not ${D} for a reason :) Verified in: commit: 718eb85806e080d0b165344b272e531ef19421eb Date: Tue Sep 25 17:14:23 2012 -0700 Bitbaked core-image-basic with qemux86; log.do_rootfs shows: " iputils-tracepath ################################################## iputils-tracepath6 ################################################## iputils-traceroute6 ################################################## gawk-common ################################################## ethtool ################################################## " run "bitbake core-image-basic" with qemux86 (package type ipk),log.do_rootfs also no such error: ... Installing iputils-traceroute6 (s20101006-r6) to root... Downloading file:/buildarea/tester/build_102/tmp/deploy/ipk/i586/iputils-traceroute6_s20101006-r6_i586.ipk. Installing iputils-tracepath6 (s20101006-r6) to root... Downloading file:/buildarea/tester/build_102/tmp/deploy/ipk/i586/iputils-tracepath6_s20101006-r6_i586.ipk. ... git info :718eb85806e080d0b165344b272e531ef19421eb git branch: poky/master |
I get this error iputils-traceroute6 ################################################## chmod: cannot access `/bin/traceroute6': No such file or directory when building an image. packaging backend is rpm. I havent tried opkg or dpkg But then I also see meta/recipes-extended/iputils/iputils_s20101006.bb do_install () .... install -m 4555 traceroute6 ${D}${base_bindir}/ I wonder if those permissions are not ok for rpm ?