Table of Content

This is a three-parts article. There are few sections here.

Part One
  • Preface
  • Preparing Docker
  • IRSIF: slackpkg install, removepkg, Query Search, Show Info, List File
  • Container: Slackware64, Minimal Install, Package Series
  • Mirror
  • System Wide: Installed Packages
  • History: The Log File
  • No Dependency: Example, slpkg deps-status
  • Hold: Blacklist
  • Cleanup
Part Two
  • Using slackbuild, manual compilation, and installpkg
  • Using sbopkg, automatic compilation
  • Using slapt-get: Reading, Install, Dependencies, Update, Upgrade, Install, Show Info
  • Using slapt-src: Update, Install
Part Three
  • Install slpkg: Dependency, Install, No certificate
  • Using slpkg: Documentation, Update, Install, The Log File
  • Repository: List, Configuration, Enable, List Package, Install Package
  • Conclusion
There are still other topic uncovered here
  • slackpkgplus

Preface

Goal: Examine Package Manager, Focus on Command Line Interface

I am so glad that finally, for the first time, I can learn Slackware Package Management using Docker. Here is my report as a new slacker who just landed in slackware land, my journey using minimal install.

Test Bed

  1. Container: Docker

  2. Operating System: Artix (OpenRC )

  3. Window Manager: Herbstluftwm

Since we are going to use docker again, you can read a common overview here.

Of course you can use virtualization, the issue is distraction. We need to avoid tendency to focus on GUI tools. At the same time, limiting the scope to CLI tools. Most of the time, CLI tools is considered lower level than the GUI one.


Getting Started With Docker

Our first move is, of course attach docker process, as usual.

$ docker pull vbatts/slackware
$ docker image list 

  --format 'table {{.Repository}}\t{{.Size}}'

REPOSITORY              SIZE
gentoo/stage3-amd64     873MB
vbatts/slackware        86.7MB
voidlinux/voidlinux     202MB
kevinleptons/lfs-auto   753MB
$ docker run -it vbatts/slackware
$ docker ps -a

  --format 'table {{.Image}}\t{{.Names}}\t{{.Status}}'
 
IMAGE               NAMES
vbatts/slackware    cranky_keller
$ docker start cranky_keller
cranky_keller
$ docker attach cranky_keller
sh-4.3# 

Docker Slackware: Getting Started


Package Management

Slackware does not really have a sophisticated official package management. Beside slackpkg there are special unoffical tools to manage your packages such as sbopkg, slapt-get, slapt-src, slapkg and slackpkgplus.

slackpkg

slapt-get

slpkg

Get Help

Read the fine manual. Helpless or more.

$ slackpkg help | less
$ man sbopkg

$ man slapt-get
$ man slapt-src

$ man slpkg

slackpkg

OS Release

$ cat /etc/slackware-version 
Slackware 14.2

Update

First Thing First

Remember to run slackpkg update first.

$ slackpkg update

Solve Dependency Issue

My first attempt is to install package I cannot live with. These package might be different with your favorites.

$ slackpkg install man nano htop mc curl 

Unfortunately when I run $ man man, error did happened. I had to fix using $ slackpkg file-search

$ man man
sh: /usr/bin/nroff: No such file or directory
sh: /usr/bin/gtbl: No such file or directory
$ slackpkg file-search nroff

Looking for nroff in package list. Please wait... DONE

The list below shows the packages that contains "nroff" file.

[uninstalled] - enscript-1.6.6-x86_64-1
[uninstalled] - groff-1.22.3-x86_64-2
[uninstalled] - jed-0.99_19-x86_64-2
[ installed ] - mc-4.8.16-x86_64-2
[uninstalled] - vim-7.4.1938-x86_64-1
[uninstalled] - emacs-24.5-x86_64-2
[uninstalled] - aspell-0.60.6.1-x86_64-1

You can search specific packages using "slackpkg search package".
$ slackpkg install groff

Looking for groff in package list. Please wait... DONE

groff-1.22.3-x86_64-2.txz

And voila! No more encounter with error.

Docker Slackware: Search file belonging

Official Documentation

More command please ...

Reading:

There are still, other cool command though. However, I choose not to bloat my minimal install.

