Patching Slackware Linux

Requirements

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

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

System upgrade

screen -S UPGRADE
slackpkg update
slackpkg upgrade pkgtools slackpkg
# slackpkg update
slackpkg upgrade-all

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

lilo

TODO — tune the default behaviour to become (K)eep w/o interaction

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. Note – we now keep track of the changes into the tag files (updated weekly)!

    #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 install --upgrade pip setuptools
pip list --outdated --format=freeze | cut -d= -f1 | xargs pip install --upgrade
pip list --outdated

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

let’s have a look for the new config files

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

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

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

now check for conflicts

diff -bu /etc/ssh/sshd_config.new /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

Cleaning-up

now clean-up everything that’s left

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

and re-check

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

Automated updates

in your daily cron job

vi /root/DAILY

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

etcupdate for slackware

and eventually use this script to partially automate the update of the /etc/ folder

Additional notes

Other interesting options

#slackpkg install-new
#slackpkg clean-system

TODO

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

Trash

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

Resources

alternatives

autoslack http://www.slackware.com/~david/zuul/autoslack/

pip

How to upgrade all Python packages with pip https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip

How To Update All Python Packages https://www.activestate.com/resources/quick-reads/how-to-update-all-python-packages/


GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH