View Issue Details

IDProjectCategoryView StatusLast Update
0004995CentOS-6grubpublic2018-03-25 16:07
Reportergoldmann 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.0 
Target VersionFixed in Version6.1 
Summary0004995: grub-0.97-68.el6 breaks some scripts having image files in /usr/share/grub/x86_64-unknown
Descriptiongrub-0.97-68.el6.x86_64.rpm package installs its image files in /usr/share/grub/x86_64-unknown:

/usr/share/grub/x86_64-unknown
/usr/share/grub/x86_64-unknown/e2fs_stage1_5
/usr/share/grub/x86_64-unknown/fat_stage1_5
/usr/share/grub/x86_64-unknown/ffs_stage1_5
/usr/share/grub/x86_64-unknown/iso9660_stage1_5
/usr/share/grub/x86_64-unknown/jfs_stage1_5
/usr/share/grub/x86_64-unknown/minix_stage1_5
/usr/share/grub/x86_64-unknown/reiserfs_stage1_5
/usr/share/grub/x86_64-unknown/stage1
/usr/share/grub/x86_64-unknown/stage2
/usr/share/grub/x86_64-unknown/stage2_eltorito
/usr/share/grub/x86_64-unknown/ufs2_stage1_5
/usr/share/grub/x86_64-unknown/vstafs_stage1_5
/usr/share/grub/x86_64-unknown/xfs_stage1_5

This has changed since earlier versions - where these files landed in x86_64-redhat. What triggered changing this behavior? This breaks scripts that should be working across RHEL and CentOS.
TagsQA-6.1

Relationships

related to 0005158 resolvedIssue Tracker centos6 BASH_VERSINFO[5]/MACHTYPE 
related to 0005281 acknowledgedkbsingh@karan.org Packages have added .centos. in name to rebuild, are not modified 
related to 0005299 closedkbsingh@karan.org POSTUN warning during update to 6.1 

Activities

athmane

athmane

2011-08-28 00:06

developer   ~0013163

AFAIK, this is caused by rpm macros, for instance CentOS 5 has _host_vendor==redhat and _host==x86_64-redhat-linux-gnu (for x86_64)

/usr/lib/rpm/macros:
<...>
%_host x86_64-unknown-linux-gnu
%_host_alias %{nil}
%_host_cpu x86_64
%_host_vendor unknown
%_host_os linux
<...>
toracat

toracat

2011-09-13 17:51

manager   ~0013244

Looks like RHEL6 has the same macros. This needs more investigation.
jsteffan

jsteffan

2011-09-22 23:36

reporter   ~0013354

RHEL 6.1: http://aws.amazon.com/amis/6287130056321776

[root@rhel6.1 ~]# rpm -qif /usr/lib/rpm/macros
Name : rpm Relocations: (not relocatable)
Version : 4.8.0 Vendor: Red Hat, Inc.
Release : 16.el6 Build Date: Wed 09 Mar 2011 01:32:03 AM EST
Install Date: Tue 10 May 2011 07:26:46 PM EDT Build Host: x86-003.build.bos.redhat.com
Group : System Environment/Base Source RPM: rpm-4.8.0-16.el6.src.rpm
Size : 2018968 License: GPLv2+
Signature : RSA/8, Mon 11 Apr 2011 07:37:27 AM EDT, Key ID 199e2f91fd431d51
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.rpm.org/
Summary : The RPM package management system
Description :
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.
[root@rhel6.1 ~]# grep _host /usr/lib/rpm/macros
%_build %{_host}
%_build_alias %{_host_alias}
%_build_cpu %{_host_cpu}
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host i686-pc-linux-gnu
%_host_alias %{nil}
%_host_cpu i686
%_host_vendor pc
%_host_os linux
%_target %{_host}
%_target_alias %{_host_alias}
%_target_cpu %{_host_cpu}
%_target_vendor %{_host_vendor}
%_target_os %{_host_os}
  %{_configure} --host=%{_host} --build=%{_build} \\\
toracat

