Using rsync for a binary installation of GAP

Getting a fully installed GAP on Linux with two simple commands!

Last changes --- Wed Mar 3 15:08:07 CET 2021    (Details)

This is a binary distribution of GAP 4 on Linux PCs with x86_64 compatible processors (Pentium, Ryzen, Athlon, Xeon, ...). It is maintained by Frank Lübeck. Any reports or suggestions are welcome.

The idea is to install GAP on Linux by synchronizing via the internet with a reference installation. Some features are:

How to get GAP via this service

(and not directly from the GAP site.)

You need: a machine with PC architecture (x86_64 compatible) running under Linux, a directory with about 2600 MB of free space and the rsync program (if you don't have rsync, there is certainly a package with this name in your Linux distribution). You do not need root permissions if you install in your home directory.

First copy the start script, called gapsync, into the current directory using the following command (don't forget the trailing dot):

  rsync --port=873 -azv rsync.gap-system.org::gap-rsync/gapsync/gapsync .

Now call this script (as root or with sudo prepended if you want to install in system directories, see below):

  ./gapsync

You are asked for two directories. The first is for the installation. Everything is copied into a subdirectory gap-rsync of this directory (the default is /usr/local/lib). The second directory should be one in your standard path of executable programs, the scripts to start GAP will be put there (the default is /usr/local/bin).

If some of these scripts exist already you will be asked if they can be deleted. Move them away first if you want to keep them.

After specifying these two directories, answer y to the next question to start the installation. Depending on your network connection you can use GAP after two to ... minutes (about 700 MB must be transferred via the internet).

You can now delete the script you started with:

  rm ./gapsync

How to call GAP

The following scripts are provided by this distribution:

gapL
for calling GAP with a saved workspace. This is the recommended way to start GAP, it is faster than calling gap.
gap
for calling GAP
gapsync
for updating this GAP installation
xgap
for using GAP via an X11 interface with graphical capabilities (but no terminal capabilities in its main window).

Updating this GAP installation

You can update the installation by calling the script

   gapsync

which was installed during initialization and mentioned above. The synchronization will usually take just a few seconds. A new workspace is created after each synchronization locally.

An update should not be made while a GAP job is running. If you have long running jobs do not use an automatic, say nightly, update.

Removing this installation

To remove this GAP installation use the script remove in the subdirectory gapsync of your installation:

   <path to your installation>/gapsync/remove
Or, if you are not sure about the path, use the following within GAP to print the command with full path:
    Print(Concatenation(First(GAPInfo.RootPaths, p->
                    Filename([Directory(p)],"lib/init.g") <> fail), 
                    "/gapsync/remove\n"));

This just deletes the links to the scripts mentioned above and the whole installation directory (starting gap-rsync), so including any custom installations in the gap-rsync/local subdirectory.

You can also just delete or forget about the gapsync script and use the installed GAP like any standard installation.

User customization in general

Customization can be done in a users home directory, if is contains a subdirectory ~/.gap/. An easy way to make use of this is to call in a GAP  session the command

    WriteGapIniFile();

This creates the ~/.gap/ directory (if necessary) and the file ~/.gap/gap.ini. Look into this file and adjust some of the settings as you like (e.g., specify packages (not) to load, color prompt, less as pager, ...). If you create a file ~/.gap/gaprc then it will be read by GAP during startup.

Customization of this installation

You can customize the gap, gapL, gapsync scripts by editing the files in the local/bin subdirectory of this GAP installation.

You can customize the workspace used in your installation by copying gapsync/CreateWorkspace.sh to local/bin/CreateWorkspace and editing the latter. For example, you may want another set of packages preloaded.

Additional packages can be installed in the local/pkg subdirectory.

Whenever you have changed something in the installation call gapsync which will produce an updated workspace.

If you change things outside the local subdirectory they are deleted with the next call of gapsync. If you find errors in this part, please report them.

Note that this distribution is not so useful for you if you need to compile GAP kernel extensions for some packages yourself. It is very likely, that your compiler and system libraries will not be compatible with those on the machine which is used to build this distribution.

Feedback

Please send comments and suggestions to Frank.Luebeck@Math.RWTH-Aachen.De.

Notes on this installation, in particular packages

The packages Alnuth, HAP, polymaking, singular, and SgpViz need or suggest further external software, and may not work immediately with full functionality.

Note that the AtlasRep package contains directories gap4r4/pkg/atlasrep/data* which are world writable (for caching downloaded representations). These are emptied with any update of this distribution.

If you don't want this you can customize the script gap-rsync/local/bin/gapsync in your installation, add the options --exclude=pkg/atlasrep/datagens --exclude=pkg/atlasrep/dataword --exclude=pkg/atlasrep/dataext to the rsync call (search the line containing --port).

You can customize details of the installation of any package by copying that package to the directory gap-rsync/local/pkg. You can also install additional packages there.

How about the 32-bit version of GAP?

Nowadays there seems to be little reason to install and use GAP in 32-bit mode. In this mode GAP would use less RAM (and could not use more than 2 GB of RAM), but it would run slower on most machines.