Re: [yocto] remove /usr/share/terminfo
On 2013-03-24 11:06, Jochen Trumpf wrote: Hi Hans, I am not subscribed to [yocto], just browsing it occasionally, so please excuse the private email. For this sort of thing I am using the following in my image recipe (stolen from some gumstix image recipe in meta-gumstix-extras, danny branch): -- cut -- # this section removes remnants of legacy sysvinit support # for packages installed above IMAGE_FILE_BLACKLIST += " \ /etc/init.d/crond \ /etc/init.d/dbus-1 \ /etc/init.d/sshd \ " remove_blacklist_files() { for i in ${IMAGE_FILE_BLACKLIST}; do rm -rf ${IMAGE_ROOTFS}$i done } ROOTFS_POSTPROCESS_COMMAND =+ "remove_blacklist_files ; " -- cut -- You can add arbitrary commands to ROOTFS_POSTPROCESS_COMMAND, e.g. your link to the network share. As you can see, you can use wildcards in the blacklist entries, or anything that rm -rf will understand. In case you want to use a similar mechanism to ADD files that are not already present on your build machine, that is not (easily) possible since image.bbclass does not support do_fetch, so SRC_URI does not work within an image recipe. The philosophy seems to be that you need a separate recipe to add things. Hope this helps. Cheers, Jochen P.S.: Feel free to forward this to the list if you think it might be interesting for other people. Hi Jochen. Thanks for the information. As you might have seen already, I solved it by using a .bbappend for ncurses, but I must admit that your solution is a lot more elegant. I will try your approach instead and keep it in mind when needing something similar in the future. Hans ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] remove /usr/share/terminfo
On Mon, Mar 18, 2013 at 1:13 PM, Hans Beckérus wrote: > This is a continuation of the thread handling removal of /boot/uImage and > terminfo database. The /boot/uImage is solved but I am still having issues > with trying to remove /usr/share/terminfo database. I thought it would be > as easy as just creating a ncurses .bbappend and configure the package with > OE_EXTRACONF = "--disable-database --enable-termcap". Not so. The problem > is that the ncurses.inc has some hardcode configuration options. One of > these is not compatible with "--disable-database". Specifically it is > "--with-ticlib". To me it seems like the ncurses package has not been > designed for providing the option to disable the terminfo database. > > What I did as a temporary workaround was to override the entire > ncurses_config() option to overcome the conflict. But I am not very happy > with this solution, neither I am very happy with what happens to the > package when actually faulting out the terminfo support. The result of such > a configuration is that the entire ncurses library gets crippled and a lot > of packages can no longer be used, eg. htop. Also, the ncurses package > recipe does not seem to create the termcap database instead of terminfo if > such is removed. Which is completely natural since it does not support > disabling terminfo in the first place. > Maybe I could try the option to compile in the termcap database? But then > I do not know what the gain would be. What I am after is to get rid of the > database completely from the rootfs due to size constraints, but instead > link to some network mounted location. If the terminfo database is missing > ncurses will simply fallback to a dumb terminal setting which is fine on a > production board. In a test environment the network location will be > available and ncurses will be able to locate the database. > > Any ideas what can be done here? If I would like to remove the physical > database from the rootfs and instead replace it by a soft link. Where would > be the best place to do this? > > So, just posting back my progress so far. Since I did not receive any responses I simply had to try "something". Not very proud of it, but it works. What I did was to create a ncurses .bbappend file in my layer containing only this: shell_do_install_append() { if [ "${CLASSOVERRIDE}" == "class-target" ]; then rm -rf "${D}${datadir}/terminfo" ln -sf /app/usr/share/terminfo "${D}${datadir}/terminfo" fi } So, what it does is by using brute force removing the terminfo database from /usr/share as installed by the recipe and replacing it with a soft link to a well known location, eg. an NFS mount point. The minimalistic database is still kept in /etc/terminfo. This database serves most purposes on a production board. If a full functional database is needed a user must provide it through the link. The result is still a fully functional ncurses implementation, but with heavily reduced footprint. I do not know if my conditional to detect a target build is correct (I do not wish to have this done for eg. natrive builds). There is probably a much better way to have this code only being performed for certain classes. Also I do not understand why using do_install_append() does not work, I had to use shell_do_install_append() as shell_do_install is defined in ncurses.inc otherwise I got recipe parse errors!? Hans ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] remove /usr/share/terminfo
This is a continuation of the thread handling removal of /boot/uImage and terminfo database. The /boot/uImage is solved but I am still having issues with trying to remove /usr/share/terminfo database. I thought it would be as easy as just creating a ncurses .bbappend and configure the package with OE_EXTRACONF = "--disable-database --enable-termcap". Not so. The problem is that the ncurses.inc has some hardcode configuration options. One of these is not compatible with "--disable-database". Specifically it is "--with-ticlib". To me it seems like the ncurses package has not been designed for providing the option to disable the terminfo database. What I did as a temporary workaround was to override the entire ncurses_config() option to overcome the conflict. But I am not very happy with this solution, neither I am very happy with what happens to the package when actually faulting out the terminfo support. The result of such a configuration is that the entire ncurses library gets crippled and a lot of packages can no longer be used, eg. htop. Also, the ncurses package recipe does not seem to create the termcap database instead of terminfo if such is removed. Which is completely natural since it does not support disabling terminfo in the first place. Maybe I could try the option to compile in the termcap database? But then I do not know what the gain would be. What I am after is to get rid of the database completely from the rootfs due to size constraints, but instead link to some network mounted location. If the terminfo database is missing ncurses will simply fallback to a dumb terminal setting which is fine on a production board. In a test environment the network location will be available and ncurses will be able to locate the database. Any ideas what can be done here? If I would like to remove the physical database from the rootfs and instead replace it by a soft link. Where would be the best place to do this? Hans ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto