Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 235195 - _target_cpu used for two unrelated purposes
Summary: _target_cpu used for two unrelated purposes
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact:
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-04 13:11 UTC by Stepan Kasal
Modified: 2008-05-07 01:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-05-07 01:25:20 UTC

Attachments (Terms of Use)

Description Stepan Kasal 2007-04-04 13:11:21 UTC
Short description of my problem:
I redefined %_target_cpu in order to fix problems with %configure, and it caused
rename of the resulting rpm.

A longer explanation:
Macro %{_target_cpu} is used for the following two purposes:

1)  %configure needlessly specifies --target explicitely (see also bug #235194),
and one of the macros used for that is %{_target_cpu}

2) the resulting binary rpm seems to be named *.%{_target_cpu}.rpm

I needed to fix the %configure command, found out that %{_target_cpu} is used
there, so I redefined it.  This caused rename of the resulting rpm.

It is a mistake to tie these two, because in the build-host-target terminology
used by configure scripts, the name of the binary rpm should contain the _host_
cpu name, the target is irrelevant.

Can rpm be fixed to use *.%{_host_cpu}.rpm for the resulting binary rpm?

(If not, what can be done to break this unfortunate link?)

Comment 1 Jeff Johnson 2007-04-04 18:53:45 UTC
The value for %{_target_cpu} et al is reset when the arch for the build is changed.

It should not (but there's nothing stopping you from attempting) be changed from
a spec file.

rpm-4.4.9 has added a "readonly" primitive for macro so that not only is the
attempt to change %_target_cpu prevented, but also there is an error message
reporting that there was an attempt to change a macro that should not be changed.

Whether %{_host_cpu} or %{build_cpu} or %{_target_cpu} is pretty much a matter
of convention. No matter which of those is used, a %define during spec file parse
will not change necessary data by re-reading per-platform macro files.

BuildArchitecture: is the means by which per-platform macrofiles are re-read.

UPSTREAM or WONTFIX, your call.

Comment 2 Red Hat Bugzilla 2007-08-21 05:33:05 UTC
User's account has been closed

Comment 3 Panu Matilainen 2007-08-22 06:30:03 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 4 Bug Zapper 2008-04-03 23:56:29 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here: to ensure this
doesn't happen again.

Comment 5 Bug Zapper 2008-05-07 01:25:18 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:

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