[Pulp-list] grinder yum filters

John Matthews jmatthew at redhat.com
Mon Mar 26 20:23:04 UTC 2012



----- Original Message -----
> Hi John,
> 
> ----- Original Message -----
> > Hi list, I just discovered pulp the other day while looking for a
> > more
> > convenient way to synch yum repos than my crazy homebrew bash
> > scripts
> > with 'plugins' and per-repo config files.
> > 
> > Mainly, rsyncing whole repos is fine for the small sites I manage.
> > However, a number of custom RPMs depend on small numbers of
> > packages
> > from 3rd party repos, Pulp initially looked right to synch partial
> > repos
> > with its 'whitelist' feature, but it didn't take long to trace the
> > lack
> > of this feature for remote repos down to its absence in the grinder
> > package.
> > 
> > For the small shop use case, grinder is fine, so I added a quick
> > filtering function to it.  The filters have their own class similar
> > to
> > pulp's, so maybe it'll be easy for someone to plumb it into pulp
> > down
> > the road.
> 
> 
> Thank you for the patch.
> We'll review it this week and see if we can bring it into grinder.
> 
> -John
> 

  
The below commits include your work in Grinder. 

http://git.fedorahosted.org/git/?p=grinder.git;a=commitdiff;h=7bc697f631673e41f1c0d907277dd10ff0631300
http://git.fedorahosted.org/git/?p=grinder.git;a=commitdiff;h=03f8f319f09f3fe71eddb83acf2e3ba27573a99f

Thank you for the patch!

> 
> 
> > However, the attached patch can probably be called
> > hackish,
> > so maybe by the time pulp has filtering for remote repos, it'll be
> > a
> > complete rewrite.  I don't feel too embarrassed about the
> > hackishness,
> > though, since grinder appears to be a bit of a patchwork itself;
> > I'm
> > guessing that the RHN and yum parts were two separate scripts that
> > were
> > quickly thrown together into a single library?
> > 
> > The patch is pretty well self-documenting.  Testing was done with
> > something like the following command line:
> > 
> > PYTHONPATH=src python bin/grinder yum --label somerepo \
> > 	-b /tmp -U 'http://www.somesite.com/somerepo' \
> > 	--filter=whitelist --filter_regex='cool-package.*' --debug
> > 
> > BTW, 'run-tests.py' will go through its routine by adding the line
> > 'sys.path.append("itests/")', but lots of failures, so I didn't
> > bother
> > with unit tests.
> > 
> > This patch doesn't deal with filtering __getDRPMs.  It would be
> > easy
> > to
> > add, but my sites don't need it just yet, and this submission is
> > partly
> > just to test the warmth of the waters.
> > 
> > This patch doesn't deal with running createrepo.  Pulp has its own
> > utilities to take care of that.  With this patch, you'll end up
> > with
> > the
> > original repodata but of course missing any packages excluded by
> > the
> > filters, so repodata must be regenerated elsehow.
> > 
> > More disclaimers:  I'm not a programmer.  I'm not a python
> > programmer.
> > It's the first time I've touched python in three years (last shop
> > ran
> > Perl, whew it's nice to be doing python again!).  I'm too lazy to
> > read
> > and understand the whole grinder code, so this patch probably makes
> > no
> > sense in its greater design.  I ramble too much.
> > 
> > Future projects:  maybe add /etc/grinder/yum.yml config (already
> > have
> > a
> > good start), and maybe add createrepo functionality.
> > 
> > 	John
> > 
> > _______________________________________________
> > Pulp-list mailing list
> > Pulp-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/pulp-list
> > 
> 
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
> 




More information about the Pulp-list mailing list