This is an old revision of the document!
Table of Contents
EDE Netinstall
Introduction
Netinstall is the way of downloading, compiling and installing EDE and edelib with their prerequisites (jam and FLTK); some readers will find it very similar with Gentoo ebuild system or Jhbuild. It is created to automate downloading and compiling procedure with a single command, making it very suitable procedure for for novice users.
Prerequisites
Current netinstall version requires the following:
- python >= 2.4, but should be runnable on older versions
- patch (optional)
Python 3.x versions are not yet supported.
If there is a EDE or edelib release that requires patching, netinstall will require patch tool; this will be reported in console before installation begins.
Download
Latest netinstall versions always can be found at http://equinox-project.org/netinstall.
Installation
Because netinstall strives to be simple for usage as much as possible, the same applies for installation: you simply download the script and execute it.
wget http://equinox-project.org/netinstall python netinstall
By default, netinstall will install all content using /usr/local prefix, but you can override this path with –prefix option, later described.
Usage
When you start netinstall for the first time, it complain how you are not superuser (you don't run your default desktop session as root, right?). This is because netinstall needs to compile and install EDE prerequisites first, installing them in their default installation folders.
Security alert
Never download netinstall (or similar scripts that advertise themself as EDE netinstall-like installers) from any other location than given in above Download section. In case you are not sure even about EDE's netinstall script, feel free to look at the source code or contact developer in case you are not familiar with python language.
After you start it as root and netinstall successfully checked it's prerequisites, it will connect at EDE's web and download build metadata (see Details). This is description from where to download needed packages and how to compile and install them.
Because netinstall is not a build system (like Gentoo's ebuilds) but more like build script, it doesn't know what of the each packages requires. For example, edelib will fail to compile if FLTK or DBus are not found and netinstall will not be able to detect this without complicating it.
netinstall relies on build scripts for each package it will compile, and if one of them fails, netinstall will quit reporting a shell error. This is a much flexible approach, allowing a package to use own methods to detect prerequisites (e.g. autoconf); also the same methods will be used when that package is manually compiled.
These are options you get with –help parameter to the script:
Usage: netinstall [OPTIONS] Download, compile and install EDE with a single command Options: --help this help --version show script version --prefix [PATH] set where all modules will be installed (e.g. /usr or /opt; default is /usr/local) --module-info [NAME] display information about [NAME] module --show-modules list modules that will be compiled --build-dir [NAME] directory where modules will be downloaded and compiled (default is 'build') --config [NAME] use [NAME] as main config file (default is 'netinstall.cfg') --config-local [NAME] use local config (only for debugging) --no-root-check do not check if script was started as root (only for debugging) --list-configs lists known config files with their description Report bugs at <http://bugs.equinox-project.org>
Most of the parameters (with their descriptions) are self-explainatory. Default usage is without parameters at all, so:
./netinstall
will do the main job. In case you would like to see what will be built, giving:
./netinstall --show-modules
will show orders of packages that will be build. The output can look like:
efltk (efltk-2.0.7.tar.gz) ede (ede-1.2.tar.gz)
Here, the first name is module name, following the package name that will be downloaded. If you would like to see some information about specific module (e.g. ede here), typing:
./netinstall --module-info ede
will show details like package name, package checksum and compile commands.
Details
Here are described details and given examples of it's advanced usage.
netinstall introduces two concepts:
- configs
- modules
Configs
Configs are nothing more than configuration file where the build metadata are stored. I know how the term metadata adds a little bit confusion, but this metadata is nothing more than description for netinstall from where to download packages, in which order to build them and how.
Here is how the file can look like:
[General] requires = 1.0 patches = http://equinox-project.org/patches mirrors = http://heanet.dl.sourceforge.net/sourceforge/ede http://superb-east.dl.sourceforge.net/sourceforge http://mesh.dl.sourceforge.net/sourceforge/ede modules = efltk, ede [ede] package = "ede-1.2.tar.gz checksum = "7bffdd825c6a32f3c99e081f2e3a4c73" [efltk] package = "efltk-2.0.7.tar.gz" checksum = "f0300fd2fec47d4b05823297032ddb9f" configure_flags = " --disable-unixODBC --disable-mysql"
This is the example of netinstall.cfg, the default file netinstall script will use to build EDE 1.2. Some keys are mandatory and some not; this should not worry you since developers will alter and modify these files when new EDE version (or EDE package) get released.
One of the greatest benefits of this rewritten netinstall version ability to build EDE it different ways (or different EDE versions) with one command and few parameters. This is achieved using different config files.
For example, if you would like to compile and install EDE 2.0 alpha, you would use this command:
./netinstall --config ede-2.0a.cfg
Here, netinstall will go and download ede-2.0a.cfg, read it and compile as given there.
These configs are always stored on http://www.equinox-project.org/netinstall-configs where you can manually view each of them. This is the location from where netinstall will fetch all config files when –config parameter was given.
On other hand, if you would like to see what configs are prepared, using:
./netinstall --list-configs
will display each of them, with the given description.
Because netinstall is dumb and simple, this config files listing is nothing more than downloading netinstall-config-list.txt file and displaying in terminal. The same you would get if go on http://www.equinox-project.org/netinstall-configs.
Modules
As you could alread see from the config samples, module is description for package building with some name (or package build metadata). There are enough information for netinstall from where to download package (by default it will use mirrors value from General section), check if package is valid (by checking MD5 sum) and how to run configure, compile and install commands.
netinstall provides rudimentary checking for some tools, and giving skip_if_found = jam will, for example skip building this module if jam executable was found.
Patching
netinstall can also patch the source if needed. It will use patch command with -p0 parameter. Using patch like this requires netinstall to use specially prepared patches, but it also makes netinstall much simpler and smaller.
If some module gives patch key with value, netinstall will use patches from General section as url and try to download the patch from there. For example if given:
[General] patches = http://equinox-project.org/patches mirrors = http://heanet.dl.sourceforge.net/sourceforge/ede http://superb-east.dl.sourceforge.net/sourceforge http://mesh.dl.sourceforge.net/sourceforge/ede modules = efltk [efltk] package = "efltk-2.0.7.tar.gz" patch = gcc432.patch checksum = "f0300fd2fec47d4b05823297032ddb9f" configure_flags = " --disable-unixODBC --disable-mysql"
netinstall will try to download gcc432.patch from `http://equinox-project.org/patches` and apply it on extracted efltk source directory. From here, the whole patching logic is on patch command, meaning if patch fails, nothing will be changed, but netinstall will continue with compiling, resulting probably failed build. You should not worry about this; patch is smart enough and if patches are prepared as prescribed, everything will be ok.
Correct patches
Because netinstall use patch with -p0 option (see manual for detail description), patches must be created diffing the whole tree. For example, if bug was found in ede-calc (ede-calc main function is in Main.cpp) and ede source tree looks like this:
ede/ ede-calc/ Jamfile Main.cpp ...
you must create similar, fixed structure, like this:
ede.fixed/ ede-calc/ Main.cpp
There is no need to copy whole tree; enough will be just to create the same depth where file for fixing existed before. Then, using diff like:
diff -uNr ede/ede-calc/Main.cpp ede.fixed/ede-calc/Main.cpp > ede-calc-2.0alpha.patch
will yield correct patch.
This doesn't sound much intuitive and is much more suitable for creating patches against multiple changes in the tree, but it creates unified way how netinstall will patch the source; patches against one program or multiple ones will be applied successfully without much of thinkering.
Anthing smarter will complicate netinstall and it's aim for providing simple and fast way of EDE installation.