RPM Community Forums

Mailing List Message of <rpm-users>

Re: package foo-1.1.1.x86_64.rpm is intended for a x86_64 architecture

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 12 May 2010 - 22:15:27 CEST
Message-id: <23C65CB8-AF77-4418-A9C7-05B67D0BD366@mac.com>

On May 12, 2010, at 2:52 PM, Marc MERLIN wrote:

> muny20:/tmp# rpm -i biosflash-1.2-1.x86_64.rpm 
> package biosflash-1.2-1 is intended for a x86_64 architecture

Hmmm ... there's --badarch if you jsut want the install to happen.

Otherwise one needs to run rpm --showrc and track the
displayed information back into /usr/lib/rpm/rpmrc configuration
and add/change the arch compatibility tables.


> muny20:/tmp# uname -m
> x86_64
> muny20:/tmp# rpm --version
> RPM version 4.4.1
> 

With 4.4.1 (and I forget 4.0.2) there's also /etc/rpm/platform,
which _SHOULD_ be used in lieu of uname(2) whenever possible.

The file contains a single
	CPU-VENDOR-OS-GNU
line.

There's setarch(1) too, but that's painful overkill imho.

> On another machine with an older rpm binary:
> eou15:/tmp# rpm -i foo-1.1.1.x86_64.rpm 
> eou15:/tmp# uname -m
> x86_64
> eou15:/tmp# rpm --version
> RPM version 4.0.2
> 

diff the --showrc output (or the /usr/lib/rpm/rpmrc files).

> I did compile the new rpm binary with
> ./configure --prefix=/usr --mandir=/usr/share/man --without-selinux  --build i386-gnu-linux
> 
> I did pick i386-gnu-linux because I have a 32bit userland and I did not 
> want a 64bit rpm binary. I'm not sure if this baked in my arch in the rpm
> binary though, I hope not.
> 

Its not baked in the rpm binary. But your goose is cooked no matter what.

> The old rpm:
> eou15:/tmp# grep -r x86-64 /usr/lib/rpm
> eou15:/tmp#
> 
> The new rpm:
> muny20:/tmp#  grep -r x86-64 /usr/lib/rpm
> /usr/lib/rpm/magic:>>18 leshort         62              AMD x86-64,
> Binary file /usr/lib/rpm/magic.mgc matches
> muny20:/tmp# 
> 
> 
> Any idea how I can tell the new rpm to rely on my arch as in uname -m as
> opposed to whatever else it is doing?
> 

Its a bit tricky because of the "automagic", but the arch stuff is buried
in configure and installplatform (there's a a nasty piece of scripting, sigh)

You really want /etc/rpm/platform, not uname(2) and voo-doo asm fixups
for when uname(2) _LIES_ through setarch(8).

73 de Jeff

> Thanks,
> Marc
> -- 
> "A mouse is a device used to point at the xterm you want to type in" - A.S.R.
> Microsoft is to operating systems & security ....
>                                      .... what McDonalds is to gourmet cooking
> Home page: http://marc.merlins.org/  
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
Received on Wed May 12 22:16:02 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.