# Virtualbox backport for Debian 10

This repository provides an unofficial (and unsupported) backport of Virtualbox
for Debian 10, based on the package available in Debian unstable (see
<https://tracker.debian.org/pkg/virtualbox>).

Since 2020-02-17, the repository also includes backports of:

- virtualbox-guest-additions-iso and virtualbox-ext-pack
- vagrant and ruby-vagrant-cloud (required so that vagrant works with VirtualBox 6.1)

Note: if you use this, please let me know, so I know if I should continue maintaining it.

Contact: Lucas Nussbaum <lucas@debian.org>

## Usage on Debian 'testing' or 'unstable'

This is a package for Debian 10 (buster). It does not work on Debian 'testing'
or 'unstable'. If you are using 'testing' or 'unstable', use the package
available in 'unstable'.  If you use 'testing', use APT pinning to install the
package from 'unstable' (see <https://wiki.debian.org/AptConfiguration>).

## Installation instructions

    # 1. Enable Debian's backports repository. See https://backports.debian.org/Instructions/

    # 2. Download and trust lucas' GPG key
    wget -O - https://db.debian.org/fetchkey.cgi?fingerprint=FEDEC1CB337BCF509F43C2243914B532F4DFBE99 | apt-key add
    
    # 3. Add the repository
    echo 'deb https://people.debian.org/~lucas/virtualbox-buster/ ./' > /etc/apt/sources.list.d/virtualbox-unofficial.list
    
    # 4. Update and install virtualbox
    apt update
    apt install virtualbox
    
    # 5. Start virtualbox manually (I'm not sure why this is needed)
    systemctl start virtualbox

## Context

Virtualbox is not available in Debian 10 (nor in backports). The reasons are
discussed at length in <https://bugs.debian.org/794466> and various other
mailing list threads, but can be summarized as:

* Virtualbox is not suitable for Debian stable releases because of the lack of cooperation of Oracle on security support (that's the Debian security team decision).
* Since it is not suitable for stable releases, it cannot be included in the testing suite (that's the Debian release team decision).
* It also cannot be included in official backports, as packages must be in testing before they get backported (that's the Debian backports team's decision).

## Notes

* Oracle also provides its own repository, as described at <https://wiki.debian.org/VirtualBox>
* For Debian 9, a backport is available in stretch-backports
* There's an ongoing project at <http://fasttrack.debian.net/> that will likely obsolete this repository

## Instructions to build the backport yourself

    # install needed packages
    apt install --no-install-recommends devscripts build-essential debian-keyring equivs
    
    # download source package
    dget http://deb.debian.org/debian/pool/contrib/v/virtualbox/virtualbox_6.0.14-dfsg-2.dsc
    
    # install build dependencies
    cd virtualbox-6.0.14-dfsg
    mk-build-deps -ir
    
    # create a new changelog entry
    # The double '~' makes it rank lower than a hypothetical official backport.
    DEBFULLNAME='Lucas Nussbaum' DEBEMAIL='lucas@debian.org' dch -bv 6.0.14-dfsg-2~~bpo10+1 --distribution buster-backports --force-distribution 'New unofficial backport.'

    # build the package
    dpkg-buildpackage
    
    # generate a proper Debian repo
    dpkg-scanpackages . > Packages
    gzip < Packages > Packages.gz
    apt-ftparchive -o "APT::FTPArchive::Release::Origin=virtualbox-unofficial" release . > Release
    gpg --yes --sign --armor --output Release.gpg Release
    gpg --yes --sign --armor --clearsign --output InRelease Release
