-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve template distribution mechanism #2534
Comments
Guix is a functional transactional package manager and it can be installed besides any existing package manger on Linux. Guix is self contained and focuses on reproducible builds. I think Guix could be used, slightly modified (chroot in disposable vm), to manage template packages. |
Some better description - requirements: template package format
repository format
tools
The above is just a brain dump, nothing set in stone. We prefer an existing format with tools meeting as much as possible the above points. While tooling could be adjusted, IMO we shouldn't really change the format itself. One possibility to consider is something based on OVF. Pros include being well adopted standard, but on the cons side it's quite complex (if going this way, we'd definitely need to use DispVM for actual package extraction). Another option is to stick with rpm+yum/dnf as package and repository format, but do not really install those packages (in terms of rpm database in dom0), but only extract root.img from there. |
After some discussion, this looks to be a good idea. |
Maybe it should be possible to be able to update (some of?) the metadata but without requiring to upgrade to the actual template image? |
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
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
- 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
- validate if IP has correct syntax - print warning if value is invalid QubesOS/qubes-issues#2534
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
Templates are no longer recorded in rpmdb, so pkg.installed doesn't work anymore QubesOS/qubes-issues#2534
pkg.installed doesn't work anymore, because templates are not recorded in rpmdb. Use proper qvm-template tool. QubesOS/qubes-issues#2534
Templates are no longer recorded in rpmdb, so pkg.installed doesn't work anymore QubesOS/qubes-issues#2534
qvm-template is now a canonical tool to management. Redirect all requests related to templates to appropriate qvm-template command QubesOS/qubes-issues#2534
Create a tool to manage installed templates. It should support:
qvm-*
tools, so as long the new tool use only that, it should be fine)Template packages should not be recorded in rpm database of dom0 for multiple reasons:
qvm-remove
refuse to remove rpm-installed templates)Additionally, processing rpm package should be safe for dom0 in sense that no template-provided scripts are executed in dom0. It should be safe to install arbitrary template package regardless of its origin, without risking dom0 compromise. Template package should only influence template itself (its root img and possibly selected settings).
The tool should use "updatevm" to access network repository, where needed.
There is already
qvm-template-postprocess
tool that given directory with root.img and default menu entries list (whitelisted-appmenus.list
) import it into qubes (create appropriate TemplateVM, import root.img into appropriate pool, setup menu entries etc). The tool may be adjusted as part of this task, but the main work is about providing input to that tool.Based on discussion on IRC and below, it should be ok to stick with yum/dnf repository as distribution method, but create separate tool to extract template rpm packages. That tool should ignore any rpm scripts inside and unexpected files, to satisfy "safe to install arbitrary template package" requirement.
Parts of
qubes-dom0-update
tool may be useful, but that's not requirement.Background:
On 2016-12-23 02:49, Marek Marczykowski-Górecki wrote:
The text was updated successfully, but these errors were encountered: