Date: Thu, 2 Nov 2006 17:49:38 +0100 From: Jeremie Le Hen <jeremie@le-hen.org> To: Jean Milanez Melo <jmelo@freebsdbrasil.com.br> Cc: Jeremie Le Hen <jeremie@le-hen.org>, small@freebsd.org, current@freebsd.org Subject: Re: [fbsd] [HEADSUP] TinyBSD and ports applications Message-ID: <20061102164938.GU20405@obiwan.tataz.chchile.org> In-Reply-To: <45489618.2000106@freebsdbrasil.com.br> References: <45489618.2000106@freebsdbrasil.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Jean, On Wed, Nov 01, 2006 at 10:42:00AM -0200, Jean Milanez Melo wrote: > 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. I read the description thoroughly. This is interesting and neat, but I am anxious about stale dependencies left by "temporary-installed" ports. For instance, lets's you're building a TinyBSD image with net/nemesis which depends on net/libnet10. You neither have this later port installed. The current TinyBSD implementation will leave net/libnet10 installed on the build system, although I agree this is more a problem relatde to port infrastructure which doesn't record whether a port is an implied dependency or has been explicitely installed by the user. AFAIK. A workaround could be to null-mount the ports directory into the temporary folder were the TinyBSD image is built, then chroot into this folder and install the port from here. Afterward you would remove www,doc,share,include,man stuff. I'm not sure if the gain is worth coding. This is maybe going to be fixed in the ports infrastructure. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061102164938.GU20405>