Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Are there some guidelines, or does anyone have suggestions on how I should package something that I need to be able to have multiple versions of installed at the same time?

share|improve this question
add comment

2 Answers

I'm not sure if this fits with what you're trying to accomplish, but on a project I worked on, we did this by first dictating a directory structure, something like:

/usr/local/[project_name]/[version]

where project_name was the "base name" of the project, and version was a specific tagged release. We then used an arbitrary number for the RPM version (monotonically increasing), so that releases within the same tag or branch could be RPM-upgraded without conflicting with other tags/branches. This means you need to encode a version number somewhere in the RPM name header, rather than the version, e.g.

Name: foobar-1.0
Version: 1234
Release: 1
# ...etc...

In this case the RPM might install to under the path /usr/local/foobar/1.0 and subsequent versions would be named "foobar-2.0" and be installed similarly.

The name "foobar-1.0" implies that you need some other system, not the RPM system, to keep track of version numbers - we used a shell script that simply generated the specfile on demand for a tagged release. This can be a bit cumbersome, but it buys you the flexibility of being able to install multiple versions of a package in a common way, and be able to use more than one at the same time.

This is just a suggestion, and YMMV obviously.

share|improve this answer
add comment

Just give the packages different names, and make sure they install files into separate locations.

Or bundle all the versions into a single package.

share|improve this answer
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.