Quote:
Originally Posted by Random Element
Hi,
I hope someone can help...
I'm trying to build a RPM that can be run on both 32 and 64 bit linux (Centos 6.3 patched up do date).
I've looked at rpm.orgs Max RPM documentation and that's helped a lot. I'm using the %ifarch command to specific different actions for each OS type, but if I run rpmbuild -ba on a 64 bit machine the rpm won't install on a 32 bit machine with the error "Package xxx is intended for a x86_64 architecture". If, when building I run the command "rpmbuild -ba --target i386 xxx.spec" then it will be installed on both 32 and 64 bit servers but always install 32bit components
Is there a way to get just 1 rpm to work with both 32 and 64 bit or do I need to use the 1 spec file to create 2 rpms?
Any help would be gratefully received
Thanks
|
I think the most simple way is create 2 rpms from one specfile.
While it's possible to pack in one rpm both 32-bit and 64-bit libraries/executables
such decision has a number of drawbacks:
- much more complicated build process
- you have to pretend that this package is noarch or i386, when indeed it is not.
- because you have both i386 and x86_64 files then either you have turn off dependencies generation,
or dependencies check will fail most of the times - on all i386 systems an on pure x86-64 systems.
Valery