Results 1 to 2 of 2
Thread: how to build a common RPM across
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jun 2013
how to build a common RPM across
Here is my requirement.
I want to build a common RPM which can be installed on both RedHat and SUSE.
On Redhat, I want files to be installed under /usr/local/mydirectory
and on SUSE, I want files to be installed under /opt/cmcluster/mydirectory.
I don't want to use the prefix and relocate option.
Is there anyway I can achieve this.
Hi and welcome
No, but you could write one spec file that creates multiple, os specific RPMs.
Note that this approach has some caveats:
- Imho, you are pretty much limited to non-compiled files: redhat and suse have different library versions, features and patch sets.
So an ELF binary will most likely be tied to the platform it was built on. (Usually and hopefully your rpm build machine)
- Different paths are inconsistent and not expected. This is bound to cause confusion, but at the very least more administrative work.
I do not know your usecase in detail but it might be a better approach to consolidate the environments: Reduce to one os or at least use common paths.You must always face the curtain with a bow.