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.

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?

share|improve this question
    
I can prolly help you with this, but i dont want to just spew a spec file into my answer, and putting it on a pastebin site means it could disappear at any time. –  Sirex Jan 25 '11 at 16:56
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
add comment

3 Answers 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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

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.