Skip to content
Kenneth Hoste edited this page Jun 2, 2020 · 10 revisions

Notes

Compute Canada

(via Bart Oldeman in EESSI Slack on Tue June 2nd 2020)

First thing to try:

wget https://gitweb.gentoo.org/repo/proj/prefix.git/plain/scripts/bootstrap-prefix.sh
chmod +x bootstrap-prefix.sh
EPREFIX=/cvmfs/soft.computecanada.ca/gentoo/2020 ./bootstrap-prefix.sh

This makes it stable:

@@ -1500,6 +1500,9 @@
        [[ -e ${ROOT}/tmp/usr/bin/emerge ]] || (bootstrap_portage) || return 1
        prepare_portage
+       echo 'ACCEPT_KEYWORDS="-~amd64"' >> ${ROOT}/tmp/etc/portage/make.conf
+       echo 'ACCEPT_KEYWORDS="-~amd64"' >> ${ROOT}/etc/portage/make.conf
+
        einfo "stage1 successfully finished"
 }

This is another tweak you may need and adjust (add all languages spoken in your countries):

@@ -1932,6 +1936,22 @@
                BOOTSTRAP_RAP=yes \
                USE="${USE} -pam" \
                with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1
+
+               # create symlinks to system nssswitch.conf, libraries, and regenerate locales
+               if [ ! -f "${ROOT}"/etc/nsswitch.conf.unused ]; then
+                       mv "${ROOT}"/etc/nsswitch.conf "${ROOT}"/etc/nsswitch.conf.unused
+                       ln -s /etc/nsswitch.conf "${ROOT}"/etc/nsswitch.conf
+                       ln -s /lib64/libnss_ldap.so.2 "${ROOT}"/lib64/libnss_ldap.so.2
+                       ln -s /lib64/libnss_sss.so.2 "${ROOT}"/lib64/libnss_sss.so.2
+                       mv "${ROOT}"/etc/locale.gen "${ROOT}"/etc/locale.gen.unused
+                       cat << EOF > "${ROOT}"/etc/locale.gen
+en_US.UTF-8 UTF-8
+en_CA.UTF-8 UTF-8
+fr_CA.UTF-8 UTF-8
+en_GB.UTF-8 UTF-8
+EOF
+                       "${ROOT}"/usr/sbin/locale-gen
+               fi
        else
                pkgs=(
                        sys-apps/gentoo-functions

Last but not least there was a bug in the bootstrap with gawk, which may have been resolved since then:

@@ -2014,14 +2035,14 @@
        # now we have a shell right there
        unset CONFIG_SHELL
-       # Build portage and dependencies.
+       # Build portage and dependencies (force stable gawk to avoid issues)
        pkgs=(
                sys-apps/coreutils
                sys-apps/findutils
                app-arch/gzip
                app-arch/tar
                sys-apps/grep
-               sys-apps/gawk
+               =sys-apps/gawk-4.2.1-r1
                sys-devel/make
                sys-apps/file
                app-admin/eselect
Clone this wiki locally