Change Vagrant build VM to debian10

This commit is contained in:
Andrew Eikum 2019-10-04 08:16:29 -05:00
parent 1dc63b6079
commit b3e80d99d8
2 changed files with 35 additions and 48 deletions

View File

@ -87,7 +87,7 @@ help:
vagrant: vagrant:
vagrant up vagrant up
vagrant rsync vagrant rsync debian10
clean: vagrant clean: vagrant
vagrant ssh -c 'rm -rf $(BUILD_DIR)/' vagrant ssh -c 'rm -rf $(BUILD_DIR)/'

35
Vagrantfile vendored
View File

@ -43,8 +43,6 @@ Vagrant.configure(2) do |config|
#different synced folder type per provider, so we always use it. #different synced folder type per provider, so we always use it.
config.vagrant.plugins = "vagrant-sshfs" config.vagrant.plugins = "vagrant-sshfs"
config.vm.box = "generic/debian9"
config.vm.provider "virtualbox" do |v| config.vm.provider "virtualbox" do |v|
v.cpus = cpus v.cpus = cpus
v.memory = memory v.memory = memory
@ -57,41 +55,31 @@ Vagrant.configure(2) do |config|
v.default_prefix = ENV['USER'].to_s.dup.concat('_').concat(File.basename(Dir.pwd)) v.default_prefix = ENV['USER'].to_s.dup.concat('_').concat(File.basename(Dir.pwd))
end end
config.vm.synced_folder "./vagrant_share/", "/vagrant/", create: true, type: "sshfs", sshfs_opts_append: "-o cache=no" #deiban10-based build VM
config.vm.synced_folder ".", "/home/vagrant/proton", id: "proton", type: "rsync", rsync__exclude: ["vagrant_share"] config.vm.define "debian10", primary: true do |debian10|
#this is where the VM is initialized on first setup debian10.vm.box = "generic/debian10"
config.vm.provision "shell", privileged: "true", inline: <<-SHELL
debian10.vm.synced_folder "./vagrant_share/", "/vagrant/", create: true, type: "sshfs", sshfs_opts_append: "-o cache=no"
debian10.vm.synced_folder ".", "/home/vagrant/proton", id: "proton", type: "rsync", rsync__exclude: ["vagrant_share"]
debian10.vm.provision "shell", privileged: "true", inline: <<-SHELL
#install docker and steam-runtime dependencies #install docker and steam-runtime dependencies
dpkg --add-architecture i386 dpkg --add-architecture i386
apt-get update apt-get update
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
#add winehq repo
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | apt-key add -
echo 'deb http://dl.winehq.org/wine-builds/debian stretch main' > /etc/apt/sources.list.d/winehq.list
#add docker repo #add docker repo
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
#add backports
echo 'deb http://ftp.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
#install host build-time dependencies #install host build-time dependencies
apt-get update apt-get update
apt-get install -y gpgv2 gnupg2 g++ g++-6-multilib git docker-ce fontforge-nox python-debian schroot python-pip apt-get install -y gpgv2 gnupg2 g++ g++-multilib git docker-ce docker-ce-cli containerd.io fontforge-nox python-debian schroot python-pip meson
apt-get -y -t stretch-backports install meson
#install adobe font devkit to build source san hans #install adobe font devkit to build source san hans
pip install afdko pip install afdko
#winehq-devel is installed to pull in dependencies to run Wine
apt-get install -y --install-recommends winehq-devel
#remove system Wine installation to ensure no accidental leakage
apt-get remove -y winehq-devel
#allow vagrant user to run docker #allow vagrant user to run docker
adduser vagrant docker adduser vagrant docker
@ -113,12 +101,11 @@ personality=linux
preserve-environment=true preserve-environment=true
EOF EOF
fi fi
SHELL
config.vm.provision "shell", privileged: "true", inline: <<-SHELL
# unprivileged shell still runs as root for some reason # unprivileged shell still runs as root for some reason
# the script below will set up the steam-runtime docker containers # the script below will set up the steam-runtime docker containers
sudo -u vagrant /home/vagrant/proton/vagrant-user-setup.sh sudo -u vagrant /home/vagrant/proton/vagrant-user-setup.sh
SHELL SHELL
end end
end