Date: Wed, 01 Nov 2006 10:42:00 -0200 From: Jean Milanez Melo <jmelo@freebsdbrasil.com.br> To: small@freebsd.org Cc: Jeremie Le Hen <jeremie@le-hen.org>, current@freebsd.org Subject: [HEADSUP] TinyBSD and ports applications Message-ID: <45489618.2000106@freebsdbrasil.com.br>
next in thread | raw e-mail | index | archive | help
Hello, I have completly redone the routines for third party applications install, I thought that initial way of doing things as Jeremied had idealized was not very good, and I decided to make it better. Now what I have do works this way: The TinyBSD user will populate the conf/<image type>/tinybsd.ports file listing the port name (in category/port) he wants to be installed on his tinybsd system, just like: category/application say, for example: www/mini_httpd So based on this information tinybsd will have the path for the port, will cd to that directory, check for the package name with "make -V PKGNAME" and later, run pkg_info to check from its exit code wether the port is installed or not. If not locally installed, tinybsd will "make install" this port in the local system, else (it already locally installed) tinybsd will skip to missing_dir function. On missing_dir function it checks for all directories which are not automatically generated from BSD.local.dist, if the directory does not exist it will "mkdir -p" it under /usr/local PREFIX on TinyBSD workdir, creating on the TinyBSD image the necessary directories hierarchy. Later it goes to copy_ports function where it checks for the applications the port installs, with pkg_info, and updates a listing excluding all things unecessary to a an embedded system, say, all data installed under www,doc,share,include,man (which just makes no sense existing on an embedded system, and would only demand useless storage space). This listing will be called /tmp/ports.files, and will contain all files that need to be added to the tinybsd system the user is building. Later, copy_libraries function will copy all necessary libraries to the image as well, just like the main idea behind the whole TinyBSD. Finally, deinstall_ports will deinstall the port from the local system if and only if it was not installed. It the port was already installed, obviously tinybsd won't remove it from the local system. I believe this is the most efficient way to handle third parties applications on embedded system. At least the easiest way for the users. They can always, of course add or remove binaries or modules themselves, but now we have a subsystem on tinybsd which does the hard work. Julian's just committed the patch and i would like to hear some feedback from you. This latest patchset is fully tested. I built some tinybsd systems from it today. About TinyBSD documentation, we are updating it on tinyBSD website regarding everything that is new, and will soon sgml it. - Jean
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45489618.2000106>