Bug 647219 - Man Pages for yum and rpm Do Not Mention /etc/rpm/platform
Man Pages for yum and rpm Do Not Mention /etc/rpm/platform
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
i686 Linux
low Severity medium
: rc
: ---
Assigned To: James Antill
BaseOS QE Security Team
Depends On:
  Show dependency treegraph
Reported: 2010-10-27 11:25 EDT by m.gordon
Modified: 2014-01-21 01:19 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-10-27 12:29:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
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).

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