Commit Graph

903 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
e0063d8808
qvm-template: use QubesArgumentParser
It produces consistent help for subcommands and already handles
--verbose/--quiet.
2021-02-07 03:35:15 +01:00
Marek Marczykowski-Górecki
6980e7ba14
Store template repo configuration in /etc
This way it's easier to permanently enable repos.
2021-02-06 16:03:40 +01:00
Marek Marczykowski-Górecki
ed6aff3b1e
qvm-template-preprocess: remove confusing message
Don't confuse user during normal template install.
2021-02-06 16:03:40 +01:00
Marek Marczykowski-Górecki
f053f51644
qvm-template: remove downloaded package after installation
At least by default. Otherwise they will pile up in the cache dir.
2021-02-06 16:03:39 +01:00
Marek Marczykowski-Górecki
fe369ce523
qvm-template: cleanup install function
Remove now unused try/finally in install() and reduce indentation.

No functional change.
2021-02-06 16:03:39 +01:00
Marek Marczykowski-Górecki
f1424812b0
qvm-template: improve install lock
Use fcntl.flock() instead of just file existence check, so it won't fail
on a stale lock file. While at it, move locking to a function decorator,
to de-clutter the install function a bit. This will allow reducing
indentation level, but don't do it yet, to make the patch readable.

Move lock testing into a separate test, and remove it from install
tests.

QubesOS/qubes-issues#2534
2021-02-06 16:03:39 +01:00
Marek Marczykowski-Górecki
febf014d14
qvm-template-postprocess: improve data validation
- validate if IP has correct syntax
- print warning if value is invalid

QubesOS/qubes-issues#2534
2021-02-06 16:03:39 +01:00
Marek Marczykowski-Górecki
b2e4d0ee34
deb,rpm: depend on qubes-repo-templates
For package repos definitions + keys.
2021-02-06 16:03:39 +01:00
Marek Marczykowski-Górecki
940124948a
qvm-template: minor improvements
- rename parser_gen to get_parser - for consistency with other tools
- clarify 'storage pool'
- move '-' to the end in regex characters list

QubesOS/qubes-issues#2534
2021-02-06 16:03:38 +01:00
Marek Marczykowski-Górecki
8aede943cc
qvm-template: add copyright header 2021-02-06 16:03:38 +01:00
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
WillyPillow
1671b4216f
qvm-template: Add tests for download function and fix minor bugs 2020-10-04 03:05:14 +08: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
WillyPillow
e9e198cc10
qvm-template: Make sure that template-dummy is set and used properly. 2020-08-25 01:43:11 +08:00
Marek Marczykowski-Górecki
e6186239ef
Make pylint happy
- fix super-with-arguments
- ignore raise-missing-from - too many intentional usages
2020-08-23 03:31:39 +02:00
WillyPillow
55a3982bf6
qvm-template: Add option to disable download progress bar. 2020-08-19 02:00:19 +08:00
WillyPillow
d09695658f
qvm-template: Add support for JSON output. 2020-08-19 01:59:51 +08:00
WillyPillow
c6d5ac7c8c
qvm-template: Add option to specify RPM keyring location. 2020-08-14 14:27:36 +08:00
WillyPillow
3314500a83
qvm-template: Add purge operation. 2020-08-14 11:38:30 +08:00
Marta Marczykowska-Górecka
fe583cd88e
Make incorrect label name error more descriptive
Instead of unintuitive Value Error now we have dedicated QubesLabelNotFoundError.
2020-08-13 20:21:46 +02:00
Marek Marczykowski-Górecki
72f565a36b
version 4.1.9 2020-08-12 11:01:43 +02:00
Marek Marczykowski-Górecki
d8cb35bfac
version 4.1.8 2020-08-11 19:26:32 +02:00