Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I make a rpm from a spec file that can be installed on any host? Currently I have a spec file but when installing the rpm on other hosts I get this:

package my_software-1.0-1dist is for a different operating system

The files in the rpm are just perl programs so if the system has perl and some modules which are already spelled out on requires lines I shouldn't need to check the os. I already have BuildArch: noarch in my RPM.

share|improve this question
add comment

1 Answer

Technically you can't. The OS the package was built for is encoded as part of the RPM header and there's no way to specify "any" as an OS. You can change %_os to another OS when building, but there's no generic value.

$ rpm -q --qf '%{os}\n' setup
linux
share|improve this answer
    
Although "you can't" is definitely an answer im disappointed RPM doesnt provide for this. I'll wait for a while to see if anyone else responds before accepting this answer. –  bot403 Oct 6 '11 at 22:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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