I've always had trouble keeping clear records of what custom software I have installed from what yum repository, leaving me sometimes in trouble managing my updates.
I was
recently working on a problem involving a custom repo, and got the following suggestion:
Instead of listing what you exclude, it might be better to use:
IncludePkgs pcre
...so you don't inadvertently install something else from that repo
and
status enabled
...so you get notified of updates/fixes.
This solution solves the problem of keeping my custom software updated, but makes it hard to install anything else from the same repo, as there is no command-line option for yum to ignore the 'IncludePkgs' directive.
This started me thinking about what it would take to both allow future installs and provide automatic update notifications for packages installed from custom repos.
I've come up with a proposed solution:
- Modify the standard custom repo configuration instructions to create two entries for each repo:
- one for installing new software
- status = 'disabled'
- using 'Exclude' to keep your SME safe)
- another for monitoring updates to installed software
- named <reponame>-installed
- status = 'enabled'
- using 'IncludePkgs' to list include what you've installed from that repo
- starting with 'IncludePkgs = -none-' to avoid unexpected updates
- Update wiki instructions to tell users how to keep the <repo>-installed settings up-to-date
Under this scenario, we would edit the repo setup instructions for all repos. As an example, the instructions to setup the dag repository on SME 8b6 would look like this:
/sbin/e-smith/db yum_repositories set dag repository \
Name 'Dag - EL5' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled
/sbin/e-smith/db yum_repositories set dag-installed repository \
Name 'Dag - EL5 - Installed Packages' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
IncludePkgs '-none-' \
status enabled
And wiki pages instructing users to install software from a custom repo would include instructions on updating the setting for 'IncludePkgs' for <repo>-installed:
db yum_repositories setprop dag-installed IncludePkgs "`db yum_repositories getprop dag-installed IncludePkgs` <newpkg>"
Pros:
- Custom-installed packages will be included in update checks
- If 'IncludePkgs' is always updated, admins will always have a record of what they have installed from what repo
- works exactly like the current situation if admins choose *not* to update 'InstallPkgs'
- Updates are as simple as 'yum update'
Cons:
- Requires an extra step after each install, to keep 'InstallPkgs' up-to-date
- ???
Comments?