FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 08-05-2008, 10:34 PM
Mike McLean
 
Default Yum Static Repos

Brian Schubert wrote:

Is kojira capable of creating static repos such as those at
http://koji.fedoraproject.org/static-repos/ or is this achieved through
some other means? Either way, would anyone be able to instruct me as to
how it's done?


Short answer: not really, but it is not hard to accomplish yourself

Longer answer:
kojira doesn't actually create repos at all. It tracks what repos are
needed and whether they are current. When a repo is needed that does not
exist, or when one is out of date, kojira creates a koji task asking the
builders to create the repo.


Actually, the repos that are created by the process /are/ static, they
just have a complicated path (involving the repo id and tag name). A
koji repo, once created, remains the same until it is deleted. If tag
content changes, a new repo will be created.


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.


--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
 
Old 08-06-2008, 02:46 AM
Jesse Keating
 
Default Yum Static Repos

On Tue, 2008-08-05 at 18:34 -0400, 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.

I chose the term as in a "static location to the latest repo".

--
Jesse Keating RHCE (http://jkeating.livejournal.com)
Fedora Project (http://fedoraproject.org/wiki/JesseKeating)
GPG Public Key (http://geek.j2solutions.net/jkeating.j2solutions.pub)
identi.ca (http://identi.ca/jkeating)
--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
 
Old 10-22-2008, 07:41 PM
Paul B Schroeder
 
Default Yum Static Repos

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.

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>

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>

Cheers...Paul...


diff --git a/builder/kojid b/builder/kojid
index 8b566a3..aab0f0b 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -2223,6 +2223,7 @@ class CreaterepoTask(BaseTaskHandler):
raise koji.GenericError, "Repo %(id)s not in INIT state (got %(state)s)" % rinfo
pathinfo = koji.PathInfo(options.topdir)
toprepodir = pathinfo.repo(repo_id, rinfo['tag_name'])
+ latestrepolink = pathinfo.repo('latest', rinfo['tag_name'])
repodir = "%s/%s" % (toprepodir, arch)
groupdata = os.path.join(toprepodir, 'groups', 'comps.xml')
if not os.path.isdir(repodir):
@@ -2266,6 +2267,10 @@ class CreaterepoTask(BaseTaskHandler):
files.append(f)
session.uploadWrapper("%s/%s" % (datadir, f), uploadpath, f)

+ if os.path.lexists(latestrepolink):
+ os.unlink(latestrepolink)
+ os.symlink(toprepodir, latestrepolink)
+
return [uploadpath, files]

class WaitrepoTask(BaseTaskHandler):



--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
 
Old 10-22-2008, 09:24 PM
Mike McLean
 
Default Yum Static Repos

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.


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.


This should probably be handled in HostExports.repoDone on the hub. I've
made a patch for that. Will test and push later.


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/

--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
 
Old 10-22-2008, 09:37 PM
Paul B Schroeder
 
Default Yum Static Repos

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.

--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
 

Thread Tools




All times are GMT. The time now is 01:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org