Distri is a distribution kit for testing fast package management technologies

Michael Stapelberg, author of the i3wm tiled window manager and former active Debian developer (maintained about 170 packages), develops experimental distribution district and the package manager of the same name. The project is positioned as a study of possible ways to increase the performance of package management systems and embodies some new ideas for building distributions. The package manager code is written in Go and spreads under the BSD license.

A key feature of the distribution's proposed package format is that the package is delivered in the form of SquashFS images, instead of compressed tar archives. The use of SquashFS, similar to the AppImage and Snap formats, allows you to "mount" a package without the need for unpacking, which saves disk space, allows for atomic changes, and makes the contents of the package instantly available. At the same time, distri packages, as in the classic β€œdeb” format, contain only individual components that are dependent on other packages (libraries are not duplicated in packages, but are installed as dependencies). In other words, distri tries to combine the granular packaging structure of classic distributions such as Debian with the methods of delivering applications in the form of mountable containers.

Each package in the distri is mounted in its read-only directory (for example, the zsh package is available as "/ro/zsh-amd64-5.6.2-3"), which has a positive effect on security and protects against accidental or malicious changes. To form a hierarchy of service directories, such as /usr/bin, /usr/share and /usr/lib, a special FUSE module is used that combines the contents of all installed SquashFS images into one whole (for example, the /ro/share directory provides access to share subdirectories from all packages).

Plans for in distri fundamentally spared from the handlers called during the installation process (no hooks and triggers), and different versions of the package can coexist with each other, so it becomes possible to parallelize the installation of packages. The proposed structure limits the performance of the package manager only to the bandwidth of the network through which the packages are downloaded. Directly installing or updating a package is performed atomically and does not require duplication of content.

Conflicts during installation of packages are excluded, since each package is associated with its own directory and the system allows for different versions of the same package (the contents of the directory with a more recent revision of the package are included in the summary directories). Building packages is also very fast and does not require installing packages in a separate build environment (the build environment creates representations of the necessary dependencies from the /ro directory).

Supported typical package management commands, such as "distri install" and "distri update", and instead of informational commands, you can use the standard "ls" utility (for example, to view installed packages, it is enough to display a list of directories in the "/ro" hierarchy, and in order to find out which package the file is included in, see where the link from this file leads).

The distribution prototype proposed for experiments includes about 1700 packages and ready installation images with an installer, suitable for both installation as the main OS and for running in QEMU, Docker, Google Cloud and VirtualBox. It supports booting from an encrypted disk partition and a set of typical applications for creating a desktop based on the i3 window manager (Google Chrome is offered as a browser). Provided a full-fledged toolkit for building a distribution, preparing and forming packages, distributing packages through mirrors, etc.

Source: opennet.ru

Add a comment