Buildscripts in action

I've already implemented the server side for Slax buildscripts. You may try to explore the 'slax' command, no changes at Slax side necessary. I will be happy if you test this all to see if there are any bugs. You should always start by downloading of a template buildscript, use command:

$ slax buildscript download template

Then edit this template to suit your needs. Run it to produce your slax bundle. Uploading and downloading of your own buildscripts work as well, so when you are done editing, you may share it with others by:

$ slax buildscript upload YOURSCRIPT.SlaxBuild

You can also try commands "slax search KEYWORD" and "slax info NAME". For example the following command will list you all available localizations:

$ slax search localization

Your uploaded scripts will be just stored on the server now, the 'autobuilding' process DOES NOT WORK YET neither activation of remote module, it will be implemented later, I hope tomorrow, because then I will be off for 4 days due to my wife's plans to go away for the entire weekend (while weekend starts on Thursday evening) and I'll stay alone with our kids; I don't want them to watch TV all the day so it's better to go offline :)

I've supplied buildscripts for all Slackware packages to the repository and I've became their maintainer. Feel free to test and report in case of any errors.

How to use this practically

You can use this all in practice already. For example if you wish to use perl, which is not included in Slax by default, issue the following sequence of commands to get it built and activated:

$ slax buildscript download perl
$ sh perl.SlaxBuild
$ slax activate perl.sb
$ perl -v # just to see it's there!

User comments
Liquid Snake 2012-12-12 16:09

Tomas, how can I restore the system titlebar in Firefox?

Tomas M 2012-12-12 16:46

In order to restore system titlebar in FireFox, go to System settings -> Workspace appearance -> Configure decoration -> Window specific Overrides and disable the rule for FireFox's title there. Then you can disable Microutilities extension in FireFox as this one cares of the buttons and window movement.

By the way, your question is absolutely off topic here under this blog post regarding buildscripts...

Ahmed 2012-12-12 19:34

thanks for buildscript.
when we'll get modules and software center for slax 7.0?
currently i'm trying to make some packages (.sb) using buildscript.

Prcek 2012-12-12 19:58

Tomas M: Well maybe offtopic, but there isn't any forum, so how can we ask questions or report bugs? I don't like posting off topic, but there's no other option for us, than to be offtopic. Bugzilla would be great for bugs and some web forum for other discussion (including offtopic).

peter_t 2012-12-12 21:30

sh perl.SlaxBuild
perl.SlaxBuild: line 47: Extraction: command not found
--2012-12-13 11:11:27-- http://slackware.osuosl.org/slackware64-14.0/slackware64/d/perl-5.16.1-i486-1.txz
Resolving slackware.osuosl.org (slackware.osuosl.org)...
Connecting to slackware.osuosl.org (slackware.osuosl.org)||:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-12-13 11:11:27 ERROR 404: Not Found.

peter_t 2012-12-12 21:42

i'm use this script, may be it will be useful


if [ $# -ne 1 ]; then
echo "build package from source"
echo "usage: `basename $0` filename.{tar.gz|tar.bz2|tar.xz}"
exit 1

TMP=/tmp/BS-`uuidgen | head -c 8`
PKG=`realpath $1 || exit 1`

case "$( uname -m )" in
x86_64) LIBDIR=$PREFIX/lib64 ;;
i?86) LIBDIR=$PREFIX/lib ;; # $PREFIX/lib32
*) LIBDIR=$PREFIX/lib ;;

mkdir $TMP
cd $TMP

tar -xvf "$PKG" || exit 1


[ -f configure ] && ./configure --prefix=$PREFIX --libdir=$LIBDIR

NUMJOBS=${NUMJOBS:--j`cat /proc/cpuinfo | grep processor | wc -l`}
make $NUMJOBS || exit 1 # unfortunatly make don't return fail but may be

mkdir $TMP/root
make install DESTDIR=$TMP/root # make install-strip DESTDIR=$TMP/root

