Table of Contents

EDE Netinstall

Introduction

The netinstall script is one way of downloading, compiling and installing EDE and edelib as well as their prerequisites (JAM and FLTK); some readers will find it very similar to the Gentoo ebuild system or Jhbuild. It was created to automate the downloading and compiling procedure with a single command, making it a suitable procedure especially for novice users.

Prerequisites

Current netinstall version requires the following packages to be installed on your system:

:!: Python 3.x versions are not supported, yet.

If there is an EDE or edelib release that requires patching, netinstall will require the patch tool; however if this is the case it will be reported in console before installation begins.

Download

Latest netinstall versions can always be found at http://equinox-project.org/netinstall.

Installation

Since netinstall strives to be as simple to use 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 the /usr/local prefix, but you can override this path with the –prefix option, as described below.

Usage

When you start netinstall for the first time, it will complain about yourself not being superuser (you don't run your default desktop session as root, right?). This is because netinstall needs to compile and install EDE prerequisites first, putting them in their default installation directories.


:!: 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 the prerequisites, it will connect to EDE's server and download the build metadata (see Details). This is the description from where to download the needed packages and how to compile and install them.

Because netinstall is not a build system (unlike e.g. Gentoo's ebuilds) but rather a build script, it doesn't know what exactly each package 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 the whole matter.

Netinstall relies on build scripts for each package it compiles, and if one of them fails, netinstall will quit reporting a shell error. This is a very flexible approach, allowing a package to use its own methods to detect the proper prerequisites (e.g. autoconf); also the same methods are used when that package is manually compiled.

These are the options you get when running the script with the –help parameter:

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 any parameters at all, so:

 ./netinstall

will do the main job. In case you would like to see what will be built, executing:

 ./netinstall --show-modules

will show the order of the packages to be build. The output may look like this:

 efltk (efltk-2.0.7.tar.gz)
 ede (ede-1.2.tar.gz)

The first intem in each line is the module name, followed by the name of the package that will be downloaded. If you would like to see some more 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

Described here are the details and given examples of the script's advanced usage.

Netinstall introduces two concepts:

Configs

Configs are nothing but configuration files where the build metadata are stored. I know how the term metadata my be a little bit confusing, but this metadata is nothing more than a description for netinstall from where to download packages, in which order to build them and how to do it.

Here is what 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 example is simply netinstall.cfg, the default file the 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) is released.

One of the greatest benefits of this rewritten netinstall version is the ability to build EDE in different ways (or different EDE versions) with one command and few parameters. This is achieved by 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

In this case, netinstall will go on downloading ede-2.0a.cfg, read it and compile as given there.

These configs are always stored at 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 the –config parameter was given.

On other hand, if you would like to see which configs are available, just using:

 ./netinstall --list-configs

will list them all, with the given description.

Because netinstall is dumb and simple, this config files listing is nothing more than downloading the netinstall-config-list.txt file and displaying it in terminal. You would see the same if you visit http://www.equinox-project.org/netinstall-configs.

Modules

As you could already tell from the config samples, a module is the description for package building with some name (or package building metadata). The include enough information for netinstall like from where to download the package (by default it will use the mirrors value from the General section), check if the package is valid (by checking MD5 sum) and how to run the configure, compile and install commands.

Netinstall provides rudimentary checking for some tools, and e.g. giving skip_if_found = jam will, skip building this module if the jam executable was found on the system.

Patching

Netinstall can also patch the source if needed. It will use the patch command with the -p0 parameter. Using patch like this requires netinstall to use specially prepared patches, but it also makes the script much simpler and smaller.

If some module includes the patch key with a value, netinstall will use the value of patches in the General section as the 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 the extracted efltk source directory. From here, the whole patching logic is on the patch command, meaning if patch fails, nothing will be changed, but netinstall will continue with compiling, probably resulting in a failed build. You need not worry about this; patch is smart enough and if patches are prepared as prescribed, everything will be ok.

Correct patches

Because netinstall uses patch with the -p0 option (see manual for detailed description), patches must be created diffing the whole tree. For example, if a 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; it will be enough to just create the same depth where the file needed to patch 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 a correct patch.

This probably isn't very intuitive and seems more suitable for creating patches against multiple changes in the tree, but it is a unified way how netinstall will patch the source; patches against one program or multiple ones will be applied successfully without much of tinkering.

Anthing smarter than that will make netinstall more complex and defeat it's goal of providing a simple and fast way for the installation of EDE.