Using Meta Packages to Install Groups of Packages
Meta packages are "empty" packages, that either require or obsolete other packages or provide programs or files
to fix broken dependencies. For example one of the Lineox Application Server packages requires "//usr/bin/perl"
(note the double slash) and to fix that, Lineox has updated the meta package used to fix older dependency problems.
Meta packages are an easy solution to install a large number of packages that are related, but do not
have inter-dependencies that would draw the others, if one of them is installed.
Note:
Initially we called these virtual packages, but in Debian speak the term meta package has already been established.
We are sorry, but we are not Debian experts. :-)
Pros and cons of meta packages
Meta packages are handy if you use apt-get, synaptic, or yum as your package manager.
Because Lineox has apt-get and synaptic as preferred package managers, we assume that
you already are familiar with yum, if you want to use it.
If you wish to install a large group of packages and have a meta package which
requires them, these package managers install all the required packages automatically.
One benefit which is not so apparent is the integrity of the managed packages. Apt-get
refuses to install new packages if some of the installed packages have unmet dependencies.
Consider the case of "//usr/bin/perl" requirement in Lineox Application Server package
puretls-demo. It can be installed, if you update the meta package virtdeps.
puretls-demo in the first version of Lineox Application Server was broken and using
"meta provide" was an easy way to fix this broken package without re-building it.
Meta packages can be used also to remove a group of packages, but Lineox has not yet
made such packages. The meta packages used to install a group of packages can't be
used to remove them. If there is enough demand
and meta packages prove to be popular, Lineox will make more of them and also for
package group removal.
The greatest downside to meta packages is that you can't exclude certain required packages -
it is all or nothing.
You might think that another downside would be that the meta packages would be left
in the system, but Lineox makes them so that they are uninstalled automatically right
after they are installed. They just do their job and are gone.
This "magic" is achieved quite simply by adding a %post script to the spec file
which defines the rpm package:
%install
%post
# remove self after required packages are pulled.
rpm -e %{name}
%files
Why Meta Packages?
Meta packages have been used in Debian, from which apt-get originates, so the idea is not new.
The immediate reason Lineox decided to use meta packages as a way to install Lineox Application Server
is that many of the packages broke if they were added to Always Current Lineox Enterprise Linux.
The installation environment of Lineox Enterprise Linux contains only a small subset of programs in the
installed system and those packages required some programs which were missing from the installation environment.
So meta packages solved a problem and offered an easy way to install the 244 packages contained in the
Lineox Application Server and Developer Suite update with only 11 meta packages.
There are also advantages in not including all the packages in the base distribution.
Not all the users wish to install all the packages, so Lineox and users can save bandwidth,
when the distribution is made more modular in this way. Lineox might even make in the future
a slimmed down version
of Always Current Lineox Enterprise Linux disks and the rest would be installed with the help of
meta packages, if the user wishes and only the ones he/she wishes.
Lineox also wishes to get feedback and to get our users accustomed to using meta packages.
Often even great ideas and enhancements take time to get known and used widely. So the sooner
Lineox began to use them, the sooner they can get acceptance.
Using Meta Packages
Before you can access the meta packages in the following examples, you must get a user
account from Lineox. The instructions are on the page
Lineox Enterprise Linux 3.0 updates.
We use Lineox Application Server and Developer Suite update as examples. First the command line version.
To install all Lineox Application Server packages, issue commands:
[root@rk7 root]# apt-get update
(output not shown)
[root@rk7 root]# apt-get install ^LAS
Reading Package Lists... Done
Building Dependency Tree... Done
Selecting LAS-Tomcat for '^LAS'
Selecting LAS-JOnAS for '^LAS'
Selecting LAS-Documentation for '^LAS'
Selecting LAS-Client for '^LAS'
Selecting LAS-CP for '^LAS'
Selecting LAS-Examples for '^LAS'
The following extra packages will be installed:
LAS-CP LAS-Client LAS-Documentation LAS-Examples LAS-JOnAS LAS-Tomcat
The following NEW packages will be installed:
LAS-CP LAS-Client LAS-Documentation LAS-Examples LAS-JOnAS LAS-Tomcat
0 upgraded, 6 newly installed, 0 removed and 0 not upgraded.
Need to get 0B/14.0kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue? [Y/n]
Note that in this case all the Lineox Application Server packages were already installed and
the output would be much longer if they weren't. The command "apt-get update" is not necessary,
if you have recently given it and you have a fresh database of available packages.
The command for installing Developer Suite update is:
[root@rk7 root]# apt-get install ^LDS
Reading Package Lists... Done
Building Dependency Tree... Done
Selecting LDS-CDT for '^LDS'
Selecting LDS-ChangeLog for '^LDS'
Selecting LDS-Eclipse for '^LDS'
Selecting LDS-Lomboz for '^LDS'
Selecting LDS-OProfile for '^LDS'
The following extra packages will be installed:
LDS-CDT LDS-ChangeLog LDS-Eclipse LDS-Lomboz LDS-OProfile
The following NEW packages will be installed:
LDS-CDT LDS-ChangeLog LDS-Eclipse LDS-Lomboz LDS-OProfile
0 upgraded, 5 newly installed, 0 removed and 0 not upgraded.
Need to get 0B/7959B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue? [Y/n]
Using synaptic is more intuitive. Lets first look at a picture.
If you can't find the two meta groups lines, click at the Refresh button and they should
soon appear.
To install groups, select the meta packages you want and click at the Install button and then at the
Apply button.
How meta packages are made
Take a look at the spec file of LAS-Tomcat package.
You can use it as a template to make your own meta group packages. To remove
packages, use Conflicts: instead of Requires:. Build as usual with "rpmbuild -ba <spec_file>".
Future directions, feedback
Making meta packages to remove a group of packages is very easy, because all the needed
information is already in a meta package which installs that group. Lineox will however
wait a while for user input. It might be confusing if installing some package actually only
removes some other packages.
An interesting concept Lineox is considering is making a slimmed down version of
Always Current Lineox Enterprise Linux. It would contain for example the packages
that are in the default workstation installation. The objective would be to have
enough for starting synaptic and configuring the system to have Internet access. The
user could then install more packages and package groups with synaptic. This slimmed down
version might fit to one CD image.
Please join and write to
Lineox Enterprise Linux 3.0 user discussion mailing list
if you have thoughts or opionions about meta packages and how Lineox should use them.
|