Bug 462532 - noarch builds in x86_64 blowup
noarch builds in x86_64 blowup
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: koji (Show other bugs)
9
All Linux
medium Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-16 18:02 EDT by Bryce
Modified: 2013-01-09 20:52 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-16 20:09:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Python traceback (24.11 KB, text/plain)
2008-09-16 18:02 EDT, Bryce
no flags Details

  None (edit)
Description Bryce 2008-09-16 18:02:33 EDT
Created attachment 316910 [details]
Python traceback

Koji 1.2.6

A bit of background before I begin.
One of the Xen VM based ISO's my company produces for it's customers is i386 only EXCEPT for the 64bit hypervisor. This brings an issue with the installer which uses rpm to drop in the packages because as it works through the i386 binaries it comes across the 64bit hypervisor and refuses to load it (invalid arch).

rpm does actually provide a means to get around this (--ignorearch) but this is not something that can be used as thats not an option that can be set from a config file during installation. Nor can you hope to use any form up update service since it would never be able to non interactively install the 64 bit package in an i386 environment.

HACK: it's not entirely true to say that rpm will only install i?86 packages, it will also install noarch packages. So a hack was devised to fool the x86_64 build into producing noarch packages

ie
%ifarch x86_64
BuildArch: noarch
BuildArchitectures: x86_64 noarch
%endif

All well and 'good', the packages were indeed created and tagged as noarch and  suddenly the installer/rpm was very happy to blindly install these                   64bit rpms without whinging and everyone was happy (except me) that we'd a means to drop in a 64bit binary during an i386 install which update services wouldn't complain about either.

Spin forward to current day where I'm trying to migrate the previous mechanisms into the koji environment.

Koji does successfully build all the rpms from xen
    xen-3.1.1-0.0.32.el5.src.rpm
    xen-64-3.1.1-0.0.32.el5.noarch.rpm
    xen-devel-3.1.1-0.0.32.el5.noarch.rpm
    xen-pvhvm-devel-3.1.1-0.0.32.el5.noarch.rpm
    xen-tools-3.1.1-0.0.32.el5.noarch.rpm
HOWEVER, when koji attempts to assimilate this build the following bailout occurs (in attachment)

Now realize that anyone reading this is probably yelling DONT DO THAT (noarch) but in this case my hands are tied as to what I can do. Am I doomed?

I actually don't consider this to be a bug in koji, I'm just trying to find a way to make everything happy.

Phil
=--=
Comment 1 Bryce 2008-09-16 18:30:40 EDT
I should start thinking more rather than reacting 8/

Anyway I'm sure the issue is that the

%ifarch x86_64
BuildArch: noarch
BuildArchitectures: x86_64 noarch
%endif

forces koji into building x86_64 and noarch

This leads to

x86_64:
xen-3.1.1-0.0.32.el5.src.rpm
xen-64-3.1.1-0.0.32.el5.noarch.rpm
xen-devel-3.1.1-0.0.32.el5.noarch.rpm
xen-pvhvm-devel-3.1.1-0.0.32.el5.noarch.rpm
xen-tools-3.1.1-0.0.32.el5.noarch.rpm

and noarch:
xen-64-3.1.1-0.0.32.el5.noarch.rpm
xen-devel-3.1.1-0.0.32.el5.noarch.rpm
xen-pvhvm-devel-3.1.1-0.0.32.el5.noarch.rpm
xen-tools-3.1.1-0.0.32.el5.noarch.rpm

being built which causes the conflict.

Consequently when it goes to insert into the database it discovers a duplicate entry from the previous build task and abends (no ON DUPLICATE KEY error action other than traceback)

It's not a koji issue per se

Phil
=--=
Comment 2 Bryce 2008-09-16 20:09:42 EDT
And for the morbidly curious, the answer is of course to koji set-pkg-arches i386 <tag> xen, BECAUSE, the tag is set as arches x86_64,i386 and as such the buildroot for noarch builds is set to be the x86_64 environment (first mentioned arch is the noarch environment). So the i386 rpms are built as per normal but the 'noarch' 64bit rpms are built as x86_64 while 'tricking' koji into pretending it's not building for x86_64 binaries.

A truly horrible hack and I'm probably going to go to burn in hell for it

Phil
=--=
Comment 3 Bryce 2008-09-16 22:29:40 EDT
And, indeed burn I shall since I originally just built that as --scratch arch-override=i386,noarch and forgot to check it by building normally in the system.

The above WONT work because set-pkg-arches only adds to the extra_arches field. It wont set a package to be JUST i386.

Nuts.

Phil
=--=

Note You need to log in before you can comment on or make changes to this bug.