Slackermedia

The Workflow Edition

Make Sport Yummy

If you are more used to tools like yum or aptitude from Fedora or Debian, respectively, then you can actually use sport as you would use them. Sport tries really hard to find a package to install no matter where you are in your filesystem, so you can tell sport to install stuff any time you want and it will probably do it.

The only exception is in an instance where two packages have the same names with the only thing to differentiate them being their category. I know of no such example of this yet, but we could imagine:

# sport search cupcake
   development/cupcake.tar.gz
   multimedia/cupcake.tar.gz

If you were to tell sport to install cupcake, it would not know whether you mean cupcake or cupcake so you must provide sport with the package's atomic name:

sport install development/cupcake

And then sport would install cupcake rather than cupcake

Clean

If you're concerned about all that source code lying around on your hard drive taking up space, or you somehow mess up a build really badly and you want to start anew, there's also sport clean foo, which removes the foo directory from the build tree and the source code contained within it, and then untars a fresh, clean copy from your source tree.

Multiple Commands, Opts, and Args

Most commands can be combined, as they can be with BSD Ports but mind the order. For instance, it might not make sense to perform an rsync and then a clean and then an install when what you probably mean is to do a clean and then an rsync and then an install.

You can also install (or cat or search or whatever) multiple packages in one command as you might with yum. For instance, this would download, build, and install both the python-openid and python-pydns packages:

# sport install python-openid python-pydns

Again, mind the order in which you name the packages to install. If one depends on the other, then you must ensure that the packages are listed in a sane order or the build will fail.

Queue Files

If you have lots of applications to install at once, it makes sense to use a batch, or "queue" file.

Creating a queue file is simple. Just list the packages in the order you wish them to be installed in a plain text file, one package per line. It is safest to use both the category and package name but if the package name is unique you can list it alone.

For example, in a file arbitrarily called example.list, you may place some lines of package names:

gsl
lxml

And to process this queue file, you would use:

# sport i $(<example.list)

By default, sport builds and installs the packages in a queue file. If you do not want sport to install the packages (for instance, maybe you are building them so you can then install them on several other machines), pass the --build-only flag:

# sport i --build-only $(<example.list)

Or, perhaps you are upgrading packages rather than freshly installing:

# INSTALLER=upgradepkg sport i $(<example.list)

In fact, you could even keep local stashes of SlackBuild queues for applications you upgrade frequently, and use sport to handle them. For instance, if you update ffmpeg with every new ffmpeg release, then you might keep a local directory in your home folder containing all of the SlackBuilds needed to build it. In this case, you can provide both the SBOPATH and INSTALLER variables:

# SBOPATH=$(pwd) INSTALLER=upgradepkg \
  sport -i $(<ffmpeg.list)

This would process the queue file ffmpeg.list located in the sub directory ffmpeg, using your current directory as the SlackBuild root directory.

You can name queue files whatever you please, and you should even be able to use sbopkg queue files (frequently saved as .sqf documents) with minimal or no modification.

For information on queue files and variables and advanced topics like that, read the included .info file and man page.

System Requirements

Slackware Port (sport) was designed for Slackware Linux. It uses only built-in tools already included on a default full install of Slackware. It has been tested on all official Slackware architectures including the Raspberry Pi (ie, SlackwareARM).

Can I pass build options through sport?

Since it is part of BASH you are able to pass SlackBuild variables through sport:

# WIDGETS=yes sport install foo

Can I pass make flags through sport?

Yes, using MAKEOPTS:

# MAKEOPTS='-j7' sport install multimedia/foo

Thanks to cobra2 for the tip!

Permanent MAKEOPTS can be set in /etc/sport.conf

Is sport a replacement for sbopkg?

No, it is an alternative to Sbopkg and you may use whichever you prefer with Slackermedia and Slackware.

I hate it, how do I uninstall?

If you want to remove sport from your system, simply remove the sport script from where ever you placed it (probably in /usr/sbin) or just use removepkg. Send back the unused portion to us, and we'll refund you.

I love it! But it sounds too good to be true.

Then it probably is. If you are seeking to turn Slackware into a one-click install type of distro the sport is not the tool you are looking for. This is just a simple frontend to some repetitious tasks involved in building from source with SlackBuild scripts.

I love it, and want to purchase a 200-seat corporate license.

Corporate licenses for sport are available by donating a lot of money to the Slackware project. Send proof of your donation and a gift card for one cup of coffee (not for any Seattle-based franchise) to klaatu at member dot fsf org, and if we feel your donation was sufficient, then we will dig up a Libre Office template and design a fancy-looking corporate license. If you donate a million dollars or more, we will modify the code so you even have to enter in a serial number to activate it, and send you the patch in the form of a service pack, on a Tuesday.

I love it, but it could be so much better.

Sport is free code! Feel free to clone and mod sport on gitorious. If you come up with cool improvements, send me a patch or a merge request.

If you don't code at all but want a better tool, then there are many other frontends to Slackbuilds.org that you might want to try, including the one that inspired me to write sport, called sbopkg. It is a robust and flexible and great system, and when I'm not using sport I use it. Unfortunately, I cannot do anything about its name ;-)

I'm from the Software Police. Why did you write yet-another-package-manager?

sport is not a package manager. It's a script that leverages other scripts to build software from source code.

Some new Slackware users seem to be looking at SlackBuilds and the frontend applications that exist as package managers. This is incorrect. You, the Slackware admin, are the package manager. SlackBuilds are only organized methods of building applications from source code. A SlackBuild doesn't even install applications so it cannot be a package manager.

Does Sport Automatically Resolve Dependencies?

No.

100% Free & Open Source Software