2017-11-01 03:04:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
if [[ ${GENTOO_OVERLAYS} != '' ]]; then
|
|
|
|
if mountpoint -q /dev/shm; then
|
|
|
|
echo "/dev/shm found in /proc/self/mountinfo"
|
|
|
|
elif [[ -k /dev/shm ]]; then
|
|
|
|
echo "/dev/shm exists and is stickied"
|
|
|
|
else
|
|
|
|
fix_shm
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -f /usr/portage/profiles ]]; then
|
|
|
|
emerge-webrsync -q
|
|
|
|
fi
|
|
|
|
|
|
|
|
# layman requires cryptography, which needs ecc crypto functions.
|
|
|
|
# binaries providing those functions have questionable legality for
|
|
|
|
# redistribution, so we have to use a version of openssl that works around
|
|
|
|
# it (using fedora's patchset) and also use a version of cryptography that
|
|
|
|
# depends on that version of openssl.
|
2018-06-24 01:47:33 +00:00
|
|
|
echo '=dev-python/cryptography-2.1.4-r2 ~amd64' >> /etc/portage/package.keywords/layman
|
|
|
|
echo '=dev-libs/openssl-1.0.2o-r6 ~amd64' >> /etc/portage/package.keywords/layman
|
2018-10-08 05:39:35 +00:00
|
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot openssl openssh
|
2017-11-01 03:04:29 +00:00
|
|
|
# install layman
|
2018-10-08 05:39:35 +00:00
|
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot --deep --ignore-built-slot-operator-deps=y layman
|
2017-11-01 03:04:29 +00:00
|
|
|
# sync the initial overlay list
|
|
|
|
layman -S
|
2018-06-24 01:47:33 +00:00
|
|
|
# enable the various overlays, ignore failures (overlay my already be enabled)
|
|
|
|
set +e
|
2017-11-01 03:04:29 +00:00
|
|
|
for OVERLAY in ${GENTOO_OVERLAYS}; do
|
|
|
|
layman -a "${OVERLAY}"
|
|
|
|
done
|
2018-06-24 01:47:33 +00:00
|
|
|
set -e
|
2017-11-01 03:04:29 +00:00
|
|
|
|
|
|
|
unfix_shm
|
|
|
|
fi
|