diskimage-builder/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags
Matthew Thode 97e4627d87
update various gentoo bits
Update an rc-update call to only be made if running openrc instead of
all gentoo profiles (systemd does not have rc-update).

Add python3-pyyaml package mappings.

Update serial console to support multiple arches.

Update open-iscsi and open-isns keywords (looks like upstream merged
some musl fixes).

Update the kernel and initramfs file name globs for the
gentoo-kernel-bin usage.

Change-Id: I259bffed3a3e3f92be2210ead6bdfa383917d457
Signed-off-by: Matthew Thode <mthode@mthode.org>
2020-08-24 10:21:35 -05:00

38 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# get the directories in order
mkdir -p /etc/portage/profile
mkdir -p /etc/portage/package.accept_keywords
if [[ -f /etc/portage/package.keywords ]]; then mv /etc/portage/package.keywords /etc/portage/package.accept_keywords/prebuilt-1; fi
mkdir -p /etc/portage/package.mask
mkdir -p /etc/portage/package.unmask
mkdir -p /etc/portage/package.use
# needed in order to install pip packages as root
echo 'dev-python/pip vanilla' >> /etc/portage/package.use/pip
# needed to create disk images
echo 'sys-fs/lvm2 -thin' >> /etc/portage/package.use/grub
echo 'sys-boot/grub device-mapper' >> /etc/portage/package.use/grub
echo 'sys-boot/grub grub_platforms_efi-64' >> /etc/portage/package.use/grub # always enable efi-64
if [[ 'x86_64' == "${ARCH}" ]]; then echo 'sys-boot/grub grub_platforms_pc' >> /etc/portage/package.use/grub; fi # bios support for bios systems
# needed to install static kernel
if [[ 'x86_64' == "${ARCH}" ]]; then echo 'sys-kernel/gentoo-kernel-bin ~amd64' >> /etc/portage/package.accept_keywords/kernel; fi
if [[ 'arm64' == "${ARCH}" ]]; then echo 'sys-kernel/gentoo-kernel-bin ~arm64' >> /etc/portage/package.accept_keywords/kernel; fi
# musl only valid for amd64 for now
if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then
echo "dev-vcs/git -gpg" >> /etc/portage/package.use/musl # gpg doesn't build on musl profiles
echo "sys-libs/pam cracklib" >> /etc/portage/package.use/musl
if [[ 'x86_64' == "${ARCH}" ]]; then echo "~sys-block/open-iscsi-2.1.1 ~amd64" >> /etc/portage/package.accept_keywords/musl; fi
if [[ 'x86_64' == "${ARCH}" ]]; then echo "~sys-block/open-isns-0.100 ~amd64" >> /etc/portage/package.accept_keywords/musl; fi
if [[ 'arm64' == "${ARCH}" ]]; then echo "~sys-block/open-iscsi-2.1.1 ~arm64" >> /etc/portage/package.accept_keywords/musl; fi
if [[ 'arm64' == "${ARCH}" ]]; then echo "~sys-block/open-isns-0.100 ~arm64" >> /etc/portage/package.accept_keywords/musl; fi
fi