Am Di., 29. Dez. 2020 um 23:13 Uhr schrieb Marco d'Itri <m...@linux.it>: > > On Dec 29, Matthias Klumpp <matth...@tenstral.net> wrote: > > > For package upgrades, we can already perform so-called "offline > > upgrades", where the system reboots into a smaller systemd target, > > applies all updates and then reboots again into the updated system. > > This is implemented in PackageKit as an option and used by GNOME. > > Fwupd uses similar concepts for certain firmware updates as well. > > Maybe hooking into these facilities is also an option for the usrmerge > > upgrade? (unless of course systemd is still interfering even in a > > minimal target, that would be a dealbreaker). > It depends on which units are started (this trouble is caused by the > ProtectSystem directive and maybe others like it): having usrmerge > stop and then restart the daemons involved would work as well, but I am > not sure of how many corner cases (gdm...) we would find before just > rebooting would become simpler again. > I think that depending on PackageKit would be more complex than an > initramfs-tools hook, since just about everybody is supposed to have > that around.
You wouldn't have to depend on PackageKit, the offline-upgrades stuff can be implemented by other tools that aren't PK as well (you could pretty much use the same mechanism, with some safeguards to not interfere with PK/GNOME). However, ensuring that no service with ProtectSystem starts may be a problem, as that feature is used quite extensively by services that are part of the systemd project, and I don't know whether it is possible to exclude them all from a potential usrmerge target without causing other problems. Also, of course this would only work on systemd systems, in the same way that the initramfs-tools solution won't work for Dracut users. Looks like quite a tricky problem, but one that could definitely be addressed by the project. Cheers, Matthias -- I welcome VSRE emails. See http://vsre.info/