I think I have made some relevant comments about this in the past but I am thinking of creating a system where every qube is gentoo compiled, I think it can be achieved in the same time it would take to compile a bloated gentoo system which is actually quite fast if you only update the @security system set bi-daily and the world set just about monthly, honestly with todays 24 threads in an average computer it might be as fast at it takes to download updates from tor for every single template.
Some differences have to be taken into account when attempting something like this in qubes or a local network, to make the process of updating the system simpler I think ignoring portage and using paludis is the right choice.
Lets break some things down, to achieve head-ache less updating and managing of multiple machines some unification has to be made in the configurations, we can group settings together and distrubute them to each system using .d/*.conf magic as well as overlayfs, it is quite simple in execution:
A) create an /overlay/global/etc/ folder stracture and place the necesarry settings in the lowest priority like (for portage) /etc/portage/make.conf/00-global.conf.
B)IUsing crossdev you create a new environment
C) You overlayfs mount /overlay/global/ to a chroot the crossdev environment
Now your to-be-compiled qube has your global use flags pain-free(overlayfs might need remounting if global settings change)
Now the choice of paludis
A)SYSROOT, ROOT and other such env-vars in portage are never working how you wold expect them to work, portage generally makes the compilation of software for another device a pain unless you are using both devices with distcc or you are using crossdev, I have lived dependency hell on loop for weeks in the past trying a bunch of different setups involving that exact scenario, paludis on the other hand makes this almost pain free as it allows you choosing a “compiling root” and a destination, here portage would use both the /etc/portage and the /usr/x86_64-crossdev-glibc/etc/portage folders, no matter what value ROOT, SYSROOT or CONFIG_ROOT have, unless you want to start every vm’s useflag with a -* then dont bother with portage at all, or strangle with headaches trying to find waldo in between 2 or more config_roots(overlayfs remember?)
B) It is unfortunate that paludis’ dependency resolution is mutch, mutch smarter then portage’s, at this point it is almost a joke since 90%+ of gentoo user’s dont even know paludis exists and 5% of the ones that do don’t want to bother learning a new package manager
C) paludis offers suggestions, that means you can create a suggestion like “www-client/* bluetooth pulseaudio”, now in general this wild yield no difference in what flags are used to compile www-client packages, unless for some reason any of these clients require pulseaudio or bluetooth to solve a dependency, in which case it will automatically enable required flags for that single dependency resolution, do you get it? Normal portage allows you to choose yes or no, hot or cold, enable or disable flags, paludis allows you to say “oh well if I have to, use that flag, just dont tell me about it I just want to install mah open source software”
D) It is match easier to create hooks during any point of the installation or compilation process, useful for communicating with dom0 or another domU during an update, running custom setup scripts etc
E) Lastly strictness, paludis unlike portage does not allow the creation on directories if not specified bh the ebuild, which is something that could create pretty serious security holes for someone with just enough knowledge to find them
so here is the theory
- create /overlay/network-manager /overlay/global /overlay/xorg /overlay/service-vm
- mount /overlay/network-manage and /overlay/qubes/sys-net to /usr/x86_64-musl
- either boot sys-net-template and NFS into it to /chroot/sys-net or mount it by creating a script that asks dom0 to get access to the disk, then mount that disk to /chroot/sys-net
- update the vm using paludi’s config_dir and root variables appropriate for sys-net
- unmount, ask dom0 to shutdown sys-net-template(or revoke access to the disk and then ask dom0 to start and then stop sys-net-template)
5.5) if eselect is needed for anything or any other portage command execute cave exec -e sys-net(environment name) eselect locale set . . . - repeat for the next qube
This whole process saves time because paludis can save compiled packages together with their metadata (like cc flags or use flags), if you used portage you might overwrite a package you compiled earlier because you changed a few flags or so
There are only a few things to iron out in this stracture:
A)The user must watch out for ghost flags, things like that can easily break because overlayfs is a very simple filesystem with very complex consiquences when missused
B)I am still not sure if NFS is the right way to do this or not
C) I am still trying to figure out a stracture to have catalyst included in this whole stracture or if I can use Exherbo’s project-builder as an alternative to catalyst, , most likely the latter
D) I am not sure if I am ever going to finish this by the and of the year if at all by next year since ram prices are still skyscraper high, mostly because I am not ready to use gentoo again untill I am ready to compile just about everything compilable with filcc (rust’s clang and clang++ cousin), but the filcc overhead is 4x at this moment
Anyway I am just giving out ideas to the community, if anyone tries this out then I ourge you to not underuse overlayfs, it is a very useful tool for such cases and if you are a tinkerer who wants full control but smooth updates then dont let suggestions.conf from paludis out of your eyes either, imagination is your limit yall
Edit: last time i tested musl as dom0 on a gentoo workstation it worked just fine, there where a few missing libraries a year ago but everythng should work now, so if someone ports dom0’s software stack to a gentoo overlay then even dom0 can be updated that way, its a shame that openbsd/gentoo has been dropped year ago, it would have been the perfect playground for kernel tinkerers to add full qubesos support to an openbsd sys-net.
On another note keep in mind that you can create an overlay, copy the base profile and edit the copy to block portage from being installed on domU’s, you can go as far as to make the whole update process happen inside sys-update, package it and sign it to create immutable qubes before updating the qube and applying the key, but that needs a little more research on my part