In order to produce a quality Gnu/Linux distribution based on RPM, you need some tools which will facilitate the maintainance of the RPM packages you are maintainer of. This is the aim of `rpmmon'.

For that purpose, the first task performed by rpmmon is to monitor what has been announced on Freshmeat, and try to guess if the package in the distro you're developing is older.

Later on, this tool has grown to support additional features:

Short tutorial

`rpmmon' is a Perl script you will run on your command-line. You may get the latest version here.

Ok, once installed on your system, try to run it:

[gc@bi ~] rpmmon.pl
<rpmmon> v0.4.0 helps you build better RPMs.

By Guillaume Cottenceau <gc at mandrakesoft dot com>.
Copyright (c) 2000-2001 by MandrakeSoft.
This is free software under the GPL License.

Usage: rpmmon <mode> [options]
  -c            check
  -l <who>      lint
  -b <who>      build
  -a            all
  -m <mount_point>      mountpoint
  -p <package_name>     package maintainer
  -q <who>      query
  -Q <who>      Query
  -M            maintainers
  -u            unmaintained
  -t <url_maints>               maints source
  -v            version
  -h            help
  -s            source
  -i            info
  -V            verbose
  -r <rc_file>  use an alternate rc file

<<< Use option -h for more details. >>>

Of course, you will want to run the -c option to perform the check.

[gc@bi ~] rpmmon.pl -c
First, you need to define one mount point for your Development branch.
This is the directory where the hottest RPM's of your distrib sit, on
your local system (called Cooker in Mandrake, Rawhide in RedHat). It must
be a local filesystem. (therefore, it can be NFS, for example)

Use option -m <mount-point>.

That's only needed one time per mountpoint, and allows to specify
multiple mountpoints (for example if you want to add contrib).

Exiting on failure.

As explained, you need to indicate to the program where it can find the RPM's. This is where the files will be found later on, to perform the lint or other operations. Let's try to give it our local mirror of Rawhide, the development version of RedHat Linux, with the option `-m'.

[gc@bi ~] rpmmon.pl -m /rawhide/RPMS/
Adding mount-point in rcfile being: '/rawhide/RPMS/' (if not duplicate)
You know have:
Opening directory /rawhide/RPMS to get the packages filenames...found 992 files.
[gc@bi ~] rpmmon.pl -c
No package to mon. You should use option '-b' to build the database.
Exiting on failure.

This has been saved in the rcfile, ~/.rpmmonrc.

Note that you may have multiple mount points, that's why it showed you the list of the set up mount-points. This is useful if you have several directories containing the RPM's, for example the "main" location, and the "contrib" (or "powertools") location.

As explained again, you still lack the database; this database will make the correspondance between each package name and the relevant Freshmeat project page. You can enter it manually, but of course this wouldn't be fun if our script would not try to be clever and save us some time. Hence the `-b' option.

[gc@bi ~] rpmmon.pl -b gc
Packages for gc are:

Contacting host freshmeat.net several times to find entries in their database.

package `libclanlib0-gl'
       -- 0 projects found --

package `mkinitrd'
       -- 0 projects found --

package `nil'
  Directly exists as /projects/nil

package `gtktalog'
  Directly exists as /projects/gtktalog

package `SimGear-devel'
       -- 0 projects found --

package `gnuplot'
  Directly exists as /projects/gnuplot

package `penguin-command'
       -- 0 projects found --


I voluntarily shortened up the list shown upper; but it may be a bit long if you're maintainer of a large bunch of packages. Of course, the script will fail on packages that are not listed on freshmeat, or when the names are too different. In such a case, you may edit by hand the ~/.rpmmonrc file to add the missing locations, if you wish.

Let's note that the default location to grab the correspondance between you and the packages you're responsible for, is the world-wide encrypted URL giving package maintainers for the Mandrake Linux distribution. You may change it (it will be saved as well, inside the rcfile, of course) with the -t option:

[gc@bi ~] rpmmon.pl -t /tmp/maints.list
Setting the source for maintainers elsewhere. You can provide
a normal URL (http://..), an encrypted URL (https://..), or a
local file. You're going to set it up to:

This file must contain lines matching:

For example:

telnet  john@distro.com
kernel  smith@distro.com

[gc@bi ~] cat /tmp/maints.list 
transfig  gc@mandrakesoft.com
hdparm    gc@mandrakesoft.com
kernel    hacker@mandrakesoft.com

This is the perfect moment to introduce the `-q' and `-Q' options, which allow to query the packages one is responsible for. The first one is the short version, the second one prints the version and release as well.

