site  contact  subhomenews

Infrastructure support apt package manager in Scarthgap

October 24, 2024 — BarryK

EasyOS Scarthgap-series is built with packages compiled from source in OpenEmbedded (OE), a repository of about 1,800 packages. Quite small, but Easy also supports installing Flatpaks and AppImages. There are actually four package managers, see here:

https://easyos.org/user/package-manager-concepts.html

Even so, users are requesting access to more packages. A couple of users have been installing Debian DEB packages and finding that they work, though it is a bit haphazard finding the dependencies.

I'm having a go at formalizing this, putting in infrastructure to support installing Devuan Daedalus .deb packages.

It is intended that Easy Scarthgap 6.4 will have the 'apt' and 'dpkg' package management packages installed.

WoofQ is the EasyOS build system, and what it will now do is examine all of the builtin packages, in easy.sfs, those compiled in OpenEmbedded, and inform dpkg and apt of their existence. So, when a package and its dependencies are installed by apt, the already-existing dependencies will be recognized.

This is quite a difficult operation to achieve. The Debian developers have the habit of changing the names of packages, and they split packages into smaller ones, often several smaller ones. So, if for example there is the 'djvulibre' OE package; Debian provides that as these split-up packages:

djview djview3 djvulibre-bin djvulibre-desktop djvuserve libdjvulibre-dev libdjvulibre-text libdjvulibre21

So, dpkg and apt have to be told that all of those packages are installed, and the version.

I have tackled this. There is a new script /usr/local/petget/debget/deb-names.sh that matches the OE package name to the Debian packages:

https://github.com/bkauler/woofq/blob/main/easyos/easy-code/rootfs-skeleton/usr/local/petget/debget/deb-names.sh

There is another script that registers these packages with dpkg, informing that they are already installed. It does this by creating empty .deb packages and installing them.

Note that there is a Debian package named 'equivs' that does this operation of installing dummy .deb packages; however, it has too many dependencies and is cumbersome. It is easy to create and install empty .deb packages from basic principles.

Package version is tricky. For example, there is the 'acl' OE package, but in the Devuan package database there is 'acl' and 'acl2'. The correct Devuan package has to be chosen that matches the version number of the OE package.

This is a very non-trivial exercise, but is working so far. The script that creates these dummy .deb packages and installs them is /usr/local/petget/debget/reg-oe2deb.sh:

https://github.com/bkauler/woofq/blob/main/easyos/easy-code/rootfs-skeleton/usr/local/petget/debget/reg-oe2deb.sh

Before releasing Scarthgap 6.4, I want to integrate dpkg/apt with PKGget. At least in a basic way, that might need refinement later. So that if install a package and its dependencies using 'apt', they will be seen as installed by PKGget, and PKGget will be able to uninstall them. Will probably just do that much for 6.4. Later, maybe PKGget will be able to install DEBs from the Devuan repository, acting as a frontend to apt.

Must qualify this; it is an experiment, yet to be decided whether it is going to be retained past 6.4.    

Tags: easy