$ slackpkg upgrade patches

Checking local integrity... DONE
Looking for patches in package list. Please wait... DONE

bash-4.3.048-x86_64-1_slack14.2.txz
kernel-headers-4.4.88-x86-1.txz

Total package(s): 2

Do you wish to upgrade selected packages (Y/n)?

Docker Slackware: Upgrade Patches

$ slackpkg check-updates

No news is good news

Package IRSIF

Install, Remove, Search, Info, File

Package Install

We have seen Install in previous example. How about reinstall ?

$ slackpkg reinstall man nano htop

Docker Slackpkg: Reinstall

Package Removal

$ removepkg htop

Docker Removepkg

We have seen search in action in previous section.

$ slackpkg file-search htop

Looking for htop in package list. Please wait... DONE

The list below shows the packages that contains "htop" file.

[uninstalled] - htop-2.0.1-x86_64-1
[uninstalled] - bash-completion-2.2-noarch-3

You can search specific packages using "slackpkg search package".
$ slackpkg search htop

Looking for htop in package list. Please wait... DONE

The list below shows all packages with name matching "htop".

[uninstalled] - htop-2.0.1-x86_64-1

You can search specific files using "slackpkg file-search file".

Package Info

$ slackpkg info htop

PACKAGE NAME:  htop-2.0.1-x86_64-1.txz
PACKAGE LOCATION:  ./slackware64/ap
PACKAGE SIZE (compressed):  80 K
PACKAGE SIZE (uncompressed):  220 K
PACKAGE DESCRIPTION:
...

Docker Slackpkg: Info

List File

Listing package files can be achieved using /var/log/packages/.

$ cat /var/log/packages/ncdu-1.12-x86_64-1_SBo 
PACKAGE NAME:     ncdu-1.12-x86_64-1_SBo
COMPRESSED PACKAGE SIZE:     44K
UNCOMPRESSED PACKAGE SIZE:     100K
PACKAGE LOCATION: /tmp/ncdu-1.12-x86_64-1_SBo.tgz
PACKAGE DESCRIPTION:
...
FILE LIST:
./
install/
install/slack-desc
usr/
usr/bin/
usr/bin/ncdu
usr/doc/
usr/doc/ncdu-1.12/
usr/doc/ncdu-1.12/COPYING
usr/doc/ncdu-1.12/ChangeLog
usr/doc/ncdu-1.12/README
usr/doc/ncdu-1.12/ncdu.SlackBuild
usr/man/
usr/man/man1/
usr/man/man1/ncdu.1.gz

Docker Slackware: /var/log/packages


Container: Minimal or Full Install ?

What should I do with this Container ?

How you play with your toy is up to you. At least we have two choice. Two kind of toy.

  • Populate Using Slackware64

  • Stay with Minimal Install.

Using Slackware64

The docker image vbatts/slackware is a slackware minimal install. Therefore you need to populate with full slackware distribution.

$ slackpkg install slackware64

Docker Slackware: Populate Slackware64

The issue with slackware64 is my docker container grown from 86.7 MB to 8.64 GB. Slackware64 has this huge size as a drawback. For that reason I decice to scrap the container. I can’t afford huge container, as I intent to play with other docker container as well.

Docker Slackware: Huge Container Slackware64

I will do that when I have my own computer. But I would never do that again with my docker. Cheers.

Stay with Minimal Install

Prepare toolchain

With minimal install, I am own my own. I assume that I know what I am doing.

For binary package come form official repository, it is all alright. The drawback is you have to prepare toolchain for slackbuild package, this slackbuild is unofficial, and must be compiled.

I must admit that I know nothing about toolchain. But here it is what you need based on my experience.

$ slackpkg install perl
$ slackpkg install gcc
$ slackpkg install autoconf automake m4 gettext libtool
$ slackpkg install glibc binutils kernel-headers make 
$ slackpkg install libmpc flex guille gc 

And some other package required by make when I compile fish

$ slackpkg install libffi libcroco libxml2

It is not a big deal. Just be brave to identify what each build need.

D Package Series

You can install D Package Series as mentioned in installation help:

$ slackpkg install d

