====== NFS Layman ======
After setting up [[nfs_portage|NFS Portage]] I found that it was annoying not to have the [[http://overlays.gentoo.org/|Overlays]] that I used updated nightly on my network storage and got lazy with syncing the overlays when my main computer was running. Fortunately though, since [[http://layman.sourceforge.net/|Layman]] is essentially just a set of [[wp>Python|Python]] scripts for managing the various overlays and it uses [[wp>SVN|SVN]], [[wp>CVS|CVS]], [[wp>Git|Git]] or [[wp>Mercurial|Mercurial]] to actually synchronise the local copy of the overlay with those made available on-line its relatively straight-forward to set up a [[wp>Cron|CRON]] job on the network storage system to synchronise the trees in the same way that Portage is.
===== Software =====
Layman is simply a Python wrapper and is relatively straight-forward to install under Gentoo (your client system).
emerge -av layman
Once installed you will need to look at the list of overlays that are available and the version control system that each uses as this will have bearing on how you then set up your server
$ layman -L
* THE [Git ] (git://zen-sources.org/zen/THE.git )
* akoya [Mercurial ] (https://hg.poildetroll.net/hg/gentoo/overlay )
* arcon [Subversion] (svn://svn.ospdev.net/svnroot/arcon/trunk/arcon-overlay )
* armagetron [Subversion] (https://armagetronad.svn.sourceforge.net/svnroot/armagetron...)
* aross [Subversion] (http://overlays.gentoo.org/svn/dev/aross )
* bangert [Subversion] (http://overlays.gentoo.org/svn/dev/bangert/ebuilds )
* berkano [Subversion] (http://svn.liveforge.org/berkano/trunk )
* break-my-gentoo-main [Rsync ] (rsync://rsync.breakmygentoo.net/bmg-main/bmg-main )
* cell [Subversion] (http://overlays.gentoo.org/svn/proj/cell )
* chtekk-apps [Subversion] (http://overlays.gentoo.org/svn/dev/chtekk/apps )
* chtekk-syscp [Subversion] (http://overlays.gentoo.org/svn/dev/chtekk/syscp )
* d [Subversion] (http://overlays.gentoo.org/svn/dev/anant/d )
* darkside [Git ] (git://git.overlays.gentoo.org/dev/darkside )
* dberkholz [Git ] (git://git.overlays.gentoo.org/dev/dberkholz )
* deathwing00 [Subversion] (http://overlays.gentoo.org/svn/dev/deathwing00 )
* dertobi123 [Subversion] (http://overlays.gentoo.org/svn/dev/dertobi123 )
* desktop-effects [Git ] (git://git.overlays.gentoo.org/proj/desktop-effects.git )
* dev-zero [Git ] (git://git.overlays.gentoo.org/dev/dev-zero )
* devnull [Mercurial ] (http://hg.core.ws/devnull )
* dirtyepic [Subversion] (http://overlays.gentoo.org/svn/dev/dirtyepic )
* dotnet [Git ] (git://git.overlays.gentoo.org/proj/dotnet.git )
* drizzt-overlay [Subversion] (http://overlays.gentoo.org/svn/dev/drizzt/ )
* eclipse [Rsync ] (rsync://blizzy.de/portage-eclipse )
* efika [Subversion] (http://overlays.gentoo.org/svn/proj/efika )
* emacs [Subversion] (http://overlays.gentoo.org/svn/proj/emacs/emacs-overlay )
* enlightenment [Subversion] (http://overlays.gentoo.org/svn/dev/vapier/enlightenment )
* falco [Git ] (git://git.overlays.gentoo.org/dev/falco )
* finnish [Subversion] (http://overlays.gentoo.org/svn/proj/finnish/trunk )
* flameeyes-overlay [Git ] (git://git.flameeyes.eu/flameeyes/overlay.git )
* freevo [Subversion] (svn://svn.freevo.org/freevo/portage/ )
* games [Subversion] (http://overlays.gentoo.org/svn/proj/games )
* gcc-porting [Subversion] (http://overlays.gentoo.org/svn/proj/gcc-porting )
* genstef [Subversion] (http://overlays.gentoo.org/svn/dev/genstef )
* gentoo-china [Subversion] (http://gentoo-china-overlay.googlecode.com/svn/trunk/ )
* gentoo-de [Rsync ] (rsync://rsync.gentoo.de/gentoo-de-ebuilds )
* gentoo-taiwan [Subversion] (http://gentoo-taiwan.googlecode.com/svn/trunk/ )
* gentoojp [Git ] (git://git.gentoo.gr.jp/ebuilds/gentoojp.git )
* gentopia [Git ] (git://git.overlays.gentoo.org/proj/gentopia.git )
* gnash-cvs [Rsync ] (rsync://overlays.biterror.net/gnash-cvs )
* gnome [Git ] (git://git.overlays.gentoo.org/proj/gnome.git )
* gnustep [Subversion] (http://overlays.gentoo.org/svn/proj/gnustep/overlay )
* graaff [Git ] (http://moving-innovations.com/overlay )
* halcy0n [Git ] (git://git.overlays.gentoo.org/dev/halcy0n.git )
* hanno-xgl [Subversion] (http://svn.hboeck.de/xgl-overlay )
* haskell [Darcs ] (http://code.haskell.org/gentoo/gentoo-haskell/ )
* hawking [Git ] (git://git.overlays.gentoo.org/dev/hawking )
* hollow [Subversion] (http://overlays.gentoo.org/svn/dev/hollow )
* ikelos [Git ] (git://git.overlays.gentoo.org/dev/ikelos.git )
* initng [Subversion] (https://svn.initng.org/portage/gentoo )
* interactive-fiction [Git ] (git://repo.or.cz/gentoo-interactive-fiction.git )
* iwlwifi [Subversion] (http://opensvn.csie.org/rmh3093/iwlwifi )
* java-gcj-overlay [Subversion] (http://overlays.gentoo.org/svn/proj/java/gcj-overlay/ )
* java-overlay [Subversion] (http://overlays.gentoo.org/svn/proj/java/java-overlay/ )
* je_fro [Subversion] (http://overlays.gentoo.org/svn/dev/je_fro )
* jokey [Subversion] (http://overlays.gentoo.org/svn/dev/jokey/trunk )
* jyujin [Git ] (git://git.jyujin.de/portage-overlay.git )
* kde [Git ] (git://www2.mailstation.de/git/genkde4svn.git )
* kde-crazy [Git ] (git://git.overlays.gentoo.org/proj/kde-crazy.git )
* kde-testing [Git ] (git://git.overlays.gentoo.org/proj/kde.git )
* kerberos [Git ] (git://git.overlays.gentoo.org/proj/kerberos.git )
* kolab [Subversion] (http://overlays.gentoo.org/svn/proj/kolab/overlay )
* kvm [Git ] (git://github.com/dang/kvm.git )
* lila-theme [Subversion] (http://svn.berlios.de/svnroot/repos/lila-theme/trunk/lila/g...)
* liquidx [Subversion] (http://overlays.gentoo.org/svn/dev/liquidx )
* lisp [Git ] (git://repo.or.cz/gentoo-lisp-overlay.git )
* loki_val [Git ] (git://git.overlays.gentoo.org/dev/loki_val )
* lordvan [Git ] (git://git.overlays.gentoo.org/dev/lordvan.git )
* ltsp [Git ] (git://git.overlays.gentoo.org/proj/ltsp.git )
* lu_zero [Subversion] (http://overlays.gentoo.org/svn/dev/lu_zero )
* luke-jr [Subversion] (svn://svn.dashjr.org/luke-portage-overlay/trunk )
* lxde [Mercurial ] (http://bitbucket.org/yngwin/lxde-overlay/ )
* marineam-xen [Subversion] (http://overlays.gentoo.org/svn/dev/marineam/xen )
* masterdriverz [Subversion] (http://overlays.gentoo.org/svn/dev/masterdriverz )
* mozilla [Subversion] (http://overlays.gentoo.org/svn/proj/mozilla )
* mpd [Git ] (git://repo.or.cz/mpd.git )
* mysql-testing [Subversion] (http://overlays.gentoo.org/svn/proj/mysql/testing )
* n4g [Subversion] (http://mars.arge.at/svn/n4g/trunk/novell4gentoo )
* n4g-experimental [Subversion] (http://mars.arge.at/svn/n4g/branches/experimental )
* nouveau [Subversion] (http://svn.hboeck.de/nouveau-overlay )
* nx [Subversion] (http://overlays.gentoo.org/svn/proj/nx/testing )
* openoffice-geki [Tar ] (http://geki.ath.cx/OOo/openoffice.tar.bz2 )
* openrc [Git ] (git://git.overlays.gentoo.org/dev/uberlord )
* oss-overlay [Mercurial ] (http://hg.atheme.org/users/majeru/portage-overlay )
* pcsx2 [Git ] (git://github.com/eatnumber1/pcsx2-overlay.git )
* pd-overlay [Subversion] (https://pd-overlay.svn.sourceforge.net/svnroot/pd-overlay/p...)
* pda [Git ] (git://vcs.gentoo.ru/gentoo-pda )
* perl-experimental [Subversion] (http://overlays.gentoo.org/svn/proj/perl/perl-experimental )
* philantrop [Git ] (git://www2.mailstation.de/git/philantrop.git )
* php-4 [Subversion] (http://overlays.gentoo.org/svn/proj/php/php4 )
* php-experimental [Subversion] (http://overlays.gentoo.org/svn/proj/php/experimental )
* php-testing [Subversion] (http://overlays.gentoo.org/svn/proj/php/testing )
* pioto-overlay [Subversion] (svn://svn.pioto.org/pioto-overlay/ )
* plan9 [Subversion] (http://overlays.gentoo.org/svn/dev/anant/plan9 )
* postgresql-experimental [Subversion] (http://overlays.gentoo.org/svn/proj/postgresql/experimental )
* postgresql-testing [Subversion] (http://overlays.gentoo.org/svn/proj/postgresql/testing )
* powerpc [Subversion] (http://overlays.gentoo.org/svn/proj/powerpc )
* pro-audio [Subversion] (svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/ove...)
* pythonhead [Subversion] (http://overlays.gentoo.org/svn/dev/pythonhead )
* rbu [Subversion] (http://overlays.gentoo.org/svn/dev/rbu/overlay )
* roslin [Rsync ] (rsync://roslin.kicks-ass.net/roslin )
* rostov [Subversion] (svn://os-rostov.ru/overlay )
* rox [Subversion] (http://overlays.gentoo.org/svn/proj/rox/trunk/overlay/ )
* ruby [Subversion] (http://overlays.gentoo.org/svn/proj/ruby )
* s3d [Git ] (git://gitorious.org/s3d-gentoo/mainline.git )
* sabayon [Subversion] (http://svn.sabayonlinux.org/overlay/ )
* science [Subversion] (http://overlays.gentoo.org/svn/proj/science/overlay )
* secondlife [Subversion] (http://overlays.gentoo.org/svn/dev/matsuu/secondlife/ )
* seemant [Subversion] (http://overlays.gentoo.org/svn/dev/seemant )
* serkan-overlay [Bzr ] (http://bazaar.launchpad.net/~serkan-kaba/serkan-overlay/mai...)
* sipx [Subversion] (http://scm.calivia.com/svn/sipx/gentoo )
* soor-overlay [Git ] (git://repo.or.cz/gentoo-soor-overlay.git )
* stuart-desktop [Subversion] (http://overlays.gentoo.org/svn/dev/stuart/desktop )
* stuart-perforce [Subversion] (http://overlays.gentoo.org/svn/dev/stuart/perforce/ )
* stuart-server [Subversion] (http://overlays.gentoo.org/svn/dev/stuart/server )
* sugar [Git ] (git://git.overlays.gentoo.org/proj/sugar.git )
* suka [Subversion] (http://overlays.gentoo.org/svn/dev/suka )
* sunrise [Subversion] (http://overlays.gentoo.org/svn/proj/sunrise/reviewed/ )
* swegener [Rsync ] (rsync://rsync.gentoo.stealer.net/swegener-overlay/ )
* thousand-parsec [Git ] (git://git.thousandparsec.net/git/gentoo-overlay.git )
* toolchain [Subversion] (http://overlays.gentoo.org/svn/proj/toolchain )
* trapni [Subversion] (http://overlays.gentoo.org/svn/dev/trapni/overlay )
* trauma [Subversion] (http://svn.digital-trauma.de/gentoo/trunk/ )
* vdr-1.5 [Subversion] (http://overlays.gentoo.org/svn/proj/vdr/vdr-1.5 )
* vdr-devel [Subversion] (http://overlays.gentoo.org/svn/proj/vdr/vdr-devel )
* vdr-experimental [Subversion] (http://overlays.gentoo.org/svn/proj/vdr/experimental )
* vdr-testing [Subversion] (http://overlays.gentoo.org/svn/proj/vdr/testing )
* verlihub [Subversion] (https://verlihub.svn.sourceforge.net/svnroot/verlihub/overlay )
* vmware [Subversion] (http://overlays.gentoo.org/svn/proj/vmware/trunk )
* voip [Subversion] (http://overlays.gentoo.org/svn/proj/voip/trunk )
* voyageur [Subversion] (https://cafarelli.fr/svn/voyageur-overlay )
* vps [Subversion] (http://overlays.gentoo.org/svn/proj/vps )
* webapps-experimental [Subversion] (http://overlays.gentoo.org/svn/proj/webapps/experimental )
* welp [Git ] (git://git.overlays.gentoo.org/dev/welp )
* wolf31o2 [Git ] (git://git.wolf31o2.org/overlays/wolf31o2.git )
* wrobel [Subversion] (http://overlays.gentoo.org/svn/dev/wrobel/stable )
* wschlich [Subversion] (http://overlays.gentoo.org/svn/dev/wschlich/stable )
* wschlich-testing [Subversion] (http://overlays.gentoo.org/svn/dev/wschlich/testing )
* x11 [Git ] (git://git.overlays.gentoo.org/proj/x11 )
* xemacs [Subversion] (http://overlays.gentoo.org/svn/proj/emacs/xemacs-overlay )
* xen [Subversion] (http://overlays.gentoo.org/svn/proj/xen/overlay )
* xfce-dev [Git ] (git://git.overlays.gentoo.org/proj/xfce.git )
* xwing [Rsync ] (rsync://gentoo.xwing.info/xwing-overlay )
* zen-overlay [Git ] (git://zen-sources.org/zen/portage-overlay.git )
* zugaina [Rsync ] (rsync://gentoo.zugaina.org/zugaina-portage )
As you can see you will need the appropriate version control systems installed on your server so that it can synchronise the tree. How this is done will depend on the system running on your server. I'm running [[http://www.nslu2-linux.org/|SlugOS BE 4.8]] on an [[wp>Nslu2|NSLU2]]. The stock software stream doesn't include [[wp>Svn|SVN]] or [[wp>Cvs|CVS]] so I had to install it from the [[adding_optware|Optware Stream]].
===== Client Configuration =====
You will already have installed Layman above but if you haven't done so yet do so now (''emerge -av layman'').
Assuming you have [[NFS Portage]] running and you have added your overlays to ''/usr/portage/local/layman'' you will now have these overlays installed and available, but as yet Portage and Layman don't know that they exist.
==== Layman ====
Layman's default configuration file is located at ''/etc/layman/layman.cfg''. There are a couple of things you will want to change in this file, firstly the location that Layman installs overlays to (although in this instance its somewhat redundant as they are being installed and synchronised on an external server, but it needs to be set correctly should you wish to do anything with Layman from your client).
storage : /usr/portage/local/layman
The official overlays are maintained at ''http://www.gentoo.org/proj/en/overlays/layman-global.txt'', however many developers and other overlays exist, so you may wish to add them to Layman by making additional entries to the ''overlays'' field.
overlays : http://www.gentoo.org/proj/en/overlays/layman-global.txt
http://mydomain.org/my-layman-list.xml
==== Portage ====
Portage needs to know that the Layman overlays exist. Simply add the following line to ''/etc/make.conf''
source /usr/portage/local/layman/make.conf
==== Install an Overlay ====
You're now ready to install an overaly. The initial installation of the overlay is done from the Gentoo client computer. Select an overlay from the list given by ''layman -L'' and then install it. This example installs the ''science'' overlay.
layman -a science
**NB** : You may get a complaint about the directory not existing as you haven't configured your server yet. If this is the case setup the directory as shown in the first step of the //Server Configuration// below.
===== Server Configuration =====
You need to configure your server. One key point to remember is that it should be exported to NFS so that your clients can see it. With this in mind and assuming that you have setup [[NFS Portage]] the most sensible place to add this is ''/usr/portage/local/layman'' (create the directory if necessary). You then need a sub-directory for the overlay to reside in. We'll use the ''science'' overlay as an example...
mkdir -p /usr/portage/local/layman/
You now need to setup a CRON job to synchronise locally against the official overlays. How you do this will depend upon the version control system that a given overlay is using.
==== SVN ====
The ''science'' overlay uses [[wp>Svn|SVN]] for version control. Checking and updating your local copy of the overlay against the server is straight-forward. You should add the following line to roots CRON (use ''crontab -e'' as root to edit CRON).
# Mins Hours Days Months Day of the week
30 00 * * * /opt/bin/svn up "/usr/portage/local/layman/science/" "http://overlays.gentoo.org/svn/proj/science/overlay"
==== CVS ====
==== Git ====
===== Useful Overlays =====
I use a few overlays that I find useful....
* [Emacs](https://wiki.gentoo.org/wiki/Project:Emacs/Overlay) for obvious reasons since [[emacs:emacs|Emacs]] is my preferred text editor/IDE.
* [raiagent](https://github.com/leycec/raiagent) as it provides an ebuild for powerline fonts used in [[linux:tmux|Tmux]] and [[linux:zsh|Zsh themes]].
* [nshephard](https://gitlab.com/nshephard/gentoo-overlay) my own overlay :-)
===== Summary =====
You should now be able to add new overlays to Gentoo using ''layman -a [overlay]''. Overlays that aren't part of the official Layman list can be included by adding the appropriate overlay location to the Layman configuration (''/etc/layman/layman.cfg''). Once these have been installed you can then switch to your server and use the version control software to update regularly.
===== Links =====
* [[http://overlays.gentoo.org|Gentoo Overlays]]
* [[http://www.gentoo.org/proj/en/overlays/userguide.xml|Gentoo Overlays: User Guide]]
{{tag>gentoo layman portage nfs svn cvs git mercurial}}