| Summary: | Missing files in rootfs when adding links /bin ->/usr/bin and /lib -> /usr/lib in recipe base-files | ||
|---|---|---|---|
| Product: | [Runtime] Package Management Issues | Reporter: | docekal |
| Component: | package-management-issues | Assignee: | Joshua Lock <joshuagloe> |
| Status: | RESOLVED NOTABUG | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | ||
| Version: | unspecified | ||
| Target Milestone: | 2.3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
docekal
2016-09-08 09:07:27 UTC
As well as updating base-files to not create the /bin and /lib links, you also need to change the bindir and libdir variables so that recipes install files into the location you're expecting. I've got a WIP series to enable a merged /usr[1] which you can view in my joshuag/usrmerge[2] branch on the poky-contrib repository that achieves a similar goal. See specifically the change to bitbake.conf[3] in that tree. If a similar set of changes result in the same error please update this bug and we'll try to reproduce the issue and root cause the error. 1. http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ 2. http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=joshuagl/usrmerge 3. http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=joshuagl/usrmerge&id=9c0a5915a7590aa053e48ca0db868b90e168ebf0 I am assigning this back to you Joshua; since docekal@spray.se is no longer a valid e-mail addresses. I will let you decide if you want to close this bug or not. Thanks, Stephen docekal@spray.se used to be valid until recently (bugzilla recommends registration on an e-mail adress that is used for spam, for this reason I do not check mail there regularly, and do not have the password handy to check if it is still alive). Unfortunately I can not check Your feedback for a week or two, since I'm currently doing release work. Please have patience with me during this time. /BR Jan Hi, I have finally had some time to look into this problem: Defining the variables as described in: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=joshuagl/usrmerge&id=9c0a5915a7590aa053e48ca0db868b90e168ebf0 solved part of the problem. The remaining problem where package manager (smart) complained on missing dependencies (see also bug id 7040) for /bin/sh, and /bin/bash, where solved by adding RPROVIDES_${PN} for busybox and bash. Changing the base_XXXdir valiables made it possible for me to build a file system successfully. I have not tested it however. Applying the same method on our own code base failed however (all our recipes do not use base_XXXdir variables). I think this has to do with explicit or implicit dependency on package base-files is missing. I will investigate this further, and in the mean time i provide my changes/files below that you either may comment on or use for furhter work. Note that I'm not a seasoned yocto hacker. /BR Jan --- ~/yocto/poky/build/confbblayers.conf ---------------------------------------- # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly POKY_BBLAYERS_CONF_VERSION = "2" BBPATH = "${TOPDIR}" BBFILES ?= "" BBLAYERS ?= " \ /home/janl/yocto/poky/meta-janl \ /home/janl/yocto/poky/meta \ /home/janl/yocto/poky/meta-poky \ /home/janl/yocto/poky/meta-yocto-bsp \ " BBLAYERS_NON_REMOVABLE ?= " \ /home/janl/yocto/poky/meta \ /home/janl/yocto/poky/meta-poky \ " --- ~/yocto/poky/meta-janl/conf/layer.conf -(probably redundant)----------------------- # We have a conf and classes directory, add to BBPATH BBPATH =. "${LAYERDIR}:" # We have a packages directory, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "janl" BBFILE_PATTERN_janl := "^${LAYERDIR}/" BBFILE_PRIORITY_janl := "6" bin = "${exec_prefix}/bin" sbin = "${exec_prefix}/sbin" lib = "${exec_prefix}/${baselib}" nonarch_lib = "${exec_prefix}/lib" export base_bindir = "${bin}" export base_sbindir = "${sbin}" export base_libdir = "${lib}" export nonarch_base_libdir = "${nonarch_lib}" --- ~/yocto/poky/meta-janl/conf/local.conf ------------------------ ## include ../../meta/conf/bitbake.conf include ../../build/conf/local.conf # CONF_VERSION = "1" bin = "${exec_prefix}/bin" sbin = "${exec_prefix}/sbin" lib = "${exec_prefix}/${baselib}" nonarch_lib = '${exec_prefix}/lib' export base_bindir = '${bin}' export base_sbindir = '${sbin}' export base_libdir = '${lib}' export nonarch_base_libdir = '${nonarch_lib}' # Fix for a bug that breaks compilation (qemu crashes) # see: http://git.yoctoproject.org/cgit.cgi/meta-fsl-ppc/tree/README#n18 DISTRO_FEATURES_remove = " gobject-introspection-data" --- ~/yocto/poky/meta-janl/recipes-janl/base-files/base-files_%.bbappend ------------------------ dirs755_remove = "/bin /lib /sbin" do_install_extra_links() { ln -svr ${D}/usr/bin ${D}/bin ln -svr ${D}/usr/lib ${D}/lib ln -svr ${D}/usr/sbin ${D}/sbin } addtask install_extra_links after do_install before do_populate_sysroot do_package --- ~/yocto/poky/meta-janl/recipes-janl/bash/bash_%.bbappend ------------------------ RPROVIDES_${PN} += "/bin/bash" --- ~/yocto/poky/meta-janl/recipes-janl/busybox/busybox_%.bbappend ------------------------ RPROVIDES_${PN} += "/bin/sh" It appears that the info requested has been supplied. Please place it back in NEEDINFO if you have other questions. It now seems that everything is "solved", either using Joshua's patches provided in his links (I set up a new layer that that made corresponding changes unconditionally, in order to be able to move them to our code base/build system in order to ensure same changes where running in both places). I guess and hope that Joshua's code will eventually be integrated in the main code base.
The only remaining issue is my way of "fudging" the dependency calculation by adding:
RPROVIDES_${PN} += "/bin/sh"
in busybox_%.bbappend and bash_%.bbappend
I'm not sure that this "solution" can be added upstream, and I really do not have the knowledge to come up with a better solution, so I hope to get some help here
We have an issue being worked on to cleanly support a merged /usr in the system: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7040 Unfortunately my patches offer a reasonable shortcut, even more so at the time they were first implemented (against Jethro), but are not the best solution for a clean integration into OE-Core. You can follow bug 7040 to track the development of a merged /usr solution for OE-Core. As the issue appears to be resolved with the suggested config changes, and without having to change the core system, I'm going to mark this bug as resolved. |