mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
allow setting up an apt package cache for the build server setup
This creates a cache folder which will store the apt cache from the VM.
This commit is contained in:
parent
b6a5978b11
commit
dd93505fce
@ -21,6 +21,13 @@
|
|||||||
#
|
#
|
||||||
# cachedir = 'buildserver/cache'
|
# 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
|
# To specify which Debian mirror the build server VM should use, by
|
||||||
# default it uses http.debian.net, which auto-detects which is the
|
# default it uses http.debian.net, which auto-detects which is the
|
||||||
# best mirror to use.
|
# best mirror to use.
|
||||||
|
@ -54,6 +54,7 @@ config = {
|
|||||||
'https://f-droid.org/jessie32.box',
|
'https://f-droid.org/jessie32.box',
|
||||||
],
|
],
|
||||||
'debian_mirror': 'http://http.debian.net/debian/',
|
'debian_mirror': 'http://http.debian.net/debian/',
|
||||||
|
'apt_package_cache': False,
|
||||||
'boot_timeout': 600,
|
'boot_timeout': 600,
|
||||||
'cachedir': cachedir,
|
'cachedir': cachedir,
|
||||||
'cpus': 1,
|
'cpus': 1,
|
||||||
@ -374,6 +375,14 @@ if cachedir != 'buildserver/cache':
|
|||||||
config.vm.synced_folder '{0}', '/vagrant/cache'
|
config.vm.synced_folder '{0}', '/vagrant/cache'
|
||||||
""".format(cachedir)
|
""".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 += """
|
vagrantfile += """
|
||||||
config.vm.provision :chef_solo do |chef|
|
config.vm.provision :chef_solo do |chef|
|
||||||
chef.cookbooks_path = "cookbooks"
|
chef.cookbooks_path = "cookbooks"
|
||||||
|
Loading…
Reference in New Issue
Block a user