This document describes how to use sbodeps to generate build queues for sbopkg. These queues can then be used with slackpkg as templates. This combination allows for consistent installation of SlackBuilds.org packages across multiple systems in cases where the target package requires one or more dependencies. In effect, the templates provide a meta package.
Use this information at your own risk. No warranty is expressed or implied.
Slackware is a registered trademark of Slackware Linux, Inc..
This process relies on a set of packages compiled from the SlackBuilds.org project. Additionally, you will need McDutchie's heretical sbodeps utility. Finally, Slackpkg+ is used to install from a local repository.
Optionally, it may be helpful to run a virtual machine for the purposes of building packages. This allows for a clean Slackware installation against which specific queues can be built.
Setup a repository to publish built packages for slackpkg+. Slackpkg+ provides for unsigned repositories using filedir:///, httpdir:///, or ftpdir:/// URLs. For purposes of this guide, we'll use filedir://home/localrepo/. Adjust the subdirectory name(s) to match the versions for which you will build packages.
If you will distribute these packages to multiple machines (the point of this entire exercise) the repository will need to be available to each computer. You can do this by running an HTTP or FTP server, by export the file system via NFS, or copying the contents of the repository to each computer.
# mkdir -p /home/localrepo/15.0 # touch /home/localrepo/15.0/{FILE_LIST,CHECKSUMS.md5}
Configure slackpkg+ to use this newly created repository. Add this line to /etc/slackpkg/slackpkgplus.conf. Adjust the repository path in MIRRORPLUS to match the version of Slackware for which you will build packages.
MIRRORPLUS['localrepo']=filedir://home/localrepo/15.0Find the REPOPLUS line. Add _localrepo_ to the list of sources such that the line look similar to
REPOPLUS=( slackpkgplus localrepo )Your installation may include additional repositories in this list.
Use _sbodeps -a_ to generate a build queue for a given package. Copy the resulting list to _/var/lib/sbopkg/queues/[PKGNAME].sqf_, where *[PKGNAME]* is the name of the target Slackbuild. Also copy this list to a template file at _/etc/slackpkg/templates/[PKGNAME]_SBo.template_. Again, replace *[PKGNAME]* with the target Slackbuild.
Use the resulting queue file to build your packages. Once complete and copied to the repository, use the template file to install the package and all required dependencies. Slackpkg+ will skip installing any packages already installed on your system.
It may be helpful to use *git* or another version control system to track the template files. These can then be checked out on each computer by cron or manually. This simplifies distribution of new templates and updates to existing templates.
Here is a working example from start to finish setting up a new repository, distributing the template, packaging the LibreOffice Slackbuild with dependencies, and finally installing it on a target computer. Assumed here is that _/home/localrepo_ is exported via NFS and mounted at the same location on the target computer.
# mkdir -p /home/localrepo/15.0 # touch /home/localrepo/15.0/{FILE_LIST,CHECKSUMS.md5}
# sbodeps -a libreoffice | tee /var/lib/sbopkg/queues/libreoffice.sqf /etc/slackpkg/template/libreoffice_SBo.template
# sbopkg -i -B libreoffice.sqf
# for package in $(cat /var/lib/sbopkg/queues/libreoffice.sqf) do mv /tmp/$package-*_SBo.t?z /home/localrepo/15.0/ done
# cd /home/localrepo # ls -l *.t?z >> FILE_LIST # md5sum *.t?z >> CHECKSUMS.md5 # sort -o FILE_LIST -k9 -u FILE_LIST # sort -o CHECKSUMS.md5 -k2 -u CHECKSUMS.md5
# slackpkg update # slackpkg install-template libreoffice_SBo
Repeat on additional computers where these packages are to be installed.