Bug 103335

Summary: RFE: provide a way to override the platform
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: rpmAssignee: Paul Nasrat <pnasrat>
Status: CLOSED DEFERRED QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: leonard-rh-bugzilla
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-06 16:31:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
rpm-platform.patch none

Description Enrico Scholz 2003-08-28 23:15:39 UTC
Description of problem:

When setting up chroot environments from the outside, rpm assumes that the
chroot-environment has the same architecture as the host-environment. This is
very bad when e.g. host is an i686 and the target-system an arm or i586.

Since bug #84055 was refused, there is needed another way to do this. IMO, with
using environment variables, this can be reached without much effort.


Version-Release number of selected component (if applicable):

rpm-4.2.1-0.30

Comment 1 Enrico Scholz 2003-08-28 23:18:09 UTC
Created attachment 94057 [details]
rpm-platform.patch

patch is untested but on the first glance, it should be compilable.

Comment 2 Leonard den Ottolander 2004-03-10 13:46:26 UTC
This seems a bit of a half baked solution, although I can understand
you don't want to touch /etc/rpm/platform every time.

A real fix would be a command line switch (--targetarch). Now how
about adding a patch for that ;) ?


Comment 3 Enrico Scholz 2004-03-11 14:56:48 UTC
Why half baked? Configuration through environment variables is an
often used and very effective solution (e.g. think on all the *_proxy
variables or TERM or TZ or ...).

A CLI switch does not really help since tools like apt or yum would
not know how to use it. AFAIR, reading of /etc/rpm/platform happens
*very* early and before CLI options are evaluated.

The latter fact makes it impossible too, to use a %macro for it.

Comment 4 Leonard den Ottolander 2004-03-11 16:31:49 UTC
I guess you are right. Your argumentation completely convinced me ;-) .


Comment 5 Jeff Johnson 2006-01-06 16:31:52 UTC
No way is rpm arch going to be set from an RPM_PLATFORM environment variable.

Teaching install/erase/upgrade modes about --target (which has already been done
for --query --specedit) is an alternative.

Deferred until somewhen ...