This patch contains the known set of changes needed to make a gentoo image build successfully. - Standardize use of GENTOO_EMERGE_DEFAULT_OPTS, reduce duplication of options set there. - Correct the cleanup commands to reflect standard Gentoo good practices by omitting --complete-graph, which is unneeded with --deep, and using --changed-use instead of --newuse to reduce unneeded package churn. - Stop using deprecated layman command to manage reposiotry overlays, instead use new supported eselect-repository - Set new USE flags required for LVM and installkernel. This was communicated via a Gentoo news item and is a required cleanup. - Remove now-invalid skip of gpg if using musl This is the set of changes needed to get the CI job passing and make DIB build images at all, and we'd like to land them, but there are still items we'd like to complete to enhance Gentoo support in DIB: - Optional, built-in support for Gentoo binhosts -- where you can set a DIB_GENTOO_BINHOST=true (or similar) and have the binhost enabled by default. - Make the default configuration of EMERGE_DEFAULT_OPTS more easily managed in a DIB-style manner, e.g. setting --quiet vs --verbose based on the value of DIB_DEBUG_TRACE. Signed-Off-By: Jay Faulkner <jay@jvf.cc> Signed-Off-By: Sam James <sam@gentoo.org> Co-Authored-By: Sam James <sam@gentoo.org> Change-Id: Idab82a9fa986fcc56fe4e1e1bf0445c7306b2858
33 lines
773 B
Bash
Executable File
33 lines
773 B
Bash
Executable File
#!/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 ${PORTDIR}/profiles ]]; then
|
|
emerge-webrsync -q
|
|
fi
|
|
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot openssl openssh
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot eselect-repository
|
|
# enable the various overlays, ignore failures (overlay my already be enabled)
|
|
set +e
|
|
for OVERLAY in ${GENTOO_OVERLAYS}; do
|
|
eselect repository enable "${OVERLAY}"
|
|
done
|
|
set -e
|
|
|
|
unfix_shm
|
|
fi
|