toracat

2011-09-22 23:48

manager   ~0013355

I get the same output as jsteffan's on a RHEL6.1 i686 system. So there's a difference between 32-bit and 64-bit, it seems.
jsteffan

jsteffan

2011-09-23 16:33

reporter   ~0013360

[root@centos6.1_x86_64 ~]# rpm -qif /usr/lib/rpm/macros
Name : rpm Relocations: (not relocatable)
Version : 4.8.0 Vendor: Red Hat, Inc.
Release : 16.el6 Build Date: Wed 09 Mar 2011 01:32:52 AM EST
Install Date: Tue 14 Jun 2011 12:59:27 PM EDT Build Host: x86-008.build.bos.redhat.com
Group : System Environment/Base Source RPM: rpm-4.8.0-16.el6.src.rpm
Size : 2030967 License: GPLv2+
Signature : RSA/8, Mon 11 Apr 2011 07:37:22 AM EDT, Key ID 199e2f91fd431d51
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.rpm.org/
Summary : The RPM package management system
Description :
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.
[root@centos6.1_x86_64 ~]# grep _host /usr/lib/rpm/macros
%_build %{_host}
%_build_alias %{_host_alias}
%_build_cpu %{_host_cpu}
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host x86_64-unknown-linux-gnu
%_host_alias %{nil}
%_host_cpu x86_64
%_host_vendor unknown
%_host_os linux
%_target %{_host}
%_target_alias %{_host_alias}
%_target_cpu %{_host_cpu}
%_target_vendor %{_host_vendor}
%_target_os %{_host_os}
  %{_configure} --host=%{_host} --build=%{_build} \\\
JohnnyHughes

JohnnyHughes

2011-09-30 08:39

administrator   ~0013430

We might be able to change that variable in the mock config file for x86_64 on the build machine to set it at the correct value.

For x86_64, should:

%_host_vendor unknown

be changed to

%_host_vendor pc


Then rebuild the "rpm" rpm with the correct value set.
toracat

toracat

2011-10-02 18:45

manager   ~0013441

I defined _host or _host_vendor in ~/.rpmmacros and rpmbuild grub on an EL6.1 x86_64 machine:

(1) %_host x86_64-redhat-linux-gnu ( _host_vendor was not defined)

resulted in the correct /usr/share/grub/x86_64-redhat/

(2) %_host_vendor pc

resulted in /usr/share/grub/x86_64-unknown/

(3) %_host_vendor redhat

resulted in /usr/share/grub/x86_64-unknown/
JohnnyHughes

JohnnyHughes

2011-10-03 10:58

administrator   ~0013444

Well ... what we really need are the values from rhel 6.1 x86_64 and i386 as a reference point.

We than then work to get the correct values
JohnnyHughes

JohnnyHughes

2011-10-04 09:08

administrator   ~0013450

Last edited: 2011-10-04 09:14

View 3 revisions

I just installed an RHEL-6.1 x86_64 machine ...

[root@rhel-6 rpm]# rpm -q rpm
rpm-4.8.0-16.el6.x86_64

[root@rhel-6 rpm]# rpm --eval "%_host"
x86_64-unknown-linux-gnu

This means that by default the %_host is x86_64-unknown-linux-gnu on RHEL-6.1 just like it is on CentOS. That is also true for RHEL-6.0.

What this probably means is that we need to force %_host to x86_64-redhat-linux-gnu inside our build environment ... as well as submit a bug upstream.

JohnnyHughes

JohnnyHughes

2011-10-04 12:02

administrator   ~0013453

Upstream bug filed:

http://bugzilla.redhat.com/show_bug.cgi?id=743229
JohnnyHughes

JohnnyHughes

2011-10-04 12:05

administrator   ~0013455

We have verified at least the following SRPMS are impacted:

bash
emacs
grub
gtk2
pango

We will be rebuilding these SRPMS and pushing into 6.0CR and onto the 6.1 ISO set.
slords

slords

2011-10-12 16:58

reporter   ~0013530

