Commit Graph

962 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
aeeb3daa80
qvm-template: handle template extraction failure
QubesOS/qubes-issues#2534
2021-02-06 16:03:38 +01:00
Marek Marczykowski-Górecki
f3954fb225
qvm-template: download templates to a temporary directory
Avoid risk of conflicting downloads to the same directory, reusing
partial downloads, leaving broken files etc. Move template package out
of temporary directory only after its verified.

QubesOS/qubes-issues#2534
2021-02-06 16:03:38 +01:00
Marek Marczykowski-Górecki
f3f6750a3f
qvm-template: call rpmkeys --checksig for signature verification
RPM API is confusing and it's easy to get it wrong when verifying
package signatures.
Call 'rpmkeys --checksig' which is more rebust here - RPM authors should
know how to use their API.

QubesOS/qubes-issues#2534
2021-02-06 16:03:38 +01:00
Marek Marczykowski-Górecki
b500462abb
qvm-template: use UpdateVM by default
Do not hardcode sys-firewall
2021-02-06 16:03:37 +01:00
Rusty Bird
e78512b4b1
qvm-backup: dom0 dst relative to cwd of tool, not qubesd 2021-02-02 19:05:12 +00:00
Marek Marczykowski-Górecki
0f42fd0580
tests: restoring a backup bigger than available space in /var/tmp
This test uses three tricks to test /var/tmp space monitoring:
1. Creates a big uncompressed backup (2GB file instead of few bytes)
2. Mount small tmpfs over /var/tmp (650MB - minimal space that should
   not deadlock the restore)
3. Artificially slow down data processing by adding sleep()

QubesOS/qubes-issues#4791
2021-01-05 04:50:59 +01:00
Marek Marczykowski-Górecki
af13c198be
tests: fix preparing multi-part disk volume
Storing encrypted filename into f_name shadowed unencrypted source file
name.
2021-01-05 04:46:12 +01:00
Marek Marczykowski-Górecki
93608658a9
backup: throttle backup extracting if there is not enough disk space
Instead of failing the restore process, pause data extracting, until
already extracted data gets processed.
This commit implements this for local tar extraction. Extracting data
received from a VM is handled in qfile-(dom0-)unpacker, which also has
similar feature, turned on in 6338b936e2.

Fixes QubesOS/qubes-issues#4791
2021-01-05 04:46:12 +01:00
Marek Marczykowski-Górecki
10d4381c14
backup: check if there is enough disk space available to restore
Avoid failing restore after potentially lengthy processing - check
available space first.

This will be even more important after adding waiting for free space -
then if there won't be enough free space, the process will deadlock.

QubesOS/qubes-issues#4791
2021-01-05 03:33:21 +01:00
Marek Marczykowski-Górecki
16ff6d0552
backup: cleanup retrieve_proc on failure 2021-01-05 03:32:21 +01:00
Marek Marczykowski-Górecki
d906fbc4bb
backup: add function parameter for override temp directory
This will be useful for tests.

QubesOS/qubes-issues#
2021-01-05 03:31:09 +01:00
Marek Marczykowski-Górecki
25a6a305c8
tests: avoid 'xrandr' call
Don't rely on tool existence, nor on a specific monitor layout in test
env.
2020-12-02 04:31:31 +01:00
Marek Marczykowski-Górecki
2266e432bf
gitlab-ci: adjust custom job
- split into two
- add codecov
2020-12-02 04:31:26 +01:00
Frédéric Pierret (fepitre)
e2de2bc0c4
Add .gitlab-ci.yml 2020-11-17 22:49:36 +01:00
Marek Marczykowski-Górecki
6f39533a65
tools/qvm-run: do not check if DispVM is paused before starting it
DispVM is created on start, so it can't be paused - it doesn't exist
yet.

Fixes: 4a6b5db "qvm-run will unpause paused VMs by defaults"
2020-10-24 16:41:22 +02:00
Marek Marczykowski-Górecki
a57396d462
version 4.1.10 2020-10-10 05:11:49 +02:00
Marta Marczykowska-Górecka
fa396a6da9
Better error reporting in qvm_start
When user provides incorrect image name/path, the tool
will now inform what's wrong.
2020-10-07 20:44:32 +02:00
WillyPillow
1671b4216f
qvm-template: Add tests for download function and fix minor bugs 2020-10-04 03:05:14 +08:00
Marek Marczykowski-Górecki
806753bbaa
Fix script executable bit 2020-09-30 02:09:45 +02:00
Marek Marczykowski-Górecki
4fa5154f48
Merge remote-tracking branch 'origin/pr/161'
* origin/pr/161:
  Added supported-service keyboard-layout to allow for better working Qube Manager
