[Yum-devel] enable yum to pass http data to repository

Michael Stenner mstenner at linux.duke.edu
Mon Nov 21 20:35:18 UTC 2005


On Mon, Nov 21, 2005 at 02:56:39PM -0500, Bryan Mills wrote:
> >On Sat, Nov 19, 2005 at 09:34:19AM -0500, Bryan Mills wrote:
> >I think what you propose is too complex for yum.  I think there are
> >too many config options.  All of this stuff would really be used only
> >be the extreme expert who is setting up some wacky custom
> >authentication system and so it's reasonable to give them a more "raw"
> >interface.
> >
> My only concern is that we are doing url parsing magic that may or may 
> not be apparent to the end user.  My general feeling is to avoid all url 
> munging and just store the variables that we need which unfortunately 
> means there will be more config parameters.

I understand.  Having things like

http_append = ?user=foo&pass=bar

in the config file will look ugly.  Having a zillion config options is
bad, too.  I don't suggest that there's a magic optimum, but I know
which way Seth leans :)  Especially since this is likely to come up
only in seriously custom setups (there IS basic auth, which has
straightforward syntax)....

> So on the yum side I'll do the magic url parsing and create the grabber 
> objects and passing those into the mirror object directly.

Basically, for changes in urlgrabber, you've got me to deal with.  I'm
a tad conservative.  Then on the yum front, you've got Seth, who I
will respectfully call militantly conservative :) Getting this sort of
processing into yum will be even harder than getting into urlgrabber.
Your point is correct, though.  I'm suggesting changes in urlgrabber
that would allow you to use precisely the yum syntax you propose.
You'd just have to do some processing in yum.  In fact, it would allow
you to append arbitrary crap to your url AND send arbitrary data via
POST.

Hey, plugins folks, could all this be done from a plugin?  I'm think
that would be by far the best way to handle it.  That would keep this
rather daunting stuff out of yum, but still provide an elegant
interface for the few wackos who really need it :)

> If lots of people started using urlgrabber for mirror lists of this
> type (meaning they have http post/get auth requirements) then at
> that point it should be moved it into urlgrabber.

Well, there we disagree.  urlgrabber is a module, which to me implies
different interface design constraints from an end-user app.  I like
the idea of making two very very raw options available ("data", and
"append") which allow you to do anything.  I'd be happy to put these
up as examples or include examples in the docs to clarify this
particular use.

> >How does that sound?  You would still be able to do everything you
> >want: you use the "append" arg for GET queries and the "data" arg for
> >POST queries.
> 
> Fine with me, do you want me to work up a patch?  Maybe I can get some 
> turkey gravy on them.

I like the "append" addition for mirror.py in any case.  However, I'd
recommend getting the nod from Seth before you dump time into yum
patches.  That said, if you can make it work from a plugin, then
you're good to go.

					-Michael

P.S.  You can keep the gravy :)
-- 
  Michael D. Stenner                            mstenner at ece.arizona.edu
  ECE Department and Optical Sciences Center                520-626-1619
  University of Arizona                                         ECE 524G



More information about the Yum-devel mailing list