syl-robitaille/Slackware-Tools
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This is a collection of simple shell and Perl scripts intended to aid
in the maintenance of Slackware systems. There is no documentation,
other than comments in the scripts. There's nothing here that should
be particularly difficult to understand.
UPGRADE.sh
This is a script meant to automate periodic package upgrades.
Run as an unpriviledged user, it will download from an offsite
repository to a local one, any package updates that are newer
than the /var/log/packages directory (whose timestamp was touched
the last time the system had any packages installed, removed,
or updated). Then it runs "upgradepkg --dry-run" on the downloaded
packages, to list which would be installed or not.
Run as "root" and it finds the latest package updates that have
been downloaded and runs "upgradepkg" on them.
This script works great, so long as no new packages get installed
between patch cycles, but be aware that as coded, it looks also
for package updates in Slackware's "testing" subset, which may
not be desirable in all situations. Adjust the script if you
don't want it to get "testing" packages, and while you're at it,
be sure to check and adjust "FTP_HOST" and "DOWNLOAD_BASE".
listdeps.sh
This simple script attempts to identify which other installed
packages a given (also installed) package depends on. Useful for
duplicating local software installations onto other computers.
As an example, in order to identify which external packagses are
installed on a system as dependencies for an application (where
all other packages are installed with the original OS installation,
or from routine updates to the OS installation):
: nemesis[syl] ; listdeps.sh abiword | ( cd /var/adm/packages/;\
xargs -r grep -hsw LOCATION | cut -d\ -f3 |grep ^\./)
./abiword-3.0.7-x86_64-1.tgz
./wv-1.2.9-x86_64-1.tgz
Note that "./" in the above output does not mean that the package
files in question are in the current directory. The script does not
search for the package files. It only lists the package location
recorded in the /var/log/packages file for that package (that
is the path to the package file as it was given to installpkg).
Note that the last "grep" in the sample command is what matches
these specific entries. Otherwise listdeps.sh will gleefully
list all installed packages that the target package depends on.
It's up to the user to figure out how to extract useful details
from the output.
slackware_chlog.sh
Perhaps the first script that was written among this set of tools,
this one keeps an eye on the official Slackware changelog, and
sends daily updates to a configured email address. Intended to
be run daily from cron, though note that it should run only as
an unprivileged user as it writes to a very predictable path
under /tmp. Obviously that can be adjusted as needed.
software_monitor.pl
This script attempts to provide the same functionality on
Slackware Linux systems as is provided by the anitya script
found at https://github.com/fedora-infra/anitya. That is
to say that it queries the software release database at
https://release-monitoring.org/ for the latest versions of
the software packages that it is configured to report on (note
that this script prioritizes known stable versions of software,
rather than nightly builds or development releases; I make no
promises that this is either similar to or different from how
the anitya script behaves), and compares them to the versions
installed on one or more local Slackware Linux systems (assuming
that the software is installed using Slackware's usual package
installation tools, and thus is recorded in /var/log/packages.
See https://slackbuilds.org/ for a collection of software build
scripts that will build Slackware-like packages of third-party
software). A report is generated when the local versions are
found to be out of date. The intention is to run this from cron
on a weekly or monthly basis (even daily seems likely to be overly
frequent), giving the system administrator a reasonable chance of
keeping locally installed software upt to date.
template.SlackBuild
This script is largely based on Slackware's own build scripts, but
also heavily influenced by many scripts found on the SlackBuilds.Org
website, as well as build scripts by Eric Hameleers, Fred Emmott,
and many others. This script makes it possible to very consistently
create Slackware packages from the source of many applications.
As the name suggests, though, this is just a template. The script
absolutely must be adjusted for each piece of software it's used
to create a package of, but if I did things well, it should fairly
easily obvious where edits need to be made.
Note that this was originally created at a time when I was working
on porting Slackware linux to a DEC Alpha system (Alphaserver-2100,
to be precise). I no longer have that system and the port was
never complete, though it did work: I had Slackware-10.0 running
on my Alphaserver for quite a while. Most folks won't need support
for all the architectures listed in template.SlackBuild, of course,
but they remain on the off chance that I might someday revive that
project (or port to a different hardware platform that I've been
meaning to work on).
All the software that I install locally on a Slackware system
starts with a copy of this script, adjusted for each package.
Upgrading to a new version of such a package is usually just a
matter of rebuilding the package, feeding the appropriate version
number via the "VERSION" environment variable, then using upgradepkg
to install the upgrade.