Alternative method to build EasyOS with Xlibre
Continuing a series of blog posts how Xlibre was compiled in
EasyOS:
- Xlibre video drivers compiled in EasyOS — June 05, 2026
- Xlibre input drivers compiled in EasyOS — June 05, 2026
- Xlibre server and drivers compiled in EasyOS — June 05, 2026
An earlier post described how Xlibre was builtin to EasyOS 7.3.8:
- EasyOS built with Xlibre — June 02, 2026
...in a nutshell, setup two repositories for APT to access;
'xlibre-devuan' and 'excalibur-backports'
On reflection, decided on a much simpler method; do away with all of that previous effort. Instead, just build Easy from Devuan packages as normal, then as a final step, install a single xlibre package that will overwrite all the Devuan X11 packages. And, those Devuan packages will be put on "hold" so won't get updated.
Simple, and the single big xlibre package could be a .deb package, but instead I chose the build a .pet package. PET packages are the original native package format in Puppy Linux, still supported in the EasyOS PKGget package manager. Note, it was forum member lobster who, a long time ago, stated that PET is an acronym for "Puppy Extra Treats".
A good thing about PET packages is that APT knows nothing about them. This is something that we can take advantage of; the script '4create-pet' will create a package, named, for example 'xlibre-25.1.0-260605-amd64.pet' that, when installed, will overwrite all of the X11 files. Here is the script:
#!/bin/sh
V="$(grep -o "version: '.*" xserver/meson.build | head -n 1 | cut -f 2 -d "'")"
D0="$(date +%y%m%d)"
D="${V}-${D0}" #ex: 25.1.0-260607
[ -d xlibre-${D}-amd64 ] && rm -rf xlibre-${D}-amd64
[ -d xlibre_DEV-${D}-amd64 ] && rm -rf xlibre_DEV-${D}-amd64
[ -f xlibre-${D}-amd64.pet ] && rm -f xlibre-${D}-amd64.pet
[ -f xlibre_DEV-${D}-amd64.pet ] && rm -f xlibre_DEV-${D}-amd64.pet
cp -a image xlibre-${D}-amd64
sync
#for debian compatibility...
mv -f xlibre-${D}-amd64/usr/bin/Xorg xlibre-${D}-amd64/usr/lib/xorg/
echo '#!/bin/sh
#
# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
# This allows distros to put the suid wrapper in a separate package.
basedir=/usr/lib/xorg
if [ -x "$basedir"/Xorg.wrap ]; then
exec "$basedir"/Xorg.wrap "$@"
else
exec "$basedir"/Xorg "$@"
fi' > xlibre-${D}-amd64/usr/bin/Xorg
chmod 755 xlibre-${D}-amd64/usr/bin/Xorg
find xlibre-${D}-amd64 -type f -exec sh -c 'file "$1" | grep -qE "ELF.*(executable|shared object)"' _ {} \; -exec strip --strip-unneeded {} +
sync
mkdir -p xlibre_DEV-${D}-amd64/usr/lib/xorg/modules/drivers
mkdir -p xlibre_DEV-${D}-amd64/usr/lib/xorg/modules/input
mv -f xlibre-${D}-amd64/usr/include xlibre_DEV-${D}-amd64/usr/
mv -f xlibre-${D}-amd64/usr/lib/pkgconfig xlibre_DEV-${D}-amd64/usr/lib/
mv -f xlibre-${D}-amd64/usr/lib/xorg/modules/drivers/*.la xlibre_DEV-${D}-amd64/usr/lib/xorg/modules/drivers/
mv -f xlibre-${D}-amd64/usr/lib/xorg/modules/input/*.la xlibre_DEV-${D}-amd64/usr/lib/xorg/modules/input/
sync
S="$(du -sk xlibre-${D}-amd64 | cut -f 1)"
echo "xlibre-${D}-amd64|xlibre|${D}-amd64||BuildingBlock|${S}K||xlibre-${D}-amd64.pet||Xlibre X11 server and drivers|devuan|excalibur||" > xlibre-${D}-amd64/pet.specs
S="$(du -sk xlibre_DEV-${D}-amd64 | cut -f 1)"
echo "xlibre_DEV-${D}-amd64|xlibre_DEV|${D}-amd64||BuildingBlock|${S}K||xlibre_DEV-${D}-amd64.pet||Xlibre X11 server and drivers|devuan|excalibur||" > xlibre_DEV-${D}-amd64/pet.specs
dir2tgz xlibre-${D}-amd64
tgz2pet xlibre-${D}-amd64.tar.gz
dir2tgz xlibre_DEV-${D}-amd64
tgz2pet xlibre_DEV-${D}-amd64.tar.gz
sync
echo "Created: xlibre-${D}-amd64.pet, xlibre_DEV-${D}-amd64.pet"
###end###
...the script also creates a separate 'xlibre_DEV-25.1.0-260605-amd64.pet' package.
The '4create-pet' script uploaded, with false '.gz' appended, here.
I could have created a 'pinstall.sh' post-install script inside the .pet, to put all the Devuan packages on "hold", for example:
# apt apt-mark hold xserver-xorg-video-vmware
However, I intend to do that in woofQ2. The xlibre PET is going to be installed into 'easy.sfs' in woofQ2, and one of the build scripts will do those "hold" operations.
Installing files without APT knowing, or removing, is done all
over the place in woofQ2, mostly as exercises to reduce the bloat
of 'easy.sfs'. So not doing anything new here.
Tags: easy