mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	Tidy up/fix some vagrant issues
1. It is packaged in modern versions of distros, update docs accordingly 2. 1.1 is hopelessly outdated - support 1.4 onwards 3. Check the version properly, and write a better config (previously it wrote the 1.1 config for 1.1 and 1.3+ 4. Ensure that the default share from later versions is not present when building, it's only required for provisioning.
This commit is contained in:
		
							parent
							
								
									f6b9e46246
								
							
						
					
					
						commit
						3629437b09
					
				
					 2 changed files with 9 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -117,7 +117,7 @@ VirtualBox (debian package virtualbox)
 | 
			
		|||
@item
 | 
			
		||||
Ruby (debian packages ruby and rubygems)
 | 
			
		||||
@item
 | 
			
		||||
Vagrant (unpackaged, tested on v1.4.3)
 | 
			
		||||
Vagrant (debian package vagrant - 1.4.x or higher required)
 | 
			
		||||
@item
 | 
			
		||||
vagrant-cachier plugin (unpackaged): `vagrant plugin install vagrant-cachier`
 | 
			
		||||
@item
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -178,16 +178,15 @@ def get_clean_vm(reset=False):
 | 
			
		|||
 | 
			
		||||
        p = subprocess.Popen(['vagrant', '--version'],
 | 
			
		||||
                             stdout=subprocess.PIPE)
 | 
			
		||||
        vver = p.communicate()[0]
 | 
			
		||||
        vver = p.communicate()[0].strip().split(' ')[1]
 | 
			
		||||
        if vver.split('.')[0] != '1' or int(vver.split('.')[1]) < 4:
 | 
			
		||||
            raise BuildException("Unsupported vagrant version {0}".format(vver))
 | 
			
		||||
 | 
			
		||||
        with open(os.path.join('builder', 'Vagrantfile'), 'w') as vf:
 | 
			
		||||
            if vver.startswith('Vagrant version 1.2'):
 | 
			
		||||
                vf.write('Vagrant.configure("2") do |config|\n')
 | 
			
		||||
                vf.write('config.vm.box = "buildserver"\n')
 | 
			
		||||
                vf.write('end\n')
 | 
			
		||||
            else:
 | 
			
		||||
                vf.write('Vagrant::Config.run do |config|\n')
 | 
			
		||||
                vf.write('config.vm.box = "buildserver"\n')
 | 
			
		||||
                vf.write('end\n')
 | 
			
		||||
            vf.write('Vagrant.configure("2") do |config|\n')
 | 
			
		||||
            vf.write('config.vm.box = "buildserver"\n')
 | 
			
		||||
            vf.write('config.vm.synced_folder ".", "/vagrant", disabled: true\n')
 | 
			
		||||
            vf.write('end\n')
 | 
			
		||||
 | 
			
		||||
        logging.info("Starting new build server")
 | 
			
		||||
        retcode, _ = vagrant(['up'], cwd='builder')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue