diskimage-builder/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags
Matthew Thode 1bde2591ae
support cracklib in pam for Gentoo's musl profile
Needed for any musl build, is default in other profiles

Change-Id: Ib7cae9124f5846d33c05f26befd8f13646a08610
2019-01-15 09:47:46 -06:00

39 lines
1.6 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
if [ -f /etc/portage/package.keywords ]; then
mv /etc/portage/package.keywords /etc/portage/package.keywords.bak
mkdir -p /etc/portage/package.keywords
mv /etc/portage/package.keywords.bak /etc/portage/package.keywords/prebuilt-1
else
mkdir -p /etc/portage/package.keywords
fi
[ -d /etc/portage/package.accept_keywords ] && mv /etc/portage/package.accept_keywords/* /etc/portage/package.keywords/ && rmdir /etc/portage/package.accept_keywords
[ -f /etc/portage/package.accept_keywords ] && mv /etc/portage/package.accept_keywords /etc/portage/package.keywords/prebuilt-2
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
# needed in order to install pip packages as root
echo '=dev-python/pip-9.0.1-r2 ~amd64' >> /etc/portage/package.keywords/pip
if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then
echo "dev-vcs/git -gpg" >> /etc/portage/package.use/musl # gpg doesn't build on musl profiles
echo "=sys-block/open-iscsi-2.0.874-r1 ~amd64" >> /etc/portage/package.keywords/musl
echo "=sys-block/open-isns-0.97 ~amd64" >> /etc/portage/package.keywords/musl
echo "sys-libs/pam cracklib" >> /etc/portage/package.use/musl
fi