cd $TMP/root

# strip binaries:
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

cd $TMP/root
tar cf - . | gzip > /tmp/$PKGNAME.tgz

echo ----------------------------------------------------------
echo Package /tmp/$PKGNAME.tgz built

rm -rf $TMP

Tomas 2012-12-12 22:52

Oh I forgot that 64bit slackware packages have different filename (they include different arch) ... SO for now the current build scripts will work only on 32bit slax. I will fix that when I return home from my trip (on train at the moment).

gnome 2012-12-12 23:50

When will be Software Center and modules ready to use?

Alberto 2012-12-13 06:17

All this work seems be very usefull. I hope that this "slax" version of linux portable distro, will became the best portable distro. I enjoy very much and i hope the modules cames as soon as you will.
Sorry for my bugs english, but I'm an italian user of linux.


tdmsilvino 2012-12-13 12:36

@Tomas M, it looks like that it doesn't recognize folder names with spaces:

bash-4.2# pwd
/root/Área de trabalho
bash-4.2# slax buildscript download template
Download in progress...
stat: cannot stat ‘/root/Área/template.SlaxBuild’: No such file or directory
/sbin/slax: line 192: [: : integer expression expected

Error: Download error. Check your network connection.

If I go back to /root the command works fine.

Kadalka 2012-12-13 13:26

@peter_t 2012-12-12 21:42

Don't give a script here because this page has bad behavior with "carriage return" so your script won't work.
It is better if you give to everyone a link where people can get your stuff...


BTW, I know how to deal with scripts...


As you described it, I think your issue is an UTF-8 issue.
(directory naming)

lettry 2012-12-13 14:36

@@Tomas M,
I want to compile ATI driver by myself . I download linux-kernel-3.6.9-i486-1.txz from this links http://ftp.linux.cz/pub/linux/slax/Slax-7.x-development/packages/32bit/linux-kernel-3.6.9-i486-1.txz
mkdir /root/kernel
installpkg -root /root/kernel/ /root/linux-kernel-3.6.9-i486-1.txz
mksquashfs /root/kernel/ /root/linux-kernel-3.6.9-i486-1.sb -comp xz -b 512K
put linux-kernel-3.6.9-i486-1.sb in /slax/modules
But there is no source :(
If possible , can you tell me the correct method ? Thanks
Best regards!

lettry 2012-12-13 14:44

<p>I'm sorry for my layout . So I post again</p>
<p>I want to compile ATI driver by myself .
</p><p align="justify">I download linux-kernel-3.6.9-i486-1.txz from this links http://ftp.linux.cz/pub/linux/slax/Slax-7.x-development/packages/32bit/linux-kernel-3.6.9-i486-1.txz
</p><p align="justify">mkdir /root/kernel
</p><p align="justify">installpkg -root /root/kernel/ /root/linux-kernel-3.6.9-i486-1.txz
</p><p align="justify">mksquashfs /root/kernel/ /root/linux-kernel-3.6.9-i486-1.sb -comp xz -b 512K
</p><p align="justify">put linux-kernel-3.6.9-i486-1.sb in /slax/modules reboot.
</p><p align="justify">But there is no source :(
</p><p align="justify">If possible , can you tell me the correct method ?
</p><p align="justify">Thanks
</p><p align="justify">Best regards!</p>

lettry 2012-12-13 14:46

uh , I'm so sorry fo post twice and bader layout . If possible , I will delete it by myself

francois.e 2012-12-13 16:44

abiword and libreoffice exist in slackbuilds. How come it is not possible to get them into bundles with Buildscripts.

I have build kdegames including the game kigo. Though I can start kigo game in command line, how come this game and others like kmahjjong will not appear in the kde menu.

thanks. ;)

francois.e 2012-12-13 16:51

In addition it would be nice to have multilib alien/multilib/ from slackware for the compatibility of 32 bit packages with 64bit os.

abhi_69 2012-12-13 19:40

the script download the both 32-bit and 64-bit version of a package source (txz), if anybody has a 32-bit distro, he/she don't need 64-bit version, but the script download that too. i think it's kinda problem for limited internet data plan users, he/she need to download both architecture although he/she don't need both!
isn't there any way to check architecture before downloading and download only the required package source (either 32-bit or 64-bit) for the system? is there any plan to implement this feature when modules and software center available?

Tomas M 2012-12-13 22:12

thank you for bug report. It's due to a bug in /sbin/slax ... at line 482, there is a call to process $(pwd) while it should be enclosed in quotes, like "$(pwd)"

abhi_69: I am aware of that. Basically you shouldn't need this at all, all the slackware packages will be built into Slax modules very soon (hopefully yet this week), so you'll then just use "slax download perl" or even "slax activate perl" instead of downloading the buildscript and using it to get your module. The efficiency of build scripts is NOT IMPORTANT at all since the binaries will be built ON THE SLAX SERVER.

MarkDS 2012-12-13 23:24

Actually, do we have to strictly stick to the template buildscripts?

Given that alot of packages already exist (packages.slackware.com, alien, etc, linuxpackages), can users write a simple script to download the package and do a txz2sb from the script itself instead of building from scratch?

Tomas M 2012-12-13 23:28

You are free to do whatever you like :-) But the buildscripts for Slax are designed to be easily parsed by automated software and to compile the sb on server side and allow users to find some relevant infos in Software Center (when it is ready). So if you make modules just for yourself, feel free to do it. But when you want to share your buildscripts, you have to follow Slax template closely.

MarkDS 2012-12-14 03:29

I was actually thinking in terms of sharing modules. Some software already exists as packages - like at alien slackbuild. Can our scripts that we upload to the slax server be simple enough to just download existing packages from places and convert them to .sb modules (instead of compiling)? Or someone may have already created a driver package and its available, so the script will just download that package and convert to an .sb module. These are for sharing, not for own use.

Is it possible to share what your automated software checks for when it parses the buildscripts? So that if I submit a script like the one I sent you via email it won't be rejected?

If the above isn't allowed, its alright, but may I know if you have any objections if I maintain an "unofficial download repository" for people to download modules I might want to share that have not been submitted or compiled using the slaxbuild scripts?

Thank you.

Tomas M 2012-12-14 05:05

Actually a proper software for Slax should be always from a known source. For me, known source is only Slackware repository. If there is a possibility to compile the software directly on Slax then the build script should do that.

Of course if you wish to make a Skype module, while skype is not opensource and can't be compiled, it is reasonable for the build script to download the precompiled software and pack it as a module. But I don't see any single reason why to use a precompiled binaries of opensource software which actually can be compiled directly on Slax.

lzap 2012-12-14 05:38

Tomáš, please add RSS for the new blog!


guttaslax 2012-12-14 06:17


+1 for RSS

Tomas M 2012-12-14 06:21

RSS added. Click the small icon right next to the header "Slax author's blog"

guttaslax 2012-12-14 06:21

sorry I didn't see it's done

Kadalka 2012-12-14 07:56

@Tomas M
"But I don't see any single reason why to use a precompiled binaries of opensource software which actually can be compiled directly on Slax"

Really ? 8(

That sounds strange to me.

I can't imagine someone who would like to use Google Chrome or LibreOffice to download all the needed libraries and the software it self, then compile it...

Honestly I do not get it...

abhi_69 2012-12-14 08:19

@Tomas M, thanks for that, hope we'll get modules and software center very soon. and also hope cool apps will be available then, like- google chrome, libreoffice, opera etc.

Tomas M 2012-12-14 10:48

@Kadalka: you surely misunderstood. The end user will NOT need to compile ANYTHING. The buildscript is intended to be sent to Slax server, where it compiles, produces binaries, and those binaries are then used by users.

MarkDS 2012-12-14 11:54

Thanks Tomas for your help and explanations, its much appreciated and also the rss. May I suggest having a "Like" button for comments/replies? So if people make a suggestion others can "like" it to show their support for the suggestion/comment (eg: guttaslax supporting rss request of lzap) - of course final decision is always up to you :)

MarkDS 2012-12-14 11:57

@Guttaslax: Hi, long time no see :) The rss feed link (http://www.slax.org/rss.php) is at the icon with the 3 rows of dot-dashes at the top right corner of the "Slax author's Blog" title.

MarkDS 2012-12-14 12:01

Just wondering if the "sign in" feature will be active soon and if it will point to the old database of users or will we need to register again? Or maybe facebook/twitter/google/OID integration? :)

