Mike McLean wrote:
Paul B Schroeder wrote:
> Mike McLean wrote:
>> So, this term 'static-repo' is unfortunate. What folks really mean is
>> 'slowly changing repo at a convenient location.' One way to get such
>> a thing is to make a cronjob that periodically copies the current
>> active repo for a tag to a fixed location.
> Just saw this old post. Coincidentally, I recently patched my kojid
> (patch below)
> to create a symlink to the "latest" repo. Unless I'm missing
> something that's
> fundamentally wrong with this, it seems easier/better.
This shouldn't be done in kojid. Koji does not require the builders to
have write access to the filesystem, but your patch assumes it.
Gotcha..
My only worry is that the sometime rapid rate of repo regeneration
might
cause a problem for yum when the link changes at the wrong time. I guess
it is probably ok though.
I had thought about that actually, but then thought it
may not be very
likely to cause an issue. It's definitely not an issue for me as my
repos aren't getting regenerated all to often (and I'm the only one
really using them).
This should probably be handled in HostExports.repoDone on the hub.
I've
made a patch for that. Will test and push later.
Cool.. Thanks..
Hmm, I should probably also make this configurable, since some admins
might already have their own mechanism for creating such links (e.g. a
cronjob).
> So I can now always get to the latest repo via
> /mnt/koji/repos/repo_tag/latest. Add this to kojiweb.conf:
> Alias /repos/ "/mnt/koji/repos/"
> <Directory "/mnt/koji/repos">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
Is multiviews needed? I don't see how it will help anything with the
content that Koji generates here.
> And the "latest" can be had via
>
http://koji.foo.com/repos/repo_tag/latest.
> Be sure to also add this to kojiweb.conf so that your packages can be
> found:
> Alias /packages/ "/mnt/koji/packages/"
> <Directory "/mnt/koji/packages">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
I don't see why FollowSymLinks is required for /mnt/koji/packages/
I simply
didn't look over the options I put in my kojiweb.conf too well.
It may be worth having the proper config commented out in the
kojiweb.conf file by default. Then when somebody installs, they can
simply uncomment these and change the directory names if need be.
--
---
Paul B Schroeder <paul.schroeder "at" bluecoat "dot" com>
Blue Coat Systems, Inc.