RPM5 ignore arch e os on SOLARIS
- Keywords:
- Last updated by:
- devzero2000
Question :
I have compiled rpm 5.1 on Solaris 10 but I experiencing a problem in
installation phase of rpm packages.
the rpm command seems to ignore the arch/os of the package, I mean it
installs on Solaris platform packages built
for linux or aix platform so also installs on SPARC packages for i386 or
x86_64.
I did something wrong in compilation process?
This kind of issues in rpm 4.x are managed using rpmrc file and I know that
the rpmrc file is obsolete in rpm5
and is replaced by the macros, but currently I have not found the way to
solve this problem using macros.
Answer:
RPM is most definitely not ignoring arch/os.
What is happening is that the expectation is that RPM
guesses and self-configures on solaris.
In this specific case, it is possible to guess that what is
expected is "disaster avoidance" as in not
installing i386 on sparc and vice versa.
That needs affinity patterns written in /etc/rpm/platform.
The problem is that there's no way to write and distribute
those patterns without a well defined name space for arch/os
And the answer there is _NOT_ create a namespace because
RPM tried and failed alread with aliasing issues for arch
and os (even on the common platform, its unclear whether
the operasting system is "Linux" or "linux". And while case
doesn't matter much, its impossible to write/distribute
*RE patterns to determine platform affinity without a
reliable namespace).
Bat there is a positive reply to getting arch/os working on solaris.
The positive reply starts with examining
rpm --showrc
and then looking at 2 or 3 packages that one wants to install with
rpm -qp --yaml *.rpm
(find RPMTAG_
and then devising a set of affinity patterns in /etc/rpm/platform
(the 1st line in /etc/rpm/platform is NOT a pattern, but rather the CPU-VENDOR-OS-GNU
string that you choose to identify this specific host. The remaining
lines _ARE_ patterns and should be ordered from most important
to least important iirc.)
The patterns are applied to RPMTAG_PLATFORM strings in *.rpm packages
to determine affinity (as well as scoring).
Using RPMTAG_PLATFORM allows a uniform approach to "affinity" (and scoring)
through patterns.
Previous schemes implemented in RPM were deficient because it was never clear whether, say, arch
was more important than os in precedence or not. And there is the aliasing
issue that I mentioned already.
Here a similar question asked in the past for Mandriva Linux