Kadalka 2012-12-14 12:14

>>> "why to use a precompiled binaries of opensource software which actually can be compiled directly on Slax"

1/ Because you don't have ALL the opensource software.
And some people give some binaries.

2/ Timestamping is a must for me so I could know if it's time to use Slax or not so I could download the updates for the slax distro.

3/ Sometimes, I could prefer a previous stable release...

4/ People with slow connections, will never have the ability to use it easily.
I suspected that a download manager could not handle that ?

>>> "The end user will NOT need to compile ANYTHING"

Thank you for that.

My question is about what you said because I can't believe that the average guy will be forced to compile anything.

Now EVERYONE knows that NO compilation will be done at the end user level.
You know, "build" means "compilation" in a Personal Computer in the end user mind.

(As I said, a forum is needed.)

>>> Questions
Before I will give it a try I've got a question :
As a 64bit user, I could expect that the process will give to us a native 64 Slax binary then ?
If this is the case then it could make me think.

The issue that may occur is the fact that I may be interested in a software which release is 1.2.10 when the latest is 1.2.14 that I may not like for example.

I was astonished that a porteus binary could run with Slax with NO changes at all.
(Technically speaking that is not a surprise)
I wonder if it will be the same with Slax...

Kadalka 2012-12-14 12:17

Latest comment was for Tomas M

---It's difficult to send a comment here...
--- ">>>" is what you've written

Kadalka 2012-12-14 12:21


--- 1/ Like thing : It could be a good thing.

--- 2/

a) Register again is better...

b) Facebook integration via connect ? A very bad idea...
Even for some people Google is not a good idea.

c) OID : Hmmm... Why not...


guttaslax 2012-12-14 20:54

Hi markDS, nice to read you again.
You disappeared, I almost disappeared for a lot of reasons, one is that 36 years of computing are a lot of time for me and my eyesight.
I'm a quite static user, and once I've solved the issues I faced and helped someone on the same issues, I can't contribute more, since I'm not a specialist in this particular subject.
Now seems to be time to start again and learn something. I've posted my first question in the old forum, and I'm investigating myself about my own problem, so let's see what comes after.

-About the database of users I hope it can be migrated, also believe everyone is loving his/her profile, avatar, even the famous bulbs :-D from the old forum. However my e-mail is dead long time ago and I can't see a way to modify it.
-About Rss: I definitely don't know much about RSS, but so as it's set it only reports new threads/articles.
I wonder if it's possible to show at least the number of new comments as a fresh or updated feed, maybe connecting to the cookie system already in use in these pages. It would be appreciated expecially in the Request section, when available, to get a notification about a new post on your question.

And, by the way, thanks Tomas for your effort in the project.

Hnoori 2012-12-17 08:51

Unfortunately the build script download both i486 and x86_64, which I'm on a 32bit machine!!!
it seems that it's a bug in scripts.

PS, I used to install perl on my slax machine.

Mark De Silva 2012-12-23 17:12

@Tomas, previously when we activate any modules, if we have scripts in /etc/rc.d/init.d they get executed. This doesn't seem to be the case with "slax activate". Scripts in /etc/rc.d/init.d don't get run. Are we supposed to put them in /etc/rc.d/rc3.d together with the Slax startup scripts?