Saturday, May 2, 2009

Using SlackPkg on Slack/390

As promised in my previous post, some instructions to use SlackPkg in Slack/390 to keep your installation up-to-date.

After almost two years without activiry, the maintainers have released some patches / upgrades for Slack/390 - both the -stable and the -current versions.
Since I use SlackPkg on my other Slackware installations (12.1, 12.2 & -current), I wanted to use this same tool in my Slack/390 installation.

First i tried with the version that is included in /extra in Slack/390, but it is quite old (1.4, from 2005) and it simply didn't work.

The first problem is that the big majority of packages on the Slack/390 mirrors do not have the associated xxxx.tgz.asc file, which contain the GPG ckecksum of the package.
This was simple to resolve, setting CHECKGPG=off in /etc/slackpkg/slackpkg.conf

But the second problem I encountered was with the naming of some files on the Slack/390 mirrors that differs from the 'main' Slackware version:

  • The MANIFEST.bz2 files are called MANIFEST.s390.bz2 in Slack/390

  • The CHECKSUM.md5 files are called CHECKSUM.s390.md5 in Slack/390

  • The PACKAGES.TXT files are called PACKAGES.s390.TXT in Slack/390

  • The FILELIST.TXT file is called FILELIST.TXT.s390 (yes, at the end) in Slack/390

I remembered from the newer versions that there was an option for the 'architecture', so I decided to try SlackPkg 2.70.5 from slackware-12.2
It can be downloaded here or any valid Slackware mirror.
Since SlackPkg is written as a collection of scripts and marked as "noarch", I expected no problems.

So I downloaded the package, upgraded the 1.4 version with upgradepkg and edited /etc/slackpkg/slackpkg.conf
I commented out the 'standard' x86 architecture and uncommented the ARCH=s390 line.
But no luck yet... Still the same problems with the differences in the file names.

At this moment I reached the conclusion that I had to 'hack' the SlackPkg scripts to get it working.

I ended up modifying two files, /usr/bin/slackpkg & /usr/libexec/slackpkg/

The first patch is to the main slackpkg script and defines a variable 'subARCH' to insert the ".s390" text in the filenames in case the ARCH is s390:

--- slackpkg.orig 2009-04-10 23:44:49.000000000 -0300
+++ /usr/sbin/slackpkg 2009-04-10 23:57:28.000000000 -0300
@@ -40,6 +40,7 @@
SOURCE=$(grep -e "^\([a-z]\)" $CONF/mirrors)
. $CONF/slackpkg.conf
+[ "$ARCH" = "s390" ] && subARCH=".s390"
KERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
TMPDIR=$(mktemp -p /tmp -d slackpkg.XXXXXX 2>/dev/null || echo "FAILED")

The second patch is to the core-functions script and inserts the $subARCH variable in the filenames:

--- 2009-04-10 23:53:19.000000000 -0300
+++ /usr/libexec/slackpkg/ 2009-04-11 00:02:49.000000000 -0300
@@ -618,16 +618,16 @@
echo -e "\t\tList of all files"
- getfile ${i}/MANIFEST.bz2 $TMPDIR/${i}-MANIFEST.bz2 && \
+ getfile ${i}/MANIFEST${subARCH}.bz2 $TMPDIR/${i}-MANIFEST.bz2 && \

echo -e "\t\tPackage List"

if [ "$CHECKPKG" = "on" ]; then
echo -e "\t\tChecksums"
+ getfile CHECKSUMS${subARCH}.md5 ${TMPDIR}/CHECKSUMS.md5

@@ -635,7 +635,7 @@
echo -e "\t\tPackage descriptions"
for i in $DIRS; do


With these changes, I got SlackPkg working in my Slack/390 installation!

There are still some problems, but they depend on some cleaning up of the Slack/390 mirrors.
In the following image you can see that SlackPkg wants to "upgrade" some packages to older versions:

The fact that SlackPkg want to "downgrade" itself to version 1.4 is understandable, as it is the official version for Slack/390.
The suggestions to downgrade abiword, gftp and gucharmap are caused by the fact that these packages exist two times on the mirrors, once in slackware/gnome (the older versions) and once in slackware/xap (the newer versions).
I wrote about these inconsistencies to but unfortunately have not received any answers yet.

Even with these minor problems, keeping your Slack/390 installation is a lot simpler now with a working SlackPkg!

Labels: , ,


Post a Comment

Subscribe to Post Comments [Atom]

<< Home