Installing software using apt is convenient, compiling software using pbuilder allows creating packages apt can install - without having to install the dependencies required to compile the software yourself.
Therefore, some notices how to create debian packages for dionaea, including the libev, libemu and liblcfg dependencies.
This doc refers to Ubuntu >= 9.04 (karmic), of course it should be possible to use this on any debian plattform, but the effort may be slightly higher, as you'll have to backport some more packages (at least python3 and cython).
Backporting packages is rather easy, we'll backport libev 3.9 from Debian Unstable here.
Before we start, we have to install pbuilder, and make it use universe for Ubuntu (debian may need something else).
~/.pbuilderrc
COMPONENTS="main restricted universe multiverse"
Now, we create a pbuilder base image, and prepare some path where to create the packages:
sudo pbuilder create
mkdir /tmp/debianization/
cd /tmp/debianization/
As mentioned before, we have to backport libev, but it is rather easy:
mkdir libev
cd libev
wget http://ftp.de.debian.org/debian/pool/main/libe/libev/libev_3.9-1.dsc http://ftp.de.debian.org/debian/pool/main/libe/libev/libev_3.9.orig.tar.gz http://ftp.de.debian.org/debian/pool/main/libe/libev/libev_3.9-1.diff.gz
sudo pbuilder build libev_3.9-1.dsc
cd /tmp/debianization/
mkdir libemu
cd libemu
git clone git://git.carnivore.it/libemu.git
cd libemu
autoreconf -vi
sudo pdebuild
cd /tmp/debianization/
mkdir liblcfg
git clone git://git.carnivore.it/liblcfg.git
cd liblcfg/code
autoreconf -vi;
pdebuild
cd /tmp/debianization/
We have to modify this baseimage, as pbuilder can not grab the already created packages from the internet, therefore we install them into the image.
To avoid changing the image, we copy it before.
sudo cp /var/cache/pbuilder/base.tgz /var/cache/pbuilder/dionaea-base.tgz
sudo pbuilder login --basetgz /var/cache/pbuilder/dionaea-base.tgz --save-after-login
...
# File extracted to: /var/cache/pbuilder/build//17065
On a different shell:
sudo cp /var/cache/pbuilder/result/*.deb /var/cache/pbuilder/build//1705/tmp/
In the pbuilder shell:
cd /tmp
dpkg -i *.deb
exit
Update the dionaea base to include the universe repository:
sudo pbuilder update --basetgz /var/cache/pbuilder/dionaea-base.tgz --override-config
Now, we can build the dionaea package:
mkdir dionaea
cd dionaea
git clone git://git.carnivore.it/dionaea.git
cd dionaea
autoreconf -vi;
pdebuild -- --basetgz /var/cache/pbuilder/dionaea-base.tgz
Now, look into your /var/cache/pbuilder/result/:
dionaea_0.1.0_amd64.changes
dionaea_0.1.0_amd64.deb
dionaea_0.1.0.dsc
dionaea_0.1.0.tar.gz
libemu_0.2.0-1_amd64.changes
libemu_0.2.0-1_amd64.deb
libemu_0.2.0-1.dsc
libemu_0.2.0-1.tar.gz
libemu-dev_0.2.0-1_amd64.deb
libev3_3.9-1_amd64.deb
libev_3.9-1_amd64.changes
libev_3.9-1.diff.gz
libev_3.9-1.dsc
libev_3.9.orig.tar.gz
libev-dev_3.9-1_amd64.deb
libev-libevent-dev_3.9-1_all.deb
liblcfg_0.2.0-1_amd64.changes
liblcfg_0.2.0-1_amd64.deb
liblcfg_0.2.0-1.dsc
liblcfg_0.2.0-1.tar.gz
liblcfg-dev_0.2.0-1_amd64.deb
You can install dionaea using:
dpkg -i liblcfg_0.2.0-1_amd64.deb libev3_3.9-1_amd64.deb libemu_0.2.0-1_amd64.deb dionaea_0.1.0_amd64.deb
Actually it does not install a init.d script yet, therefore you'll have to install by hand, or send me a diff on the debian control files.
If you want to recompile a packages for a different version or plattform, you can create the pbuilder base image and recompile the package afterwards, e.g.:
pbuilder --basetgz /var/cache/pbuilder/debian-etch-base.tgz libemu_0.2.0-1.dsc
That's it.
hi, I installed dionaea on my debian box, but after I started it, I got some messages and dionaea seemed to freeze forever, and the only thing I can do is to kill it by Ctrl-C. Do you have any idea about this? Thx very much.
below is the output on the screen.
Dionaea Version 0.1.0 Compiled on Linux/x86 at May 25 2010 22:33:35 with gcc 4.4.4 Started on DellWS running Linux/i686 release 2.6.22-3-686-bigmem processors emu config emulation limits files = "3" filesize = "524288" sockets = "3" sustain = "120" idle = "30" cpu = "120" steps = "1073741824" api connect host = "127.0.0.1" port = "4444" config emulation limits files = "3" filesize = "524288" sockets = "3" sustain = "120" idle = "30" cpu = "120" steps = "1073741824" api connect host = "127.0.0.1" port = "4444"administrative reformatting