void-mklive icon indicating copy to clipboard operation
void-mklive copied to clipboard

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

Open paper42 opened this issue 2 years ago • 5 comments

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:

  • people won't be able to install xfce without network anymore (because including whole xfce xbps cache would create a very big iso)
  • bigger isos (because we would have to include the base system xbps cache which is 340-350MB, current base isos have ~650MB, so this would increase their size to ~1GB, we could also have a way to create smaller netinstall isos without cache)

Advantages:

  • high flexibility - people can easily create their own iso spins just by copying one setup file
  • cleaner code (we won't need a list of exceptions to prevent some packages or files from getting installed)
  • less bugs because setting up the iso is done with the same code as the final system, but the setups are separate and the same code is used for both netinstall and local install (for example currently, the local install installs cryptsetup, lvm2 and mdadm to the local system for no reason, but netinstall doesn't)
  • ability to install the xfce system even from the base iso (when network is available)

paper42 avatar Apr 13 '23 16:04 paper42

+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

classabbyamp avatar Apr 13 '23 17:04 classabbyamp

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).

Animeshz avatar Jun 12 '23 15:06 Animeshz

+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.

ahesford avatar Jun 13 '23 18:06 ahesford

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

Animeshz avatar Sep 20 '23 19:09 Animeshz

i think it's off-topic for this

classabbyamp avatar Sep 20 '23 19:09 classabbyamp