support/misc/Vagrantfile: move to Ubuntu 26.04
PATCH 1/2 support/misc/Vagrantfile: move to Ubuntu 26.04
Debian bullseye (11) reached the end of its LTS support on 2026-08-31, and the official boxes of the newer Debian releases are only built for libvirt.
Move to the Bento Ubuntu 26.04 box, as the same image is available for VirtualBox, VMware and libvirt:
https://portal.cloud.hashicorp.com/vagrant/discover/bento/ubuntu-26.04
While at it:
- purge snapd, the Ubuntu management tools and the services not needed in a build VM, to keep it minimal;
- use the GNU install, Buildroot does not work with the uutils one;
- install libncurses-dev (libncurses5-dev is gone), cpio, file and wget;
- replace the vagrant-vbguest plugin, archived since 2023 and broken with recent Vagrant versions, with the virtualbox-guest-utils package, which uses the kernel drivers;
- use the vmware_desktop provider name;
- download the release over https.
--- support/misc/Vagrantfile | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-)
support/misc/Vagrantfile +29 -10
@@ -12,9 +12,13 @@ VM_MEMORY=2048 VM_CORES=1 Vagrant.configure('2') do |config| - config.vm.box = 'debian/bullseye64' + # Ubuntu is used because the same Bento box is available for all the + # providers below: VirtualBox, VMware and libvirt. There is no such box + # for Debian trixie: the official one is only built for libvirt, and + # the Bento one has no libvirt image. + config.vm.box = 'bento/ubuntu-26.04' - config.vm.provider :vmware_fusion do |v, override| + config.vm.provider :vmware_desktop do |v, override| v.vmx['memsize'] = VM_MEMORY v.vmx['numvcpus'] = VM_CORES end
@@ -23,10 +27,13 @@ Vagrant.configure('2') do |config| v.memory = VM_MEMORY v.cpus = VM_CORES - required_plugins = %w( vagrant-vbguest ) - required_plugins.each do |plugin| - system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin - end + # Replace the Guest Additions built in the box with the Ubuntu + # ones, which use the drivers of the kernel: nothing to compile, + # and they keep working across kernel updates + override.vm.provision 'shell', privileged: true, inline: + "/opt/VBoxGuestAdditions-*/uninstall.sh || true + apt-get -q update + apt-get -q -y install virtualbox-guest-utils" end config.vm.provider :libvirt do |v, override|
@@ -37,7 +44,7 @@ Vagrant.configure('2') do |config| config.vm.provision 'shell' do |s| s.inline = 'echo Setting up machine name' - config.vm.provider :vmware_fusion do |v, override| + config.vm.provider :vmware_desktop do |v, override| v.vmx['displayname'] = "Buildroot #{RELEASE}" end
@@ -49,15 +56,27 @@ Vagrant.configure('2') do |config| config.vm.provision 'shell', privileged: true, inline: "dpkg --add-architecture i386 apt-get -q update - apt-get -q -y install build-essential libncurses5-dev \ - git bzr cvs mercurial rsync subversion libc6:i386 unzip bc + # Keep the VM minimal: drop snapd and the Ubuntu specific management + # tools, the services and the storage tools a build VM does not need + apt-get -q -y purge --auto-remove snapd lxd-installer lxd-agent-loader \ + ubuntu-pro-client landscape-common apport pollinate unminimize \ + cloud-init cloud-initramfs-copymods cloud-initramfs-dyn-netconf \ + software-properties-common ufw needrestart fwupd packagekit \ + modemmanager plymouth kdump-tools sos overlayroot multipath-tools \ + open-iscsi bcache-tools btrfs-progs xfsprogs ntfs-3g mdadm + apt-get -q -y install build-essential libncurses-dev \ + git bzr cvs mercurial rsync subversion libc6:i386 unzip bc \ + cpio file wget gnu-coreutils + # Buildroot does not work with the uutils install of Ubuntu + update-alternatives --install /usr/bin/install install \ + /usr/bin/gnuinstall 100 apt-get -q -y autoremove apt-get -q -y clean update-locale LC_ALL=C" config.vm.provision 'shell', privileged: false, inline: "echo 'Downloading and extracting buildroot #{RELEASE}' - wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz + wget -q -c https://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz tar axf buildroot-#{RELEASE}.tar.gz" end
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 DEVELOPERS: add Angelo Compagnucci for the Vagrantfile
--- DEVELOPERS | 1 + 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
@@ -265,6 +265,7 @@ F: package/sshguard/ F: package/sunwait/ F: package/sysdig/ F: package/uthash/ +F: support/misc/Vagrantfile N: Andy Shevchenko <[email protected]> F: package/fb-test-app/
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot