Merge "update various gentoo bits"

This commit is contained in:
Zuul 2020-09-16 08:34:31 +00:00 committed by Gerrit Code Review
commit 32441d052d
6 changed files with 29 additions and 10 deletions

View File

@ -7,7 +7,7 @@ set -eu
set -o pipefail
# gentoo
if [[ "${DISTRO_NAME}" == "gentoo" ]]; then
if [[ "${DIB_INIT_SYSTEM}" == "openrc" ]]; then
rc-update add cloud-config default
rc-update add cloud-final default
rc-update add cloud-init-local boot

View File

@ -1,7 +1,8 @@
{
"family": {
"gentoo": {
"PyYAML": "dev-python/pyyaml"
"PyYAML": "dev-python/pyyaml",
"python3-PyYAML": "dev-python/pyyaml"
},
"suse": {
"PyYAML": "python-PyYAML",

View File

@ -14,4 +14,16 @@ elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
install -D -g root -o root -m 0644 ${SCRIPTDIR}/serial-console-udev.rules /etc/udev/rules.d/99-serial-console.rules
elif [ "$DIB_INIT_SYSTEM" == "openrc" ]; then
sed -r 's/^#(.*ttyS[0,1].*$)/\1/' -i /etc/inittab
echo '# diskimage-builder serial console' >> /etc/inittab
echo -n 's0:12345:respawn:/sbin/agetty -L 115200 ' >> /etc/inittab
if [[ -n "${DIB_BOOTLOADER_SERIAL_CONSOLE}" ]]; then
echo -n "${DIB_BOOTLOADER_SERIAL_CONSOLE}" >> /etc/inittab
elif [[ "powerpc ppc64 ppc64le" =~ ${ARCH} ]]; then
echo -n "hvc0" >> /etc/inittab
elif [[ "arm64" =~ ${ARCH} ]]; then
echo -n "ttyAMA0" >> /etc/inittab
else
echo -n "ttyS0" >> /etc/inittab
fi
echo ' vt100' >> /etc/inittab
fi

View File

@ -29,7 +29,9 @@ if [[ 'arm64' == "${ARCH}" ]]; then echo 'sys-kernel/gentoo-kernel-bin ~arm64' >
# 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-block/open-iscsi-2.0.878 ~amd64" >> /etc/portage/package.accept_keywords/musl
echo "=sys-block/open-isns-0.97 ~amd64" >> /etc/portage/package.accept_keywords/musl
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

View File

@ -1,13 +1,17 @@
{
"family": {
"redhat": {
"PyYAML": "PyYAML",
"python3-PyYAML": "python3-pyyaml"
},
"debian": {
"PyYAML": "python-yaml",
"python3-PyYAML": "python3-yaml"
},
"gentoo": {
"PyYAML": "dev-python/pyyaml",
"python3-PyYAML": "dev-python/pyyaml"
},
"redhat": {
"PyYAML": "PyYAML",
"python3-PyYAML": "python3-pyyaml"
},
"suse": {
"PyYAML": "python-PyYAML"
}

View File

@ -214,8 +214,8 @@ function select_boot_kernel_initrd () {
KERNEL=$(basename $(readlink -e $BOOTDIR/vmlinuz))
RAMDISK=$(basename $(readlink -e $BOOTDIR/initrd))
elif [[ -f "${TARGET_ROOT}"/etc/gentoo-release ]]; then
KERNEL="$(basename $(ls -1rv $BOOTDIR/kernel-*-openstack | head -n 1))"
RAMDISK="$(basename $(ls -1rv $BOOTDIR/initramfs-*-openstack | head -n 1))"
KERNEL="$(basename $(ls -1rv $BOOTDIR/vmlinuz-* | head -n 1))"
RAMDISK="$(basename $(ls -1rv $BOOTDIR/initramfs-* | head -n 1))"
else
echo "ERROR: Unable to detect operating system"
exit 1