Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
netinstall [2013/06/01 01:30]
sanel created
netinstall [2015/10/03 14:54] (current)
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-Netinstall ​is the way of downloading,​ compiling and installing EDE and +The ''​netinstall''​ script ​is one way of downloading,​ compiling and installing ​''​EDE'' ​and 
-edelib ​with their prerequisites (jam and FLTK); some readers will find +''​edelib''​ as well as their prerequisites (''​JAM'' ​and ''​FLTK''​); some readers will find 
-it very similar ​with [[http://​gentoo.org | Gentoo]] ebuild system or +it very similar ​to the [[http://​gentoo.org | Gentoo]] ​''​ebuild'' ​system or 
-[[http://​live.gnome.org/​Jhbuild | Jhbuild]]. It is created to automate +[[http://​live.gnome.org/​Jhbuild | Jhbuild]]. It was created to automate 
-downloading and compiling procedure with a single command, making it +the downloading and compiling procedure with a single command, making it 
-very suitable procedure ​for for novice users.+suitable procedure ​especially ​for novice users.
  
 ===== Prerequisites ===== ===== Prerequisites =====
  
-Current netinstall version requires the following:+Current ​''​netinstall'' ​version requires the following ​packages to be installed on your system:
  
-  * python >= 2.4, but should ​be runnable ​on older versions+  * python >= 2.4, but should ​work on older versions, too.
   * patch (optional)   * patch (optional)
  
-:!: Python 3.x versions are not yet supported.+:!: Python 3.x versions are not supported, yet.
  
-If there is EDE or edelib release that requires patching, netinstall +If there is an ''​EDE'' ​or ''​edelib'' ​release that requires patching, ​''​netinstall''​ 
-will require //patch// tool; this will be reported in console before +will require ​the //patch// tool; however if this is the case it will be reported in console before installation begins.
-installation begins.+
  
 ===== Download ===== ===== Download =====
  
-Latest netinstall versions ​always ​can be found at http://​equinox-project.org/​netinstall.+Latest ​''​netinstall'' ​versions can always ​be found at http://​equinox-project.org/​netinstall.
  
 ===== Installation ===== ===== Installation =====
  
-Because ​netinstall strives to be simple for usage as much as possible, +Since netinstall strives to be as simple to use as possible, the same applies for installation:​ you simply download the script and execute it.
-the same applies for installation:​ you simply download the script and +
-execute it.+
  
 <​code>​ <​code>​
Line 38: Line 35:
 </​code>​ </​code>​
  
-By default, netinstall will install all content using ///​usr/​local//​ +By default, ​''​netinstall'' ​will install all content using the ///​usr/​local//​ 
-prefix, but you can override this path with //​--prefix//​ option, ​later described.+prefix, but you can override this path with the //​--prefix//​ option, ​as described ​below.
  
 ===== Usage ===== ===== Usage =====
  
-When you start netinstall for the first time, it complain ​how you are +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.
-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** :!: :!: **Security alert** :!:
-<​code>​ + 
-Never download netinstall (or similar scripts that advertise themself+<​code>​Never download netinstall (or similar scripts that advertise themself
 as EDE netinstall-like installers) from any other location than given as EDE netinstall-like installers) from any other location than given
-in above Download section.+in above Download section!
  
 In case you are not sure even about EDE's netinstall script, feel free 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 to look at the source code or contact developer in case you are not
-familiar with python language. +familiar with python language.</​code>​ 
-</​code>​+\\
  
-After you start it as root and netinstall successfully checked ​it's +After you start it as root and netinstall successfully checked ​the 
-prerequisites,​ it will connect ​at EDE'​s ​web and download //build +prerequisites,​ it will connect ​to ''​EDE''​'​s ​server ​and download ​the //build 
-metadata// (see [[#details | Details]]). This is description from +metadata// (see [[#details | Details]]). This is the description from 
-where to download needed packages and how to compile and install them.+where to download ​the needed packages and how to compile and install them.
  
-Because netinstall is not a build system (like Gentoo'​s ebuilds) but +Because ​''​netinstall'' ​is not a build system (unlike e.g. ''​Gentoo''​'​s ​''​ebuilds''​) but 
-more like build script, it doesn'​t know what of the each packages +rather a build script, it doesn'​t know what exactly ​each package ​requires. For example, ​''​edelib''​ 
-requires. For example, edelib will fail to compile if FLTK or DBus +will fail to compile if //FLTK// or //DBus// are not found and ''​netinstall'' ​will not be able 
-are not found and netinstall will not be able to detect this without +to detect this without complicating ​the whole matter.
-complicating ​it.+
  
-netinstall ​relies on build scripts for each package it will compile+''​Netinstall'' ​relies on build scripts for each package it compiles
-and if one of them fails, netinstall will quit reporting a shell +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 +error. This is a very flexible approach, allowing a package to use its own 
-methods to detect prerequisites (e.g. autoconf); also the same methods +methods to detect ​the proper ​prerequisites (e.g. autoconf); also the same methods 
-will be used when that package is manually compiled.+are used when that package is manually compiled.
  
-These are options you get with //--help// parameter ​to the script:+These are the options you get when running the script ​with the //--help// parameter:
  
 <​code>​ <​code>​
Line 101: Line 94:
  
 Most of the parameters (with their descriptions) are Most of the parameters (with their descriptions) are
-self-explainatory. Default usage is without parameters at all, so:+self-explainatory. Default usage is without ​any parameters at all, so:
 <​code>​ <​code>​
  ​./​netinstall  ​./​netinstall
Line 107: Line 100:
  
 will do the main job. In case you would like to see what will be will do the main job. In case you would like to see what will be
-built, ​giving:+built, ​executing:
 <​code>​ <​code>​
  ​./​netinstall --show-modules  ​./​netinstall --show-modules
 </​code>​ </​code>​
  
-will show orders ​of packages ​that will be build. The output ​can look +will show the order of the packages ​to be build. The output ​may look 
-like:+like this:
 <​code>​ <​code>​
  efltk (efltk-2.0.7.tar.gz)  efltk (efltk-2.0.7.tar.gz)
Line 119: Line 112:
 </​code>​ </​code>​
  
-Here, the first name is module name, following ​the package ​name that +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 information about+will be downloaded. If you would like to see some more information about
 specific module (e.g. ede here), typing: specific module (e.g. ede here), typing:
 <​code>​ <​code>​
Line 126: Line 119:
 </​code>​ </​code>​
  
-will show details like package name, package checksum and compile +will show details like package name, package checksum and compile commands.
-commands.+
  
 ===== Details ===== ===== Details =====
  
-Here are described ​details and given examples of it's advanced usage.+Described here are the details and given examples of the script's advanced usage.
  
-netinstall ​introduces two concepts:+''​Netinstall'' ​introduces two concepts:
  
   * configs   * configs
Line 140: Line 132:
 ====== Configs ====== ====== 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.+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 description for ''​netinstall'' ​from where to download packages, in which order to build them and how to do it.
  
-Here is how the file can look like:+Here is what the file can look like:
 <​code>​ <​code>​
 [General] [General]
Line 163: Line 155:
 </​code>​ </​code>​
  
-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.+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 ability to build EDE it different ways (or different EDE versions) with one command and few parameters. This is achieved using different config files.+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:+For example, if you would like to compile and install ​''​EDE''​ **2.0 alpha**, you would use this command:
 <​code>​ <​code>​
  ​./​netinstall --config ede-2.0a.cfg  ​./​netinstall --config ede-2.0a.cfg
 </​code>​ </​code>​
  
-Here, netinstall will go and download ​ede-2.0a.cfg,​ read it and compile as given there.+In this case''​netinstall'' ​will go on downloading //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.+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 what configs are prepared, using:+On other hand, if you would like to see which configs are availablejust using:
 <​code>​ <​code>​
  ​./​netinstall --list-configs  ​./​netinstall --list-configs
 </​code>​ </​code>​
  
-will display each of them, with the given description.+will list them all, 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.+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 ====== ====== 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.+As you could already tell from the config samples, ​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 giving //​skip_if_found = jam// will, for example ​skip building this module if //jam// executable was found.+''​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 ===== ===== 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.+''​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 ​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:+If some module ​includes the //patch// key with 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:
 <​code>​ <​code>​
 [General] [General]
Line 212: Line 204:
 </​code>​ </​code>​
  
-netinstall will try to download //​gcc432.patch//​ from `http://​equinox-project.org/​patchesand 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.+''​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 ===== ===== 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:+Because ​''​netinstall''​ uses //patch// with the //-p0// option (see manual for detailed ​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:
 <​code>​ <​code>​
  ede/  ede/
Line 232: Line 224:
 </​code>​ </​code>​
  
-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:+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:
 <​code>​ <​code>​
  diff -uNr ede/​ede-calc/​Main.cpp ede.fixed/​ede-calc/​Main.cpp > ede-calc-2.0alpha.patch  diff -uNr ede/​ede-calc/​Main.cpp ede.fixed/​ede-calc/​Main.cpp > ede-calc-2.0alpha.patch
 </​code>​ </​code>​
  
-will yield correct 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.+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''​.
Print/export