aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile25
-rw-r--r--conf/14.0-14.1.repl12
-rw-r--r--conf/14.1-14.2.repl21
-rw-r--r--slackware-upgrade-system57
-rw-r--r--slackware-upgrade-system.8104
5 files changed, 140 insertions, 79 deletions
diff --git a/Makefile b/Makefile
index 09a5a8c..3d90bb6 100644
--- a/Makefile
+++ b/Makefile
@@ -15,12 +15,14 @@
# along with slackware-upgrade-system. If not, see
# <http://www.gnu.org/licenses/>.
-PACKAGE=slackupgrade
-VERSION=0.1
+PACKAGE = slackupgrade
+VERSION = 0.1
-SBINDIR=/sbin
-MANDIR=/usr/man
-MAN8DIR=$(MANDIR)/man8
+SBINDIR = /sbin
+MANDIR = /usr/man
+MAN8DIR = $(MANDIR)/man8
+CONFDIR = /etc/slackware-system-upgrade
+CONFFILES = conf/14.0-14.1.repl conf/14.1-14.2.repl
help:;
@echo "Avalable targets:"
@@ -42,7 +44,7 @@ help:;
# ##########################
# Installation rules
# ##########################
-install: install-sbin install-man
+install: install-sbin install-conf install-man
install-sbin:
@if ! test -d $(DESTDIR)$(SBINDIR); then install -d $(DESTDIR)$(SBINDIR); fi
@@ -52,17 +54,22 @@ install-man:
@if ! test -d $(DESTDIR)$(MAN8DIR); then install -d $(DESTDIR)$(MAN8DIR); fi
install -m 644 slackware-upgrade-system.8 $(DESTDIR)$(MAN8DIR)
+install-conf:
+ @if ! test -d $(DESTDIR)$(CONFDIR); then install -d $(DESTDIR)$(CONFDIR); fi
+ install -m 644 $(CONFFILES) $(DESTDIR)$(CONFDIR)
+
# ##########################
# Distribution tarball rules
# ##########################
-DISTDIR=$(PACKAGE)-$(VERSION)
-DISTFILES=\
+DISTDIR = $(PACKAGE)-$(VERSION)
+DISTFILES =\
slackware-upgrade-system\
slackware-upgrade-system.8\
Makefile\
COPYING\
- README
+ README\
+ $(CONFFILES)
distdir:
test -d $(DISTDIR) || mkdir $(DISTDIR)
diff --git a/conf/14.0-14.1.repl b/conf/14.0-14.1.repl
new file mode 100644
index 0000000..af9130a
--- /dev/null
+++ b/conf/14.0-14.1.repl
@@ -0,0 +1,12 @@
+# Package replacement map for upgrading from Slackware 14.0 to 14.1
+# See slackware-upgrade-system(8) for details.
+Terminal xfce4-terminal
+kdegames konquest ksquares ksnakeduel killbots kgoldrunner ksirk\
+ kiriki knavalbattle kdiamond kolf kbounce klickety kblocks\
+ kfourinline knetwalk palapeli bovo kblackbox kubrick kpat\
+ kigo kjumpingcube kbreakout kollision bomber klines kshisen\
+ ksudoku katomic ktuberling kmines kfourinline lskat kapman\
+ kspaceduel kreversi kmahjongg
+
+kdemultimedia dragon juk kmix mplayerthumbs
+mysql mariadb
diff --git a/conf/14.1-14.2.repl b/conf/14.1-14.2.repl
new file mode 100644
index 0000000..4594a97
--- /dev/null
+++ b/conf/14.1-14.2.repl
@@ -0,0 +1,21 @@
+# Package replacement map for upgrading from Slackware 14.1 to 14.2
+# See slackware-upgrade-system(8) for details.
+procps procps-ng
+udev eudev
+portmap rpcbind
+ConsoleKit ConsoleKit2
+bluez-hcidump bluez
+foomatic-filters cups-filters
+kdeadmin kuser ksystemlog
+kdenetwork kget krdc kopete kppp
+kdesdk kde-dev-utils kde-dev-scripts
+kdetoys kteatime amor ktux
+kwallet kwalletmanager
+libelf elfutils
+libjpeg libjpeg-turbo
+libxfcegui4 libxfce4ui
+open-cobol gnu-cobol
+pil python-pillow
+qca-cyrus-sasl qca
+qca-gnupg qca
+qca-ossl qca
diff --git a/slackware-upgrade-system b/slackware-upgrade-system
index ad8e963..4553b82 100644
--- a/slackware-upgrade-system
+++ b/slackware-upgrade-system
@@ -18,6 +18,8 @@
set -e
+# Configuration directory
+: ${SUS_CONFDIR:=/etc/slackware-upgrade-system}
# Slackware root directory
rooturl=
# Log file name
@@ -427,18 +429,15 @@ else
mv remove.list.$$ remove.list
fi
-# Scan the remove.list for names of the packages that are replaced with
-# another packages in the new release. If found, add the names of the
-# replacements to the list of installation candidates and remove original
-# names from the $remove_report.
-#
-# Reads package replacement map from the standard input. Each input line
-# contains old and new package names, separated by whitespace. Multiple
-# new package names are allowed.
-function replace_pkglist() {
+# Create $remove_report and the list of installation candidates.
+if [ -f "$SUS_CONFDIR/$VERSION-$newversion.repl" ]; then
+ error "info: reading $SUS_CONFDIR/$VERSION-$newversion.repl"
# Update candidates and save the replacement map in a temporary.
- sed -r -e 's/[[:space:]]+$//' | \
- sort +0 -1 | \
+ awk '{ sub(/#.*$/,""); sub(/[[:space:]]+$/,"") }
+ /\\$/ { sub(/\\$/,""); p = p $0; next }
+ NF == 0 { if (p) print p; p = ""; next }
+ { print p $0; p="" }' $SUS_CONFDIR/$VERSION-$newversion.repl | \
+ sort +0 -1 | \
tee rename.$$ | \
join - remove.list | \
cut -d ' ' -f 2- | \
@@ -449,37 +448,11 @@ function replace_pkglist() {
awk '{print $1}' rename.$$ | \
comm -13 - remove.list > $remove_report
# Clean up
- rm rename.$$
-}
-
-# Create $remove_report and the list of installation candidates.
-case $VERSION-$newversion in
- 14.1-14.2)
- replace_pkglist <<EOF
-procps procps-ng
-udev eudev
-portmap rpcbind
-ConsoleKit ConsoleKit2
-bluez-hcidump bluez
-foomatic-filters cups-filters
-kdeadmin kuser ksystemlog
-kdenetwork kget krdc kopete kppp
-kdesdk kde-dev-utils kde-dev-scripts
-kdetoys kteatime amor ktux
-kwallet kwalletmanager
-libelf elfutils
-libjpeg libjpeg-turbo
-libxfcegui4 libxfce4ui
-open-cobol gnu-cobol
-pil python-pillow
-qca-cyrus-sasl qca
-qca-gnupg qca
-qca-ossl qca
-EOF
- ;;
- *) cp remove.list $remove_report
- mv candidates.$$ candidates
-esac
+ rm rename.$$
+else
+ cp remove.list $remove_report
+ mv candidates.$$ candidates
+fi
# Disable interrupts during critical section
trap '' HUP INT QUIT ABRT
diff --git a/slackware-upgrade-system.8 b/slackware-upgrade-system.8
index f2e1c88..9facf56 100644
--- a/slackware-upgrade-system.8
+++ b/slackware-upgrade-system.8
@@ -14,7 +14,7 @@
.\" You should have received a copy of the GNU General Public License
.\" along with slackware-upgrade-system. If not, see
.\" <http://www.gnu.org/licenses/>.
-.TH SLACKWARE\-UPGRADE\-SYSTEM 8 "September 19, 2019" "SLACKWARE\-UPGRADE\-SYSTEM" "System Manager's Manual"
+.TH SLACKWARE\-UPGRADE\-SYSTEM 8 "September 20, 2019" "SLACKWARE\-UPGRADE\-SYSTEM" "System Manager's Manual"
.SH NAME
slackware\-upgrade\-system \- do a full upgrade of a Slackware installation
.SH SYNOPSIS
@@ -54,16 +54,27 @@ public key in your keyring. If you don't, run
curl -o - https://www.slackware.com/gpg-key | gpg --import
.EE
.PP
-When this initial check is passed, the program constructs the list
-of currently installed packages and packages available in the
-distribution. The difference between these two sets, i.e. the
-installed packages that have no equivalent in the available set,
-are orphaned packages. These were either removed from the Slackware
-distribution, or replaced with other packages or were installed from
-third-party sources. It is unpredictable whether or not these
-packages will work on the newly upgraded system, therefore they will
-be removed after a successful upgrade. Before proceeding, the
-program will display this list on the screen and save it in file
+When this initial check is passed, the program constructs two lists
+of packages: a list of currently installed packages and a list of
+packages available in the distribution. When constructing the list of
+available packages, known differences between Slackware releases are
+taken into account. For example, consider upgrade from version 14.1 to
+14.2. It is known that the \fIportmap\fR package from 14.1 is
+replaced with the \fIrpcbind\fR in version 14.2. Consequently, if the
+program sees that \fIportmap\fR is installed on the system, it will
+include \fIrpcbind\fR to the list of installation candidates.
+Information about package differences in various versions is kept in
+\fIreplacement map files\fR. See the section \fBREPLACEMENT MAP\fR,
+for a discussion of these files.
+.PP
+The difference between these two lists, is the set of installed
+packages that have no equivalent in the available package list. Those
+are \fIorphaned packages\fR, which were either removed from the Slackware
+distribution, or were installed from third-party sources. It is
+unpredictable whether or not these will work on the newly upgraded
+system, therefore they will be removed after a successful upgrade.
+Before proceeding, the program will display this list on the screen
+and save it in file
.nh
\fB/var/log/slackware-upgrade-system-\fIOLD\fR-\fINEW\fB.removed\fR
.hy
@@ -71,26 +82,32 @@ for your consideration (here, \fIOLD\fR and \fINEW\fR stand for the
current and new Slackware version numbers, correspondingly). After
the upgrade, you can re-install them, if necessary.
.PP
-The script attempts to handle the second case (packages replaced by
-other packages) automatically for upgrades from version 14.1 to 14.2.
-However, it is possible that some of such packages haven't been
-accounted for. If you encounter any, you can install them during the
-upgrade via the \fB\-p\fR option.
-.PP
After this step, the program will print the current Slackware version
and the version you are going to upgrade to, and will ask you to
confirm that you really want to upgrade. This is the right moment to
-quit if you decide that some orphaned packages should be kept anyway.
-If so, type \fBno\fR, and create a \fIkeep-list\fR file, i.e. a file
-containing names of packages that should be retained even though
-orphaned, each name on a separate line. Then re-start the program
-with the \fB\-k\fR option and the name of this file as its argument.
-.PP
-Finally, the actual upgrade begins. By default, the program will
-upgrade only the packages actually installed on your system. You can
-request to install additional series from the distribution with the
-\fB\-s\fR option. E.g., it is often a good idea to install all
-packages from series \fBl\fR, like that:
+quit if you decide to modify program invocation in order to handle
+orphaned packages.
+.PP
+If you do, type \fBno\fR. You have two options. First, if there are
+any orphaned packages that you want to keep in place, create a
+\fIkeep-list\fR file. This file should contain names of those
+packages, each name on a separate line. When you restart the program
+use the \fB\-k \fIFILE\fR\fR option to instruct it to use this file.
+.PP
+Secondly, if you are upgrading to the version for which there is no
+replacement map, there can be replacement packages for some of the
+orphaned ones. You can create a replacement map and save it to
+the \fB/etc/slackware\-upgrade\-system\fR directory (see the section
+\fBREPLACEMENT MAP\fR for details). If you do, please drop me a note
+so that your changes become available for other users (see the
+\fBBUGS\fR section, for contact information). You can also use the
+\fB\-p\fR command line option to provide the names of replacement
+packages from the command line.
+.PP
+By default, the program will upgrade only the packages actually
+installed on your system. You can request to install additional
+series from the distribution with the \fB\-s\fR option. E.g., it is
+often a good idea to install all packages from series \fBl\fR, like that:
.PP
.EX
slackware-upgrade-system \-s l
@@ -166,8 +183,39 @@ Verbosely list each package being upgraded or removed.
.TP
.B \-y
Assume "yes" to all queries.
+.SH REPLACEMENT MAP
+Replacement map files contain names of packages that have been
+replaced with another packages in the new release. They are stored in
+the \fB/etc/slackware\-upgrade\-system\fR directory. Each replacement
+map is named \fIOLD\fB\-\fINEW\fB.repl\fR, where \fIOLD\fR and
+\fINEW\fR are two subsequent versions of Slackware. For example, the
+file \fB/etc/slackware\-upgrade\-system/14.1\-14.2.repl\fR contains
+changes in package names between versions 14.1 and 14.2.
+.PP
+This version of \fBslackware\-upgrade\-system\fR is shipped with two
+replacement maps, for upgrades between 14.0 and 14.1, and between 14.1
+and 14.2.
+.PP
+A replacement map is a plaintext file with each package being described
+on a separate line. Lines consist of two or more columns separated
+with any amount of whitespace. Column one contains the name of the
+package in the version \fIOLD\fR of Slackware. Column two contains
+the name of the corresponding package in Slackware version \fINEW\fR.
+If the package was spli into several packages, additional packages can
+be listed on the same line.
+.PP
+Excessively long lines can be
+split over several physical lines by using the traditional UNIX
+approach: prefix and each line that must be joined with the next one
+with a backslash immediately followed by a newline character.
+.PP
+Comments are introduced with the hash sign (\fB#\fR) and extend to the
+nearest newline character. Empty lines and comments are ignored.
.SH FILES
.TP
+\fB/etc/slackware\-upgrade\-system/\fIOLD\fB\-\fINEW\fB.repl\fR
+Replacement map for upgrades from version \fIOLD\fR to \fINEW\fR.
+.TP
\fB/var/log/slackware\-upgrade\-system\-\fIOLD\fB\-\fINEW\fB.log\fR
Detailed log of operations performed during the upgrade from version
\fIOLD\fR to \fINEW\fR.

Return to:

Send suggestions and report system problems to the System administrator.