[arch-commits] Commit in tcptrace (7 files)

Baptiste Jonglez zorun at archlinux.org
Thu Jul 6 15:40:33 UTC 2017


    Date: Thursday, July 6, 2017 @ 15:40:32
  Author: zorun
Revision: 242559

archrelease: copy trunk to community-i686, community-x86_64

Added:
  tcptrace/repos/
  tcptrace/repos/community-i686/
  tcptrace/repos/community-i686/PKGBUILD
    (from rev 242558, tcptrace/trunk/PKGBUILD)
  tcptrace/repos/community-i686/tcptrace-6.6.7_no_pcap_offline_read.patch
    (from rev 242558, tcptrace/trunk/tcptrace-6.6.7_no_pcap_offline_read.patch)
  tcptrace/repos/community-x86_64/
  tcptrace/repos/community-x86_64/PKGBUILD
    (from rev 242558, tcptrace/trunk/PKGBUILD)
  tcptrace/repos/community-x86_64/tcptrace-6.6.7_no_pcap_offline_read.patch
    (from rev 242558, tcptrace/trunk/tcptrace-6.6.7_no_pcap_offline_read.patch)

------------------------------------------------------------+
 community-i686/PKGBUILD                                    |   43 +++++++++++
 community-i686/tcptrace-6.6.7_no_pcap_offline_read.patch   |   38 +++++++++
 community-x86_64/PKGBUILD                                  |   43 +++++++++++
 community-x86_64/tcptrace-6.6.7_no_pcap_offline_read.patch |   38 +++++++++
 4 files changed, 162 insertions(+)

Copied: tcptrace/repos/community-i686/PKGBUILD (from rev 242558, tcptrace/trunk/PKGBUILD)
===================================================================
--- repos/community-i686/PKGBUILD	                        (rev 0)
+++ repos/community-i686/PKGBUILD	2017-07-06 15:40:32 UTC (rev 242559)
@@ -0,0 +1,43 @@
+# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
+# Contributor: Heath Caldwell <mrbrobro at ftml dot net>
+# Contributor: Jan-Erik Rediger <badboy at archlinux dot us>
+
+pkgname=tcptrace
+pkgver=6.6.7
+pkgrel=4
+pkgdesc="A TCP dump file analysis tool"
+arch=('i686' 'x86_64')
+url="http://tcptrace.org/"
+license=('GPL')
+depends=('libpcap')
+optdepends=(
+  'tcpdump: for generating dumps'
+  'gnuplot: for plotting graphs'
+  'xplot: for plotting graphs'
+)
+source=("http://tcptrace.org/download/$pkgname-$pkgver.tar.gz"
+        "${pkgname}-${pkgver}_no_pcap_offline_read.patch")
+md5sums=('68128dc1817b866475e2f048e158f5b9'
+         'a2d757088f9a1d3d6dd102d569c76926')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -p1 -i "${srcdir}/${pkgname}-${pkgver}_no_pcap_offline_read.patch"
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  ./configure --prefix=/usr --mandir=/usr/share/man
+  sed -e "s|BINDIR = /usr/local/bin|BINDIR = ${pkgdir}/usr/bin|" -e "s|MANDIR = /usr/local/man/|MANDIR = ${pkgdir}/usr/share/man|" -i Makefile
+  sed -e "s|-o bin -g bin| -o root -g root|" -i Makefile
+  make
+}
+
+package(){
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make install
+  install -Dm755 "${srcdir}/${pkgname}-${pkgver}/xpl2gpl" \
+    ${pkgdir}/usr/bin/xpl2gpl
+}

