From Fedora Project Wiki
(setup External Repo Bootstrap page)
 
(Replaced content with "= Bootstrapping a new External Repo Koji build environment = This document has moved to the [https://docs.pagure.org/koji/ Koji Documentation]. The new location is: ...")
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
= Bootstrapping a new External Repo Koji build environment =
= Bootstrapping a new External Repo Koji build environment =
These are the steps involved in pointing a new Koji server at external repositories so that it can be used for building.  This assumes that the Koji hub is up, appropriate authentication methods have been configured, the Koji repo administration daemon (<code>kojira</code>) is properly configured and running, and at least one Koji builder (<code>kojid</code>) is properly configured and running.  All koji cli commands assume that the user is a Koji ''admin''.  If you need help with these tasks, see the [[Koji/ServerHowTo| ServerHowTo]] .


* Create a new tag
This document has moved to the [https://docs.pagure.org/koji/ Koji Documentation]. The new location is:
<pre>
$ koji add-tag dist-foo
</pre>


* Create a build tag with the desired arches, and the previously created tag as a parent
    https://docs.pagure.org/koji/external_repo_server_bootstrap/
<pre>
$ koji add-tag --parent dist-foo --arches "i386 x86_64 ppc ppc64" dist-foo-build
</pre>


* Add an external repository to your build tag
You can submit changes to Koji's docs in [https://pagure.io/koji Pagure]
<pre>
$ koji add-external-repo -t dist-foo-build  dist-foo-external-repo http://repo-server.example.com/path/to/repo/for/foo/\$arch/
</pre>
* Create a build target that includes the tags you've already created
<pre>
$ koji add-target dist-foo dist-foo-build
</pre>
 
* Create a ''build'' and ''srpm-build'' group associated with your build tag
<pre>
$ koji add-group dist-foo-build build
$ koji add-group dist-foo-build srpm-build
</pre>
 
* Populate the ''build'' and ''srpm-build'' group with packages that will be installed into the minimal buildroot
You can find out what the is in the current groups for Fedora by running <code>koji list-groups dist-f9-build</code>
against the Fedora Koji instance.  This is probably a good starting point for your minimal buildroot and srpm creation buildroot.
<pre>
$ koji add-group-pkg dist-foo-build build pkg1
$ koji add-group-pkg dist-foo-build build pkg2
</pre>
 
* Add packages that you intend to build to your tag.
<pre>
$ koji add-pkg --owner <kojiuser> dist-foo <pkg1> <pkg2> .....
</pre>
 
 
* Wait for the repo to regenerate, and you should now be able to run a build successfully.
 
= Regenerating your repo =
koji doesn't monitor external repositories for changes.  new repositories will be generated when packages you build land in a tag that populates the buildroot or you manually regenerate the repository.  you should be sure to regularly regenerate the repositories manually to pick up updates.
 
<pre>
$ koji regen-repo dist-foo-build
</pre>
 
= Examples of urls to use for external Repositories =
all these examples use mirrors.kernel.org  please find the closest mirror to yourself.  Note that  the Fedora minimal buildroots download ~100Mb  then build dependencies on top.  these are downloaded each build  you can save alot of network bandwidth by using a local mirror or running through a caching proxy.
 
koji substitutes $arch for the arches in your build tag. $ needs to be escaped for the shell to send it though.
 
== Fedora 10 ==
<pre>
http://mirrors.kernel.org/fedora/releases/10/Everything/\$arch/os/
http://mirrors.kernel.org/fedora/updates/10/\$arch/
</pre>
 
== CentOS 5 and EPEL ==
<pre>
http://mirrors.kernel.org/centos/5/os/\$arch/
http://mirrors.kernel.org/centos/5/updates/\$arch/
http://mirrors.kernel.org/fedora-epel/5/\$arch/
</pre>

Latest revision as of 21:16, 23 August 2016

Bootstrapping a new External Repo Koji build environment

This document has moved to the Koji Documentation. The new location is:

   https://docs.pagure.org/koji/external_repo_server_bootstrap/

You can submit changes to Koji's docs in Pagure