Installing Software
Details
You are reading version 017 of this page. The current version can be found here.
You are reading version 017 of this page. The current version can be found here.
You are reading version 017 of this page. The current version can be found here.
Binary packages in GoboLinux are precompiled software packages built for the GoboLinux directory tree and made available through the GoboLinux software repository (recipe store). Since these packages are already compiled, you can save the many hours needed to build larger applications. On the other hand, with binary packages you donât have the ability to set compile flags for optimization or specific architectures.
InstallPackage is the GoboLinux script for installing binary packages. If you want InstallPackage to look for the most recent Gimp package available, you can run
InstallPackage Gimp
The script will check if the package is available in the GoboLinux repositories.
(See /System/Settings/GetAvailable.conf
for the specific URLs scanned. You may
add your own repositories if you desire.)
If you want to select a specific version, you can pass it as the second parameter:
InstallPackage Gimp 2.8.18
If you downloaded the package and want to install it, run:
InstallPackage Gimp--2.8.18--i686.tar.bz2
The script normally runs interactively, asking about each dependency of the
requested package before installing it. You can avoid these queries by adding
the --batch
or -b
flag. This is particularly useful with large packages such
as Gimp or Xorg, which have many dependencies.
InstallPackage -b Gimp
InstallPackage will warn you if dependencies of a package you are trying to install are unavailable and ask if you want to continue. This is valuable, because some software may still work satisfactorily even if a particular plug-in or other dependency is missing.
See Installing Packages from the LiveCD.
In GoboLinux, all binary packages (as well as all user-compiled software) is
installed under /Programs
in a âprogram directoryâ provided for each version
of each application, for example:
/Programs/Gimp/2.8.18
When compiling software under GoboLinux the installation target directories such
as bin/
, lib/
, and etc/
that are required for a typical program are placed
inside the program directory.
With this self-contained directory structure, all that is needed to generate a
binary package is to make a tarball of the program directory, copy over the
Resources/
directory from the Compile recipe, and generate a few additional
files, which are also placed under Resources/
.
This is accomplished by the CreatePackage command.
Before creating a package, be careful to vet the contents of the programâs
Settings/
directory to ensure that it does not include personal information.
A package submitted for inclusion in the GoboLinux packages repository must have sensible default settings, honoring the application defaults if possible.
In order to create a package, run the CreatePackage utility with the package name as a parameter. For example,
CreatePackage rxvt
will create a binary package in the current working directory.
You are reading version 017 of this page. The current version can be found here.
With Compile, GoboLinux build utility, software sources can be downloaded, compiled and installed in a single step. An example will follow next.
In order to install irssi, a text-based IRC client from the command line, you would type the following instruction:
Compile irssi
Depending on the speed of your computer, internet connection and what packages you have installed, Irssi should download and install in a few minutes.
Compile manages the build process using GoboLinux recipes. Each recipe contains a list of build directives and supplemental control files for compiling a particular software library.
Typically, you can just try the name of the recipe you want from the command line. There is also an online recipe viewer, listing the most recently uploaded recipes first.
Compile has a number of command-line options, which are listed here. The following are especially useful.
When using the --batch
or -b
automatically attempts to process all
dependencies of the requested program.
The next two options are useful when working with intermittent internet access, or if youâd like to run your compiling jobs at night when youâre asleep.
Calling Compile with the --no-build
flag downloads sources only.
Later, in the event that you wish to use the --no-web
flag, this will direct
Compile to search to your systemâs own download cache and build the sources
found there instead. This commandline switch is obviously very useful if you do
not have a working internet connection for the time being.
Main article: Writing recipes
Compile Compile git
InstallPackage Compile
In general it is recommended to always use the latest stable version of
Compile. Compile
is very important to GoboLinux so if
there is any problem in it, it is normally fixed very quickly.
You are reading version 017 of this page. The current version can be found here.
Normally, you shouldnât need to compile âmanuallyâ, i.e., without using the
Compile
tool. However, it is possible to manually run
the same commands that Compile
uses.
Compiling programs in Linux is typically a three-part process: prepare the
sources with ./configure
, compile them with make
, and install the compiled
program with make install
.
To this process, Gobo adds a source configuration step to target the GoboLinux
directory structure, and after the install phase, a step that symlinks the files
from the application directory under /Programs
to /System/Index
. It is this
last step that makes programs âvisibleâ to the GoboLinux system.
These are the relevant commands:
PrepareProgram
is a wrapper to the first step
described above. SandboxInstall
is a wrapper to
the third step, ensuring safe execution of make install
.
SymlinkProgram
performs the final operations
that integrate the new program into the system.
The PrepareProgram
script does two things. It
creates a directory hierarchy for the program under /Programs
, and it attempts
to prepare the sources for compilation.
The syntax for the PrepareProgram
is:.
PrepareProgram <program-name> <version-number> [ -- <additional-options> ]
Passing a program name and version number is mandatory. These names are the ones used in the directories under programs. For example,
PrepareProgram --tree Foo 1.0
(the --tree
switch) creates the directories /Programs/Foo/Settings
,
/Programs/Foo/1.0
, /Programs/Foo/1.0/bin
and so on.
The second task performed by PrepareProgram
is
to prepare the sources. Since there isnât a standardized format for distribution
of source-code tarballs in the free software world, there is no way to implement
completely automated preparation. Fortunately, the popularization of the GNU
AutoTools brings us much closer.
PrepareProgram
, in this second step, will
detect availability of preparation tools and perform one of the following:
configure
script generated by GNU autoconf,
PrepareProgram
will run it, passing the
necessary options (mainly --prefix
, --sysconfdir
) as well as any
additional options requested by the user in the command line (as
<additional-options>
).configure
scripts, but due to the
popularity of GNU autoconf, design a command line interface similar to that
used by autoconf. PrepareProgram
tries to
detect if a non-autoconf configure
script accepts at least the --prefix
option, and uses it.In short, PrepareProgram
can be considered a
wrapper to configure
. Instead of running, for example,
cd foo-1.0
./configure --with-shared=yes
youâll run
cd foo-1.0
PrepareProgram Foo 1.0 -- --with-shared=yes
Strictly speaking, if everything were configured correctly you could simply run
make
and make install
, and all files would be installed under the
appropriate subdirectory under Programs/
.
To ensure this happens is to guarantee the modularity of the software installation.
To prevent any possibility of files being copied elsewhere in the directory tree
than the target under /Programs
, GoboLinux conducts the install step in a
âsandboxâ that is isolated from the rest of the filesystem.
SandboxInstall
constructs a container for
make install
. It uses a sandbox provided by the
FiboSandbox
script, which configures custom
permissions for an allowed set of paths to a special user,
fibo
. On systems with a UnionFS backend (such as
FunionFS, UnionFS-FUSE or OverlayFS), the sandbox is provided by the alternative
script UnionSandbox
. Installation then runs
confined to a sandbox, with no permission to write anywhere but the few places
SandboxInstall
allows it to, such as
/Programs/Foo/Current
and /Programs/Foo/Settings
. Therefore, no files can be
installed in ârandom placesâ. A typical call to
SandboxInstall
looks like this:
SandboxInstall Foo 1.0
If necessary, additional options can be passed. Refer to the SandboxInstall
reference page for details.
The final step in the compilation of a program is performed by the
SymlinkProgram
. This is the script responsible
for creating the symbolic links under /System/Index
.
The syntax for SymlinkProgram
is:
SymlinkProgram program-name [ version-number ]
The second argument is optional. If no version number is specified, the one
linked as Current
will be used. A commonly used command-line parameter is -c
overwrite
, which tells it to overwrite any existing symlinks in case of
conflicts (the default action is to preserve the existing links in order to not
affect previously existing applications). To integrate a program Foo
into the
/System
structure, overwriting any links, you would type:
SymlinkProgram -c overwrite Foo
SymlinkProgram
features many command-line
switches, to cover more advanced needs. You can refer to the SymlinkProgram
reference page for details if necessary.