debianization

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.

pbuilder

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/

libev

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/

libemu

mkdir libemu
cd libemu
 
git clone git://git.carnivore.it/libemu.git
cd libemu
 
autoreconf -vi
sudo pdebuild
 
cd /tmp/debianization/

liblcfg

mkdir liblcfg
git clone git://git.carnivore.it/liblcfg.git
cd liblcfg/code
 
autoreconf -vi; 
pdebuild
 
cd /tmp/debianization/

dionaea

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

done

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.

Comments

1

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

xg
2010/05/25 17:29
2

Hi xg,

not sure if you're still having issues, but I have just rebuilt my Dionaea installation and encountered a similar issue when running the binary.

Might not be the same issue as I can't tell just from the information you've provided, but in my case I edited the ./configure line for the Dionaea compiliation, I needed to remove the final '/emu/' from the '–with-emu-include='. Could be worth trying to see if it corrects your problem.

I've updated an older post on building Dionaea to include the ./configure operation which made my installation functional. (http://blog.infosanity.co.uk/2010/01/26/building-dionaea/)

Andrew Waite
2010/06/06 15:20
3

Hi,

in order to comply with some standards, I had to change the libemu & liblcfg installpath, both used pkgdir before, now they use libdir (which is the better choice anyway). The documentation was adjusted some time ago.

xg's problem was not using ”-l all -L '*'”, so the cli did not show anything by default.

Besides, I added a support section to the hp, in case you've been unaware of the ml yet.

Markus
2010/06/06 18:39


96 -12 = ?
2010/05/18/debianization.txt · Last modified: 2010/06/15 01:01 by common
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0