Open main menu

CDOT Wiki β

Changes

Winter 2010 SBR600 Weekly Schedule

2,965 bytes added, 23:37, 27 January 2010
Week 3 (January 25) - Using Mock and Koji
* Take the software you compiled last week and package it (not Nled!). Blog about the experience. Include a link to your source RPM (and optionally your binary RPM) from your blog. '''Please complete this by Tuesday, January 26.'''
= Week 3 (January 25) - Using Mock and Koji = == rpmlint: Checking for a clean spec file, SRPM, and RPM == <code>rpmlint</code> is a spec file, SRPM (.src.rpm), and RPM (.rpm) checker. To use it, supply the names of the file(s) to be checked as argument(s):  rpmlink ''foo.spec foo*.rpm'' Notice that the checks performed vary based on the input file. For example, some errors in the spec file (such as the summary ending in a period ".") could be determined from the spec file, but only show up when the SRPM/RPM is checked. Each run will report the number of errors and warnings; errors are serious problems which should not be ignored, while warnings may be ignored depending on the context. == mock: Testing BuildRequires == It's often difficult to get the BuildRequires in a spec file exactly right, because it's easy to overlook packages that are coincidentally installed on the machine. <code>mock</code> is a tool that uses the chroot system call to create a "cleanroom" environment for the build, so that any missing BuildRequires cause the build to fail. To build with mock:  mock -r ''fedora-12-x86_64'' --rebuild ''foo*.src.rpm'' The value ''fedora-12-x86_64'' may be changed to any of the config files found in <code>/etc/mock</code> in order to test building based on the libraries and available packages for a specific architecture and Fedora release. If errors are reported, review the log files (see the mock output to determine the directory containing the log files). == koji: Testing multiple architectures == <code>koji</code> is a client-server system which allows you to queue builds within the Fedora build farm. This permits you to test whether your package builds on several different architectures, which is especially useful when you don't otherwise have access to the machines of that architecture. {{Admon/note|Koji Setup|Note that koji requires some setup, particularly for certificate-based authentication. See the [[:fedora:UsingKoji|UsingKoji]] page on the Fedora wiki for setup instructions.}} To queue a build for all four Fedora-supported architectures (currently i386, x86_64, ppc, and ppc64):  koji build ''dist-f12'' --scratch '''foo*.src.rpm'' In this example, ''dist-f12'' selects the package repository (similar to the <code>-r</code> option for mock, except that the build arch is not specified); <code>--scratch</code> specifies that this is a scratch build (the results are not kept or fed to Bodhi). To perform a build that will be passed to Bodhi for distribution, substitute <code>--rebuild</code> for <code>--scratch</code> (do not do this until you have passed the package review and sponsor procedures). == Resources == * rpmlint** [[:fedora:Common Rpmlint issues]]* mock** [[:fedora:Projects/Mock|Mock Project page]]** [[:fedora:Using_Mock_to_test_package_builds]]* koji** [[:fedora:PackageMaintainers/UsingKoji|Using Koji]] == ToDo == * Test your RPM from last week with:** rpmlint** mock** koji * Blog about your experience.
= Week 4 (February 1) - Using Mock and Koji II =