Reputation: 137
Is there a way to specify the version of the RPM generated by rpmbuild?
For example: On a machine with RPM version 4.8.0 , I would like to be able to generate rpm files suitable for deployment on a box running RPM version 4.4.2.3, as well as rpm files suitable for deployment on RPM version 4.8.0
I need to do this for legacy reasons - currently I need a dedicated legacy build box with RPM version 4.4.2.3.
TY
Upvotes: 1
Views: 666
Reputation: 6748
You need to use mock
or a VM/Container running the target OS version.
Upvotes: 0
Reputation: 5417
1) If you build package using some recent rpm, it can be deployed on system with older system without problem. E.g. packages build on Fedora 23 can be deployed on RHEL 7 (you need to make sure the macros are expanded correctly, if you are calling rpmbuild directly, but that can be solved by my next point).
2) you you build using mock
then it will create chroot and it will using rpmbuild from that chroot. So on Fedora 23 the command mock -r epel-6-x86_64 foo.src.rpm
will build the package with rpmbuild from Centos/RHEL 6.
Upvotes: 1