Building or installing new set of executables for FullPiant

Overview

In FullPliant, the executables and libraries are mainly providing two things:

 • 

Implementation of some command line services, such as 'tar' file format support

 • 

User land part of some kernel features, such as Wifi network configuration

They are contained in file:/bin/ file:/lib/ and file:/share/ directories.

Building

Building the new set of executables relies on the 'debootstrap' standard linux distributions features that enables to download and install a release of Linux in a subdirectory, so without disturbing the running one.
The 'debootstrap' tool is not part of FullPliant executables, so you need to do that on a Pliant instance running in a standard Linux distribution such as Ubuntu. On a box running FullPliant, the standard Linux distribution shall run as a virtual (KVM emulated) computer provided your box be equiped with a VT enabled processor, and you have enough memory (1 GB should be ok).
If the distribution is Ubuntu Karmic, you need to install the optional 'debootstrap' packages through typing something like:
  sudo dpkg install debootstrap

Select 'Install' 'Compile fullpliant executables tarball' from FullPliant main menu.

See /pliant/fullpliant/build/executable.ui for extra details.

In facts, relying on 'debootstrap' is probably not mandatory. In such a case, the existing Ubuntu distribution will be upgraded, extended with the extra required packages, and used to provide FullPliant executables.
In order to do that, just set 'Where to store downloaded Ubuntu distribution' to 'file:/'
Also you should not try that if you don't have fresh backup of your Ubuntu distribution.

More details on the building script

The building script in /pliant/fullpliant/build/executable.ui calls two functions in /pliant/fullpliant/install.pli that perform most of the work.

'fullpliant_debootstrap' is calling Linux 'debootstrap' command to install a minimal Linux distribution, then calling 'dpkg' to install extra packages. Also, there is no simple automated way to discover what the required packages are to provide various executables and libraries required by FullPliant, so it's hardcoded in the 'fullpliant_debootstrap' function source code, and might need to be upgraded from time to fime.
Please also notice that some Linux packages such as 'lilo' have a buggy install script that prevent them to run unattended, and that's why Pliant script install them using:
  add_package "lilo" "file:/embedded/" false
that download them through command 'apt-get -d -y install' then unpack them using 'dpg-deb -x' in order not to run their install script.

Then 'fullpliant_select' is responsible for copying from source path to the target path the various executables and libraries required for FullPliant, and to add extra libraries required by each executable. This last stage is performed by the 'resolve' method that calls 'file_libraries'.
'file_libraries' either relies on loading the executable with a special 'LD_TRACE_LOADED_OBJECTS' environment variable set (see documentation of ELF loader on the Internet) or, if it does not work, tries to use 'ldd' executable.

Installing

Select 'Install' 'Upgrade FullPliant executables' from FullPliant main menu.

When installing a new set of executable, the old file:/bin/ directory is renamed as file:/bin.old/
So are file:/lib/ and file:/share/
As a result, in case of troubles, you can boot from a FullPliant USB key, mount the disk partition, and rename the directories to restore the old working configuration.

When the new version as been fully tested, use the 'Remove old executables' button to remove the file:/bin.old/, file:/lib.old/ and file:/share.old/ directories. Until you do that, no new release can be installed.

See the /pliant/fullpliant/install/executable.ui script for extra details.