The long term goal of the project is to generate root file systems for arbitrary collections of packages. pkg2 should be a meta-package system that consumes package indexes and package build scripts and turns them into working systems.
For each source of package data there are functional levels the code needs to go though.
Copying from my internal notes about the different levels of package handling.
- Level 1: Accessible Package Metadata.
- At this stage you can emit a layer that installs the package using a already installed package manager.
- The only thing needed for this is a list of available packages in a package index.
- This is the kind of metadata that [[Repology]] keeps.
- All the fetchers have reached at least Level 1.
- [[Nix]] is challenging to get past level 1 since it's dependency information is very opaque.
- Level 2: Installation Plan Generation.
- At this stage you can emit a series of layers that installs packages using the distribution package manager.
- The installation plan generated needs to be mostly correct.
- Errors will result in more packages than needed being generated and large layers.
- The advantage is more efficient layer generation and potentially layer caching.
- [[Alpine [[Linux]]]], [[Debian]], [[Arch Linux]], [[RPM]] have some level of support for this with [[Alpine [[Linux]]]] the only one being exhaustively tested.
- Level 3: Automated Package Installation.
- At this stage most of the package installation can be handled internally. The emitted layer contains the (mostly) installed package.
- It excludes the scripts that are needed by the package.
- Right now [[Alpine [[Linux]]]], [[RPM]] have pretty stable support for this.
- [[Arch Linux]] and [[Void Linux]] kinda work but the code for that is in [[TinyRange]].
- Level 4: Automated Package Builder.
- At this stage enough metadata to build a package is downloaded.
- The build process is automated.
- With this you can automatically build legacy versions of packages which are no longer on the index.
- Level 5: Source-Level Customised Package Builder.
- At this stage all the build metadata for the package is extracted and customised package builds can be generated.
- This relies on the ability to extract build metadata.
- This doesn't just mean the build process can be customised but that the entire build process is lifted into the metadata.
The long term goal of the project is to generate root file systems for arbitrary collections of packages. pkg2 should be a meta-package system that consumes package indexes and package build scripts and turns them into working systems.
For each source of package data there are functional levels the code needs to go though.
Copying from my internal notes about the different levels of package handling.