Packaging Barnyard2 for Debian Squeeze

793 views
Skip to first unread message

Rich

unread,
Aug 11, 2012, 3:00:19 AM8/11/12
to barnyar...@googlegroups.com
Hi, I am currently performing tests with snort in a virtual lab based on Debian Squeeze (6.0.5). For convenience and portability I decided to try packaging from upstream source all the components required for testing. This includes Barnyard2.

I have been able to package libpcap, libdnet (libdumbnet1 on Debian), daq, and snort resulting in a very speedy deployment for testing. However, I am having a difficult time creating a Debian package for Barnyard2. No matter what I've tried, I end up with a .deb with DOCS and no binary -- lintian reports 'empty package' after each packaging attempt I've made.

Barnyard2 will make && make install fine and works as expected along with snort/daq/libpcap/libdnet. However, building from source on each deployment is something I'd rather avoid if possible to save time and energy.

Any insight on how to 'debianize' Barnyard2 is greatly appreciated. If there is any specific information I can provide to help you help me just let me know. I didn't want my first message to the list to be build logs. :)

Thanks,
Rich Gray (netritious)

Rich

unread,
Aug 11, 2012, 3:48:43 AM8/11/12
to barnyar...@googlegroups.com
Upstream sources I'm currently packaging for test deployment:

libpcap-1.3.0
libdnet-1.12
daq-0.6.2
snort-2.9.2.3
firnsy-barnyard2-v2-1.10-beta2-8-g57597de

beenph

unread,
Aug 11, 2012, 6:03:37 AM8/11/12
to barnyar...@googlegroups.com
Greetings Rich, What issue are you having packaging the barnyard2 binary?

Once its built you should be able to put the binary and configuration
file in any type of package without mutch of an isuse.

-elz
> --
>
>
>

Rich

unread,
Aug 11, 2012, 5:56:41 PM8/11/12
to barnyar...@googlegroups.com
Hi Bob,

I'm trying to package using the Debian New Maintainer's Guide, or at least what I've read about packaging upstream sources.

In a nutshell:

# cd /usr/src
# wget https://github.com/firnsy/barnyard2/tarball/master -O firnsy-barnyard2-v2-1.10-beta2-8-g57597de.tar.gz
# tar -zxf firnsy-barnyard2-v2-1.10-beta2-8-g57597de.tar.gz
# mv firnsy-barnyard2-57597de barnyard2-2.10
# tar -zcf barnyard2-2.10.tar.gz barnyard2-2.10
# cd barnyard2-2.10/
# dh_make -f ../barnyard2-2.10.tar.gz
# debuild -us -uc # I'm pretty certain something is missing in debian/rules since ...
# dpkg-deb -c ../barnyard2_2.10-1_i386.deb # outputs

drwxr-xr-x root/root         0 2012-08-11 15:33 ./
drwxr-xr-x root/root         0 2012-08-11 15:33 ./usr/
drwxr-xr-x root/root         0 2012-08-11 15:33 ./usr/share/
drwxr-xr-x root/root         0 2012-08-11 15:33 ./usr/share/doc/
drwxr-xr-x root/root         0 2012-08-11 15:33 ./usr/share/doc/barnyard2/
-rw-r--r-- root/root       188 2012-08-11 15:05 ./usr/share/doc/barnyard2/README.Debian
-rw-r--r-- root/root      2622 2012-06-22 04:37 ./usr/share/doc/barnyard2/README.gz
-rw-r--r-- root/root       177 2012-08-11 15:05 ./usr/share/doc/barnyard2/changelog.Debian.gz
-rw-r--r-- root/root      1099 2012-08-11 15:05 ./usr/share/doc/barnyard2/copyright

As you can see from the output /usr/local/bin/barnyard2 is missing.

I think it may be that debian/rules is lacking the proper directives but I'm not sure how to specify them.

I've tried:

#!/usr/bin/make -f
%:
        dh $@

override_dh_autoreconf:
        dh_autoreconf -fvi -I ./m4

override_dh_auto_configure:
        dh_auto_configure -- --with-mysql


This seems to have no effect.

I would like to be good enough at packaging barnyard2 and possibly maintain it for Debian since it doesn't appear to be available in the repositories, hence trying to follow the guide.

However, I am open to other methods of packaging for the sake of conveniently testing in the lab.

Obviously I'm just starting on the journey so any help is greatly appreciated.

Thanks,
-Rich

Rich

unread,
Aug 11, 2012, 10:58:44 PM8/11/12
to barnyar...@googlegroups.com
Problem solved!

# dpkg-deb -c barnyard2_2.10-1_i386.deb

drwxr-xr-x root/root         0 2012-08-11 20:59 ./
drwxr-xr-x root/root         0 2012-08-11 20:59 ./usr/
drwxr-xr-x root/root         0 2012-08-11 20:59 ./usr/share/
drwxr-xr-x root/root         0 2012-08-11 20:59 ./usr/share/doc/
drwxr-xr-x root/root         0 2012-08-11 20:59 ./usr/share/doc/barnyard2/
-rw-r--r-- root/root       188 2012-08-11 15:05 ./usr/share/doc/barnyard2/README.Debian
-rw-r--r-- root/root      2622 2012-06-22 04:37 ./usr/share/doc/barnyard2/README.gz
-rw-r--r-- root/root       177 2012-08-11 15:05 ./usr/share/doc/barnyard2/changelog.Debian.gz
-rw-r--r-- root/root      1099 2012-08-11 15:05 ./usr/share/doc/barnyard2/copyright
drwxr-xr-x root/root         0 2012-08-11 20:59 ./usr/bin/
-rwxr-xr-x root/root    203432 2012-08-11 20:59 ./usr/bin/barnyard2

Indeed it was debian/rules lacking the appropriate directives.

# cat barnyard2_2.10/debian/rules

#!/usr/bin/make -f
export DH_VERBOSE=1
export DEB_DH_AUTORECONF_ARGS= -v -I ./m4

%:
        dh $@ --with autoreconf

override_dh_auto_configure:
        dh_auto_configure -- --with-mysql


On another note, I did research a little more about officially maintaining barnyard2 for Debian. According to Debian's WNPP (http://www.debian.org/devel/wnpp/being_packaged) barnyard2 is on the list as of 200 days ago. (ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657114).

Regardless, glad I am able to move on with lab deployments.

Best Regards,
Rich Gray
Reply all
Reply to author
Forward
0 new messages