Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 244388 - net-analyzer/dhcpdump-1.8 version bump
Summary: net-analyzer/dhcpdump-1.8 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Thilo Bangert (RETIRED) (RETIRED)
URL: http://www.mavetju.org/unix/dhcpdump-...
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2008-10-25 23:07 UTC by Jeroen Roovers (RETIRED)
Modified: 2008-11-04 19:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
files/dhcpdump-1.8-Makefile.patch (dhcpdump-1.8-Makefile.patch,528 bytes, patch)
2008-10-25 23:08 UTC, Jeroen Roovers (RETIRED)
Details | Diff
dhcpdump-1.8-Makefile.patch (dhcpdump-1.8-Makefile.patch,556 bytes, patch)
2008-10-25 23:24 UTC, Jeroen Roovers (RETIRED)
Details | Diff
dhcpdump/files/dhcpdump-1.8-udp-len.patch (dhcpdump-1.8-udp-len.patch,657 bytes, patch)
2008-10-25 23:36 UTC, Jeroen Roovers (RETIRED)
Details | Diff
dhcpdump-1.8-include.patch (dhcpdump-1.8-include.patch,354 bytes, patch)
2008-10-25 23:53 UTC, Jeroen Roovers (RETIRED)
Details | Diff
dhcpdump-1.8-ebuild.patch (dhcpdump-1.8-ebuild.patch,972 bytes, patch)
2008-10-25 23:56 UTC, Jeroen Roovers (RETIRED)
Details | Diff
dhcpdump-1.8-ebuild.patch (dhcpdump-1.8-ebuild.patch,1.03 KB, patch)
2008-10-26 00:00 UTC, Jeroen Roovers (RETIRED)
Details | Diff
dhcpdump-1.8-debian.patch (dhcpdump-1.8-debian.patch,2.81 KB, text/plain)
2008-10-26 00:44 UTC, Jeroen Roovers (RETIRED)
Details
dhcpdump-1.8-ebuild.patch (dhcpdump-1.8-ebuild.patch,960 bytes, patch)
2008-10-26 00:47 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2008-10-25 23:07:39 UTC
According to URL, a later version than 1.7 was out even before the initial commit of 1.7 to the tree. Sadly, the new version can use (a deprecated) libpcap and doesn't like what it finds in the current stable version:

>>> Compiling source in /var/tmp/portage/net-analyzer/dhcpdump-1.8/work/dhcpdump-1.8 ...
cc -O2 -pipe -march=athlon-xp -c -o dhcpdump.o dhcpdump.c
pod2man --section 8 \
                --date "23 June 2008" \
                --name "DHCPDUMP" \
                --center "User Contributed Software" \
                dhcpdump.pod dhcpdump.8
In file included from dhcpdump.c:30:
strsep.c:63: error: expected identifier or ‘(’ before ‘__extension__’
strsep.c:63: error: expected identifier or ‘(’ before ‘)’ token
strsep.c:66: error: expected identifier or ‘(’ before ‘{’ token
dhcpdump.c: In function ‘pcap_callback’:
dhcpdump.c:153: warning: incompatible implicit declaration of built-in function ‘strftime’
dhcpdump.c:154: warning: passing argument 4 of ‘strftime’ makes pointer from integer without a cast
dhcpdump.c:159: warning: passing argument 2 of ‘strcpy’ makes pointer from integer without a cast
dhcpdump.c:161: warning: passing argument 2 of ‘strcpy’ makes pointer from integer without a cast
dhcpdump.c:166: error: ‘struct udphdr’ has no member named ‘uh_ulen’
dhcpdump.c:169: error: ‘struct udphdr’ has no member named ‘uh_ulen’
make: *** [dhcpdump.o] Error 1
make: *** Waiting for unfinished jobs....
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-25 23:08:27 UTC
Created attachment 169874 [details, diff]
files/dhcpdump-1.8-Makefile.patch

Adhere to CFLAGS and LDFLAGS - doesn't solve the problem mentioned in the Description.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-25 23:24:22 UTC
Created attachment 169877 [details, diff]
dhcpdump-1.8-Makefile.patch

Ignore strsep.c completely.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-25 23:36:04 UTC
Created attachment 169880 [details, diff]
dhcpdump/files/dhcpdump-1.8-udp-len.patch

__FAVOR_BSD shamelessly copied from /usr/include/netinet/udp.h
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-25 23:53:35 UTC
Created attachment 169881 [details, diff]
dhcpdump-1.8-include.patch

Shut gcc up by using the proper includes.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-25 23:56:54 UTC
Created attachment 169883 [details, diff]
dhcpdump-1.8-ebuild.patch

1) add src_unpack() to patch stuff [and inherit eutils]
2) add src_compile to adhere to toolchain [and inherit toolchain-funcs]
3) replace the missing make install target
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-26 00:00:55 UTC
Created attachment 169885 [details, diff]
dhcpdump-1.8-ebuild.patch

4) Add the net-libs/libpcap dependency.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-26 00:08:32 UTC
Debian has more interesting changes at [1].

[1] http://ftp.de.debian.org/debian/pool/main/d/dhcpdump/dhcpdump_1.8-2.diff.gz
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-26 00:44:30 UTC
Created attachment 169890 [details]
dhcpdump-1.8-debian.patch

Debian's patch, stripped down to the dhcpdump.c changes, fixes some signedness warnings that I get on hppa:
dhcpdump.c: In function 'pcap_callback':
dhcpdump.c:154: warning: pointer targets in passing argument 1 of 'strftime' differ in signedness
dhcpdump.c:155: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
dhcpdump.c:156: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
dhcpdump.c:159: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness
dhcpdump.c:161: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness
dhcpdump.c:163: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness
dhcpdump.c:163: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness
dhcpdump.c:164: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness
dhcpdump.c:164: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness
dhcpdump.c: In function 'printdata':
dhcpdump.c:375: warning: pointer targets in passing argument 1 of '__builtin_strncpy' differ in signedness
dhcpdump.c:375: warning: pointer targets in passing argument 2 of '__builtin_strncpy' differ in signedness
dhcpdump.c:521: warning: pointer targets in passing argument 1 of '__builtin_strncpy' differ in signedness
dhcpdump.c:521: warning: pointer targets in passing argument 2 of '__builtin_strncpy' differ in signedness

However, that doesn't get rid of a runtime problem I see on hppa:
elmer ~ # dhcpdump -i eth0
Ignored non IPv4 packet: 2048
Ignored non IPv4 packet: 2048

An x86 system shows the same DHCP traffic fine.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-26 00:47:22 UTC
Created attachment 169892 [details, diff]
dhcpdump-1.8-ebuild.patch

This seems to work better.
Comment 10 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-11-04 19:40:25 UTC
Comment on attachment 169881 [details, diff]
dhcpdump-1.8-include.patch

already part of the debian patch
Comment 11 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-11-04 19:40:39 UTC
Comment on attachment 169880 [details, diff]
dhcpdump/files/dhcpdump-1.8-udp-len.patch

already part of the debian patch
Comment 12 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-11-04 19:41:52 UTC
its in cvs.
thanks for your work - greatly appreciated.

regarding the hppa issue, i'm at a loss...
Comment 13 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-11-04 19:55:51 UTC
/me goes and takes another piece of chocolate...
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-04 19:58:57 UTC
(In reply to comment #12)
> its in cvs.
> thanks for your work - greatly appreciated.
> 
> regarding the hppa issue, i'm at a loss...

I'll look into it later - it would appear to be a problem with IPv6, or perhaps an endian problem which has dhcpdump looking at the data in entirely the wrong way - a problem seen in many (overly simplistic) IP related packages. It shouldn't stop this bug from being RESOLVED as the package currently isn't keyworded for HPPA.