I remind that I keep my minimal install for learning purpose. So do not have any plan to install D Package Series. If storage is not a problem for you, you can install D Package Series, or even use full Slackware64 install.


Mirror

Change mirror is slackware can be done, by changing the /etc/slackpkg/mirrors. Here I uncomment local university named kambing.

$ cat /etc/slackpkg/mirrors
...
# INDONESIA (ID)
http://kambing.ui.ac.id/slackware/slackware64-14.2/
...

Docker Slackware: Change Mirrors

The result will shown when update.

$ slackpkg update

Updating the package lists...
	Downloading...
			Downloading http://kambing.ui.ac.id/slackware/slackware64-14.2/ChangeLog.txt...
--2017-09-09 21:53:58--  http://kambing.ui.ac.id/slackware/slackware64-14.2/ChangeLog.txt

Docker Slackware: Update Use Kambing

The repository is already using kambing.


System Wide

System wide information.

Installed Packages

You can query installed packages, with rather hackish low level slackway as below

$ ls /var/log/packages/
aaa_base-14.2-x86_64-2
aaa_elflibs-14.2-x86_64-23
aaa_terminfo-5.9-x86_64-1
autoconf-2.69-noarch-1
automake-1.15-noarch-1
bash-4.3.048-x86_64-1_slack14.2
...
wget-1.18-x86_64-1
which-2.21-x86_64-1
xproto-7.0.29-noarch-1
xz-5.2.2-x86_64-1

Docker Slackware: /var/log/packages

Update

$ slackpkg update

Updating the package lists...
	Downloading...
			Downloading http://kambing.ui.ac.id/slackware/slackware64-14.2/ChangeLog.txt...
--2017-09-21 07:57:34--  http://kambing.ui.ac.id/slackware/slackware64-14.2/ChangeLog.txt
Resolving kambing.ui.ac.id (kambing.ui.ac.id)... 152.118.24.30, 2403:da00:1:3::1e
Connecting to kambing.ui.ac.id (kambing.ui.ac.id)|152.118.24.30|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 430814 (421K) [text/plain]
Saving to: '/tmp/slackpkg.TCDDsX/ChangeLog.txt'

/tmp/slackpkg.TC 100%[==========>] 420.72K   215KB/s    in 2.0s    
...

Docker slackpkg: update

Install New

This will install a lot of package. I personally, avoid to use it.

$ slackpkg install-new

Looking for NEW packages to install. Please wait... DONE

ConsoleKit2-1.0.0-x86_64-3.txz
Cython-0.23.4-x86_64-1.txz
LibRaw-0.17.2-x86_64-1.txz
...

Docker slackpkg: install new

Upgrade All

$ slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

No packages match the pattern for upgrade. Try:

	/usr/sbin/slackpkg install|reinstall

Clean System

Clean non official repository. I won’t do this.

$ slackpkg clean-system

Looking for packages to remove. Please wait... DONE

fish-2.6.0-x86_64-1_SBo
kdev-python-1.7.2-x86_64-1
man-db-2.7.6.1-x86_64-2_SBo
ncdu-1.12-x86_64-1_SBo
openbox-3.6.1-x86_64-1alien
python2-pythondialog-3.4.0-x86_64-1_SBo
sbopkg-0.38.1-noarch-1_wsr
slapt-get-0.10.2t-x86_64-1
slapt-src-0.3.2i-x86_64-1
slpkg-3.2.8-x86_64-1_SBo

Total package(s): 10

Do you wish to remove selected packages (Y/n)? 

History

The Log File

This is most the forgotten part of package management, although it is not uncommon to notice messages. For that reason, I put the recorded event here, before discussing about any further feature.

Unfortunately, I cannot find any reference about slackpkg log file. However, there is are some log file for

  • sbopkg: /var/log/sbopkg/sbopkg-build-log

  • slpkg: /var/log/slpkg/sbo/build_logs/build_fish_log

Most likely you want the tail, latest transaction, at the bottom of the recorded event.


No Dependency

Slackware proud of their no dependency resolution philosophy. A package that required by other packaged could be removed without prior warning.

Example

