Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: [Buildroot] [PATCH 1/2] support/misc/Vagrantfile: move to Ubuntu 26.04
Date: Fri,  6 Nov 2026 11:20:58 +0100	[thread overview]
Message-ID: <20261106102059.1407103-1-angelo.compagnucci@gmail.com> (raw)

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.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
 support/misc/Vagrantfile | 39 +++++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile
index 4fb2c9728a..91504468a6 100644
--- a/support/misc/Vagrantfile
+++ b/support/misc/Vagrantfile
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2026-11-06 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 10:20 Angelo Compagnucci [this message]
2026-11-06 10:20 ` [Buildroot] [PATCH 2/2] DEVELOPERS: add Angelo Compagnucci for the Vagrantfile Angelo Compagnucci

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261106102059.1407103-1-angelo.compagnucci@gmail.com \
    --to=angelo.compagnucci@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox