This is a custom ebuild repository for use with CCR's compatability layer.
To ensure all software runs on any compute node no matter what OS distro is installed, we use Gentoo Prefix as the compatability layer.
This repo provides the recipes (ebuilds) for various packages and software used at CCR. This is similar to custom yum/apt repos where we put custom builds of our software. One subtle difference is gentoo builds everything from source, so ebuilds define recipes on how to build software and will set the sysroot of configure/make to point at our gentoo prefix install.
We also create custom package sets which define the software to be installed in the compatability layer.
NOTE: these are currently very much a WIP
-
Bootstrap gentoo prefix. See here
-
Install a few required gentoo packages:
$ emerge --ask gentoolkit
$ emerge --ask dev-vcs/git
$ emerge --ask app-eselect/eselect-repository
$ mkdir -p /etc/portage/repos.conf
- Clone this repo into
/var/db/repos
:
$ cd $EPREFIX/var/db/repos
$ git clone https://github.com/ubccr/gentoo-overlay.git ubccr
- Create these two files:
$ vim $EPREFIX/etc/portage/repos.conf/ubccr.conf
[ubccr]
location = /cvmfs/soft.ccr.buffalo.edu/versions/[VERSION]/compat/var/db/repos/ubccr
sync-type = git
sync-uri = https://github.com/ubccr/gentoo-overlay.git
masters = gentoo
priority = 50
auto-sync = yes
$ vim $EPREFIX/etc/portage/repos.conf/gentoo.conf
[gentoo]
sync-type = webrsync
auto-sync = no
- Add symlinks to portage configs:
$ cd $EPREFIX/etc/portage
$ ln -s $EPREFIX/var/db/repos/ubccr/etc/portage/package.* .
$ ln -s $EPREFIX/var/db/repos/ubccr/etc/portage/sets .
$ ln -s $EPREFIX/var/db/repos/ubccr/etc/portage/env .
- Fix locale in EPREFIX:
$ vim ${EPREFIX}/etc/locale.gen
Uncomment this line:
en_US.UTF-8 UTF-8
$ locale-gen
$ eselect locale list
Available targets for the LANG variable:
[1] C
[2] C.utf8
[3] POSIX
[4] en_US.utf8
[ ] (free form)
$ eselect locale set 4
- Make sure that glibc is always compiled with a user-defined-trusted-dirs option
$ equery has --package glibc EXTRA_EMAKE
(this should return nothing)
# (Re)install glibc with the user-defined-trusted-dirs option
$ EXTRA_EMAKE="user-defined-trusted-dirs=/eprefix/path/host_injections/[CCR_VERSION]/compat/linux/x86_64/lib" emerge --ask --oneshot sys-libs/glibc
$ equery has --package glibc EXTRA_EMAKE
user-defined-trusted-dirs=/eprefix/path/host_injections/[CCR_VERSION]/compat/linux/x86_64/lib
- Install packages from package set:
$ emerge --ask --update --newuse --deep --complete-graph --verbose @ubccr-VERSION-linux-x86_64
The config files and ebuilds in this repo were heavily adopted from EESSI and Compute Canada. You can check out their overlays here: