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 set -o pipefail
# gentoo # gentoo
if [[ "${DISTRO_NAME}" == "gentoo" ]]; then if [[ "${DIB_INIT_SYSTEM}" == "openrc" ]]; then
rc-update add cloud-config default rc-update add cloud-config default
rc-update add cloud-final default rc-update add cloud-final default
rc-update add cloud-init-local boot rc-update add cloud-init-local boot

View File

@ -1,7 +1,8 @@
{ {
"family": { "family": {
"gentoo": { "gentoo": {
"PyYAML": "dev-python/pyyaml" "PyYAML": "dev-python/pyyaml",
"python3-PyYAML": "dev-python/pyyaml"
}, },
"suse": { "suse": {
"PyYAML": "python-PyYAML", "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 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 elif [ "$DIB_INIT_SYSTEM" == "openrc" ]; then
sed -r 's/^#(.*ttyS[0,1].*$)/\1/' -i /etc/inittab 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 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 # musl only valid for amd64 for now
if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then
echo "dev-vcs/git -gpg" >> /etc/portage/package.use/musl # gpg doesn't build on musl profiles 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 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 fi

View File

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

View File

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