0

I have ganglia already installed in /opt/ganglia-3.1.7 and I would like to collect the files in an RPM to be installed on other systems. Does anyone have a template .spec file for something simple like this?

Nicholas
  • 171
  • 4
  • 3
    also, there's rpm files of ganglia out in the wild. Wouldnt it be easier to use one of those and just distribute the config files ? – Sirex Jan 25 '11 at 16:58

3 Answers3

3

While not the canonical solution, take a look at fpm as a simple method to create an RPM package from a set of files. It's much simpler than writing your own RPM spec, and as a bonus it also generates Debian packages in case you need to run on a .deb-based distribution as well.

natacado
  • 3,367
  • 29
  • 27
0

There is a tutorial section on creating RPM .spec files for your first RPM at rpm.org. Your hardest part will be the first time you create a SPEC file. Another example is in the installation of fonts where the distribution mainly involves dropping files into directories, but some real magic has to occur in the %pre and %post sections to register and unregister the fonts. You could follow this example if you needed to restart a system daemon after installing configuration files.

With your specific request, if you don't want to use the pre-built RPMs, at least download an SRPM, install it, extract the .spec file and remove the source package. Then customize the .spec file for your site and repackage the tool. One caveat though - if you do this to software licensed with the GPL (any version), then you have to be sure to distribute any source code or documentation changes. In this case though, Ganglia is distributed under a BSD license which is more lenient.

zerolagtime
  • 1,428
  • 9
  • 10
0

Can you re-install ganglia again? The you could run the install under checkinstall which will create an rpm for you.

js.
  • 133
  • 1
  • 5