Bug 647219

Summary: Man Pages for yum and rpm Do Not Mention /etc/rpm/platform
Product: Red Hat Enterprise Linux 5 Reporter: m.gordon
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4   
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-27 12:29:02 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description m.gordon 2010-10-27 11:25:29 EDT
The /etc/rpm/platform file, which is not listed in the yum man page, controls the ability to download and list - using yum or yumdownloader (in the yum-utils package) - rpm files not associated with the platform running the yum command. For example if one wants to download x86_64 rpm files on an i686 machine, the only way to do so is to change the /etc/rpm/platform content from "i686" to "x86_64".

Users need to be aware of the /etc/rpm/platform file. At a minimum this file should be listed in the files section of the man pages. Better yet there should be a brief mention that /etc/rpm/platform must be modified for cross-platform downloads. When reading the documentation one gets the impression that changing the exactarch parameter value on the yum.conf man page will do the trick but that is not the case.

Found using yum.noarch 3.2.22-20.el5.centos and yum-utils.noarch (which contains yumdownloader) 1.1.16-14.el5.centos.1.
Comment 1 James Antill 2010-10-27 12:29:02 EDT
 That file is strictly legacy, it _can_ be used to tweak the arch. setting Eg. from i686 to athlon etc. but that's an implementation detail of anaconda/rpm/yum/etc. ... we don't document the random set of /proc files we also look at and changing it by hand is, being nice, unsupported.
 Completely changing it from i686 to x86_64 is pretty crazy, I've not heard of anybody doing that and I know it can't work with RHN.
Comment 2 m.gordon 2010-10-27 13:17:28 EDT
The /etc/rpm/platform file may be legacy but it is still used by yum when deciding which repositories to search. Try it and you will see.

I'm not suggesting that you support changing /etc/rpm/platform manually. I AM suggesting that you correct your documentation to mention the file because it IS still consulted by the yum code and used by the algorithm.

As to the reason for editing /etc/rpm/platform, there are cases where a machine of one type (platform) is used to query repositories to determine what rpm files will be used by another platform.
Comment 3 James Antill 2010-10-27 13:58:03 EDT
I know it's "used", but as I said we do significantly more than just look at uname -a to work out $arch/$basearch ... documenting all of that would likely not be more useful than what we have now.

For querying use: repoquery --archlist (although, again, this won't work with RHN).