Installing PET packages in XBPS-managed system
Continuing with developing woofV, here is the previous post:
https://bkhome.org/news/202401/woofv-create-initrd.html
woofV will build easyVoid built with .xbps packages -- nothing new yet, that is what easyVoid 6.0.1 does -- but woofV will build using the XBPS package management system.
There is a vital distinction here. 6.0.1 is like the traditional pups; binary packages of any distro can be used (what we call the "compatible" distro). The method is that the package database of that distro is converted to "Puppy DB" format, and PKGget (or PPM in the case of the pups) is used as the package manager. The package manager of the original distro, such as APT for Debian, or XBPS for Void, is not used at all.
If you have used easyVoid 6.0.1, you will have seen that PKGget
works OK. It is a nice GUI for installing packages. It also has a
great advantage, compared with most other package managers, in
that it is a chameleon -- it can install just about any type of
package, for example .deb, .rpm, .tar.xz, .pet or .xbps.
Some of the recent pups and derivatives have given up on the PPM
and adopted the package manager of the compatible distro. The
basic reason is, it is very difficult to have both.
With woofV I am attempting to build easyVoid based on XBPS package manager, retaining PKGget as a GUI frontend. Which is quite a challenge.
As a step in this direction, I have written a script that installs .pet packages and also registers them with XBPS. There are two main hurdles:
- Most .pet packages are not usr-merge
- The XBPS manager cannot install a .pet package, only .xbps
All of the Woofs have a table, a variable PKGS_SPECS_TABLE, with a list of packages that are to used to build the SFS (or multiple SFSs) which will be the rootfs. These packages can come from different places, some from the compatible-distro, some from other distros, and some PETs.
If the core package manager is XBPS, then a PET package will have to be converted. Firstly, converted so that the folder hierarchy is usr-merge. Secondly, converted to a .xbps package so that XBPS manager can install it.
That is what this script, 3populate-rootfs, does:
...cannot guarantee that what you see there right now is working; it was, but I have made some enhancements before uploading to github and not yet tested. The script shows the principles anyway.
There were issues with a few PETs; the 'xbps-create' script couldn't convert to .xbps. For example:
Success, folder tas-1.15-easyos created
xbps-create: ERROR: invalid pkgver! got `tas-1.15-easyos_1' expected `foo-1.0_1' No such file or directory
ERROR: NAME='tas' VER='1.15-easyos_1'
ERROR failed: xbps-create -n "tas-1.15-easyos_1" -s "Screenshot utility" -A x86_64 -D "" "/mnt/wkg/data/woofV/sandbox/tas-1.15-easyos"
...those last two "ERROR: ..." lines are echo statements that I put into the script to try and figure out what is going wrong.
The PET is 'tas-1.15-easyos.pet' and expanded to folder 'tas-1.15-easyos'. I do not know why xbps-create objected to the name-version string of "tas-1.15-easyos_1". There were so many other PETs with far weirder package naming that xbps-create was quite happy with. Really odd.
I will play with renaming the PET, maybe to 'tas-1.15.pet',
surely that will be acceptable. Hopefully "tas" is not some kind
of keyword.
Tags: easy