Commit graph

53 commits

Author SHA1 Message Date
Jochen Sprickerhof
2a5b127773
vmtools: Properly initialize provider member 2023-03-21 14:00:58 +01:00
FestplattenSchnitzel
abc752314b pylint: Reenable E1101 no-member 2023-03-20 16:33:16 +01:00
Hans-Christoph Steiner
176301d831 fix pylint W0715: Exception arguments suggest string formatting might be intended (raising-format-tuple) 2023-02-02 15:49:20 +01:00
Hans-Christoph Steiner
b4d25d2834 makebuildserver: use vagrant package; purge custom code
Years ago, vagrant-libvirt did not implement the `vagrant package` command
that we needed, and there were no Ruby people around to implement it for us.
So we hacked a custom version in our Python wrapper.  Now, vagrant-libvirt
v0.7.0 does implement it, so this switches things to just using
`vagrant package`
2022-10-13 13:56:56 +00:00
Jochen Sprickerhof
9ddf38b69a Drop vagrant ssh config
Not needed and breaks login with debian/bullseye64 image.
2022-10-10 21:22:59 +02:00
Jochen Sprickerhof
4ce79a7eaa explicitly re-raising exceptions
To fix pylint.
2022-06-01 22:52:22 +02:00
Hans-Christoph Steiner
307cf8958c
run black to reformat code that does not have WIP merge requests 2021-06-28 18:57:56 +02:00
Benedikt Brückmann
01b9fb1549 Fix pep8 whitespace errors 2021-06-25 06:28:47 +02:00
Benedikt Brückmann
1e943a22df rewrite docstrings to match numpy style guide 2021-06-25 06:28:47 +02:00
Felix C. Stegerman
259ca51001 use vagrantfile instead of 'builder/Vagrantfile' in get_clean_builder() 2021-03-10 09:12:52 +00:00
mimi89999
5485869e3f
build: destroy vm after each build 2020-10-31 10:55:14 +01:00
Michael Pöhn
daadcdd12a log vm status when vagrant up fails 2020-10-08 16:37:25 +02:00
Hans-Christoph Steiner
6030445be0 logging.warn() was deprecated in Python 3.3, use logging.warning()
sed -i 's,logging\.warn(,logging.warning(,g' fdroid */*.*

https://docs.python.org/3.3/library/logging.html#logging.Logger.warning
2020-05-27 08:35:14 +02:00
Jochen Sprickerhof
30c654459f Use ImportError for Python < 3.6 (Closes: !734)
ModuleNotFoundError is a subclass of ImportError, so this should not
change anything.
2020-04-17 23:26:06 +02:00
Jochen Sprickerhof
86beac22e2 Use libarchive instead of the Python implementation 2020-04-15 18:27:13 +00:00
fuwa
2d63ab66f5 libvirt: various fixes related to the makebuildserver and fdroid build commands 2020-03-09 15:06:19 +00:00
Michael Pöhn
ddcab79817 fix .vagrant directory based vm provider lookup 2018-11-16 16:53:01 +01:00
Michael Pöhn
c95cbfdf9c Merge branch 'use_available_buildserver_box' into 'master'
vmtools: use whatever buildserver box is available

Closes #497

See merge request fdroid/fdroidserver!574
2018-09-18 08:52:51 +00:00
Marcus Hoffmann
1b95452c14 vmtools: use whatever buildserver box is available
When we don't have an already working builder/.vagrant directory
look for available buildserver vagrant boxes because we'll need to
import one.

Abort if there's no buildserver box.

Fixes: #497
2018-09-12 14:12:12 +02:00
Marcus Hoffmann
1e90b6118e vmtools: fix comment typos 2018-09-12 12:59:11 +02:00
Marcus Hoffmann
b0cce0b8c4 vmtools: actually use the chosen provider
Fixes #561
2018-09-12 12:59:11 +02:00
Michael Pöhn
a318a637a5 vmtools: use pythonic way to check for installed binaries 2018-06-19 14:47:03 +02:00
Michael Pöhn
ebe71472d3 use default logging style in vmtools 2018-06-19 14:37:18 +02:00
Hans-Christoph Steiner
e6d5260c3c fix PEP8: W504 line break after binary operator 2018-05-29 12:31:56 +02:00
Michael Pöhn
f8a7c23485 fixed typo vmtools.py 2018-05-21 15:29:13 +00:00
Hans-Christoph Steiner
f24cf7f71b vmtools: use standard imports: os.remove()
The rest of the code uses os.remove()
2018-01-26 10:18:42 +01:00
Hans-Christoph Steiner
4463bf238d vmtools: use standard imports: os.path.join()
The rest of the code uses os.path.join()
2018-01-26 10:18:42 +01:00
Hans-Christoph Steiner
b851d49d24 shell=True is too dangerous to allow; there are unfiltered user inputs
There are all sorts of unfiltered user inputs like tag and branch names in
source repos.  If those names are fed into popen calls that use shell=True,
that opens up a wide range of exploits.  All core operations should never
use shell=True.
2018-01-26 10:18:41 +01:00
Marcus Hoffmann
85985074d4
build: enable watchdog timer for each build that kills in 2 hours
This introduces locking for the commonly used vagrant functions in
vmtools because vagrant fails when another vagrant command is
already running.
2018-01-22 16:01:20 +01:00
Pierre Rudloff
ebfb35f1f7 Fix a typo in vmtools.py 2017-12-22 00:14:29 +00:00
Michael Pöhn
68bbfa7e0e Merge branch 'no_sleep' into 'master'
vmtools: remove old vagrant workaround

See merge request fdroid/fdroidserver!380
2017-12-02 12:49:05 +00:00
Hans-Christoph Steiner
27d332c8ae vmtools: in KVM mode, only call sudo hack when file is not readable 2017-11-29 21:06:35 +01:00
Michael Pöhn
1e83bd306f fix vm provider lookup flaw 2017-11-25 17:30:15 +01:00
Marcus Hoffmann
b9b262422f vmtools: remove old vagrant workaround
This was introduced in cd23bb933c
apparently to work around problems in vagrant 1.3.5.

This seems not to be necessary any more, I have never had a problem with
those sleeps removed.
2017-11-25 00:38:00 +01:00
Andrew Patrikalakis
5a0c201fab Copy initial buildserver CPU/memory configuration to final box Vagrantfile 2017-06-01 09:53:33 -04:00
Michael Pöhn
c8234919df refactored vm related code from build.py to vmtools.py 2017-05-23 20:08:29 +02:00
Michael Pöhn
fc660048eb removed unused buildserver code 2017-05-23 20:08:08 +02:00
Hans-Christoph Steiner
9ef936c21a leave VirtualBox vagrant package as it was originally
We only need Vagrantfile hacks for KVM.
2017-05-23 20:06:47 +02:00
Michael Pöhn
8f1fabfed6 restart builder vm when ssh connection fails 2017-05-23 20:06:47 +02:00
Michael Pöhn
48159f005a reset buildserver vm if vagrant uuid not present 2017-05-23 20:06:06 +02:00
Michael Pöhn
0ec5422952 use uuid for vbox snapshots again 2017-05-23 20:06:06 +02:00
Michael Pöhn
358b00d7aa removed useless vm validity check; attempted to fix vbox support 2017-05-23 20:06:06 +02:00
Michael Pöhn
1b1d6b7d96 deal with outdated box images in libvirt storage pool 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
acf25a3999 build server use up instead or resume; logging 2017-05-23 20:06:06 +02:00
Michael Pöhn
3187d2cbcf revised build server creation 2017-05-23 20:06:06 +02:00
Michael Pöhn
8abd3f1cbc auto-lookup vm provider based on available executables; more fault tolerant vagrant package 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
bba6b8ab0a fixed reading libvirt box image size 2017-05-23 20:06:06 +02:00
Michael Pöhn
1bd51966b8 vmtools debug logging for check_output calls 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
5dbcd0e9bd added box handling to vmtools 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
01b6473823 refactored kvm_package to vmtools 2017-05-23 20:06:06 +02:00