These are a list of srpms that show differences based on the _host variable. Not sure if they are affected but there is potential.

antlr
apr
bacula
bash
dirmngr
emacs
gnuplot
gob2
grub
gtk2
ibus
icu
ImageMagick
libevent
libguestfs
librsvg2
libssh2
libwmf
log4cpp
mingw32-gcc
mysql
net-snmp
nfs-utils
pango
php
postgresql
ppl
pycairo
pygtk2
python
ruby
systemtap
wordnet
tru

tru

2011-10-21 20:48

administrator   ~0013595

https://bugzilla.redhat.com/show_bug.cgi?id=743229#c5 don't expect changes from upstream soon :(

https://issues.jboss.org/browse/BGBUILD-267 delayed until we (CentOS) can fix it ourself...
AnYang

AnYang

2011-11-02 06:41

reporter   ~0013692

It's a redhat's trick to prevent the rebuilders build the src.rpm, do not hope the upstream to fix it.
JohnnyHughes

JohnnyHughes

2011-11-22 09:40

administrator   ~0013801

This is fixed in grub-0.97-70.el6.x86_64.rpm and grub-0.97-70.el6.i686.rpm that have been compiled for the 6.1 release.
JohnnyHughes

JohnnyHughes

2011-11-22 09:52

administrator   ~0013802

The following variables are now set in all CentOS mock config files to build properly:

For i386/i686:
%vendor CentOS
%_vendor redhat
%_vendor_host redhat
%_host i386-redhat-linux-gnu

for x86_64:
%vendor CentOS
%_vendor redhat
%_vendor_host redhat
%_host x86_64-redhat-linux-gnu

This seems to fix the issue for all packages. All users who recompile RPMS need to manually set these variables for compatibility with upstream compiles ... we will not be changing this in the RPMS themselves as we only change upstream RPMS for branding related issues and not to fix bugs.
JohnnyHughes

JohnnyHughes

2011-12-06 15:43

administrator   ~0013873

fixed in 6.1

Issue History

Date Modified Username Field Change
2011-07-22 09:15 goldmann New Issue
2011-08-28 00:06 athmane Note Added: 0013163
2011-09-13 17:42 toracat Tag Attached: QA-6.1
2011-09-13 17:51 toracat Note Added: 0013244
2011-09-13 17:52 toracat Status new => acknowledged
2011-09-22 23:36 jsteffan Note Added: 0013354
2011-09-22 23:48 toracat Note Added: 0013355
2011-09-23 16:33 jsteffan Note Added: 0013360
2011-09-30 08:39 JohnnyHughes Note Added: 0013430
2011-10-01 23:35 JohnnyHughes Relationship added related to 0005158
2011-10-02 18:45 toracat Note Added: 0013441
2011-10-03 10:58 JohnnyHughes Note Added: 0013444
2011-10-04 09:08 JohnnyHughes Note Added: 0013450
2011-10-04 09:09 JohnnyHughes Note Edited: 0013450 View Revisions
2011-10-04 09:14 JohnnyHughes Note Edited: 0013450 View Revisions
2011-10-04 12:02 JohnnyHughes Note Added: 0013453
2011-10-04 12:05 JohnnyHughes Note Added: 0013455
2011-10-12 16:58 slords Note Added: 0013530
2011-10-21 20:48 tru Note Added: 0013595
2011-11-02 06:41 AnYang Note Added: 0013692
2011-11-22 09:40 JohnnyHughes Note Added: 0013801
2011-11-22 09:52 JohnnyHughes Note Added: 0013802
2011-12-02 10:43 JohnnyHughes Relationship added related to 0005281
2011-12-06 15:43 JohnnyHughes Note Added: 0013873
2011-12-06 15:43 JohnnyHughes Status acknowledged => resolved
2011-12-06 15:43 JohnnyHughes Fixed in Version => 6.1
2011-12-06 15:43 JohnnyHughes Resolution open => fixed
2012-04-08 17:12 toracat Relationship added related to 0005299