Ergo Project - koji http://www.ergo-project.org/taxonomy/term/4/0 en Release Engineering 101 - Create Your Own Distribution http://www.ergo-project.org/group/release-engineering/release-engineering-101-create-your-own-distribution <p>This page includes some documentation-work-in-progress on creating your own distribution, your own (private) third-party add-on repository, package rebuilding infrastructure, and more.</p><table id="attachments" class="sticky-enabled"> <thead><tr><th>Attachment</th><th>Size</th> </tr></thead> <tbody> <tr class="odd"><td><a href="http://www.ergo-project.org/sites/default/files/Release_Engineering-101-HOWTO_Create_Your_Own_Distribution-en-US.pdf">Release_Engineering-101-HOWTO_Create_Your_Own_Distribution-en-US.pdf</a></td><td>210.12 KB</td> </tr> </tbody> </table> <div class="og_rss_groups"></div> http://www.ergo-project.org/group/release-engineering/release-engineering-101-create-your-own-distribution#comments build system koji releng sysadmin Thu, 13 May 2010 12:25:43 +0000 jmeeuwen 82 at http://www.ergo-project.org Koji Magic Oneliners http://www.ergo-project.org/group/infrastructure/koji-magic-oneliners <p>To extract from the Koji database, which packages have failed building with mock exiting with status code 10 (build requirements not met):</p> <pre>$ for taskid in `echo "select id from task where result like '%exited with status 10;%';" | psql`; do<br /> echo "select package.name from build inner join package on build.pkg_id = package.id where build.task_id='$taskid';" | psql 2&gt;/dev/null<br /> done | grep -vE "(^-|^\(|name\s*\$|^$)"<br /></pre><div class="og_rss_groups"></div> http://www.ergo-project.org/group/infrastructure/koji-magic-oneliners#comments koji oneliners Wed, 28 Apr 2010 03:03:33 +0000 jmeeuwen 72 at http://www.ergo-project.org Koji Tag and Target Naming Standards http://www.ergo-project.org/group/infrastructure/koji-tag-and-target-naming-standards <h2>custom-<em>$branch</em>-<em>$name</em></h2> <p>This is a custom, addon repository, such as custom-el5-buildsys. It contains addon packages which may override packages from the base operating system or other third party addon repositories. In the case of custom-el5-buildsys, such packages may include yum (from 3.2.22 to 3.2.24), rpm, koji, and so forth. Each of the packages overriden through this repository should have its own explanatory paragraph or page.</p> <h2>dist-<em>$branch</em>-<em>$name</em></h2> <p>This is the simplest of repositories by Ergo Project. This is an addon repository which does not override any package.</p> <h2>feature-<em>$branch</em>-<em>$name</em></h2> <p>This is a feature addon repository, that is definitely going to override packages provided by the base operating system or other third party addon repositories. For instance, feature-el5-ruby-1.8.6 is one of such repositories, providing a ruby-1.8.6 stack for the Enterprise Linux 5 branch of operating systems.</p> <p>The version number of the Ruby stack is included, to be able to also supply a 1.8.7, 1.8.7-ee and 1.9.1 stack for Enterprise Linux 5 (and later Fedora 11, 12, 13 and Enterprise Linux 6).</p> <p>Note that feature repositories do not necessarily conform with update and upgrade policies of the upstream branch of operating systems.</p><div class="og_rss_groups"></div> http://www.ergo-project.org/group/infrastructure/koji-tag-and-target-naming-standards#comments build system koji Tue, 27 Apr 2010 20:54:17 +0000 jmeeuwen 65 at http://www.ergo-project.org Koji for RPMFusion http://www.ergo-project.org/group/infrastructure/koji-for-rpmfusion <h2>Creating the Bare Bones based on Fedora 11</h2> <p>First, we add the regular upstream repositories with tags. These include the <strong>-release</strong> and <strong>-updates</strong> repositories.</p> <pre>$ koji add-tag dist-f11-release<br />$ koji add-external-repo -t dist-f11-release dist-f11-release \<br /> http://download.fedoraproject.org/pub/fedora/linux/releases/11/Everything/\$arch/os/<br />$ koji add-tag --parent dist-f11-release dist-f11-release-override<br />$ koji add-tag dist-f11-updates<br />$ koji add-external-repo -t dist-f11-updates dist-f11-updates \<br /> http://download.fedoraproject.org/pub/fedora/linux/updates/11/\$arch/<br />$ koji add-tag --parent dist-f11-updates dist-f11-updates-override<br />$ koji add-tag dist-f11-updates-testing<br />$ koji add-external-repo -t dist-f11-updates-testing dist-f11-updates-testing \<br /> http://download.fedoraproject.org/pub/fedora/linux/updates/testing/11/\$arch/<br />$ koji add-tag --parent dist-f11-updates-testing dist-f11-updates-testing-override<br /></pre><p>Add the build and srpm-build groups to a build tag, inheriting the base distribution. Remember to first inherit the <strong>-updates</strong>, and then add tag inheritance for the <strong>-release</strong> with a lower priority.</p> <pre>$ koji add-tag --parent dist-f11-updates-override dist-f11-build<br />$ koji add-tag-inheritance --priority=1 dist-f11-build dist-f11-release-override<br />$ koji add-group dist-f11-build build<br />$ koji add-group-pkg dist-f11-build build bash bzip2 coreutils \<br /> cpio diffutils findutils gawk \<br /> gcc gcc-c++ grep gzip \<br /> info make patch redhat-rpm-config \<br /> rpm-build sed shadow-utils tar \<br /> unzip util-linux-ng which<br />$ koji add-group dist-f11-build srpm-build<br />$ koji add-group-pkg dist-f11-build srpm-build bash curl cvs gnupg make redhat-rpm-config shadow-utils</pre><p>This has no <strong>fedora-release</strong> or <strong>generic-release</strong> package, so that it can function as the basis for any derivative distribution.</p> <pre>$ koji add-tag --arches="i586 x86_64" rpmfusion-f11-free-release<br />$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-free-release rpmfusion-f11-free-updates</pre><pre>$ koji add-tag --arches="i586 x86_64" rpmfusion-f11-nonfree-release<br />$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-nonfree-release rpmfusion-f11-nonfree-updates</pre><p>Now, in the case of rpmfusion, we need a free and non-free build tag. The <strong>-free</strong> tag is easy, and is based on the <strong>dist-f11-build</strong> tag + the packages that have already been built in the <strong>-free-release</strong> and <strong>-free-updates</strong> tags:</p> <pre>$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-free-updates rpmfusion-f11-free-build<br />$ koji add-tag-inheritance --priority=2 rpmfusion-f11-free-build dist-f11-build<br /></pre><p>Now, the<strong>-nonfree</strong> part is a little harder:</p> <pre>$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-free-updates rpmfusion-f11-nonfree-build<br />$ koji add-tag-inheritance --priority=1 rpmfusion-f11-nonfree-build rpmfusion-f11-nonfree-updates<br />$ koji add-tag-inheritance --priority=2 rpmfusion-f11-nonfree-build dist-f11-build<br /></pre><p>Now we have the <strong>-free-build</strong> and <strong>-nonfree-build</strong>, we can also choose the <strong>-release</strong> package to use for (amongst other things) the %{?dist} macros. In the case of RPM Fusion, we want <strong>fedora-release</strong> for Fedora builds (and <strong>epel-release</strong> EPEL builds).</p> <pre>$ koji add-group-pkg rpmfusion-f11-free-build build fedora-release<br />$ koji add-group-pkg rpmfusion-f11-free-build srpm-build fedora-release<br />$ koji add-group-pkg rpmfusion-f11-nonfree-build build fedora-release<br />$ koji add-group-pkg rpmfusion-f11-nonfree-build srpm-build fedora-release<br /></pre><h3>Updates Testing</h3> <p>We need an <strong>-updates-testing</strong> tag to mark the builds with that end up in the corresponding repository:</p> <pre>$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-free-updates rpmfusion-f11-free-updates-testing<br />$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-nonfree-updates rpmfusion-f11-free-nonupdates-testing<br /></pre><p>We also need a couple of build targets, and such build targets should not result in the builds becoming available in any kind of <strong>-updates</strong> or <strong>-updates-testing</strong> tag. Instead, we use a <strong>-updates-candidate</strong> tag.</p> <pre>$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-free-updates rpmfusion-f11-free-updates-candidate<br />$ koji add-tag --arches="i586 x86_64" --parent rpmfusion-f11-nonfree-updates rpmfusion-f11-nonfree-updates-candidate<br /></pre><h2>Next Release</h2> <p>Commands:</p> <pre>$ koji add-tag dist-f12-release<br />$ koji add-tag --parent dist-f12-release dist-f12-release-override<br />$ koji add-external-repo -t dist-f12-release dist-f12-release \<br /> <a href="http://download.etc.etc/" title="http://download.etc.etc/" rel="nofollow">http://download.etc.etc/</a><br />$ koji add-tag dist-f12-updates<br />$ koji add-tag --parent dist-f12-updates dist-f12-updates-override<br />$ koji add-external-repo -t dist-f12-updates dist-f12-updates \<br /> <a href="http://download.etc.etc/" title="http://download.etc.etc/" rel="nofollow">http://download.etc.etc/</a><br />$ koji add-tag dist-f12-updates-testing<br />$ koji add-tag --parent dist-f12-updates-testing dist-f12-updates-testing-override<br />$ koji add-external-repo -t dist-f12-updates-testing dist-f12-updates-testing \<br /> <a href="http://download.etc.etc/" title="http://download.etc.etc/" rel="nofollow">http://download.etc.etc/</a><br />$ koji add-tag --arches="i686 x86_64" --maxdepth=1 --parent dist-f11-build dist-f12-build<br /></pre><h2>Adding the Build Targets</h2> <p>The build targets you add as follows:</p> <pre>$ koji add-target rpmfusion-f11-free-release rpmfusion-f11-free-build rpmfusion-f11-free-release<br />$ koji add-target rpmfusion-f11-nonfree-release rpmfusion-f11-nonfree-build rpmfusion-f11-nonfree-release</pre><p>Note that the release tag does not require a staging tag, because it'll be used once (at the most), and then locked. Further targets include:</p> <pre>$ koji add-target rpmfusion-f11-free-updates rpmfusion-f11-free-build rpmfusion-f11-free-updates-candidate<br />$ koji add-target rpmfusion-f11-nonfree-updates rpmfusion-f11-free-build rpmfusion-f11-free-updates-candidate</pre><h2>Importing Existing Builds</h2> <p>You may want to import the existing builds, rather then to rebuild the entire lot. Some of the packages may have a .fc10 disttag (if they have not been rebuild for Fedora 11 by the previous build system in use), and will therefor fail to build (the release of the source will not match the release of the build).</p> <h3>Importing Fedora 11 General Availability</h3> <p>Now, import the builds in Everything for Fedora 11:</p> <pre>$ cd /data/os/repos/rpmfusion/free/fedora/releases/11/Everything/<br />$ for srpm in `find source/SRPMS/ -name "*.src.rpm"`; do<br /> srpm_name=$(rpmquery --nosignature --queryformat="%{NAME}\n" -p $srpm)<br /> <a href="http://search.twitter.com/search?q=%23">#</a> Maybe look up the owner here<br /> koji add-pkg --owner=&lt;owner&gt; rpmfusion-f11-free-release $srpm_name<br /> koji import --link $srpm<br /> done<br />$ for rpm in `find i386/ x86_64/ -type f -name "*.rpm | sort`; do<br /> koji import --link $rpm<br /> done<br /></pre><p>Now, all these imported packages are untagged; tag them:</p> <pre>$ for build in `koji list-untagged`; do<br /> echo Tagging build $build<br /> koji call tagBuildBypass rpmfusion-f11-free-release $build<br /> done<br /></pre><p>Wait until this command has completed, before attempting the next step!</p> <h3>Importing Fedora 11 Updates</h3> <p>Now, import the builds in updates for Fedora 11:</p> <pre>$ cd /data/os/repos/rpmfusion/free/fedora/updates/11/<br />$ for srpm in `find SRPMS/ -name "*.src.rpm"`; do<br /> srpm_name=$(rpmquery --nosignature --queryformat="%{NAME}\n" -p $srpm)<br /> <a href="http://search.twitter.com/search?q=%23">#</a> Maybe look up the owner here<br /> koji add-pkg --owner=&lt;owner&gt; rpmfusion-f11-free-release $srpm_name<br /> koji import --link $srpm<br /> done<br />$ for rpm in `find i386/ x86_64/ -type f -name "*.rpm | sort`; do<br /> koji import --link $rpm<br /> done<br /></pre><p>Now, all these imported packages are untagged; tag them:</p> <pre>$ for build in `koji list-untagged`; do<br /> echo Tagging build $build<br /> koji call tagBuildBypass rpmfusion-f11-free-updates $build<br /> done<br /></pre><p>Again, wait until this command has completed, before attempting the next step!</p><div class="og_rss_groups"></div> http://www.ergo-project.org/group/infrastructure/koji-for-rpmfusion#comments fedora koji rpmfusion Sat, 20 Mar 2010 17:55:24 +0000 jmeeuwen 59 at http://www.ergo-project.org Notes on the Buildsystem http://www.ergo-project.org/group/infrastructure/notes-buildsystem <p>This page tracks a couple of notes on the build system environment. First of all, here's a couple of bookmarks for you:</p> <ul> <li><a href="http://koji.green-beret.org" title="http://koji.green-beret.org" rel="nofollow">http://koji.green-beret.org</a> (legacy domain name, be warned this may change)</li> <li><a href="http://planet.ergo-project.org/blog/jmeeuwen/2010/03/07/koji-and-ftbfs-enterprise-linux" title="http://planet.ergo-project.org/blog/jmeeuwen/2010/03/07/koji-and-ftbfs-enterprise-linux" rel="nofollow">http://planet.ergo-project.org/blog/jmeeuwen/2010/03/07/koji-and-ftbfs-e...</a></li> <li><a href="http://planet.ergo-project.org/blog/jmeeuwen/2010/02/22/repo-tag-required" title="http://planet.ergo-project.org/blog/jmeeuwen/2010/02/22/repo-tag-required" rel="nofollow">http://planet.ergo-project.org/blog/jmeeuwen/2010/02/22/repo-tag-required</a></li> <li><a href="http://planet.ergo-project.org/blog/jmeeuwen/2010/02/19/koji-lessons-learned" title="http://planet.ergo-project.org/blog/jmeeuwen/2010/02/19/koji-lessons-learned" rel="nofollow">http://planet.ergo-project.org/blog/jmeeuwen/2010/02/19/koji-lessons-lea...</a></li> </ul> <h2>Build Targets</h2> <p>First of all, build targets include a platform specific base (such as "Enterprise Linux 6"), it's stream (ergo, EL-6.1, EL-6.2), as well as any option value that this build target might provide (ergo, EL-6.1-Ruby-1.9.1-devel, EL-6.1-Ruby-1.9.1-stable). Whatever the naming convention does turn out to be –nothing of such is set in stone yet–, it is very important we allow such to be consistent all across the board.</p> <h2>Tag Inheritance</h2> <p>Tag inheritance is majorly important if you think of each inherited tag as the basis of a tag.</p> <h2>Miscellaneous</h2> <ul> <li>Different update policies may require different tags</li> <li>Different distribution channels may require different destination tags <ul> <li>Different destination tags should still inherit the same buildroot settings and inheritance</li> </ul> </li> </ul><div class="og_rss_groups"></div> http://www.ergo-project.org/group/infrastructure/notes-buildsystem#comments build system koji Sun, 07 Mar 2010 14:54:23 +0000 jmeeuwen 42 at http://www.ergo-project.org