void-linux / void-mklive

The Void Linux live image maker
https://voidlinux.org
Other
323 stars 188 forks source link

[RFC] including base xbps cache in the iso and setup scripts #333

Open paper42 opened 1 year ago

paper42 commented 1 year ago

Currently we are copying the live system to the target when Local source is selected. This means both systems have to be exactly the same and we maintain a list of exceptions for what should not be copied to the target system in the installer (xmirror, xtools-minimal, sudoers, some configs, etc.).

Ideally we would want the iso and the target system to be created by the same code, but also allow customizing only the iso with additional packages or files. This can done by: 1) including xbps cache for the base system and letting local install be the same as network install, but use that cache instead of remote repositories 2) move the iso setup logic from build-x86-images.sh to individual setup scripts. These setup scripts would be included in the iso and used both for creating the iso and installing the target system

Disadvantages:

Advantages:

classabbyamp commented 1 year ago

+1 to the idea, and i think it would be more than fine to build 3 variants by default: netinstall, base, and xfce after this change

Animeshz commented 1 year ago

To me portability matters much more, if cache are just compressed form of what's already in the iso wouldn't it be duplication?

Customizing only iso with addon pkg/files can be done by maintaining a simple blacklisting list that can be created while creating the iso in almost no time, no overhead. There could also be option given at build commands in form of list or file that specify the blacklists.

In general if I create iso with nvidia drivers, I'd expect the installed system should also work like that. There are some exceptional nvidia cards (3060 iirc), that keeps rebooting if they don't find nvidia drivers for instance. I'm up for refactoring or recreating script from scratch to give up legacy if there are in blacklisting, but I'd generally not want to include both working system and cache, instead I'd want to perform net install if I really had to (keeping iso still small, that may also allow to accomodate more iso in same flash drive as a plus)...

In the end we should also look up for DIP (Dependency Inversion Principle), which says core part of scripts should not control the rest of the parts it can have, instead the small parts of script should ask the core to do certain things, that keeps core flexible to removal of certain small parts later (and to also accommodate an option to disable/exclude something).

ahesford commented 1 year ago

+1 for including a local cache and making "local" install the same as a network install without remote repos and for offering netinstall, base and xfce variants of the ISOs. Copying the live image to a hard disk and stripping out "live" bits is a kludgey way to do a non-network installation that has bitten us before and leaks into places where it has no business, like the INSTALL scripts of critical packages.

This change will simplify the installer and could even pave the way for user selection of package sets at install time, if somebody wants to undertake the effort.

Animeshz commented 1 year ago

What do you think about distri's approach, that packages are images and not archives?

classabbyamp commented 1 year ago

i think it's off-topic for this