2

I work on a server software that is targeted for RHEL/CentOS and is currently distributed via a standard RPM file. What brings me here is that it includes a downloadable client engine that users can get to by going through the main web UI.

So this is what I have:

  1. Downloadable agent is still something my company maintains but it has a separate release cycle.
  2. Each new RPM version is typically associated with a specific agent version (typically also newer, but potentially could be the same)
  3. When users upgrade the server, they may wish to continue using the same agent
  4. Agent install is currently packaged with the RPM, so when the server is upgraded, older version of the agent is removed from the system.

Apparently (4) is not desirable so what we want is to keep all agent versions that have every been installed even as the server component is being upgraded.

One possible solution that might work is to put agent into its own RPM that has agent version number in the name and that the main RPM would require as its dependency. So when the product is installed, rpm -qa would show:

<product>-1.0.0
<product>-agent-install-1.0.5-1.0  (might be a better way to format the name)

And when the server is updated, you would see:

<product>-2.0.0
<product>-agent-install-1.0.5-1.0
<product>-agent-install-1.2.0-1.0

As I'm not by any stretch of imagination a Linux expert, I'd like to know if the strategy I outlined above is...

  1. a possible solution (i.e. I'm not missing something obvious that would kill the whole idea)
  2. an acceptable practice or a hack

Is there a cleaner way that you would do instead? For example, I could have each server install, simply copy off the agent installer into a separate directory and since the other directory is not managed by the RPM, it'll stick around and not get deleted. But would that be better?

  • Wouldn't it be easier to just do a cp to a directory common to all server releases (like /opt/servSoft/agent-rpms/) inside the RPM's %post script? It shouldn't get caught by RPM and your server software should be able to just enumerate all the *.rpm files in that directory – Bratchley Jun 11 '13 at 23:37
  • 1
    @JoelDavis: you might be right, that's exactly where I was going in the last paragraph but clearly, not in as much detail. It's certainly an option. – DXM Jun 12 '13 at 3:51
  • D'oh I was in a rush and only read the first 2/3's of the post. But yeah, that seems like it's exactly what you're angling for. – Bratchley Jun 12 '13 at 11:14
  • @JoelDavis: np, let that be a lesson to me for typing too much :) – DXM Jun 12 '13 at 15:28

Your Answer

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

Browse other questions tagged or ask your own question.