Slax bundles and build scripts

written by Tomas M. 6 years ago

I've received some valuable feedback on Slax buildscripts, which I mentioned in one of the previous blog posts. Several questions has been asked so I'll answer them. The idea is following: users will write build scripts for Slax, and they will be able to submit the scripts to Slax server so the server can make (compile or whatever) the binary Slax Bundles (.sb) automatically. The reason for this is that with each new Slax release, all binary bundles may be updated (recompiled or whatever) automatically so they will always work. Another good reason is that it will be much easier to check if the bundles contain only safe software, since users will not submit any binary packages, only the recipe.

Why not to use existing slackbuild scripts, for example those which are at Well, there are several reasons I don't like them. Main reason is the poor quality of the code. Don't understand me wrong, I'm sure all the build scripts work properly. But my purpose is to provide unified way of writing them. For example, most slackbuild scripts include some long code to check architecture at the beginning, then some other long code to make temporary folders and unpack sources to them, etc.

If there is a well-designed template, with unified way to perform these tasks easily with just few command, it will be much easier to read and maintain such build scripts. As an example, instead of 20 lines of code at the beginning of the build script, there can be just something like:

Another thing is dependency tracking. I don't want the automatic dependency tracking which I was trying to make with the old Slax 6. It made more problems than it should. So this time I would like to let the dependency be set by the buildscript creator. For that purpose, the buildscript will just include two variables. Lets see an example:

The slax build script will simply activate all dependencies before it starts the actual work. This will provide useful info to the user who is reading the script as well as to the server which will automatically activate all dependencies before the compilation starts.

What if there are multiple submissions for the same packages? Well, every build script will need to have unique name. Lets say ffmpeg. The first one who makes buildscript for ffmpeg will become the owner and maintainer, and nobody else will be able to submit build script with the same name (unless some selected admin decides). Thus if the user wants to build some software which requires some other library, then he must firstly write buildscript to make Slax Bundle with the library, and then he can include that dependency in his build script.

If somebody decides to include libraries together with the software, well lets be it. As long as there is another slax buildscript submitted for the given library, others can continue using it, there will no longer be a problem if a library is in several bundles (as this made some troubles for Slax 6, if you remember).

I hope that these my ideas will work out. I appreciate all your feedback on this, it is possible that I've overlooked something important, so all your comments are really welcome.

Tomas M.

(c) 2019, Tomas M; rss