site  contact  subhomenews

packages-templates copied from woofQ

July 09, 2023 — BarryK

I have wanted to do this for years, finally it has happened. A bit of background explanation is required...

woofQ has scripts '0setup', '1download', '2createpackages' and '3buildeasydistro', that are executed in sequence. '2createpackages' expands each package, be it .deb, .rpm, .pet, .tar.xz, or whatever, to a folder and processes it ready for '3buildeasydistro' to copy them all into sandbox3/rootfs-complete and hence create the 'easy.sfs' file.

Packages from so many different places may need some processing to be suitable for use in EasyOS, and there is a folder 'packages-templates' that has processing for any packages that need it. Take Scribus for example. If Scribus is going to be a builtin package in the final 'easy.sfs', then '2createpackages' will expand the package, apply any processing specified in packages-templates/scribus and the resultant 'sribus' folder will then be ready for '3buildeasydistro'.

Simplified explanation, but that's the general idea. Puppy developers who build their pups with Woof-CE will know about the above.

Scribus is a good example, as it does have packages-templates/scribus, which does quite a lot of processing. As an example, for EasyOS it sets the default "File/Open..." to '/files' folder, instead of in the '/root' folder -- that's if Scribus is to run as root user, but there is more to be said about that.

Another example: if Scribus 1.5.8 is started from the commandline, there is report of missing icons. That's something that packages-templates/scribus does, supply those icons.

So, packages-templates is very useful. But, what if Scribus is not builtin, instead is installed later? Scribus is a native package in the Kirkstone-series of EasyOS, and can be installed via PKGget.

Scribus can be installed in a running EasyOS, but it will not have all the fixes that are in packages-templates/scribus. There is a little post-install script, /usr/local/petget/hacks-postinstall.sh, that does apply fixes for some packages, but very limited -- and there is nothing in that script to fix Scribus.

Consequently, Scribus will run with default "File/Open..." at '/root' and have the missing icons.

Those fixes in 'packages-templates' folder have been developed over many years, well, as long as Woof* has been in existence, even before, the "Puppy Unleashed" build system.

What would be nice if those accumulated fixes could be in a running EasyOS (or pup), and applied when a package is installed. That's what I did last night. A cut-down 'packages-templates' is copied from woofQ to sandbox3/rootfs-complete/root/.packages, by '3buildeasydistro' script.

Then, /usr/local/petget/installpkg.sh script has new code, based on some code from '2createpackages', that will look to see if there is a folder for the package being installed, for example /root/.packages/packages-templates/scribus, and if so, apply the fixes.

That's the gist of it. See the commit here, though bear in mind it is not yet tested:

https://github.com/bkauler/woofq/commit/27ea9878ad2b191717285c5b11ce1b76837e9f57

There is more to be said about Scribus, that will be in the next blog post.   

Tags: easy