1. Introduction |
2. Requirements |
3. Installation |
4. Configuration files |
5. Preventing concurrent execution |
6. Preventing accidental system breakage |
7. Obtaining help |
8.Using multilibpkg |
Introduction
multilibpkg is an automated tool for managing (installing, upgrading, and, uninstalling) of 64-bit part of alienBOB's multilib for slackware-64.
The 64-bit part of the multilib is a subset of packages which allows to turn a pure 64-bit slackware-64 into a multilib slackware-64. This subset is provided by multilib's version of packages glibc-solibs, glibc, glibc-i18n, glibc-profile, glibc-zoneinfo, gcc, gcc-g++, gcc-gfortran, gcc-gnat, gcc-java, gcc-obj, and, by the additional package compat32-tools which provides tools related to 32-bit compatibility layer.
As multilibpkg is dedicated to the management of 64-bit part of the multilib, it cannot be used to manage the 32-bit part, ie the 32-bit compatibility layer. For that, users may use its little brother, compat32pkg.
multilibpkg provides the following features:
- Downloading, from a given multilib mirror, of packages that provide the 64-bit part of the multilib, and installs them.
- Checking, from a given multilib mirror, of available updates for installed 64-bit part of the multilib.
- Enumerating of available updates, on a given multilib mirror, for installed 64-bit part of the multilib.
- Upgrading of the 64-bit part of the multilib according to the available updates on a given multilib mirror.
- Uninstalling of 64-bit part of the multilib.
Requirements
multilibpkg requires :
- To be installed on a 64-bit version of Slackware. Even if there's currently no multilib for Slackware S/390, support for this port has been integrated into multilibpkg, and this should work, I hope, flawlessly when time comes ...
- User to be root.
- Availability of the following commands:
commands | packages |
---|---|
cat,cp,cut,id,md5sum,printf,rm,sleep,sort,tee,tr,uname,wc,who | a/coreutils |
awk | a/gawk |
find | a/findutils |
gpg | n/gnupg |
grep | a/grep |
lftp | n/lftp |
ping or resolveip | a/iputils or ap/mysql |
rev | a/util-linux-ng |
sed | a/sed |
tempfile | a/bin |
removepkg,upgradepkg | a/pkgtools |
wget | a/wget |
which | a/which |
Installation
The best way to do that is to grab the Slackware-64 package here and install it like any other slackware package:
Configuration files
The Configuration script: /etc/multilibpkg/multilibpkg.conf
This script contains the following variables that users can overwrite when needed.
WORKDIR
This is required and must refer to the working directory used by multilibpkg to store its working data.
By default, WORKDIR is set to /var/lib/multilibpkg. As data stored into this directory are not re-used, it can be cleaned at any time, except, obviously, while running of multilibpkg.
MULTILIBPKG_CACHE
This is required and must refer to the directory used to store packages downloaded from multilib mirrors and from slackware-64 mirrors.
By default, MULTILIBPKG_CACHE is set to /var/cache/multilibpkg. To avoid waste of disk space, this directory could be cleaned from time to time. This could be automated by executing multilibpkg in mode --clear-cache :
$ multilibpkg --clear-cache
DEFAULT_ML64_MIRROR
This is optional. When defined, it must refer to the multilib mirror that will be used by --install, --check-updates, --list-updates, and --upgrade when user does not provide one on the command line. By default, DEFAULT_ML64_MIRROR is set to "". When defined, its value can be :
-
A local directory containing a valid multilib tree. In this case, the directory
could contain only part of official multilib tree (ex: without the directories
not related to the installed version of Slackware-64 like 'current', nor the
'source' directory and directories related to packages to format compat32) :
DEFAULT_ML64_MIRROR=~/mirrors/~alien/multilib/13.1
- The URL of an official multilib mirror :
DEFAULT_ML64_MIRROR=http://connie.slackware.com/~alien/multilib/13.0
- The key (or alias), introduced by an "at symbol", of one of the mirrors given
into the file /etc/multilibpkg/multilib-mirrors :
DEFAULT_ML64_MIRROR=@Official-13.1
MULTILIB64_PACKAGES
This is required. This is an array containing the packages (their basenames) which provide the 64-bit part of the multilib.
MULTILIB64_SIGNATURES
This is required. It defines the signatures, as an array of regular-expressions, of the field build of packages which provide the 64-bit part of the multilib.
These signatures are used in conjunction with MULTILIB64_PACKAGES to identify :
- The packages of the '64-bit part of the multilib' onto the selected multilib mirror.
- The packages of the '64-bit part of the multilib' installed onto the local system.
BLACKLIST
This is optional. When defined, this must be an array containing the basename of multilib packages to blacklist, which must not be installed.
For instance, to avoid installation of multilib version of gcc and glibc-zoneinfo packages, this variable must be declared as below :
BLACKLIST=( "gcc" "glibc-zoneinfo" )
To avoid installation of multilib version of all gcc packages, this variable must be declared as below :
BLACKLIST=( "gcc.*" )
SLACK64_PRECEDENCE_ORDER
This is required. It is an array containing the packages precedence order, from the most important to the least important, given by patterns of kind baseref.
The order given in this array is used to resolve conflicts between packages and more precisely to give the priority to the more recent packages from a Slackware-64 mirror when running multilibpkg in mode --uninstall.
With default configuration, user has guarantee that uninstall of 64-bit part of the multilib will imply installation of the latest (or more up to date) version of glibc (for example) available onto the Slackware-64 mirror given in argument of parameter --uninstall.
PACKAGES_INSTALL_ORDER
This is required. It defines the install order of the packages. This order is given into an array containing patterns of kind basename.
PACKAGE_INSTALL_ORDER is applied in all cases: when installing the multilib, when enumerating available updates, when upgrading the multilib, and, when uninstalling the multilib. In this last case, the order is applied to the 64-bit pure packages which supersede the installed multilib packages.
With default configuration, user has guarantee that packages and updates will be installed in the right order, which means that glibc-solibs will be always installed first.
PACKAGE_INTEGRITY_CHECK
This is required. It defines whether integrity of packages downloaded from mirrors must or not being checked. By default, the integrity checking is enabled.
PACKAGE_INTEGRITY_CHECK can be set to $TRUE (integrity checking enabled), or, to $FALSE (integrity checking disabled).
When enabled, integrity checking mechanism requires availability of the commands gpg and md5sum onto the local system.
PREVENT_SYSTEM_BREAKAGE
This is required. It allows to enable or disable the mechanism of preventing accidental system breakage. By default, this mechanism is enabled.
PREVENT_SYSTEM_BREAKAGE can be set to $TRUE (mechanism enabled), or, to $FALSE (mechanism disabled).
When enabled, this mechanism is able to preventing install of packages which could lead to system breakage.
Look at the section Preventing accidental system breakage to learn more about this mechanism.
RUNLEVEL_RULE
This is required. It defines what multilibpkg must do when in mode --install, --upgrade, --uninstall, while the system is not in run level 1. By default, RUNLEVEL_RULE is set to ASK.
Running multilibpkg in run-level 1 is not strictly required as explained in Installing of 64-bit part of the multilib.
RUNLEVEL_RULE can be set to one of the following values :
NONE | multilibpkg will continue whatever the current run level is. |
WARN:<duration> | multilibpkg will warn the user and pauses execution for the given amount of time (in seconds). For example, WARN:30 will imply a warn followed by a pause of 30 seconds. when duration is not specified or invalid, the pause will be 15 seconds long. |
ASK | multilibpkg will warn the user, and prompts him to confirm continuation of the process. If continuation is dismissed, multilibpkg is terminated with 99 as exit code. |
ERROR | multilibpkg will throw an error and is terminated with 1 as exit code. |
RUNLEVEL_RULE is not applied when mode download-only or dry-run is used in conjunction with --install, --upgrade, --uninstall.
DEVELOPER SECTION
This section is reserved to the developers and is never executed in the case of stable releases. Users have not to worry about this section, and its removal will have no consequence.
The file of multilib mirrors : /etc/multilibpkg/multilib-mirrors
This file is required but its usage is optional and always implicit. It contains the list of multilib mirrors and their aliases. It consists in a set of entries that rely on the syntax below:
mirror-entry ::= <key> = <mirror-addr>
key ::= STRING
mirror-addr ::= <local-directory>url>
For example, if you look at the content of this file, you will find declarations like as below :
snippets of multilib-mirror's file |
---|
|
The entries with the keys Official-13.0, Official-13.1 and Official-current respectively refer to the mirrors of 64-bit part of the multilib for Slackware-64 13.0, 13.1 and current.
Each of the mirrors from this file can be defined as the default mirror for multilibpkg, or, explicitly passed to multilibpkg using their aliases introduced by an at symbol :
-
To defines the mirror bound to the key Official-13.1 the
default mirror, the variable DEFAULT_ML64_MIRROR in configuration
script /etc/multilibpkg/multilibpkg.conf should be declared as
below:
DEFAULT_ML64_MIRROR=@Official-13.1
-
To select the mirror bound to the key Official-13.0 using the
command line, simply pass this key, introduced by an at symbol,
as argument to the parameter --mirror :
$ multilibpkg --mirror @Official-13.0 ...
The file of slackware64 mirrors : /etc/multilibpkg/slackware64-mirrors
This file is required but its usage is optional and always implicit. It contains the list of slackware-64 mirrors and their aliases.
A Slackware-64 mirror is required only when uninstalling of 64-bit part of the multilib.
This files uses the same syntax as the file of multilib mirrors. Its content looks like this :
snippets of slackware64-mirror's file |
---|
|
Each of the Slackware-64 mirrors in this file can be explicitly passed in argument to --uninstall using their aliases introduced by an at symbol, like in the example below :
$ multilibpkg --uninstall @WorldWide-13.1 ...
The logfile : /var/log/multilibpkg.log
This file is used by multilibpkg to log all of its activity. As this file could take more disk space over time, it has to be reset from time to time by executing multilibpkg as below :
$ multilibpkg --reset-log
Preventing concurrent execution
Only one instance of multilibpkg can be run at a time. To achieve this, multilibpkg uses a simple lock mechanism based on the file /var/lock/multilibpkg.lock. In case of freeze of this mechanism (due to a power outage for example), this file should be deleted manually to unlock execution of multilibpkg.
Preventing accidental system breakage
This mechanism has been designed to preventing install of packages which could lead to system breakage.
The activation and deactivation of this mechanism is controlled by the variable PREVENT_SYSTEM_BREAKAGE in configuration's script /etc/multilibpkg/multilibpkg.conf. By default, this mechanism is enabled. To disable it, the variable PREVENT_SYSTEM_BREAKAGE must simply be set to $FALSE as below :
PREVENT_SYSTEM_BREAKAGE=@$FALSE
The preventing is done by :
- Checking consistency (at architecture and version level), between the selected multilib mirror and the installed version of Slackware when multilibpkg is in mode --install, --check-updates, --list-updates, --upgrade.
- Checking consistency (at architecture and version level), between the selected slackware mirror, and, the installed Slackware when multilibpkg is in mode --uninstall.
In case of inconsistency, this could imply one of the following :
-
multilibpkg is terminated with exit-code 1.
For example, in case of uninstalling the 64-bit part of the multilib using a Slackware mirror which relates to a Slackware version incompatible at architecture level with installed one:
-
The user is warned and execution of multilibpkg is paused for 5 seconds.
- In case of looking updates onto a multilib mirror which relates to a multilib dedicated to a version of slackware newer (or older) than the installed one:
- When checking for updates for the 64-bit part of the multilib using a mirror which relates to the multilib dedicated to the development version of slackware (ie current) :
-
The user is warned, and, prompted to explicitly confirm continuation of the process. When continuation is dismissed, multilibpkg is terminated with 99 as exit code.
- In case of upgrading the installed 64-bit part of the multilib using a mirror which relates to a multilib dedicated to a version of slackware newer (or older) than the installed one.
- In case of uninstalling the 64-bit part of the multilib using a mirror which relates to a newer, or older, version of slackware than the installed one.
Obtaining help
multilibpkg provides two kinds of help: summary and complete. The first is displayed by default when executing multilibpkg without argument, like below:
Using multilibpkg
Installing of 64-bit part of the multilib
This is done by using multilibpkg in mode --install. As this mode needs a source to get the packages, a multilib mirror should be supplied in argument of parameter --mirror unless a default multilib mirror is provided into the configuration script /etc/multilibpkg/multilibpkg.conf :
$ multilibpkg --mirror @Official-13.0 --install
$ multilibpkg --install
Multilibpkg stores the packages downloaded from the selected mirror into the directory pointed by MULTILIBPKG_CACHE, which is defined into configuration's script /etc/multilibpkg/multilibpkg.conf.
By default, when multilibpkg is in mode --install while the system is not in run level 1, the user is warned and prompt to confirm continuation of the process:
The reason of this behave relates to the fact that installing of 64-bit part of the multilib is a process that changes some critical components (ie glibc) of the system, what should usually be done in run level 1.
Note that this is not strictly required from being into run level 1 to install the 64-bit part of the multilib, nor to upgrade it or to uninstall it.
From all tests done into run level 3, none of them has led to a system breakage. There's only one thing which revealed a problem:
Installing the 64-bit part of the multilib, while the 32-bit part and others 32-bit software were already installed. This led to a display problem into firefox-32, which was resolved by running of /usr/bin/update-pango-querymodules manually, and which would have been automatically resolved the next boot. Moreover, this problem is not fully related to the installation of 64-bit part of the multilib as it can be observed when the 32-bit part of the multilib and firefox-32 are installed at the same time, without doing a reboot before install of firefox.
User can change how multilibpkg should behave when the system is not in runlevel 1 by modifying the variable RUNLEVEL_RULE into the configuration script /etc/multilibpkg/multilibpkg.conf. Possible value are: NONE, WARN:<duration>, ASK (the default), and ERROR. To learn more about this, read this.
Unless to use a local mirror, multilibpkg requires network access. Therefore, running of multilibpkg in run-level 1, implies that /etc/rc.d/rc.inet1 will have to be started manually :Optionally, --install can be run in mode download only or dry-run using the optional arguments --download-only (-y), --dry-run (-r) :
$ multilibpkg --mirror @Official-13.1 --install --download-only
$ multilibpkg --mirror @Official-current --install --dry-run
When in mode --download-only, --install only downloads packages :
when in mode --dry-run, --install download packages, and simulates their installation only :
Check available updates of 64-bit part of the multilib
This is done by using multilibpkg in mode --check-updates. As this mode needs a source to search updates, a multilib mirror should be supplied in argument of parameter --mirror unless a default multilib mirror is provided into the configuration script /etc/multilibpkg/multilibpkg.conf.
$ multilibpkg --mirror @Official-13.0 --check-updates
$ multilibpkg --check-updates
When updates were found, multilibpkg terminates with 0 as exit code, otherwise it terminates with 100 as exit code.
Running multilibpkg in mode --check-updates while the 64-bit part of the multilib is not installed will imply multilibpkg to throw an error and terminates with 101 as exit code :
Enumerate available updates of 64-bit part of the multilib
This works like for checking updates unlike that the parameter --list-updates has to be used instead of --check-updates.
$ multilibpkg --mirror @Official-13.0 --list-updates
$ multilibpkg --list-updates
Like for --check-updates, running multilibpkg in mode --list-updates while the 64-bit part of the multilib is not installed will imply multilibpkg to throw an error and terminates with 101 as exit code.
When in mode --list-updates, multilibpkg terminates with 0 as exit code, even when no updates were found.
Upgrading of 64-bit part of the multilib
This is done by using multilibpkg in mode --upgrade. As this mode needs a source to search updates, a multilib mirror should be supplied in argument of parameter --mirror unless a default multilib mirror is provided into the configuration script /etc/multilibpkg/multilibpkg.conf.
$ multilibpkg --mirror @Official-13.1 --upgrade
$ multilibpkg --upgrade
By default, when multilibpkg is in mode --upgrade, while the system is not in run level 1, the user is warned and prompt to confirm continuation of the process. This is the same as for --install, and, obviously, what was said for --install applies for --upgrade.
Like for --check-updates and --list-updates, running multilibpkg in mode --upgrade while the 64-bit part of the multilib is not installed will imply multilibpkg to throw an error and terminates with 101 as exit code.
Similarly to --install, --upgrade can be optionally run in mode download-only or dry-run, using the optional arguments --download-only (-y), --dry-run :
$ multilibpkg --mirror @Official-13.1 --upgrade --download-only
$ multilibpkg --mirror @Official-current --upgrade --dry-run
Uninstalling of 64-bit part of the multilib
This is done by using multilibpkg in mode --uninstall. Uninstalling of 64-bit part of the multilb is a two step process :
- Installed packages of the 64-bit part of the multilib are superseded by their 64-bit pure counterpart available onto the selected Slackware-64 mirror.
- Installed packages of the 64-bit part of the multilib which have no 64-bit pure counterpart are removed.
To achieve this, a Slackware-64 mirror must be supplied in argument of --uninstall. This could :
- A local directory containing a valid Slackware-64 tree
- The URL of an official Slackware-64 mirror
- The key, introduced by an at symbol (ie: character '@'), of one of the Slackware-64 mirrors given into /etc/multilibpkg/slackware64-mirrors
$ multilibpkg --uninstall ftp://ftp.chg.ru/pub/Linux/Slackware/slackware64-13.1
$ multilibpkg --uninstall @WorldWide-13.1
Like for --check-updates, --list-updates and --upgrade, running multilibpkg in mode --uninstall while the 64-bit part of the multilib is not installed will imply multilibpkg to throw an error and terminates with 101 as exit code.
By default, when multilibpkg is in mode --uninstall, while the system is not in run level 1, the user is warned and prompt to confirm continuation of the process. This is the same as for --install, and, obviously, what was said for --install applies for --uninstall".
Like to --install and --upgrade, --uninstall can be optionally run in mode download-only or -run the optional arguments --download-only (-y), --dry-run (-r) :
$ multilibpkg --uninstall @France-13.1 --download-only
$ multilibpkg --uninstall @UK-current --dry-run
Running --uninstall in mode download-only only implies download of packages from the selected mirror. In the case of dry-run, the packages from selected mirror are downloaded, and, their installation as the removal of un-necessary packages will be simulated only.
As defined at start of this section, uninstall of the 64-bit part of the multilib is a two step process which is as below :
The uninstall of 64-bit part of the multilib without removing the 32-bit part, will imply the following error messages on next boot.
Updating gtk.immodules for x86_64-slackware-linux:
/usr/bin/gtk-query-immodules-2.0-64 \
> /etc/gtk-2.0/x86_64-slackware-linux/gtk.immodules
Updating gtk.immodules for i486-slackware-linux:
/usr/bin/gtk-query-immodules-2.0-32 \
> /etc/gtk-2.0/i486-slackware-linux/gtk.immodules
/usr/bin/update-gtk-immodules: line 56: /usr/bin/gtk-query-immodules-2.0-32: No such file or directory
Updating gdk.pixbuf.loaders for x86_64-slackware-linux:
/usr/bin/gdk-pixbuf-query-loaders-64 \
> /etc/gtk-2.0/x86_64-slackware-linux/gdk-pixbuf.loaders
Updating gdk.pixbuf.loaders for i486-slackware-linux:
/usr/bin/gdk-pixbuf-query-loaders-32 \
> /etc/gtk-2.0/i486-slackware-linux/gdk-pixbuf.loaders
/usr/bin/update-gdk-pixbuf-loaders: line 56: /usr/bin/gdk-pixbuf-query-loaders-32: No such file or directory
Updating pango.modules for x86_64-slackware-linux:
/usr/bin/pango-querymodules-64\
> /etc/pango/x86_64-slackware-linux/pango.modules
Updating pango.modules for i486-slackware-linux:
/usr/bin/pango-querymodules-32\
> /etc/pango/i486-slackware-linux/pango.modules
/usr/bin/update-pango-querymodules: line 55: /usr/bin/pango-querymodules-32: No such file or directory
To get rid of this, simply remove the 32-bit part of the multilib using compat32pkg or something else :
$ compat32pkg --remove layer-32
Clearing the cache(s)
As shown here, the directory used to store downloaded packages has to be cleaned from time to time. This could be easily automated by using multilibpkg in mode --clear-cache.
Resetting the logfile
As said here, the logfile used by multilibpkg to log its activity can be reset using the mode --reset-log.