Upgrading a Slackware-based system


Over the years, I've performed many upgrades to my systems. I've moved my desktop incrementally from Slackware 3 to Slackware 12.1, refining my process as I go. While the various documents and notes in each Slackware release do help, I've evolved my own upgrade "management reporting" process that gives a clear picture of what the upgrade will and will not do.

While my process has evolved, I currently use two scripts to do all the "heavy lifting". The UpgradeRpt script generates a spreadsheet showing all the upgrade activities by Slackware package, and the GenUpgrade script generates action scripts that will co-ordinate and perform the upgrade based on modifications to the UpgradeRpt spreadsheet.

UpgradeRpt combines information from the current installation's /var/adm/packages database of installed packages with the effects of a "dry-run" upgrade for every package in the target Slackware's slackware/* and extra/* directories, or in a locally-maintained Slackware "patch" directory. As a result, the script builds a spreadsheet CSV file containing the script's recommendations as to how to upgrade.

This spreadsheet contains a single row for each upgrade action, with each row consisting of five columns: an action, the current package name and it's source, the upgrade package name, and the source for the upgrade package. The action column contains one of the "ABANDONED" (for currently installed packages that have no upgrade package), "upgrade" (for currently installed packages that have an upgrade package), "reinstall" (for currently installed packages that are at level-set with the upgrade), or "OMITTED" (for upgrade packages that have no corresponding currently-installed package).

For example, the CSV will contain lines like

ABANDONED Ri-li-2.0.0-i386-1 LOCAL_PKG -unknown- -unknown-
ABANDONED anacron-2.3-i386-1 LOCAL_PKG -unknown- -unknown-
ABANDONED bin86-0.16.15-i486-1 slackware/d -unknown- -unknown-
ABANDONED checkinstall-1.6.1-i386-1 . -unknown- -unknown-
ABANDONED openoffice.org-3.0.0-i586-1kjz . -unknown- -unknown-
ABANDONED pine-4.64-i486-2 slackware/n -unknown- -unknown-
ABANDONED ppracer-0.5alpha-i486-2gds . -unknown- -unknown-
ABANDONED qemu-0.11.0-rc2-i386-1 LOCAL_PKG -unknown- -unknown-
ABANDONED wine-1.1.30-i386-1 LOCAL_PKG -unknown- -unknown-
...
upgrade aaa_base-12.1.0-noarch-2 slackware/a aaa_base-12.2.0-noarch-1 slackware/a
upgrade aaa_elflibs-12.1.1-i486-1 slackware/a aaa_elflibs-12.2.0-i486-1 slackware/a
upgrade acct-6.3.2-i386-1 slackware/ap acct-6.4pre1-i486-1 slackware/ap
upgrade acpid-1.0.4-i486-2 slackware/a acpid-1.0.8-i486-2 slackware/a
upgrade alsa-lib-1.0.15-i486-1 slackware/l alsa-lib-1.0.17a-i486-1 slackware/l
upgrade alsa-oss-1.0.15-i486-1 slackware/l alsa-oss-1.0.17-i486-1 slackware/l
upgrade alsa-utils-1.0.15-i486-3 slackware/ap alsa-utils-1.0.17-i486-2 slackware/ap
upgrade amarok-1.4.10-i486-1_slack12.1 PATCH_CURRENT amarok-1.4.10-i486-3 slackware/kde
upgrade apr-1.3.8-i486-1_slack12.1 PATCH_CURRENT apr-1.3.3-i486-1 slackware/l
upgrade apr-1.3.8-i486-1_slack12.1 PATCH_CURRENT apr-1.3.8-i486-1_slack12.2 PATCH_12.2
upgrade apr-util-1.3.9-i486-1_slack12.1 PATCH_CURRENT apr-util-1.3.4-i486-1 slackware/l
upgrade apr-util-1.3.9-i486-1_slack12.1 PATCH_CURRENT apr-util-1.3.9-i486-1_slack12.2 PATCH_12.2
...
reinstall a2ps-4.13b-i386-2 slackware/ap a2ps-4.13b-i386-2 slackware/ap
reinstall aaa_terminfo-5.6-noarch-1 slackware/a aaa_terminfo-5.6-noarch-1 slackware/a
reinstall aalib-1.4rc5-i486-2 slackware/l aalib-1.4rc5-i486-2 slackware/l
reinstall acl-2.2.47_1-i486-1 slackware/a acl-2.2.47_1-i486-1 slackware/a
reinstall amp-0.7.6-i386-1 slackware/ap amp-0.7.6-i386-1 slackware/ap
reinstall apmd-3.2.2-i486-1 slackware/a apmd-3.2.2-i486-1 slackware/a
reinstall appres-1.0.1-i486-1 slackware/x appres-1.0.1-i486-1 slackware/x
reinstall ash-0.4.0-i386-1 slackware/ap ash-0.4.0-i386-1 slackware/ap
reinstall aspell-0.60.5-i486-2 slackware/l aspell-0.60.5-i486-2 slackware/l
reinstall aspell-en-6.0_0-noarch-4 slackware/l aspell-en-6.0_0-noarch-4 extra/aspell-word-lists
reinstall aspell-en-6.0_0-noarch-4 slackware/l aspell-en-6.0_0-noarch-4 slackware/l
reinstall at-3.1.10-i486-1 slackware/ap at-3.1.10-i486-1 slackware/ap
reinstall attr-2.4.41_1-i486-1 slackware/a attr-2.4.41_1-i486-1 slackware/a
...
OMITTED -na- -na- alpine-2.00-i486-1 slackware/n
OMITTED -na- -na- anthy-9100e-i486-1 slackware/x
OMITTED -na- -na- aspell-af-0.50_0-noarch-4 extra/aspell-word-lists
OMITTED -na- -na- aspell-am-0.03_1-noarch-4 extra/aspell-word-lists
OMITTED -na- -na- aspell-az-0.02_0-noarch-4 extra/aspell-word-lists
...

NB: In the above example, we see that the currently installed packages bin86-0.16.15-i486-1 and pine-4.64-i486-2 have been ABANDONED, and originated in a slackware/* directory. The CHANGES-AND-HINTS.TXT file from the Slackware install DVD confirms that these two packages have been dropped from Slackware. Additionally, we see that the new package alpine-2.00-i486-1 has been OMITTED, and the CHANGES-AND-HINTS.TXT file tells us that this is a new package which replaces the pine- package. Consequently, we can change the action on bin86-0.16.15-i486-1 and pine-4.64-i486-2 to remove, and the action on alpine-2.00-i486-1 to install.

The system administrator will review this spreadsheet, making changes to the action column as appropriate, and then feed the resulting CSV file into the GenUpgrade script to generate a set of 5 upgrade scripts.

The system administrator will alter the action column for each package according to the installation's standards. Acceptable final values for this column are: "install" (to installpkg the upgrade package), "remove" (to removepkg the current package), "upgrade" (to upgradepkg from the current package to the upgrade package), "reinstall" (to upgradepkg --reinstall the upgrade package), or "ignore" (to do nothing with either the current or the upgrade package).

Locally-installed and 3rd-party packages rarely have Slackware upgrades, and the spreadsheet will show them as "ABANDONED". The system administrator can decide to "remove" or "ignore" these packages as is required by the system installation and use.

The spreadsheet will show new Slackware packages that have no prior equivalents as "OMITTED", and the system administrator can decide to "install" or "ignore" these packages as is required by the system installation and use.

Packages that have an established upgrade will show as "upgrade" or "reinstall", and the system administrator can again decide how the upgrade should run, changing them to "remove" or "ignore" as is required by the system installation and use.

The system administrator will input the finalized CSV file into the GenUpgrade script to build 5 scripts that will perform the actual upgrade.

  • The first script, 1_Delete_Orphan_Pkgs.sh will delete currrently installed locally-installed and/or 3rd-party packages flagged as "remove" in the spreadsheet.
  • The second script, 2_Install_Critical_Pkgs.sh will install/upgrade the upgrade's glibc-solibs-* and pkgtools-* packages.
  • 3_Install_All_Pkgs.sh will install/upgrade all Slackware packages (both from the slackware/* and the extra/* directories) flagged as "install", "upgrade", or "reinstall" in the spreadsheet.
  • 4_Install_Patch_Pkgs.sh will install/upgrade all locally-saved Slackware patches (for the target upgrade level) flagged as "install", "upgrade", or "reinstall" in the spreadsheet.
  • Finally, 5_Delete_Obsolete_Pkgs.sh will deletepkg all Slackware-origin packages marked as "delete in the spreadsheet.

The GenUpgrade script does not perform any lilo maintenance, nor does it evaluate and/or implement any of the .new configuration files that the Slackware upgrade leaves for the system administrator. Those functions (along with a bit more robust error reporting) will someday come, but not now.

About: 
System Configuration: 
System Management: