From: fdroid on solaria Date: Sat, 5 May 2018 10:55:18 +0000 (+0100) Subject: from https://f-droid.org/en/docs/Build_Server_Setup/ X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d32f6f003a35e6d809e54d395503f57840871325;p=fdroidserver.git from https://f-droid.org/en/docs/Build_Server_Setup/ --- diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 00000000..4c050170 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,25 @@ + + +Vagrant.configure("2") do |config| + config.vm.box = "debian/jessie64" + # Disable default /vagrant folder rsync + config.vm.synced_folder ".", "/vagrant", disabled: true + config.disksize.size = '60GB' + + config.vm.provision "shell", inline: <<-SHELL + sudo apt-get update && sudo apt-get install -y parted + sudo swapoff /dev/sda5 # disable swap so we can then remove the partition + sudo parted /dev/sda rm 5 rm 2 # remove swap and extended partition + # Extend sda1 to the full disk. Yes, this needs three dashes. See + # https://unix.stackexchange.com/a/365657/126364. + sudo parted ---pretend-input-tty /dev/sda resizepart 1 yes 100% + sudo resize2fs /dev/sda1 # enlarge filesystem to fill the whole partition + sudo dd if=/dev/zero of=/swap bs=1024K count=500 # create a swapfile + sudo chmod 600 /swap + sudo mkswap /swap + sudo swapon /swap + sudo sed -i '/swap/d' /etc/fstab # and update fstab with the swapfile + echo "/swap none swap sw 0 0" | sudo tee -a /etc/fstab + SHELL +end +