[Yum-devel] [PATCH] package basepath in yum

seth vidal skvidal at linux.duke.edu
Fri Feb 10 06:07:42 UTC 2006


On Fri, 2006-02-10 at 01:01 -0500, Dennis Gregorovic wrote:
> On Fri, 2006-02-10 at 00:35 -0500, seth vidal wrote:
> > On Wed, 2006-02-01 at 16:39 -0800, David Lutterkort wrote:
> > > On Wed, 2006-02-01 at 13:30 -0500, Dennis Gregorovic wrote:
> > > > So, the end effect is that if xml:base is specified for a package, then
> > > > that url is used instead of the baseurl/mirrorlists value of the repo
> > > > itself.  This essentially provides the capability to do 'virtual'
> > > > repositories as discussed a couple months back on the metadata list.  
> > > 
> > > Nice .. I just ran into a case where I downloaded something from a guy's
> > > yum repo and spent the better part of an hour trying to chase down all
> > > the dependencies, i.e. finding the right repos that provided dependent
> > > packages. 
> > > 
> > > There is a bit of a catch-22 with pulling packages in from other repos
> > > though: if those packages are signed, you also need the gpg key for that
> > > repo. If you have that already, chances are that you also have the repo
> > > config for it, in which case yum could have resolved the dependency.
> > > 
> > > Do you have any support for getting baseurl's into the metadata ? I am
> > > thinking something like telling createrepo to resolve dependencies
> > > against some other repos, and having it set the xml:base accordingly.
> > > 
> > > To implement this kind of repo remapping/virtual repos reliably, we
> > > would really need a way for a package to say 'I am from repo X', which
> > > in turn requires that there is a way to uniquely specify a repo (e.g.,
> > > with a URL under the control of the repo maintainer), and a way to get a
> > > config for that repo (e.g., by doing a GET on that URL). But all that is
> > > not entirely trivial, especially if you want to avoid malicious repos
> > > hijacking your system.
> > 
> > well createrepo's -u option forces xml:base to be specified. This
> > attribute was added to allow people to have some packages in the
> > metadata that had a specific url and not the mirror-able url. This was
> > to handle licensed/access-controlled packages.
> > 
> > what I'm confused about in the patch by Dennis is why anyone would want
> > to set the url this way. ie: what benefit do you get?
> > 
> > -sv
> 
> Hi Seth,
> 
> I've been thinking about David's email and how one might extend
> createrepo to automatically generate baseurls for external, dependent
> packages, as well as the other ideas he mentions.  No clarity has come
> to mind yet.
> 
> However, the situation that prompted my patch originally is fairly
> simple.  I have a NFS share of RPMs.  That share is read-only, so I
> can't directly create repos in it.  However, I would still like to be
> able to create repos pointing at that share.  With this patch to yum
> (plus the outputdir patch to createrepo that I posted), I can solve this
> problem with:
> 
> $ createrepo --outputdir /home/dennis/myrepos \
>              --baseurl file://mnt/rpms/fc4 \
>              /mnt/rpms/fc4
> 
> Another situation where this comes up is when I have a CD mounted (or
> ISO image mounted) and I want to create a repo with those packages.  
> 
> Also, a nice thing about the basepath patch, in my opinion, is that it
> provides flexibility at a later point to do some of the things that
> David mentions.
> 

okay - those use cases sound sane enough to me.

If you could test the patch out using mirrorlists to make sure it
doesn't go crazy then I'll be cool with merging it.

Thanks
-sv






More information about the Yum-devel mailing list