RPM Community Forums

Mailing List Message of <rpm-users>

Re: Single RPM database, multiple platforms

From: Jeff Putsch <putsch@mxim.com>
Date: Wed 04 Mar 2009 - 01:39:10 CET
Message-Id: <163AEE15-A54A-4DFE-9A2E-32D27F2840DA@mxim.com>
Jeff,

Thanks for the feedback, see below for more questions and guidance  
requests...

On Mar 3, 2009, at 3:40 PM, Jeff Johnson wrote:
>> I'm installing custom built rpm packages for multiple platforms  
>> (CPU-any-OS) on a single NFS shared filesystem. The platforms for  
>> the packages are defined by CPU and OS as in the following example:
>>
>
> Careful, Berkeley DB needs to be built with fcntl locking __AND__
> you need fcntl working across NFS for this deployment to be  
> successful.

Yes. I understand and am aware of the problem. I avoid Berkely DB and  
use SQLite instead to minimize problems. Yes, I know it can have  
problems too, but as numerous people have pointed out on this list, it  
turns out to be good enough in practice.

> Hmmmm, either
> rpm -e foo-1.0-1.amd64-rhel3
> or
> rpm -e foo-1.0-1.amd64-rhel3
> would be the command if you truly had distingushed architectures.

Not sure what you mean here? What is a "distinguished architecture"?  
For both packages %{arch} is "amd64", for one package %{os} is  
"rhel3", for the other %{os} is "rhel4". To wit:

   % rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}-%{OS} 
\n'
   foo-1.0-1.amd64-rhel4
   foo-1.0-1.amd64-rhel3
   foo-1.0-1.sparc64-solaris8
   % rpm -e foo-1.0-1-1.amd64-rhel3
   error: package foo-1.0-1.amd64-rhel3 is not installed
   % rpm --version
   rpm (RPM) 5.1.6
   % rpm --eval '%{_arch}-%{_vendor}-%{_os}'
   amd64-any-rhel4
   % rpm --showrc | grep amd64
   build arch            : amd64
   compatible build archs: amd64
   install arch          : amd64
   compatible archs      : amd64
   macrofiles            : ... paths removed to save space ...
    -1= _host_cpu	amd64
   -14: _prefix	/usr/sepp/amd64-rhel4
   -11= _target	amd64-rhel4
   -11= _target_cpu	amd64
   -14: _usrlibrpm	/usr/sepp/amd64-rhel4/lib/rpm
   -14: l_prefix	/usr/sepp/amd64-rhel4
   -14: l_prefix_static	/usr/sepp/amd64-rhel4

I thought RPM treated %{arch} and %{os} equally, and that the  
"platform"was a
combination of arch, vendor, and os. I'm using "My Company Name" for  
vendor
(via Vendor: in the spec file), thereby making distinguishing parts of  
the
"platform" be arch and os. Perhaps I need to let "Vendor" default to  
"any"?

I set the platform for a given system in the $prefix/etc/rpm/platform  
file (where $prefix is the root of my RPM install tree). The value in  
that file is "ARCH-any-OS" where ARCH and OS are values above.

It looks to me as if that's not happening. It's much more likely I don't
understand what I need to do to properly define "platforms" for RPM such
that I can do what I'm trying to do. Any guidance on getting the  
packages built with a "platform" or architecture such that rpm will  
recognize them distinctly at removal time will be greatly appreciated.

Thanks again for the pointers and advice.

Jeff.

--
Jeff Putsch
Email: putsch@mxim.com
Office: 503.267.5480
Horse ... Water ... Drink.
Received on Wed Mar 4 01:39:12 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.