rpm-devel  

Re: What should the contents of /etc/rpm/platform be ?

Jeff Johnson
Fri, 22 Jul 2011 11:56:21 -0700

On Jul 22, 2011, at 2:38 PM, Sriram Narayanan wrote:

> Hi:
> 
> I'm facing a problem with the smart package manager downloading the
> createrepo based metadata, but not showing me any packages.
> 
> Anders F Bjorklund on the smart package manager mailing list gave a
> few pointers, most of which I'd already applied.
> 
> He also pointed out to me that I should have /etc/rpm/platform

Yes. You need something like the follow:ng 1-liner in /etc/rpm/platform
        ix86-belenix-linux
You can add a 4th -gnu field to taste (RPM doesn't care what you wish to 
advocate)

Note that your choice of "ix86", while perfectly okay, is a different
arch name than what most distros are using. You might run into some obscure
difficulties down the road if you choose "ix86" instead of "i586" or "i686"
which is more typical for linux distros using smart/yum/zypper/whatever.
> 
> I don't have this with the make install that I carried out. What
> should the contents of this file be ?
> 

There's too many variant names for arch like "ix86" to
attempt automatically populating /etc/rpm/platform with
        make install

On @redhat based systems using anaconda, its anaconda that
populates /etc/rpm/platform based off which kernel is chosen.
Anaconda gets /etc/rpm/platform wrong in many cases, but having
the installer populate /etc/rpm/platform based on what kernel
is chosen to boot is the right approach because that is the most
specific de facto info available.

> Here are various inputs from my side (sorry, it's a bit late for me
> and in my sleep I'm not able to think of anything much).
> 
> sriram@ram-oi:/usr/src/rpm/RPMS/i86pc$ uname -a
> SunOS ram-oi 5.11 oi_147 i86pc i386 i86pc Solaris
> 
> sriram@ram-oi:/usr/src/rpm/RPMS/i86pc$ ls /usr/src/rpm/RPMS/i86pc/
> autoconf-2.68-1.i86pc.rpm  cmake-2.8.5-1.i86pc.rpm  nginx-1.0.4-1.i86pc.rpm
> axel-2.4-1.i86pc.rpm     git-1.7.6-1.i86pc.rpm    repodata
> 
> I build some packages already. (I now install from rpm packages only).
> 
> rpm --eval "%{_arch}-%{_vendor}-%{_os}%{?_gnu}"
> i386-pc-solaris
> 

This string will "work" but the vendor field will be "pc". Almost
nothing depends on the vendor field.

You can try various combinations and see where the values propagate with
        rpm -v --showrc
Note that the -v MUST precede --showrc because --showrc exits from
CLI processing immediately: any further options/args will be ignored.

> $ python
>>>> import rpm
>>>> rpm.archscore("i86pc")
> 0
> 
> I placed "i386-pc-solaris" in /etc/rpm/platform, but that did not help.
> 

Choose a CPU-VENDOR-OS-GNU string and put that in /etc/rpm/platform.

One easy way to guess that string conventionally is to run
        ./config.guess

hth

73 de Jeff
> Sriram
> -- 
> Belenix: www.belenix.org
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org