[gc@bi ~] rpmmon.pl -q gc
[gc@bi ~] rpmmon.pl -Q gc

Ok, now that we're set up with the database, let's retry again to run the check against latest versions published on Freshmeat (I reverted the list of maintainers to the whole one, not the one illustrating the `-t' option):

[gc@bi ~] rpmmon.pl -c
Maintainer   Package             Our-version Frsh-version

<gc>         SysVinit                   2.78         2.79
<gc>         python                    1.5.2          2.1
<gc>         dmalloc                   4.8.1        4.8.2
<gc>         gkrellm                   1.0.8        1.2.0

This presents you all the packages for which Freshmeat got an announce for newer packages that what you currently have in your distro.

The first column, Maintainer, will become particularly useful when you set up a database for your whole company; this is the usefulness of the `-a' option, which builds the database for everyone; of course, this may last one hour or around, depending on the quickness of Freshmeat and the quality of your Internet connectivity.

[gc@bi ~] rpmmon.pl -a

Contacting host freshmeat.net several times to find entries in their database.

package `Xdialog'
  Directly exists as /projects/Xdialog

package `lm_sensors-devel'
       -- 0 projects found --

package `lout-doc'
       -- 0 projects found --

package `SDL11'
       -- 0 projects found --

package `wu-ftpd'
  Directly exists as /projects/wu-ftpd

package `gmp-devel'
       -- 0 projects found --

package `librep'
  Directly exists as /projects/librep

package `mod_dav'
  Directly exists as /projects/mod_dav


The `-l' functionality, as described, will run rpmlint on all the packages one is responsible for. We can expect many errors since rpmlint is tuned to tightly fit our distrib's policy, and since I chose to use the packages in Rawhide rather than at Mandrake's, it will generate many irrelevant errors:

[gc@bi ~] rpmmon.pl -l gc
W: hdparm invalid-vendor Red Hat, Inc.
W: hdparm invalid-distribution Red Hat Linux
W: hdparm manpage-not-bzipped /usr/share/man/man8/hdparm.8.gz
W: hdparm invalid-packager Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
W: hdparm not-standard-release-extension 2
W: hdparm non-standard-group Applications/System
W: hdparm no-version-in-last-changelog
W: transfig invalid-vendor Red Hat, Inc.
W: transfig invalid-distribution Red Hat Linux
W: transfig manpage-not-bzipped /usr/X11R6/man/man1/fig2dev.1x.gz
W: transfig manpage-not-bzipped /usr/X11R6/man/man1/fig2ps2tex.1x.gz
W: transfig manpage-not-bzipped /usr/X11R6/man/man1/pic2tpic.1x.gz
W: transfig manpage-not-bzipped /usr/X11R6/man/man1/transfig.1x.gz
W: transfig invalid-packager Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
W: transfig not-standard-release-extension 2
W: transfig non-standard-group Applications/Multimedia
W: transfig no-version-in-last-changelog
W: transfig invalid-license distributable

The `-p' functionality is maybe the most useful mode of rpmmon. It can print out who's maintainer of this package you just found a small bug in, or for which you found a interesting patch or plugin somewhere, etc. All the cases for which you're willing to drop quickly a mail to the maintainer of the package. It supports multiple files in a given query (comma-separated, mandatory), and let's also illustrate the `-V' option that asks for more verbose output. As we're all fond of shell completion, this option also understands packages designated with their filenames, because extensively typing at keyboard something like "xmms-more-vis-plugins-unsafe" is a pain.

[gc@bi ~] rpmmon.pl -p kdebase
[gc@bi ~] rpmmon.pl -p emacs
[gc@bi ~] rpmmon.pl -p icewm,kdelibs,modutils
[gc@bi ~] rpmmon.pl -p icewm,kdelibs,modutils -V
Getting information about packages from: https://qa.mandrakesoft.com/cgi-bin/maints.cgi
Found maintainers for 3132 different packages.
icewm: florin
kdelibs: daouda
modutils: chmouel
[gc@bi ~] rpmmon.pl -p /RPMS/xmms-more-vis-plugins-unsafe-1.4.0-2mdk.i586.rpm 
[gc@bi ~] rpmmon.pl -p /rawhide/RPMS/octave-2.1.34-3.i386.rpm 


Guillaume Cottenceau (for MandrakeSoft)


Copyright 2000-2001 MandrakeSoft.

Licensed under the Gnu GPL. In other words, that's free software, of course.


Last updated: Fri Aug 10 15:37:08 2001
Valid XHTML 1.0!