1

Do any of you have a idea how to build a spec file using rpmbuild for a el5 system while running on el6 host? spec is a simple packaging of py script. Difference between el5 and el6 rpm should by python dependencies (python-json, etc.)

I've tried to use rpmbuild -bb --target noarch-linux-el5 foo.spec and simillar, but no luck... :)

Any idea?

Thanks

1

There are exciting and challenging differences between the rpm-build environment on both systems.

Have you considered mock ? It's a software project in fedora-land, at https://fedoraproject.org/wiki/Mock . It's apparently /made/ for cross-environment RPM builds.

My own builds are still self-hosted (make EL5 VM, build there, make EL6 VM, build there, etc) but mock is on my own list to check out.

0

The easy way for me is to create a virtual machines using target distro (el5) in your el6 host. This is just a question of minutes, and the result is certain.

0

Add these to rpmbuild command line (or even add to .rpmmacros).

--define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"

I recommend using mock to build for el5 - but you still need el5 compatible SRPMS, so you need to at least make the source_filedigest compatible.

$ rpmbuild --define "_source_filedigest_algorithm md5" --define "dist .el5" -bs lbatofile.spec
Wrote: /home/stuart/rpm/SRPMS/lbatofile-0.3-1.el5.src.rpm
$ mock -r epel-5-i386 ../SRPMS/lbatofile*el5*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.