Browse Source

Merge "update various gentoo bits"

tags/3.3.0
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
32441d052d
6 changed files with 29 additions and 10 deletions
  1. +1
    -1
      diskimage_builder/elements/cloud-init/post-install.d/20-enable-cloud-init
  2. +2
    -1
      diskimage_builder/elements/dracut-regenerate/pkg-map
  3. +12
    -0
      diskimage_builder/elements/enable-serial-console/install.d/20-stty
  4. +4
    -2
      diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags
  5. +8
    -4
      diskimage_builder/elements/svc-map/pkg-map
  6. +2
    -2
      diskimage_builder/lib/img-functions

+ 1
- 1
diskimage_builder/elements/cloud-init/post-install.d/20-enable-cloud-init 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


+ 2
- 1
diskimage_builder/elements/dracut-regenerate/pkg-map 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",


+ 12
- 0
diskimage_builder/elements/enable-serial-console/install.d/20-stty 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

+ 4
- 2
diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags 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

+ 8
- 4
diskimage_builder/elements/svc-map/pkg-map 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"
}


+ 2
- 2
diskimage_builder/lib/img-functions 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


Loading…
Cancel
Save