On Sat, 15 Mar 2003, Levi Ramsey wrote:

> On Sat Mar 15 17:29 -0800, James Sparenberg wrote:
> >   Is there a decent tutorial on using urpmi with a locally created rpm
> > database?  I've a number of "our company only" rpms that I'd like to
> > make available to urpmi is why.
> 
> Basically I do the following... this is how I generate my own custom
> distrib for my local mirror (which only does main minus various i18n
> packages, installer stuff etc.).  I may be wrong in places, in which
> cases, someone will correct me ;o).

I think James was looking for something a bit simpler.

Easiest way is to decide on a repository, and how you want to access it 
(which depends on which distro releases your are running). We use 
anonymous FTP, since our repository is on an internal machine and our 
network is well firewalled and we still have one 8.0 and one 8.1 
production machine, plus an 8.2 running MNF. Once they all run something 
that can use urpmi over ssh, we will probably switch to that instead.

Place all the RPMS for the release in one directory, and then run 
'genhdlist .' there. Then, run 'urpmi.addmedia' on all the clients, 
pointing them to the hdlist.cz or synthesis.hdlist.cz in the directory you 
ran genhdlist.

We don't use it *that* much, since most machines run just main+contrib+ 
(in some cases) plf. The samba boxes use 
http://ranger.dnsalias.com/mandrake/samba, since that server is on our lan 
;-). We mirror updates for all the releases we run, and still have the 
original releases mirrored, mirrored on the same box. So all machines have 
at least a 'main','contrib' and 'updates' which are all internal.

> 
> 1) create a base/hdlists file.  This file has a simple format:
> 
> hdlist_name   path/to/rpms    name_of_distrib
> 
> hdlist_name is generally going to be hdlist.cz
> path/to/rpms is relative to the main directory of the distribution.  If
> your RPMS are in /distrib/RPMS, then the main directory of the
> distribution is /distrib, for instance.
> 
> In this case, base/hdlists looks something like
> 
> hdlist.cz     RPMS    internal packages

Levi, Why don't you leave main intact, and just add another line to 
hdlists pointing to your own RPMS.internal (or whatever) directory.

> 
> 2) from the main directory, execute:
> 
> gendistrib --distrib .
> 
> which will create the files that urpmi needs

... based on what it finds in the hdlists file. So, theoretically, you can 
get contrib RPMS in the installer if you have the contrib RPMS listed in 
hdlists? (I have been meaning to try this, and actually added contrib to 
the hdlist on our 9.0 mirror ... but haven't gotten around to it).

> 
> 3) do a normal urpmi.addmedia for a local medium... in our example:
> 
> urpmi.addmedia source_name file://distrib/RPMS with ../base/hdlist.cz
> 
> source_name does not have to correspond to name_of_distrib...
> 
> That should do it...
> 

You know, this really only needs a GUI and some integration with LDAP to 
be able to compete with MS's AD-integrated software management features!

Regards,
Buchan

-- 
|----------------Registered Linux User #182071-----------------|
Buchan Milne                Mechanical Engineer, Network Manager
Cellphone * Work            +27 82 472 2231 * +27 21 8828820x121
Stellenbosch Automotive Engineering         http://www.cae.co.za
GPG Key                   http://ranger.dnsalias.com/bgmilne.asc
1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7


Reply via email to