Copied: tcptrace/repos/community-i686/tcptrace-6.6.7_no_pcap_offline_read.patch (from rev 242558, tcptrace/trunk/tcptrace-6.6.7_no_pcap_offline_read.patch)
===================================================================
--- repos/community-i686/tcptrace-6.6.7_no_pcap_offline_read.patch	                        (rev 0)
+++ repos/community-i686/tcptrace-6.6.7_no_pcap_offline_read.patch	2017-07-06 15:40:32 UTC (rev 242559)
@@ -0,0 +1,38 @@
+diff -rpU3 -x flex_bison tcptrace-6.6.7/tcpdump.c tcptrace-6.6.7_libpcapfix/tcpdump.c
+--- tcptrace-6.6.7/tcpdump.c	2004-10-07 13:07:30.000000000 -0700
++++ tcptrace-6.6.7_libpcapfix/tcpdump.c	2017-03-02 10:00:58.923356327 -0800
+@@ -68,9 +68,6 @@ static char const GCC_UNUSED rcsid[] =
+ 
+ 
+ 
+-/* external ref, in case missing in older version */
+-extern int pcap_offline_read(void *, int, pcap_handler, u_char *);
+-
+ /* global pointer, the pcap info header */
+ static pcap_t *pcap;
+ 
+@@ -246,9 +243,12 @@ pread_tcpdump(
+     void		**pplast)
+ {
+     int ret;
++    struct pcap_pkthdr *pkt_header;
++    const u_char *pkt_data;
+ 
+     while (1) {
+-	if ((ret = pcap_offline_read(pcap,1,(pcap_handler)callback,0)) != 1) {
++	ret = pcap_next_ex(pcap, &pkt_header, &pkt_data);
++	if (ret != 1) {
+ 	    /* prob EOF */
+ 
+ 	    if (ret == -1) {
+@@ -263,6 +263,10 @@ pread_tcpdump(
+ 	    return(0);
+ 	}
+ 
++	if (callback(0, pkt_header, (char *)pkt_data)) {
++		continue;
++	}
++
+ 	/* at least one tcpdump implementation (AIX) seems to be */
+ 	/* storing NANOseconds in the usecs field of the timestamp. */
+ 	/* This confuses EVERYTHING.  Try to compensate. */

Copied: tcptrace/repos/community-x86_64/PKGBUILD (from rev 242558, tcptrace/trunk/PKGBUILD)
===================================================================
--- repos/community-x86_64/PKGBUILD	                        (rev 0)
+++ repos/community-x86_64/PKGBUILD	2017-07-06 15:40:32 UTC (rev 242559)
@@ -0,0 +1,43 @@
+# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
+# Contributor: Heath Caldwell <mrbrobro at ftml dot net>
+# Contributor: Jan-Erik Rediger <badboy at archlinux dot us>
+
+pkgname=tcptrace
+pkgver=6.6.7
+pkgrel=4
+pkgdesc="A TCP dump file analysis tool"
+arch=('i686' 'x86_64')
+url="http://tcptrace.org/"
+license=('GPL')
+depends=('libpcap')
+optdepends=(
+  'tcpdump: for generating dumps'
+  'gnuplot: for plotting graphs'
+  'xplot: for plotting graphs'
+)
+source=("http://tcptrace.org/download/$pkgname-$pkgver.tar.gz"
+        "${pkgname}-${pkgver}_no_pcap_offline_read.patch")
+md5sums=('68128dc1817b866475e2f048e158f5b9'
+         'a2d757088f9a1d3d6dd102d569c76926')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -p1 -i "${srcdir}/${pkgname}-${pkgver}_no_pcap_offline_read.patch"
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  ./configure --prefix=/usr --mandir=/usr/share/man
+  sed -e "s|BINDIR = /usr/local/bin|BINDIR = ${pkgdir}/usr/bin|" -e "s|MANDIR = /usr/local/man/|MANDIR = ${pkgdir}/usr/share/man|" -i Makefile
+  sed -e "s|-o bin -g bin| -o root -g root|" -i Makefile
+  make
+}
+
+package(){
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make install
+  install -Dm755 "${srcdir}/${pkgname}-${pkgver}/xpl2gpl" \
+    ${pkgdir}/usr/bin/xpl2gpl
+}

Copied: tcptrace/repos/community-x86_64/tcptrace-6.6.7_no_pcap_offline_read.patch (from rev 242558, tcptrace/trunk/tcptrace-6.6.7_no_pcap_offline_read.patch)
===================================================================
--- repos/community-x86_64/tcptrace-6.6.7_no_pcap_offline_read.patch	                        (rev 0)
+++ repos/community-x86_64/tcptrace-6.6.7_no_pcap_offline_read.patch	2017-07-06 15:40:32 UTC (rev 242559)
@@ -0,0 +1,38 @@
+diff -rpU3 -x flex_bison tcptrace-6.6.7/tcpdump.c tcptrace-6.6.7_libpcapfix/tcpdump.c
+--- tcptrace-6.6.7/tcpdump.c	2004-10-07 13:07:30.000000000 -0700
++++ tcptrace-6.6.7_libpcapfix/tcpdump.c	2017-03-02 10:00:58.923356327 -0800
+@@ -68,9 +68,6 @@ static char const GCC_UNUSED rcsid[] =
+ 
+ 
+ 
+-/* external ref, in case missing in older version */
+-extern int pcap_offline_read(void *, int, pcap_handler, u_char *);
+-
+ /* global pointer, the pcap info header */
+ static pcap_t *pcap;
+ 
+@@ -246,9 +243,12 @@ pread_tcpdump(
+     void		**pplast)
+ {
+     int ret;
++    struct pcap_pkthdr *pkt_header;
++    const u_char *pkt_data;
+ 
+     while (1) {
+-	if ((ret = pcap_offline_read(pcap,1,(pcap_handler)callback,0)) != 1) {
++	ret = pcap_next_ex(pcap, &pkt_header, &pkt_data);
++	if (ret != 1) {
+ 	    /* prob EOF */
+ 
+ 	    if (ret == -1) {
+@@ -263,6 +263,10 @@ pread_tcpdump(
+ 	    return(0);
+ 	}
+ 
++	if (callback(0, pkt_header, (char *)pkt_data)) {
++		continue;
++	}
++
+ 	/* at least one tcpdump implementation (AIX) seems to be */
+ 	/* storing NANOseconds in the usecs field of the timestamp. */
+ 	/* This confuses EVERYTHING.  Try to compensate. */



More information about the arch-commits mailing list