Skip to content

Commit

Permalink
Fix upload public/private flag lookup (#1544)
Browse files Browse the repository at this point in the history
* fix upload public or private flag lookup
* oracle 7 cleanup script error removing linux-firmware
* ubuntu 23.10 post install command on file that doesn't exist
  • Loading branch information
Stromweld committed Feb 2, 2024
1 parent ba10f22 commit 82435a5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#>
- Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches
- Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private

## [unreleased] (2024-01-31)
## [unreleased] (2024-02-01)

## [v3.2.2] (2024-02-01)

- Fix upload private or public flag lookup in builds.yml
- Fix yum cleanup script for oracle linux 7 error removing linux-firmware
- Fix ubuntu user-data post command modifying a file that doesn't exist on 23.10

## [v3.2.1] (2024-01-31)

- Fix build list generation on aarch64 machines
- Updated Debian 12 to 12.4
Expand Down
2 changes: 1 addition & 1 deletion lib/bento/upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def lookup_slug(name)

def public_private_box(name)
builds_yml['public'].each do |public|
if name.include?('arm64')
if name.include?('arm64') || name.include?('aarch64')
return '--no-private' if name.start_with?(public) && public.include?('arm64')
else
return '--no-private' if name.start_with?(public) && !public.include?('arm64')
Expand Down
2 changes: 1 addition & 1 deletion lib/bento/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bento
VERSION = '3.2.1'.freeze
VERSION = '3.2.2'.freeze
end
1 change: 0 additions & 1 deletion packer_templates/http/ubuntu/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ autoinstall:
install-server: yes
allow-pw: yes
late-commands:
- 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml'
- echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant
# Enable hyper-v daemons only if using hyper-v virtualization
- if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi
8 changes: 6 additions & 2 deletions packer_templates/scripts/rhel/cleanup_yum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ package-cleanup --oldkernels --count=1 -y

# Avoid ~200 meg firmware package we don't need
# this cannot be done in the KS file so we do it here
echo "Removing extra firmware packages"
yum -y remove linux-firmware
if test "$(uname -r)" == -- *el7uek*; then
echo "Skipping firmware removal for Oracle Linux"
else
echo "Removing extra firmware packages"
yum -y remove linux-firmware
fi

echo "clean all package cache information"
yum -y clean all --enablerepo=\*;
Expand Down
3 changes: 2 additions & 1 deletion packer_templates/scripts/ubuntu/cleanup_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ dpkg --list \
| grep linux-source \
| xargs apt-get -y purge;

# 23.10 gives dependency errors for systemd-dev package
echo "remove all development packages"
dpkg --list \
| awk '{ print $2 }' \
| grep -- '-dev\(:[a-z0-9]\+\)\?$' \
| xargs apt-get -y purge;
| xargs -I % apt-get -y purge % || true;

echo "remove docs packages"
dpkg --list \
Expand Down

0 comments on commit 82435a5

Please sign in to comment.