diff --git a/CHANGELOG.md b/CHANGELOG.md index 830e5088d..fac2dcd1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,12 @@ Markdown table generated at - Update oraclelinux 8 to 8.10 - Update rhel 8 to 8.10 - Update freebsd 14 to 14.1 +- update debian 11 to 11.10 +- Update debian 12 to 12.6 +- Fix dnf cleanup command for broken pkg deps +- Fix parallel tools install for aarch64 oraclelinux-8 +- Fix shell exec err for ubuntu user-data script +- Fix FreeBSD 14 builds due to change in home directory location ## [v4.1.2] (2024-05-23) diff --git a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl index 2a1a0763f..8ad7cc03b 100644 --- a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl @@ -4,6 +4,7 @@ os_arch = "aarch64" iso_url = "https://repo.almalinux.org/almalinux/9/isos/aarch64/AlmaLinux-9.5-aarch64-dvd.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/9/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" +vbox_guest_os_type = "Oracle_arm64" vmware_guest_os_type = "arm-rhel9-64" +vbox_boot_wait = "10s" boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg x"] diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index e06e354f1..465c4a72e 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.9" +os_version = "11.10" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.9.0-arm64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.10.0-arm64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl index e60ff9fb2..28483fd7e 100644 --- a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.9" +os_version = "11.10" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.9.0-amd64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.10.0-amd64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 4c31488e3..e25545392 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -58,6 +58,22 @@ locals { ) : var.qemuargs # virtualbox-iso + vboxmanage = var.vboxmanage == null ? ( + var.os_arch == "aarch64" ? [ + ["modifyvm", "{{.Name}}", "--chipset", "armv8virtual"], + ["modifyvm", "{{.Name}}", "--vrde", "off"], + ["modifyvm", "{{.Name}}", "--audio-enabled", "off"], + ["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"], + ["modifyvm", "{{.Name}}", "--mouse", "usb"], + ["modifyvm", "{{.Name}}", "--keyboard", "usb"], + ["modifyvm", "{{.Name}}", "--usb-xhci", "on"], + ["modifyvm", "{{.Name}}", "--usb-ohci", "off"], + ["storagectl", "{{.Name}}", "--name", "IDE Controller", "--remove"], + ] : [ + ["modifyvm", "{{.Name}}", "--chipset", "ich9"], + ["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"] + ] + ) : var.vboxmanage vbox_gfx_controller = var.vbox_gfx_controller == null ? ( var.is_windows ? "vboxsvga" : "vmsvga" ) : var.vbox_gfx_controller @@ -254,16 +270,23 @@ source "qemu" "vm" { } source "virtualbox-iso" "vm" { # Virtualbox specific options - #firmware = "efi" + # chipset = var.os_arch == "aarch64" ? "armv8virtual" : "ich9" + firmware = var.os_arch == "aarch64" ? "efi" : "bios" + rtc_time_base = "UTC" + # hard_drive_discard = true + # hard_drive_nonrotational = true + # sound = "none" + # usb = true + gfx_controller = local.vbox_gfx_controller gfx_vram_size = local.vbox_gfx_vram_size guest_additions_path = var.vbox_guest_additions_path guest_additions_mode = local.vbox_guest_additions_mode guest_additions_interface = var.vbox_guest_additions_interface guest_os_type = var.vbox_guest_os_type - hard_drive_interface = var.vbox_hard_drive_interface - iso_interface = var.vbox_iso_interface - vboxmanage = var.vboxmanage + hard_drive_interface = var.os_arch == "aarch64" ? "virtio" : var.vbox_hard_drive_interface + iso_interface = var.os_arch == "aarch64" ? "virtio" : var.vbox_iso_interface + vboxmanage = local.vboxmanage virtualbox_version_file = var.virtualbox_version_file # Source block common options boot_command = var.boot_command @@ -294,7 +317,7 @@ source "virtualbox-ovf" "vm" { guest_additions_path = var.vbox_guest_additions_path source_path = var.vbox_source_path checksum = var.vbox_checksum - vboxmanage = var.vboxmanage + vboxmanage = local.vboxmanage virtualbox_version_file = var.virtualbox_version_file # Source block common options communicator = local.communicator diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 5a6354105..f508c9097 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -233,17 +233,8 @@ variable "vbox_iso_interface" { default = "sata" } variable "vboxmanage" { - type = list(list(string)) - default = [ - [ - "modifyvm", - "{{.Name}}", - "--audio", - "none", - "--nat-localhostreachable1", - "on", - ] - ] + type = list(list(string)) + default = null } variable "virtualbox_version_file" { type = string diff --git a/packer_templates/scripts/_common/parallels-rhel.sh b/packer_templates/scripts/_common/parallels-rhel.sh index fde6f59fb..e9b5d670a 100644 --- a/packer_templates/scripts/_common/parallels-rhel.sh +++ b/packer_templates/scripts/_common/parallels-rhel.sh @@ -9,6 +9,13 @@ parallels-iso|parallels-pvm) # make sure we use dnf on EL 8+ if [ "$major_version" -ge 8 ]; then dnf -y install checkpolicy selinux-policy-devel gcc kernel-devel kernel-headers make + if [ "$major_version" -eq 8 ]; then + dnf -y install -- *epel-release* + dnf -y install gcc-toolset-12 gcc-toolset-12-runtime gcc-toolset-12-gcc-c++ + mv /usr/bin/gcc /usr/bin/gcc.old + ln -s /opt/rh/gcc-toolset-12/root/usr/bin/gcc /usr/bin/gcc + dnf -y remove -- *epel-release* + fi else yum -y install checkpolicy selinux-policy-devel gcc kernel-devel kernel-headers make fi @@ -32,16 +39,5 @@ parallels-iso|parallels-pvm) umount /tmp/parallels; rm -rf /tmp/parallels; rm -f "$HOME_DIR"/*.iso; - - # Parallels Tools for Linux includes native auto-mount script, - # which causes losing some of Vagrant-relative shared folders. - # So, we should disable this behavior. - # https://github.com/Parallels/vagrant-parallels/issues/325#issuecomment-418727113 - # TODO: verify this is fixed in latest version of parallels - # auto_mount_script='/usr/bin/prlfsmountd' - # if [ -f "${auto_mount_script}" ]; then - # printf '#!/bin/sh\n # Shared folders auto-mount is disabled by Vagrant' > "${auto_mount_script}" - # fi - ;; esac diff --git a/packer_templates/scripts/_common/parallels.sh b/packer_templates/scripts/_common/parallels.sh index def4f01aa..3f688f596 100644 --- a/packer_templates/scripts/_common/parallels.sh +++ b/packer_templates/scripts/_common/parallels.sh @@ -24,16 +24,5 @@ parallels-iso|parallels-pvm) umount /tmp/parallels; rm -rf /tmp/parallels; rm -f "$HOME_DIR"/*.iso; - - # Parallels Tools for Linux includes native auto-mount script, - # which causes losing some of Vagrant-relative shared folders. - # So, we should disable this behavior. - # https://github.com/Parallels/vagrant-parallels/issues/325#issuecomment-418727113 - # TODO: verify this is fixed in latest version of parallels - # auto_mount_script='/usr/bin/prlfsmountd' - # if [ -f "${auto_mount_script}" ]; then - # printf '#!/bin/sh\n # Shared folders auto-mount is disabled by Vagrant' > "${auto_mount_script}" - # fi - ;; esac diff --git a/packer_templates/scripts/_common/virtualbox.sh b/packer_templates/scripts/_common/virtualbox.sh index f6e66b7f1..82334c2c4 100644 --- a/packer_templates/scripts/_common/virtualbox.sh +++ b/packer_templates/scripts/_common/virtualbox.sh @@ -12,21 +12,26 @@ virtualbox-iso|virtualbox-ovf) mkdir -p /tmp/vbox; mount -o loop "$HOME_DIR"/"$ISO" /tmp/vbox; - echo "installing deps necessary to compile kernel modules" - # We install things like kernel-headers here vs. kickstart files so we make sure we install them for the updated kernel not the stock kernel - if [ -f "/bin/dnf" ]; then - dnf install -y --skip-broken perl cpp gcc make bzip2 tar kernel-headers kernel-devel kernel-uek-devel || true # not all these packages are on every system - elif [ -f "/bin/yum" ] || [ -f "/usr/bin/yum" ]; then - yum install -y --skip-broken perl cpp gcc make bzip2 tar kernel-headers kernel-devel kernel-uek-devel || true # not all these packages are on every system - elif [ -f "/usr/bin/apt-get" ]; then - apt-get install -y build-essential dkms bzip2 tar linux-headers-"$(uname -r)" - elif [ -f "/usr/bin/zypper" ]; then - zypper install -y perl cpp gcc make bzip2 tar kernel-default-devel - fi +# echo "installing deps necessary to compile kernel modules" +# # We install things like kernel-headers here vs. kickstart files so we make sure we install them for the updated kernel not the stock kernel +# if [ -f "/bin/dnf" ]; then +# dnf install -y --skip-broken perl cpp gcc make bzip2 tar kernel-headers kernel-devel kernel-uek-devel || true # not all these packages are on every system +# elif [ -f "/bin/yum" ] || [ -f "/usr/bin/yum" ]; then +# yum install -y --skip-broken perl cpp gcc make bzip2 tar kernel-headers kernel-devel kernel-uek-devel || true # not all these packages are on every system +# elif [ -f "/usr/bin/apt-get" ]; then +# apt-get install -y build-essential dkms bzip2 tar linux-headers-"$(uname -r)" +# elif [ -f "/usr/bin/zypper" ]; then +# zypper install -y perl cpp gcc make bzip2 tar kernel-default-devel +# fi echo "installing the vbox additions" # this install script fails with non-zero exit codes for no apparent reason so we need better ways to know if it worked - /tmp/vbox/VBoxLinuxAdditions.run --nox11 || true + arch="$(uname -m)" + if [ "$arch" = "aarch64" ]; then + /tmp/vbox/VBoxLinuxAdditions-arm64.run --nox11 || true + else + /tmp/vbox/VBoxLinuxAdditions.run --nox11 || true + fi if ! modinfo vboxsf >/dev/null 2>&1; then echo "Cannot find vbox kernel module. Installation of guest additions unsuccessful!" diff --git a/packer_templates/scripts/rhel/cleanup_dnf.sh b/packer_templates/scripts/rhel/cleanup_dnf.sh index 2018ca3c4..4c0ed94b8 100644 --- a/packer_templates/scripts/rhel/cleanup_dnf.sh +++ b/packer_templates/scripts/rhel/cleanup_dnf.sh @@ -8,7 +8,7 @@ echo "Remove development and kernel source packages" dnf -y remove gcc cpp gc kernel-devel kernel-headers glibc-devel elfutils-libelf-devel glibc-headers kernel-devel kernel-headers echo "remove orphaned packages" -dnf -y autoremove +dnf -y autoremove --skip-broken echo "Remove previous kernels that preserved for rollbacks" dnf -y remove "$(dnf repoquery --installonly --latest-limit=-1 -q)"