2020-09-30 02:09:35 +02:00
Marek Marczykowski-Górecki
2615340b2c
Merge remote-tracking branch 'origin/pr/160'
* origin/pr/160:
  doc: add 'input-dom0-proxy' feature
2020-09-30 02:08:56 +02:00
Marta Marczykowska-Górecka
7fa468eb0c
Added supported-service keyboard-layout to allow for better working Qube Manager
references QubesOS/qubes-issues#6030
2020-09-23 17:24:20 +02:00
Frédéric Pierret (fepitre)
69bf1c5765
doc: add 'input-dom0-proxy' feature 2020-09-20 18:52:53 +02:00
Marek Marczykowski-Górecki
07dfe826f7
qvm-device: improve error message on invalid device type
Fixes QubesOS/qubes-issues#6057
2020-09-16 13:34:56 +02:00
WillyPillow
5f03640467
qvm-template: Fix broken indention 2020-09-15 01:30:57 +08:00
WillyPillow
63f488f64c
qvm-template: Mock print_table in tests for consistent output 2020-09-15 01:09:45 +08:00
WillyPillow
20443d5c6f
qvm-template: Add tests for functions list_templates and search 2020-09-15 00:25:49 +08:00
WillyPillow
7facc7d35f
qvm-template: Fix minor bugs
* Incomprehensive spec filtering in `list_templates`
* Type error of `install_time` in `list_templates`
* Incorrect version comparision in `search`
2020-09-15 00:23:06 +08:00
WillyPillow
dc26ba0ebf
qvm-template: Add tests for qrexec_repoquery and get_dl_list 2020-09-09 03:04:37 +08:00
WillyPillow
b9f1d4c633
qvm-template: Make pylint happy 2020-09-07 02:12:22 +08:00
WillyPillow
161ff01d7d
qvm-template: Fix compatibility with Python 3.6 in tests 2020-09-07 02:12:03 +08:00
WillyPillow
554459ef42
qvm-template: Fix compatibility with Python 3.6 2020-09-07 01:53:43 +08:00
WillyPillow
3fac2097eb
qvm-template: Add partial tests for qrexec_repoquery 2020-09-07 01:52:56 +08:00
WillyPillow
5e1e0daa5c
Make TestProcess.communicate return str instead of IO object 2020-09-07 01:18:59 +08:00
WillyPillow
3f75e6e49e
qvm-template: Add tests for qrexec_payload 2020-09-07 00:41:03 +08:00
WillyPillow
89895038b5
qvm-template: Fix date formats to "%Y-%m-%d %H:%M:%S" 2020-09-06 23:57:42 +08:00
WillyPillow
f8032b0f5a
Revert "qvm-template: Fix compatibility with Python 3.6"
This reverts commit 199996e7b8.
2020-09-05 02:25:26 +08:00
WillyPillow
199996e7b8
qvm-template: Fix compatibility with Python 3.6 2020-09-05 02:06:53 +08:00
WillyPillow
205eee4d80
qvm-template: Fix timezone issues by storing timezone explictly in features 2020-09-05 01:51:45 +08:00
WillyPillow
5a1e1b7fdd
qvm-template: Update docs for --updatevm 2020-09-04 01:59:28 +08:00
WillyPillow
757bb33329
Add stubs for rpm module and initial tests for qvm-template install 2020-09-04 01:56:15 +08:00
WillyPillow
3a42564af2
qvm-template: Make pylint happy 2020-08-31 02:22:39 +08:00
WillyPillow
39492ffce9
Fix CI dependencies 2020-08-31 02:02:12 +08:00
WillyPillow
fbf6c4e3c3
Merge remote-tracking branch 'origin/master' into qvm-template 2020-08-31 01:53:15 +08:00
WillyPillow
4199a9a222
qvm-template: Fix qvm_template_postprocess tests 2020-08-31 01:48:31 +08:00
WillyPillow
6b3858314d
qvm-template: Improve help message for --upgrades 2020-08-30 02:54:43 +08:00
WillyPillow
d65d3c741a
qvm-template: Replace "template-install-time" with "template-installtime" for consistency 2020-08-30 02:01:19 +08:00
WillyPillow
32a38c7183
qvm-template: Eliminate use of lsb_release 2020-08-30 01:58:25 +08:00
WillyPillow
2e06e300e6
qvm-template: Tweak machine-readable output format. 2020-08-26 01:31:33 +08:00
WillyPillow
6efd85afba
qvm-template: Initial manpage. 2020-08-25 23:00:08 +08:00