I've created a little bash script and build it into a RPM package. This little bash script works very well on CentOS 5, CentOS 6 and CentOS 7 (and probably on CentOS 8, not checked)

My question is: Do I really need to build


even if it is the exact same source code and the dependencies are filled in CentOS 6 and CentOS 7 ?

Is there a situation where you can create 1 RPM for all CentOS major version ?


How does it work and what are the best practices ? Thank you

1 Answer 1


You can use the same RPM not only for multiple versions of CentOS but also for multiple different RPM based distributions so if it works feel free to use it everywhere.

The different elX suffixes are usually not added manually but by a build system -- if you for example use Copr to build for EPEL you'll start with a single SRPM and it will build RPMS for different EPEL versions and add the corresponding suffix.

Having different packages for different versions is important for compiled projects because you get different versions of libraries, different compilers and build environments etc. but that isn't the case for a bash script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .