Re: Install of all packages

Hunter Matthews <[email protected]>
Newsgroups gmane.network.up2date.current.devel
Message-ID <[email protected]>
On Wed, 2002-07-17 at 05:28, John HEARNS wrote:
> Dear All,
> me again. Sorry - you must be sick of my questions!
> 
> Here is a snippet of my current.conf
> 
> [CERNCC]
> label = CERN-CC
> name = CERN Computer Centre addons
> parent_channel = 
> arch = i386
> os_release = 7.2
> description = RPMs which FIO group make to add to interactive and batch
> machines
> 
> rpm_dirs = /afs/cern.ch/project/linux/redhat/pro/addon/cc/RPMS/i386
>            /afs/cern.ch/project/linux/redhat/pro/addon/cc/RPMS/noarch
> 
> xrpm_dirs = 
> src_dirs = 
> db_dir = /var/current/redhat-7.2/CERN-CC/current
> 
> 
> 
> My aim is that when we create new, extra packages for our machines that
> these will be automatically installed when up2date is run on the
> clients.
> I think I got some fundamentals of the up2date mechanism mixed up.
> 
> Say I create a package called CERN-CC-package
> I then put it in the appropriate (...addon) directory then re-create the
> channel.  So far, so good.
> However, up2date -u does not automatically install a package which is
> not already on the system.
> I've tried wildcards like   up2date --nox -u *  which doesn't work.

No, you would need something more like
up2date $(up2date --showall | grep cern-cc)

or whatever. But I don't recommend that due to the vagaries of what
kinds of matches you can get there. See below for one potential
work-around.


> I'm no Python hacker - but I will try to look in the sources of up2date.

In RHN, you would log into the admin pages on the web, and use that
interface to "add" packages to machines or group machines.

That would cause an add "action" to be stored in the database, and the
next time rhn_check (which is all rhnsd does: run rhn_check approx.
every 2 hours) ran, it would see some actions in the database, and would
perform them, and report the results.

Unfortunately, none of what I just described is implemented in current
yet. Its all waiting on the sql backend integration.

What I do here at my site to approximate that is:

Create a biology-base (and in our case biology-workstation) package.
This package contains _nothing_ except a "version" file in /etc, similar
to /etc/redhat-release. However, it requires several other packages in
the tree. (In our case, all of ssh, joe, gromit, couple other things).

The workstation package includes all the scientific software I've rpm'd
for our department.

I then add the biology-base (and on workstations and compute nodes, the
biology-workstation) package. Unfortunately, this must be done by hand,
initially.

Then when I want to add packages to our established machines, I:

1. Create (or get) an rpm that will work with the redhat release we  
   support.

2. Add that to my tree.

3. Rebuild the biology-base or biology-workstation package as 
   appropriate, adding the new package to its list of requirements.

4. Put the new biology-base/workstation package in the tree.

5. Rerun cadmin create.

That night, all my machines will up2date -u (as a cron job). They'll see
a new biology-workstation package, update it (which through the magic of
up2date will _also_ grab the new dependancy) and viola.

This isn't NEARLY as good as what RHN does. RHN is a precision weapon.
This is a nuke. Like nukes, it has side effects. Our plan is to fully
add this kind of functionality to current, but John and I only move so
fast.

In 7.3 and later, if you kickstart your machines, you can just add the
biology-base/workstation packages to your %files section and use the
--resolvedeps option to grab the requirements automatically. In 7.2 and
earlier, you had to list ALL the requirements in your post.

But theres no getting around the fact that you have to add these special
packages yourself at some point.

-- 
Hunter Matthews                          Unix / Network Administrator
Office: BioScience 145/244               Duke Univ. Biology Department
Key: F0F88438 / FFB5 34C0 B350 99A4 BB02  9779 A5DB 8B09 F0F8 8438
Never take candy from strangers. Especially on the internet.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.