Building 32-bit version of RPM?

We provide binary packages of our software for several Linux distributions, and we want to provide both 32-bit and 64-bit versions of some packages. On RHEL7 for example, the convention is to supply name-1.2.3.el7.i686.rpm and name-1.2.3.el7.x86_64.rpm. On SLES12, the convention appears to be name-32bit-1.2.3.sles12.x86_64.rpm and name-1.2.3.sles12.x86_64.rpm. (In other words, both packages use the x86_64 arch but one has a “-32bit” suffix.)

I’ve looked at the .spec file for a randomly-selected SLES12 and openSUSE package that is provided this way, but I don’t see any arch-specific logic in there.

Can someone tell me how the 32-bit openSUSE packages are built for x86_64 so that we can reproduce it in our own builds?

Thanks,
Mark

Your description suggests a 64-bit package, but with 32-bit support. For example cups-libs-32bit-1.5.4-147.1.x86_64 is a 64-bit package providing libcups 32-bit library.

This is not a SLES forum, but normally a 32-bit binary RPM would be named name-xx.yy.zz.i586.rpm (or similar).

BTW, these might be useful to you

https://en.opensuse.org/openSUSE:Build_Service_Installation_Tutorial
https://en.opensuse.org/Portal:Build_Service

Thanks for the replies.

Yes, this is what I was referring to. I’m wondering how rpmbuild is invoked for such a package and/or what techniques are used in the package’s .spec file to generate the 32bit version of the package.

Mark

Building with rpmbuild is tedious when there are better ways now. (If you’re trying to build 32-bit packages on a 64-bit system, you’d need to use a chroot environment.)

The beauty of OBS is that you can use a graphical interface via the CLI using osc.
http://seravo.fi/2012/cross-distribution-packaging-with-the-open-build-service

Hopefully, those more familiar with building packages can expand on this more meaningfully.

Hi
It’s a build feature of OBS and the file called baselibs.conf, for example;
https://build.opensuse.org/package/show?project=Base%3ASystem&package=termcap
This provides the 32bit shared library.

Some are nothing, for example gcc, have a look here at the spec file how gcc-32bit is created (just a README…);
https://build.opensuse.org/package/show/devel:gcc/gcc