ports/184325: net/tcpdump and net/libpcap port upgrade
Rodrigo Osorio
rodrigo at bebik.net
Wed Nov 27 12:50:01 UTC 2013
>Number: 184325
>Category: ports
>Synopsis: net/tcpdump and net/libpcap port upgrade
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 27 12:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Rodrigo (ros) OSORIO
>Release: FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD sisko 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Update tcpdump from 4.4.0 to 4.5.1
Update libpcap from 1.4.0 to 1.5.1
Latest tcpdump releases commes with an new switch
(-P) to filter the direction of the capture performed by
tcpdump : in/out/inout.
This feature is required at work for our testbed.
The tcpdump compiles and works without error or warning after upgrade.
I also remove NO_STAGE flag and fix install path, tcpdump and libpcat are stage ready !
>How-To-Repeat:
>Fix:
--- tcpdump-4.5.1.patch begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 334952)
+++ Makefile (working copy)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= tcpdump
-PORTVERSION= 4.4.0
+PORTVERSION= 4.5.1
CATEGORIES= net ipv6
MASTER_SITES= http://www.tcpdump.org/release/
@@ -29,12 +29,13 @@
USER_DESC= Drop privileges to nobody
CHROOT_DESC= Chroot to /var/run/tcpdump (set CHROOTDIR to change)
-NO_STAGE= yes
.include <bsd.port.options.mk>
# The --without-crypto flag needs to be explicitly specified. The
# configure script gets confused if you specify --with-crypto and
# thinks this means you *don't* want crypto.
#
+
+CONFIGURE_ARGS+= --enable-pcap_setdirection --with-pcap_setdirection
.if ${PORT_OPTIONS:MCRYPTO}
USE_OPENSSL= yes
.else
@@ -72,7 +73,7 @@
@${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.1," ${WRKSRC}/Makefile
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${PREFIX}/sbin
- ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1
+ ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${STAGEDIR}${PREFIX}/sbin
+ ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
.include <bsd.port.post.mk>
Index: distinfo
===================================================================
--- distinfo (revision 334952)
+++ distinfo (working copy)
@@ -1,2 +1,2 @@
-SHA256 (tcpdump-4.4.0.tar.gz) = 12274bed2cb89098dadf00a022b4d40853c5108369f3b3117aedf21ec61530bd
-SIZE (tcpdump-4.4.0.tar.gz) = 915381
+SHA256 (tcpdump-4.5.1.tar.gz) = 14ab39657128f3a650aed4cf455f76c7590601087b6101c253d698f6e73f0b96
+SIZE (tcpdump-4.5.1.tar.gz) = 1024455
--- tcpdump-4.5.1.patch ends here ---
--- libpcap-1.5.1.patch begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 334952)
+++ Makefile (working copy)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libpcap
-PORTVERSION= 1.4.0
+PORTVERSION= 1.5.1
CATEGORIES= net ipv6
MASTER_SITES= http://www.tcpdump.org/release/
@@ -114,7 +114,7 @@
OPTIONS_DEFAULT= IPV6
-NO_STAGE= yes
+#NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MIPV6}
Index: distinfo
===================================================================
--- distinfo (revision 334952)
+++ distinfo (working copy)
@@ -1,2 +1,2 @@
-SHA256 (libpcap-1.4.0.tar.gz) = 7c6a2a4f71e8ab09804e6b4fb3aff998c5583108ac42c0e2967eee8e1dbc7406
-SIZE (libpcap-1.4.0.tar.gz) = 619045
+SHA256 (libpcap-1.5.1.tar.gz) = 259db4fe1e9f0b6b9c43a057ec5916dec7d0a821b00d6d6c4dff7db2445fa7e4
+SIZE (libpcap-1.5.1.tar.gz) = 640233
Index: files/patch-Makefile.in
===================================================================
--- files/patch-Makefile.in (revision 334952)
+++ files/patch-Makefile.in (working copy)
@@ -1,6 +1,6 @@
---- ./Makefile.in.orig 2012-01-07 23:10:56.713381055 -0500
-+++ ./Makefile.in 2012-01-07 23:10:38.819379443 -0500
-@@ -548,52 +548,19 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -564,49 +564,19 @@
$(DESTDIR)$(includedir)/$$i; done
[ -d $(DESTDIR)$(bindir) ] || \
(mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
@@ -19,42 +19,39 @@
+ j=$$(echo $$i | sed -e 's/3pcap/3/') ; \
$(INSTALL_DATA) $$i \
- $(DESTDIR)$(mandir)/man3/$$i; done
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
-- rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
-- $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
+- (cd $(DESTDIR)$(mandir)/man3 && \
+- rm -f pcap_datalink_val_to_description.3pcap && \
+- $(LN_S) pcap_datalink_val_to_name.3pcap \
+- pcap_datalink_val_to_description.3pcap && \
+- rm -f pcap_dump_fopen.3pcap && \
+- $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
+- rm -f pcap_freealldevs.3pcap && \
+- $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \
+- rm -f pcap_perror.3pcap && \
+- $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \
+- rm -f pcap_sendpacket.3pcap && \
+- $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \
+- rm -f pcap_free_datalinks.3pcap && \
+- $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \
+- rm -f pcap_free_tstamp_types.3pcap && \
+- $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \
+- rm -f pcap_dispatch.3pcap && \
+- $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \
+- rm -f pcap_minor_version.3pcap && \
+- $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \
+- rm -f pcap_next.3pcap && \
+- $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \
+- rm -f pcap_open_dead_with_tstamp_precision.3pcap && \
+- $(LN_S) pcap_open_dead.3pcap \
+- pcap_open_dead_with_tstamp_precision.3pcap && \
+- rm -f pcap_open_offline_with_tstamp_precision.3pcap && \
+- $(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \
+- rm -f pcap_fopen_offline.3pcap && \
+- $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
+- rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
+- $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
+- rm -f pcap_getnonblock.3pcap && \
+- $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
+ $(DESTDIR)$(mandir)/man3/$$j; done
for i in $(MANFILE); do \
$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
--- libpcap-1.5.1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list