mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
makebuildserver: purge apt_package_cache feature
This is unmaintained, lightly used, a tangled mess, and can be replaced by things like the vagrant-cachier plugin or #418
This commit is contained in:
parent
52849deea0
commit
21ea1c1c89
4 changed files with 1 additions and 29 deletions
9
buildserver/Vagrantfile
vendored
9
buildserver/Vagrantfile
vendored
|
@ -12,8 +12,7 @@ end
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
# these two caching methods conflict, so only use one at a time
|
if Vagrant.has_plugin?("vagrant-cachier")
|
||||||
if Vagrant.has_plugin?("vagrant-cachier") and not configfile.has_key? "aptcachedir"
|
|
||||||
config.cache.scope = :box
|
config.cache.scope = :box
|
||||||
config.cache.auto_detect = false
|
config.cache.auto_detect = false
|
||||||
config.cache.enable :apt
|
config.cache.enable :apt
|
||||||
|
@ -77,12 +76,6 @@ Vagrant.configure("2") do |config|
|
||||||
# necessary with 9p synced folders
|
# necessary with 9p synced folders
|
||||||
Dir.mkdir('cache') unless File.exists?('cache')
|
Dir.mkdir('cache') unless File.exists?('cache')
|
||||||
|
|
||||||
# cache .deb packages on the host via a mount trick
|
|
||||||
if configfile.has_key? "aptcachedir"
|
|
||||||
config.vm.synced_folder configfile["aptcachedir"], "/var/cache/apt/archives",
|
|
||||||
owner: 'root', group: 'root', create: true
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.provision "shell", name: "setup-env-vars", path: "setup-env-vars",
|
config.vm.provision "shell", name: "setup-env-vars", path: "setup-env-vars",
|
||||||
args: ["/opt/android-sdk"]
|
args: ["/opt/android-sdk"]
|
||||||
config.vm.provision "shell", name: "apt-get-install", path: "provision-apt-get-install",
|
config.vm.provision "shell", name: "apt-get-install", path: "provision-apt-get-install",
|
||||||
|
|
|
@ -32,13 +32,6 @@
|
||||||
#
|
#
|
||||||
# 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
|
|
||||||
|
|
||||||
# The buildserver can use some local caches to speed up builds,
|
# The buildserver can use some local caches to speed up builds,
|
||||||
# especially when the internet connection is slow and/or expensive.
|
# especially when the internet connection is slow and/or expensive.
|
||||||
# If enabled, the buildserver setup will look for standard caches in
|
# If enabled, the buildserver setup will look for standard caches in
|
||||||
|
|
|
@ -69,7 +69,6 @@ fi
|
||||||
cat <<EOF > $WORKSPACE/makebuildserver.config.py
|
cat <<EOF > $WORKSPACE/makebuildserver.config.py
|
||||||
debian_mirror = 'http://deb.debian.org/debian/'
|
debian_mirror = 'http://deb.debian.org/debian/'
|
||||||
boot_timeout = 1200
|
boot_timeout = 1200
|
||||||
apt_package_cache = True
|
|
||||||
copy_caches_from_host = True
|
copy_caches_from_host = True
|
||||||
memory = $memory
|
memory = $memory
|
||||||
cpus = $cpus
|
cpus = $cpus
|
||||||
|
|
|
@ -77,7 +77,6 @@ BASEBOX_CHECKSUMS = {
|
||||||
config = {
|
config = {
|
||||||
'basebox': BASEBOX_DEFAULT,
|
'basebox': BASEBOX_DEFAULT,
|
||||||
'debian_mirror': 'https://deb.debian.org/debian/',
|
'debian_mirror': 'https://deb.debian.org/debian/',
|
||||||
'apt_package_cache': False,
|
|
||||||
'copy_caches_from_host': False,
|
'copy_caches_from_host': False,
|
||||||
'boot_timeout': 600,
|
'boot_timeout': 600,
|
||||||
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
||||||
|
@ -121,18 +120,6 @@ if config['vm_provider'] == 'libvirt':
|
||||||
tmp = os.path.dirname(tmp)
|
tmp = os.path.dirname(tmp)
|
||||||
logging.debug('cache dir %s is accessible for libvirt vm.', config['cachedir'])
|
logging.debug('cache dir %s is accessible for libvirt vm.', config['cachedir'])
|
||||||
|
|
||||||
if config['apt_package_cache']:
|
|
||||||
config['aptcachedir'] = config['cachedir'] + '/apt/archives'
|
|
||||||
logging.debug('aptcachedir is set to %s', config['aptcachedir'])
|
|
||||||
aptcachelock = os.path.join(config['aptcachedir'], 'lock')
|
|
||||||
if os.path.isfile(aptcachelock):
|
|
||||||
logging.info('apt cache dir is locked, removing lock')
|
|
||||||
os.remove(aptcachelock)
|
|
||||||
aptcachepartial = os.path.join(config['aptcachedir'], 'partial')
|
|
||||||
if os.path.isdir(aptcachepartial):
|
|
||||||
logging.info('removing partial downloads from apt cache dir')
|
|
||||||
shutil.rmtree(aptcachepartial)
|
|
||||||
|
|
||||||
CACHE_FILES = [
|
CACHE_FILES = [
|
||||||
('https://services.gradle.org/distributions/gradle-6.8.3-bin.zip',
|
('https://services.gradle.org/distributions/gradle-6.8.3-bin.zip',
|
||||||
'7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205'),
|
'7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue