Patching Slackware Linux

Getting ready

BEFORE we proceed, let’s get rid of all the useless .new files

locate \.new | grep new$ | grep -v sbopkg
locate \.new | grep new$ | grep -v sbopkg | xargs rm -f

System upgrade

We would like the default behaviour to be (K)eep

slackpkg update
slackpkg upgrade pkgtools slackpkg
slackpkg upgrade-all

(K)eep the old files and consider .new files later


In some situation you might also want to check for new packages, however this makes only sense if you have all the sets installed and a full slackware system. As we have minimal custom built bare-metal and XEN guest systems here, we are not gonna do that.

    #slackpkg install-new

Also make sure you still have your favorite python modules in there (in case python got upgraded)

pip list | grep spf
pip list | grep mta
# pip install --upgrade setuptools pip

You might also like to fixup a few symlinks after a major upgrade (those folders may be re-created)

ls -lF /home
ls -lF /var/lib/lxc

Applying new config files

Now let’s have a look for the new config files

locate \.new | grep new$ | grep -v sbopkg

for f in `locate \.new | grep new$ | grep -v sbopkg`; do
    diff -bu ${f%\.new} $f | less
done; unset f

check and apply some configs out-of-the-box e.g.

diff -bu /etc/ca-certificates.conf /etc/
mv -f /etc/ /etc/ca-certificates.conf

now check for conflicts

diff -bu /etc/ssh/ /etc/ssh/sshd_config.dist
cat /etc/ssh/sshd_config

and eventually update your customized configs e.g.

vi /etc/ssh/sshd_config
sshd -t && echo OK || echo NOK
/etc/rc.d/rc.sshd restart


now clean-up everything that’s left

locate \.new | grep new$ | grep -v sbopkg
locate \.new | grep new$ | grep -v sbopkg | xargs rm -f

and re-check

locate \.new | grep new$ | grep -v sbopkg

Automated updates

draft - untested

vi /root/WEEKLY




echo "To: ${MAILTO:-root}"
echo "Subject: Weekly $host $date"
echo ""

# don't do that on -current
/usr/sbin/slackpkg update
/usr/sbin/slackpkg -batch=on -default_answer=y upgrade-all

chmod +x /root/WEEKLY
crontab -e

00 5 * * 0 /root/WEEKLY 2>&1 | /usr/sbin/sendmail -t

Additional notes

Other interesting options

#slackpkg install-new
#slackpkg clean-system


Consider a link between autoslack and diy conf manager with dsh.


#locate \.orig | grep \.orig$
#locate \.orig | grep \.orig$ | xargs rm -f