diff --git a/.gitignore b/.gitignore index e12871c..c48e245 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ libpcap-1.1.1.tar.gz /generate-tarball.sh /libpcap-1.5.1.tar.gz /libpcap-1.5.3.tar.gz +/libpcap-1.6.2.tar.gz diff --git a/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch b/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch new file mode 100644 index 0000000..c929ddb --- /dev/null +++ b/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch @@ -0,0 +1,27 @@ +From 208bb414553d5444d82601e6fd4ca25fbb192998 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 29 Sep 2014 08:19:05 +0200 +Subject: [PATCH 1/4] man: tcpdump and tcpslice have manpages in man8 + +Both should be run only by root, hence manpages for them should be located in +/usr/share/man/man8/ +--- + pcap.3pcap.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pcap.3pcap.in b/pcap.3pcap.in +index f5a7e0c..f220e68 100644 +--- a/pcap.3pcap.in ++++ b/pcap.3pcap.in +@@ -882,7 +882,7 @@ use an + script or some other configuration script to check whether the libpcap + 1.0 APIs are available and use them only if they are. + .SH SEE ALSO +-autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8), ++autoconf(1), tcpdump(8), tcpslice(8), pcap-filter(@MAN_MISC_INFO@), pfconfig(8), + usermod(1M) + .SH AUTHORS + The original authors of libpcap are: +-- +1.8.3.1 + diff --git a/0002-pcap-config-mitigate-multilib-conflict.patch b/0002-pcap-config-mitigate-multilib-conflict.patch new file mode 100644 index 0000000..6708d67 --- /dev/null +++ b/0002-pcap-config-mitigate-multilib-conflict.patch @@ -0,0 +1,88 @@ +From 5b80ca39b1f01177e98c78bbc622dfda6f7a7e71 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 29 Sep 2014 08:27:15 +0200 +Subject: [PATCH 2/4] pcap-config: mitigate multilib conflict + +libdir path is different on 64bit and 32bit arches. Hence when installing both +multilib versions on the system yum complains about conflicting pcap-config +file. + +Hence remove libdir references from pcap-config, libdir is in dynamic linker +path anyway. +--- + pcap-config.in | 27 ++++++++------------------- + 1 file changed, 8 insertions(+), 19 deletions(-) + +diff --git a/pcap-config.in b/pcap-config.in +index 206be3b..75f2c9f 100644 +--- a/pcap-config.in ++++ b/pcap-config.in +@@ -7,7 +7,6 @@ + prefix="@prefix@" + exec_prefix="@exec_prefix@" + includedir="@includedir@" +-libdir="@libdir@" + V_RPATH_OPT="@V_RPATH_OPT@" + LIBS="@LIBS@" + +@@ -36,16 +35,6 @@ do + esac + shift + done +-if [ "$V_RPATH_OPT" != "" ] +-then +- # +- # If libdir isn't /usr/lib, add it to the run-time linker path. +- # +- if [ "$libdir" != "/usr/lib" ] +- then +- RPATH=$V_RPATH_OPT$libdir +- fi +-fi + if [ "$static" = 1 ] + then + # +@@ -54,16 +43,16 @@ then + # + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] + then +- echo "-I$includedir -L$libdir -lpcap $LIBS" ++ echo "-lpcap @LIBS@" + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] + then +- echo "-I$includedir -L$libdir $LIBS" ++ echo "@LIBS@" + elif [ "$show_cflags" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_libs" = 1 ] + then +- echo "-L$libdir -lpcap $LIBS" ++ echo "-lpcap @LIBS@" + elif [ "$show_additional_libs" = 1 ] + then + echo "$LIBS" +@@ -75,15 +64,15 @@ else + # + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] + then +- echo "-I$includedir -L$libdir $RPATH -lpcap" ++ echo "-lpcap" + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_cflags" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_libs" = 1 ] + then +- echo "-L$libdir $RPATH -lpcap" ++ echo "-lpcap" + fi + fi +-- +1.8.3.1 + diff --git a/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch b/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch new file mode 100644 index 0000000..c2c9ca2 --- /dev/null +++ b/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch @@ -0,0 +1,28 @@ +From b9fa92532328daad84766753422e8a21fd474e6f Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 29 Sep 2014 08:37:25 +0200 +Subject: [PATCH 3/4] pcap-linux: apparently ctc interfaces on s390 has + ethernet DLT + +--- + pcap-linux.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pcap-linux.c b/pcap-linux.c +index 900ebbc..58292c3 100644 +--- a/pcap-linux.c ++++ b/pcap-linux.c +@@ -3197,6 +3197,10 @@ activate_new(pcap_t *handle) + handle->linktype = DLT_LINUX_SLL; + } + ++ /* Hack to make things work on s390 ctc interfaces */ ++ if (strncmp("ctc", device, 3) == 0) ++ handle->linktype = DLT_EN10MB; ++ + handlep->ifindex = iface_get_id(sock_fd, device, + handle->errbuf); + if (handlep->ifindex == -1) { +-- +1.8.3.1 + diff --git a/0004-pcap-linux-don-t-use-TPACKETV3-for-memory-mmapped-ca.patch b/0004-pcap-linux-don-t-use-TPACKETV3-for-memory-mmapped-ca.patch new file mode 100644 index 0000000..dad6899 --- /dev/null +++ b/0004-pcap-linux-don-t-use-TPACKETV3-for-memory-mmapped-ca.patch @@ -0,0 +1,35 @@ +From 1ce0a55f93bdddb4bdf0956f094f4198f714a42c Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 29 Sep 2014 09:25:52 +0200 +Subject: [PATCH 4/4] pcap-linux: don't use TPACKETV3 for memory mmapped + capture + +There has been numerous reports from users complaining about changes in behavior +of libpcap when using libpcap compiled with TPACKETV3 support. Back out and +disable it. + +See: https://github.com/the-tcpdump-group/libpcap/issues/380 +See: https://github.com/the-tcpdump-group/libpcap/issues/364 + +Resolves: #1131500 +--- + pcap-linux.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/pcap-linux.c b/pcap-linux.c +index 58292c3..b3a7a51 100644 +--- a/pcap-linux.c ++++ b/pcap-linux.c +@@ -193,9 +193,6 @@ + * uses many ring related structs and macros */ + # ifdef TPACKET_HDRLEN + # define HAVE_PACKET_RING +-# ifdef TPACKET3_HDRLEN +-# define HAVE_TPACKET3 +-# endif /* TPACKET3_HDRLEN */ + # ifdef TPACKET2_HDRLEN + # define HAVE_TPACKET2 + # else /* TPACKET2_HDRLEN */ +-- +1.8.3.1 + diff --git a/libpcap-man.patch b/libpcap-man.patch deleted file mode 100644 index e37afbc..0000000 --- a/libpcap-man.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up libpcap/pcap.3pcap.in.man libpcap/pcap.3pcap.in ---- libpcap/pcap.3pcap.in.man 2009-07-03 06:01:12.000000000 +0200 -+++ libpcap/pcap.3pcap.in 2009-07-03 15:00:12.000000000 +0200 -@@ -363,7 +363,7 @@ use an - script or some other configuration script to check whether the libpcap - 1.0 APIs are available and use them only if they are. - .SH SEE ALSO --autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8), -+autoconf(1), tcpdump(8), tcpslice(8), pcap-filter(@MAN_MISC_INFO@), pfconfig(8), - usermod(1M) - .SH AUTHORS - The original authors of libpcap are: diff --git a/libpcap-multilib.patch b/libpcap-multilib.patch deleted file mode 100644 index e359736..0000000 --- a/libpcap-multilib.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up libpcap-1.3.0/pcap-config.in.multilib libpcap-1.3.0/pcap-config.in ---- libpcap-1.3.0/pcap-config.in.multilib 2012-03-29 14:57:32.000000000 +0200 -+++ libpcap-1.3.0/pcap-config.in 2013-03-26 09:56:16.293324264 +0100 -@@ -7,7 +7,6 @@ - prefix="@prefix@" - exec_prefix="@exec_prefix@" - includedir="@includedir@" --libdir="@libdir@" - V_RPATH_OPT="@V_RPATH_OPT@" - LIBS="@LIBS@" - -@@ -36,16 +35,6 @@ do - esac - shift - done --if [ "$V_RPATH_OPT" != "" ] --then -- # -- # If libdir isn't /usr/lib, add it to the run-time linker path. -- # -- if [ "$libdir" != "/usr/lib" ] -- then -- RPATH=$V_RPATH_OPT$libdir -- fi --fi - if [ "$static" = 1 ] - then - # -@@ -54,16 +43,16 @@ then - # - if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] - then -- echo "-I$includedir -L$libdir -lpcap $LIBS" -+ echo "-lpcap @LIBS@" - elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] - then -- echo "-I$includedir -L$libdir $LIBS" -+ echo "@LIBS@" - elif [ "$show_cflags" = 1 ] - then -- echo "-I$includedir" -+ echo "" - elif [ "$show_libs" = 1 ] - then -- echo "-L$libdir -lpcap $LIBS" -+ echo "-lpcap @LIBS@" - elif [ "$show_additional_libs" = 1 ] - then - echo "$LIBS" -@@ -75,15 +64,15 @@ else - # - if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] - then -- echo "-I$includedir -L$libdir $RPATH -lpcap" -+ echo "-lpcap" - elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] - then -- echo "-I$includedir" -+ echo "" - elif [ "$show_cflags" = 1 ] - then -- echo "-I$includedir" -+ echo "" - elif [ "$show_libs" = 1 ] - then -- echo "-L$libdir $RPATH -lpcap" -+ echo "-lpcap" - fi - fi diff --git a/libpcap-s390.patch b/libpcap-s390.patch deleted file mode 100644 index ee7c003..0000000 --- a/libpcap-s390.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up libpcap-1.5.0/pcap-linux.c.s390 libpcap-1.5.0/pcap-linux.c ---- libpcap-1.5.0/pcap-linux.c.s390 2013-11-08 08:05:02.608387300 +0100 -+++ libpcap-1.5.0/pcap-linux.c 2013-11-08 08:08:49.597405024 +0100 -@@ -3181,6 +3181,10 @@ activate_new(pcap_t *handle) - handle->linktype = DLT_LINUX_SLL; - } - -+ /* Hack to make things work on s390 ctc interfaces */ -+ if (strncmp("ctc", device, 3) == 0) -+ handle->linktype = DLT_EN10MB; -+ - handlep->ifindex = iface_get_id(sock_fd, device, - handle->errbuf); - if (handlep->ifindex == -1) { diff --git a/libpcap.spec b/libpcap.spec index dbdc593..5de616a 100644 --- a/libpcap.spec +++ b/libpcap.spec @@ -1,7 +1,7 @@ Name: libpcap Epoch: 14 -Version: 1.5.3 -Release: 5%{?dist} +Version: 1.6.2 +Release: 1%{?dist} Summary: A system-independent interface for user-level packet capture Group: Development/Libraries License: BSD with advertising @@ -9,9 +9,11 @@ URL: http://www.tcpdump.org BuildRequires: glibc-kernheaders >= 2.2.0 bison flex bluez-libs-devel Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz -Patch1: libpcap-man.patch -Patch2: libpcap-multilib.patch -Patch3: libpcap-s390.patch + +Patch0001: 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch +Patch0002: 0002-pcap-config-mitigate-multilib-conflict.patch +Patch0003: 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch +Patch0004: 0004-pcap-linux-don-t-use-TPACKETV3-for-memory-mmapped-ca.patch %description Libpcap provides a portable framework for low-level network @@ -44,10 +46,7 @@ resources needed for developing libpcap applications. %prep %setup -q - -%patch1 -p1 -b .man -%patch2 -p1 -b .multilib -%patch3 -p1 -b .s390 +%autopatch -p1 #sparc needs -fPIC %ifarch %{sparc} @@ -84,6 +83,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a %{_mandir}/man5/pcap*.5* %changelog +* Mon Sep 29 2014 Michal Sekletar - 14:1.6.2-1 +- update to 1.6.2 (#1124174) +- disable TPACKET_V3 support (#1131500) + * Sun Aug 17 2014 Fedora Release Engineering - 14:1.5.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/sources b/sources index f9a9765..ae319c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7e7321fb3aff2f2bb05c8229f3795d4a libpcap-1.5.3.tar.gz +5f14191c1a684a75532c739c2c4059fa libpcap-1.6.2.tar.gz