theohbrothers / docker-packer

Dockerized packer with useful tools 🐳
Apache License 2.0
3 stars 1 forks source link

Enhancement: Install `virtualbox` 6.1 across all `virtualbox` variants #18

Closed leojonathanoh closed 2 years ago

leojonathanoh commented 2 years ago

Closes #10

Previously, apt was used to install virtualbox. Although this means builds are less error prone and should work, it has downsides:

Now a specific minor version of virtualbox (i.e. virtualbox-6.1) is installed across distros. This keeps reliability of builds, while addressing all of above weaknesses.

TODO

leojonathanoh commented 2 years ago

This is the official way to install a specific minor version via apt https://www.virtualbox.org/wiki/Linux_Downloads.

leojonathanoh commented 2 years ago

@joeltimothyoh the apt-cache madison virtualbox-6.1 (https://download.virtualbox.org/virtualbox/debian/pool/contrib/v/virtualbox-6.1/) shows only the latest patch versions. This means using virtualbox apt sources may mutate patch versions, but at least its better than ubuntu upstream which might mutate minor / major versions, and differ by major versions across distros.

Used to be:

# Ubuntu 18.04 upstream
$ apt-cache madison virtualbox
virtualbox | 5.2.42-dfsg-0~ubuntu1.18.04.1 | http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages
virtualbox | 5.2.18-dfsg-2~ubuntu18.04.5 | http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages
virtualbox | 5.2.10-dfsg-6 | http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages

# Ubuntu 20.04 upstream
$ apt-cache madison virtualbox
virtualbox | 6.1.26-dfsg-3~ubuntu1.20.04.2 | http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages
virtualbox | 6.1.16-dfsg-6~ubuntu1.20.04.2 | http://archive.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages
virtualbox | 6.1.6-dfsg-1 | http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages

now:

# virtualbox upstream
$ apt-cache madison virtualbox-6.0
virtualbox-6.0 | 6.0.24-139119~Ubuntu~bionic | https://download.virtualbox.org/virtualbox/debian bionic/contrib amd64 Packages
$ apt-cache madison virtualbox-6.1
virtualbox-6.1 | 6.1.28-147628~Ubuntu~bionic | https://download.virtualbox.org/virtualbox/debian bionic/contrib amd64 Packages

# virtualbox upstream
$ apt-cache madison virtualbox-6.0
virtualbox-6.0 | 6.0.24-139119~Ubuntu~eoan | https://download.virtualbox.org/virtualbox/debian focal/contrib amd64 Packages
$ apt-cache madison virtualbox-6.1
virtualbox-6.1 | 6.1.28-147628~Ubuntu~eoan | https://download.virtualbox.org/virtualbox/debian focal/contrib amd64 Packages
leojonathanoh commented 2 years ago

the images will be tagged virtualbox-6.1 so it's clear that that is the specific minor version that is in the image. I think this should be much better.

leojonathanoh commented 2 years ago

merging

joeltimothyoh commented 2 years ago

This change only installs latest minor versions rather than patch versions of virtualbox @leojonathanoh

leojonathanoh commented 2 years ago

@joeltimothyoh yes, there's no patch apt source

joeltimothyoh commented 2 years ago

It's difficult to see how this approach is any much different from using default apt packages or helps introduce strict control over virtualbox versions. @leojonathanoh

leojonathanoh commented 2 years ago

It's difficult to see how this approach is any much different from using default apt packages or helps introduce strict control over virtualbox versions. @leojonathanoh

using distro's default upstream apt source is likely to hop minor versions, and major versions once in a blue moon