Installing the Hacking Networked Solutions overlay for Gentoo Linux

Installing the Layman package

Before we install any packages we should ensure that the correct use-flags will be used so that all required functionality is made available and unnecessary functionality is not included. The app-portage/layman package and its dependencies provide a variety of use-flags only some of which will be discussed further here. As usual feel free to add and remove use-flags at will although the minimum set which are required for using this guide in its entirety are shown below.

lisa emerge -pv layman
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild      ] app-portage/layman-1.4.1  USE="-bazaar -cvs -darcs -git -mercurial -subversion -test"

As you can see all of the use-flags available for the app-portage/layman package (apart from the test flag) refer to types of version control system. The Hacking Networked Solutions overlay for Gentoo Linux uses the rsync application to synchronise the remote and local repositories and therefore does not require any of these version control systems to be installed.

Caution:
Many of the other overlays available via the layman application require one of the listed version control systems to be available so if you already use other overlays, or intend to use other overlays in the future, be sure to enable the required use-flags to avoid having to reinstall the layman application.
 

Once you are confident that the correct use-flags are set for the app-portage/layman package, and any dependencies it may require, you can proceed with the installation by issuing the emerge command shown below.

lisa emerge layman

Configuring the Layman package

If you have already configured the layman application, probably because you are already using other overlays, then you should skip this section as you will already have the necessary entries in /etc/make.conf and the /var/lib/layman/make.conf file will have already been created.

Warning:
If you have already configured the layman application, probably because you are already using other overlays, you should skip this section. Performing the configuration actions described below on an already configured layman instance will result in installed overlays no longer being recognised by portage and the /var/lib/layman/make.conf file will be included in /etc/make.conf twice.
 

Before the layman application can be used to manage overlays portage needs to be configured to use the additional configuration settings that the layman application will create and manage. We also need to create an empty configuration as we have not used the layman application to add any overlays yet. This is a two stage process as shown below.

lisa echo "source /var/lib/layman/make.conf" >> /etc/make.conf
lisa echo PORTDIR_OVERLAY=\"\" > /var/lib/layman/make.conf

Installing the overlay

Once the layman application has been configured and correctly integrated with portage a list of installed overlays can be displayed using the command shown in the example below. As you can see in our example the hacking-gentoo overlay has already been installed, when run for the first time however no overlays will be listed. You can use this command later to verify that the overlay has been installed correctly.

lisa layman -l
* hacking-gentoo           [Rsync     ] (rsync://rsync.mad-hacking.net/hacking-gentoo-overlay       ) 

A complete list of the overlays available through the layman application can be displayed using the command shown in the example below. As the list is rather long, containing some 225 overlays when this document was written, the output of the command below has been omitted.

lisa layman -L

When you have decided which overlay or overlays to install, and presumably if you are reading this document you intend to install at least the hacking-gentoo overlay, you can proceed using the command shown in the example below.

lisa layman -a hacking-gentoo