Bug 743229 - %_host set to x86_64-unknown-linux-gnu by default
Summary: %_host set to x86_64-unknown-linux-gnu by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: Patrik Kis
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-04 10:14 UTC by Johnny Hughes
Modified: 2013-02-21 10:51 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 10:51:09 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0461 0 normal SHIPPED_LIVE rpm bug fix and enhancement update 2013-02-20 21:07:23 UTC

Description Johnny Hughes 2011-10-04 10:14:48 UTC
Description of problem:
%_host is set to x86_64-unknown-linux-gnu in RHEL 6.1 in /usr/lib/rpm/macros

This results in many packages, when rebuilt, in being built incorrectly.  For example:

grub rebuilds with:

/usr/share/grub/x86_64-unknown

where it should be

/usr/share/grub/x86_64-redhat

Also, a rebuild of the bash SRPM will produce this for the Machine Type:

echo ${BASH_VERSINFO[5]}
x86_64-unknown-linux-gnu

I know that a custom .rpmmacros can be used to set %_host to x86_64-redhat-linux-gnu for building x86_64 SRPMS ... but config.guess should also get the correct value by default without having to set it manually, otherwise it also has to be set in ./configure statements when building non SRPM items. 

================================================================== 

I think that %_host should be x86_64-redhat-linux-gnu instead of x86_64-unknown-linux-gnu on RHEL-6.1 ... that is the default behavior for other versions of RHEL (5.x and 4.x)


How reproducible:
Always

Steps to Reproduce:
1. Install RHEL-6.1 x86_64
2. Issue the command:  rpm --eval "%_host"

  
Actual results:
x86_64-unknown-linux-gnu


Expected results:
x86_64-redhat-linux-gnu

Comment 1 Johnny Hughes 2011-10-04 10:15:56 UTC
Note:  This is also present in RHEL-6.0

Comment 3 Akemi Yagi 2011-10-04 14:46:44 UTC
Just wanted to add a note to say it was correct in RHEL 5.x.

Comment 4 Johnny Hughes 2011-10-07 12:46:02 UTC
The i386 build is also incorrect, in a different way.

_host	i686-pc-linux-gnu

In all of the RHEL builds, the _host is:

_host	i386-redhat-linux-gnu

Comment 5 RHEL Program Management 2011-10-07 16:04:59 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 6 Panu Matilainen 2012-07-02 10:48:00 UTC
devel_ack ... I guess. The defaults are what config.guess upstream gives for RHEL/Fedora, so incorrect is in the eye of the beholder to some degree. But then, parts of the toolchain (at least gcc) is set for <arch>-redhat-linux and various packages expect it that way, and koji appears to override it to <arch>-redhat-linux-gnu anyway, so might as well have rpm defaults match what everything expects.

Comment 9 Patrik Kis 2012-10-03 13:17:17 UTC
(In reply to comment #4)
> The i386 build is also incorrect, in a different way.
> 
> _host	i686-pc-linux-gnu
> 
> In all of the RHEL builds, the _host is:
> 
> _host	i386-redhat-linux-gnu

Hi Panu,

do you plan to fix also what is described above? I'm asking because I'm preparing the test for this bug. Is this a bug at all?

Comment 10 Panu Matilainen 2012-10-04 06:56:49 UTC
(In reply to comment #9)
> Hi Panu,
> 
> do you plan to fix also what is described above? I'm asking because I'm
> preparing the test for this bug. Is this a bug at all?

See comment #6, the "correct" value of these is in the eye of the beholder, i686-pc-linux-gnu and x86_64-unknown-linux-gnu are upstream config.guess values. But since there are various things in the distro that expect the <arch>-redhat-linux-gnu host we might as well "fix" rpm to always use those. Here's the Fedora "fix": http://pkgs.fedoraproject.org/cgit/rpm.git/commit/?id=4660edea189ee99d0aa80aee0461f472d00d8d76, probably the same thing will work for RHEL too.

Comment 14 errata-xmlrpc 2013-02-21 10:51:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0461.html


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