«

»

Oct 20 2012

Automatic way to create deb and rpm packages

Everybody who has tried to find some reliable and easy-to-use guide on packaging will surely nod in understanding when I yell: “I just need a damn command to create a damn package!”. So far I had not found a simple how to and it really bothered me. Perhaps I have not searched enough but after a while you find it pointless to go on and on.

But, I have good news. Thanks to the wonderful gentleman Jordan Sissel there is hope after all. This guy created a fantastic command-line utility that can build various kinds of packages using various kinds of sources! The tool is called fpm and it’s hosted on GitHub. The simplest way to get it is through Ruby gems:

gem install fpm

Creating packages then becomes a quick and easy task. For example here is the command to create a .deb package from Kippo-Graph’s sources, using most of the optional arguments:

fpm -s dir -t deb -n kippo-graph -d php5 -d php5-gd -d php5-mysql \
-a all -m "BruteForce Lab <info@bruteforcelab.com>" \
--description "Kippo-Graph is a full featured script to visualize statistics \
from a Kippo SSH honeypot." --vendor "BruteForce Lab" \
--url http://bruteforcelab.com/kippo-graph -v 0.7.2 --category misc \
--prefix /var/www/kippo-graph/ ./

And then you can manage the application (jn the above case just the directory that was created) through Synaptic:

How cool is that? 😎

1 comment

  1. Rodrigo Araujo

    Hi! It seems what I’ve been looking for, but I am still not sure how to do that.
    My goal is to easily create .rpm files.
    FPM is capable of generating a package from a github address, for example:
    –url https://github.com/hexchat/hexchat
    Thank you.

Leave a Reply

More in Programming
How to find patterns in large graphs
Δημιουργία ενός botnet, από την αρχή!
Introduction to Test-Driven Development
The big post of Kippo scripts, front-ends, bash one-liners and SQL queries
Close