#
# cachedir = 'buildserver/cache'
+# A big part of creating a new instance is downloading packages from Debian.
+# This setups up a folder in ~/.cache/fdroidserver to cache the downloaded
+# packages when rebuilding the build server from scratch. This requires
+# that virtualbox-guest-utils is installed.
+#
+# apt_package_cache = True
+
# To specify which Debian mirror the build server VM should use, by
# default it uses http.debian.net, which auto-detects which is the
# best mirror to use.
'https://f-droid.org/jessie32.box',
],
'debian_mirror': 'http://http.debian.net/debian/',
+ 'apt_package_cache': False,
'boot_timeout': 600,
'cachedir': cachedir,
'cpus': 1,
config.vm.synced_folder '{0}', '/vagrant/cache'
""".format(cachedir)
+# cache .deb packages on the host via a mount trick
+if config['apt_package_cache']:
+ aptcachedir = cachedir + '/apt/archives'
+ vagrantfile += """
+ config.vm.synced_folder "{0}", "/var/cache/apt/archives",
+ owner: 'root', group: 'root', create: true
+""".format(aptcachedir)
+
vagrantfile += """
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"