[libpcap/f21] spec: update to 1.6.2

Michal Sekletar msekleta at fedoraproject.org
Mon Sep 29 15:07:11 UTC 2014


commit 656dce8da1761cd3f8797c646e64b6d4fe5de90a
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Mon Sep 29 15:17:16 2014 +0200

    spec: update to 1.6.2
    
    This commit also disables support for TPACKET_V3 mmaped packet capture
    
    Resolves: #1131500,#1124174

 .gitignore                                         |    1 +
 ...cpdump-and-tcpslice-have-manpages-in-man8.patch |   27 +++++++++++++++
 ...02-pcap-config-mitigate-multilib-conflict.patch |   25 ++++++++++++--
 ...apparently-ctc-interfaces-on-s390-has-eth.patch |   28 ++++++++++++++++
 ...don-t-use-TPACKETV3-for-memory-mmapped-ca.patch |   35 ++++++++++++++++++++
 libpcap-man.patch                                  |   12 -------
 libpcap-s390.patch                                 |   14 --------
 libpcap.spec                                       |   21 +++++++-----
 sources                                            |    2 +-
 9 files changed, 126 insertions(+), 39 deletions(-)
---
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 <msekleta at redhat.com>
+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/libpcap-multilib.patch b/0002-pcap-config-mitigate-multilib-conflict.patch
similarity index 65%
rename from libpcap-multilib.patch
rename to 0002-pcap-config-mitigate-multilib-conflict.patch
index e359736..6708d67 100644
--- a/libpcap-multilib.patch
+++ b/0002-pcap-config-mitigate-multilib-conflict.patch
@@ -1,6 +1,22 @@
-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
+From 5b80ca39b1f01177e98c78bbc622dfda6f7a7e71 Mon Sep 17 00:00:00 2001
+From: Michal Sekletar <msekleta at redhat.com>
+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@"
@@ -67,3 +83,6 @@ diff -up libpcap-1.3.0/pcap-config.in.multilib libpcap-1.3.0/pcap-config.in
 +		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 <msekleta at redhat.com>
+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 <msekleta at redhat.com>
+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.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 <msekleta at redhat.com> - 14:1.6.2-1
+- update to 1.6.2 (#1124174)
+- disable TPACKET_V3 support (#1131500)
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 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


More information about the scm-commits mailing list