Removing libpipeline would not remove man-db. libpipeline would be removed without prior warning. Therefore be careful while remove.

$ removepkg groff

Removing package /var/log/packages/groff-1.22.3-x86_64-2...
Removing files:
  --> Deleting symlink /usr/bin/geqn
  --> Deleting symlink /usr/bin/gindxbib
  --> Deleting symlink /usr/bin/glookbib
...

Docker Slackware: remove groff

$ man man
sh: /usr/bin/gtbl: No such file or directory
sh: /usr/bin/nroff: No such file or directory

Docker Slackware: man man

The same result for slapt-get --remove.

slapt-get --remove groff

Using slpkg deps-status

However, you can use slpkg, and achieve dependency resolution.

$ slpkg deps-status --tree
+==============================================================================
| Dependencies
| -- Packages
+==============================================================================
+ man-db
|
+-- fish
 

Status summary
===============================================================================
found 1 dependencies in 1 packages.

Docker Slackware: slpkg deps-status


Hold

Holding package ini Slackware can be done using /etc/slackpkg/blacklist.

Consider this install-new command. This will install a lot of package, and we want to reduce he number of package by blacklisting.

$ slackpkg install-new

Looking for NEW packages to install. Please wait... DONE

ConsoleKit2-1.0.0-x86_64-3.txz
Cython-0.23.4-x86_64-1.txz
LibRaw-0.17.2-x86_64-1.txz
a52dec-0.7.4-x86_64-2.txz
adwaita-icon-theme-3.18.0-noarch-1.txz
alsa-plugins-1.1.1-x86_64-1.txz
amor-4.14.3-x86_64-2.txz
artikulate-4.14.3-x86_64-2.txz
atkmm-2.24.2-x86_64-1.txz
baloo-4.14.3-x86_64-2.txz
baloo-widgets-4.14.3-x86_64-2.txz
cairomm-1.12.0-x86_64-1.txz
calligra-l10n-en_GB-2.9.11-noarch-1.txz
calligra-l10n-ja-2.9.11-noarch-1.txz
calligra-l10n-tr-2.9.11-noarch-1.txz
cervisia-4.14.3-x86_64-2.txz
cgmanager-0.39-x86_64-1.txz
cups-filters-1.9.0-x86_64-2.txz
dconf-editor-3.18.2-x86_64-1.txz

Docker Slackpkg: unlock example

We can reduce by blacklist some few package

Blacklist

This is just an example. Blacklisting lib is a bad idea.

$ cat /etc/slackpkg/blacklist
...
calligra
kde
gst

Docker Slackpkg: Blacklist

Now we have fewer packages.

$ slackpkg install-new

Looking for NEW packages to install. Please wait... DONE

ConsoleKit2-1.0.0-x86_64-3.txz
Cython-0.23.4-x86_64-1.txz
LibRaw-0.17.2-x86_64-1.txz
a52dec-0.7.4-x86_64-2.txz
adwaita-icon-theme-3.18.0-noarch-1.txz
alsa-plugins-1.1.1-x86_64-1.txz
atkmm-2.24.2-x86_64-1.txz
cairomm-1.12.0-x86_64-1.txz
cgmanager-0.39-x86_64-1.txz
cups-filters-1.9.0-x86_64-2.txz
dconf-editor-3.18.2-x86_64-1.txz
dri3proto-1.0-x86_64-2.txz
eigen3-3.2.7-x86_64-2.txz
elfutils-0.163-x86_64-1.txz
eudev-3.1.5-x86_64-8.txz
glibmm-2.46.4-x86_64-1.txz
gnu-cobol-1.1-x86_64-1.txz
gparted-0.26.1-x86_64-1.txz

Docker Slackpkg: lock example

This is just an example. I do not have any intention to install anything.


Clean Up

Time after time, your cache size may growing bigger and bigger.

Package Cache

  • /var/cache/packages/ * / * / * .txz
$ ls -lR /var/cache/packages/slackware64/d

Docker Slack: Cache

Unfortunately, I haven’t find any reference, on how to clean up this cache directory.


What’s Next

Consider finish reading [ Part Two ] that cover slackbuild, sbopkg, slapt-get and slapt-src.

Thank you for reading