Skip to content

Commit 82435a5

Browse files
authored
Fix upload public/private flag lookup (#1544)
* 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
1 parent ba10f22 commit 82435a5

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#>
5454
- Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches
5555
- Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private
5656

57-
## [unreleased] (2024-01-31)
57+
## [unreleased] (2024-02-01)
58+
59+
## [v3.2.2] (2024-02-01)
60+
61+
- Fix upload private or public flag lookup in builds.yml
62+
- Fix yum cleanup script for oracle linux 7 error removing linux-firmware
63+
- Fix ubuntu user-data post command modifying a file that doesn't exist on 23.10
64+
65+
## [v3.2.1] (2024-01-31)
5866

5967
- Fix build list generation on aarch64 machines
6068
- Updated Debian 12 to 12.4

lib/bento/upload.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def lookup_slug(name)
8787

8888
def public_private_box(name)
8989
builds_yml['public'].each do |public|
90-
if name.include?('arm64')
90+
if name.include?('arm64') || name.include?('aarch64')
9191
return '--no-private' if name.start_with?(public) && public.include?('arm64')
9292
else
9393
return '--no-private' if name.start_with?(public) && !public.include?('arm64')

lib/bento/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Bento
2-
VERSION = '3.2.1'.freeze
2+
VERSION = '3.2.2'.freeze
33
end

packer_templates/http/ubuntu/user-data

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ autoinstall:
1313
install-server: yes
1414
allow-pw: yes
1515
late-commands:
16-
- 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml'
1716
- echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant
1817
# Enable hyper-v daemons only if using hyper-v virtualization
1918
- 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

packer_templates/scripts/rhel/cleanup_yum.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ package-cleanup --oldkernels --count=1 -y
1919

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

2529
echo "clean all package cache information"
2630
yum -y clean all --enablerepo=\*;

packer_templates/scripts/ubuntu/cleanup_ubuntu.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ dpkg --list \
2626
| grep linux-source \
2727
| xargs apt-get -y purge;
2828

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

3536
echo "remove docs packages"
3637
dpkg --list \

0 commit comments

Comments
 (0)