Better netinstall

July 30, 2009
During perod while I was setting up moin and preparing a stuff for the new web pages, I took some time and rewrote NetInstall script (Note: link to netinstall can be changed in the mean time).

Previous netinstall, used to build EDE 1.1 and 1.2 was written in shell. I got inspiration for it from GWARE's install script (or there were another project, can't remember).

Shell version worked as expected; after few tunings even worked on FreeBSD (probably on OpenBSD too), but the drawback was the shell itself. Is already known how shell scripts can easily become unportable, especially if you get used on some very cool " bash-isms".

To make the story shorter, the new version is re-written in python, so using this script should not be a problem, since python comes with every distro and is often installed by default. Originally I wanted to do it in perl (to refresh my knowledge), but the final version emerged from one of the quick mockups I did in python and redoing that again would be a waste of time. I will leave perl for something else.

Shots of shell tools are not fancy, but everyone would like to see them anyway, so here is the one:

So what was done here? Well, netinstall is not static tool any more (read this as: " with stored package data") and contrary to the previous shell version, it can be downloaded and used multiple times.

Package information and details (a.k.a. metadata) are stored in separate files (named config files) and are downloaded from EDE web server. For example, here is how looks like default file. Nothing complicated.

But, the main " pro" of this approach is ability do build different EDE versions (or build EDE in few different ways), with a single tool. For example, by default, netinstall will build EDE 1.2, downloading eFLTK and correct EDE packages.

If you want to play a little bit with 2.0 version, you just type:
./netinstall --config ede-2.0.cfg
and voila; everything needed will be downloaded, compiled, patched if needed and installed. On other hand, if you don't have FLTK already installed, using:
./netinstall --config ede-2.0-full.cfg
will even download FLTK and compile it and install it, besides other EDE packages.

I know how how someone will try to compare it with Jhbuild and ask why I didn't use it first, but Jhbuild is way from netinstall goals. Jhbuild is kitchen sink that can do a lot of things, but you need to install it first, bootstrap it and perform some magic. In the mean time you could already download and manualy compile all EDE dependencies :P

I want netinstall to keep " download-and-run-it" spirit, with as less as possible hassle for user. That is the main goal.

Anyway, documentation needs to be completed and the code needs to be tested a little bit more.