From: Moray Henderson [mailto:Moray.Henderson@ict-software.org]
Sent: 25 April 2012 15:27
I've got Koji to build rpms - but the task is still failing with the
message
GenericError: Unable to complete build: release mismatch (build: 2,
rpm: 2.el6)
The different build steps are giving different results. My .spec file
contains
Release: %{release}%{?dist}
and my build and srpm-build groups both contain redhat-release, which
resolves to centos-release-6-2.el6.centos.7.x86_64 and contains
/etc/rpm/macros.dist to set "%dist .el6".
However buildSRPMFromSCM results in
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/mypackage-1.0-2.src.rpm
while buildArch also builds a srpm before the binary rpm:
Building target platforms: noarch
Building for target noarch
Wrote: /builddir/build/SRPMS/mypackage-1.0-2.el6.src.rpm
Building target platforms: noarch
Building for target noarch
...
Wrote: /builddir/build/RPMS/slspkg-1.0-2.el6.noarch.rpm
My Koji hub lists the build as "mypackage-1.0-2". If I get
buildSRPMFromSCM to use the dist macro, will the Koji hub pick up the
right name? How do I get buildSRPMFromSCM to do that?
(There was a typo in the above: slspkg should read mypackage. Sorry.)
Never mind - got it. Yum needs the correct package name, it doesn't match
on what the package provides.
Still getting to grips with the Koji and Koji hub interfaces. I found the
root.log of the task and that gave me the clue:
DEBUG util.py:257: Installing:
DEBUG util.py:257: bash x86_64 4.1.2-8.el6.centos
build 902 k
DEBUG util.py:257: curl x86_64 7.19.7-26.el6_2.4
build 192 k
DEBUG util.py:257: make x86_64 1:3.81-19.el6
build 389 k
DEBUG util.py:257: redhat-rpm-config noarch 9.0.3-34.el6
build 57 k
DEBUG util.py:257: rpm-build x86_64 4.8.0-19.el6_2.1
build 124 k
DEBUG util.py:257: shadow-utils x86_64 2:4.1.4.2-13.el6
build 896 k
Some packages from srpm-build were missing from the install, because they
are in the repository under different names. They got pulled in to the
buildArch buildroot as dependencies.
Moray.
"To err is human; to purr, feline."