Bug 211748

Summary: Option --target seems to be broken (OS is not included)
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: n3npq
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-29 22:06:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rpm --rcfile /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc --showrc
none
strace output none

Description Robert Scheck 2006-10-21 18:50:46 UTC
Description of problem:
# rpmbuild --rcfile /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc \
           -ba --target i686 openssl.spec
Building target platforms: i686
# 
# echo $?
1
# 

# rpmbuild --rcfile /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc \
           -ba --target i686 kernel-2.6.spec
Building target platforms: i686
error: OS is not included:
#
# echo $?
1
# 

Version-Release number of selected component (if applicable):
rpm-4.4.7-1
openssl-0.9.8b-8
kernel-2.6.18-1.2798

How reproducible:
Everytime, see above.

Actual results:
Option --target seems to be broken (OS is not included)

Expected results:
Working stuff like in the past.

Additional info:
Expected result is FIXED UPSTREAM when done, because this bug report is not 
filed for a Fedora release but for latest RPM release.

Comment 1 Robert Scheck 2006-10-21 18:52:50 UTC
Created attachment 139065 [details]
rpm --rcfile /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc --showrc

Comment 2 Robert Scheck 2006-10-22 10:27:55 UTC
Last working version seems to be 4.4.7-0.13, which I had to revert to for 
building kernel and openssl successfully.

Comment 3 Jeff Johnson 2006-10-22 12:36:20 UTC
Hmmm, openssl is building for me. I cannot reproduce the problem.

The rpmrc values in --showrc spew are identical to yours afaict too
(if I remove /etc/rpm/platform). My build result is invariant to whether
/etc/rpm/platform exists or not. OTOH, my machine is used for rpm
development, and might be configured rather differently. Lemme trash
and burn my installed rpm, and update to FC6 final (I'm mebbe 3 weeks back)
to see if I can reproduce.

FYI, here's what I have in /etc/rpm/platform: "i386-unknown-linux-gnu"

The issue is likely to be configuration however.






Comment 4 Robert Scheck 2006-10-22 13:28:41 UTC
Strange, a after downgrade to -0.13 and upgrade to -1, kernel-2.6.18-1.2798.fc6 
is only reproducer for me, but this with and without a /etc/rpm/platform file 
containing "i386-unknown-linux-gnu".

Comment 5 Robert Scheck 2006-10-22 13:46:41 UTC
Created attachment 139080 [details]
strace output

$ wget
http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/kernel-2.6.18-1.2798.fc6.src.rpm

$ rpm -Uvh kernel-2.6.18-1.2798.fc6.src.rpm
$ cd /usr/src/rpm/SPECS
$ rpmbuild --rcfile /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc -ba --target
i686 kernel-2.6.spec
Building target platforms: i686
error: OS is not included:
$ 

Output of strace is attached.

Comment 6 Jeff Johnson 2006-10-22 14:59:52 UTC
Invoking a kernel build with --target i686-linux "works".

The kernel package (and 50 others in FC) have chosen to add
    ExclusiveOS: Linux

Ripping rpmrc out of 4.4.7 has change how the default value for OS is set.

Comment 7 Jeff Johnson 2006-10-29 22:03:05 UTC
Fixed in rpm CVS, should be in rpm-4.4.8-0.2 when built.

UPSTREAM

Comment 8 Robert Scheck 2006-10-29 22:06:13 UTC
Thank you very much, closing with expected result.