diff options
-rw-r--r-- | network/packit/packit.SlackBuild | 32 | ||||
-rw-r--r-- | network/packit/patches/README | 11 | ||||
-rw-r--r-- | network/packit/patches/fix-spellings-manpage.patch | 43 | ||||
-rw-r--r-- | network/packit/patches/fix_call_to_pcap-bpf_h.patch | 16 | ||||
-rw-r--r-- | network/packit/patches/fix_dups_paths_man_page.patch | 18 | ||||
-rw-r--r-- | network/packit/patches/fix_inject_mode_segfault.patch | 17 | ||||
-rw-r--r-- | network/packit/patches/fix_spelling_errors.patch | 59 | ||||
-rw-r--r-- | network/packit/patches/fix_typo_in_source_code.patch | 17 | ||||
-rw-r--r-- | network/packit/patches/tcpdump.patch | 24 | ||||
-rw-r--r-- | network/packit/patches/update_homepage.patch | 26 |
10 files changed, 248 insertions, 15 deletions
diff --git a/network/packit/packit.SlackBuild b/network/packit/packit.SlackBuild index cd97e7fc49..98091915e4 100644 --- a/network/packit/packit.SlackBuild +++ b/network/packit/packit.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for Packit (Packet toolkit) # # Copyright 2009-2010 Marco Bonetti <sid77@slackware.it> +# Copyright 2016 Brenton Earl <brent@exitstatusone.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,12 +26,12 @@ PRGNAM=packit VERSION=${VERSION:-1.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +43,8 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} DOCS="ChangeLog LICENSE docs" -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -66,30 +67,31 @@ tar xvf $CWD/$PRGNAM-$VERSION.tgz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -patch -p1 < $CWD/tcpdump.patch +for i in $CWD/patches/*.patch; do + patch -p1 --verbose < "$i" +done CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux \ + --mandir=/usr/man make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/network/packit/patches/README b/network/packit/patches/README new file mode 100644 index 0000000000..710b6195f4 --- /dev/null +++ b/network/packit/patches/README @@ -0,0 +1,11 @@ +Thanks to Debian for these patches: +* fix-spellings-manpage.patch +* fix_call_to_pcap-bpf_h.patch +* fix_inject_mode_segfault.patch +* fix_spelling_errors.patch +* fix_typo_in_source_code.patch +* update_homepage.patch + +Slackware contributed patches: +* tcpdump.patch +* fix_dups_paths_man_page.patch diff --git a/network/packit/patches/fix-spellings-manpage.patch b/network/packit/patches/fix-spellings-manpage.patch new file mode 100644 index 0000000000..7e257c3cbd --- /dev/null +++ b/network/packit/patches/fix-spellings-manpage.patch @@ -0,0 +1,43 @@ +Description: fix spelling errors in manpage. +Author: Joao Eriberto Mota Filho <eriberto@debian.org> +Last-Update: 2016-11-20 +Index: packit-1.0/man/packit.8.in +=================================================================== +--- packit-1.0.orig/man/packit.8.in ++++ packit-1.0/man/packit.8.in +@@ -82,7 +82,7 @@ Don't resolve host addresses or port num + \fB-r\fR \fIfile\fR + .br + .ti +5 +-Read packet data from tcpdump formated binary log \fIfile\fR. (example: ++Read packet data from tcpdump formatted binary log \fIfile\fR. (example: + .br + .ti +5 + a file created with -w) +@@ -281,7 +281,7 @@ The IP address of the machine you would + \fB-o\fR \fItype of service\fR + .br + .ti +5 +-TOS values are typically in hexidecimal format, however, packit ++TOS values are typically in hexadecimal format, however, packit + .br + .ti +5 + only accepts TOS values as integers. +@@ -331,7 +331,7 @@ The default value is \fB128\fR. + \fB-V\fR \fIIP protocol number\fR + .br + .ti +5 +-Specify the IP protocol assocated with this packet (RAWIP only). ++Specify the IP protocol associated with this packet (RAWIP only). + .br + .ti +5 + The default value is \fB255\fR. +@@ -899,7 +899,7 @@ from 1-1024 with the SYN flag set and di + .br + + Inject a broadcast ARP reply stating that 4.3.2.1 is at 5:4:3:2:1:0. Also, spoof the source +-ethernet adddress for a little more authenticity and supply the payload in hex. ++ethernet address for a little more authenticity and supply the payload in hex. + .br + + .ti +5 diff --git a/network/packit/patches/fix_call_to_pcap-bpf_h.patch b/network/packit/patches/fix_call_to_pcap-bpf_h.patch new file mode 100644 index 0000000000..77bb9a4dd6 --- /dev/null +++ b/network/packit/patches/fix_call_to_pcap-bpf_h.patch @@ -0,0 +1,16 @@ +Description: call to pcap-bpf.h instead of net/bpf.h. +Author: LaMont Jones <lamont@debian.org> +Last-Update: 2007-09-10 +Index: packit-1.0/configure.in +=================================================================== +--- packit-1.0.orig/configure.in ++++ packit-1.0/configure.in +@@ -130,7 +130,7 @@ AC_CHECK_TYPE(u_int32_t, unsigned int) + AC_CHECK_TYPE(u_int64_t, unsigned long long) + + dnl Checks for header files. +-AC_CHECK_HEADERS(signal.h net/bpf.h sys/time.h) ++AC_CHECK_HEADERS(signal.h pcap-bpf.h sys/time.h) + + AC_ARG_WITH(libnet_includes, + [ --with-libnet-includes=DIR libnet include directory], diff --git a/network/packit/patches/fix_dups_paths_man_page.patch b/network/packit/patches/fix_dups_paths_man_page.patch new file mode 100644 index 0000000000..ba2d588709 --- /dev/null +++ b/network/packit/patches/fix_dups_paths_man_page.patch @@ -0,0 +1,18 @@ +--- packit-1.0.orig/man/packit.8.in 2003-10-03 03:57:51.000000000 -0600 ++++ packit-1.0/man/packit.8.in 2016-12-16 18:20:31.066760261 -0700 +@@ -503,13 +503,13 @@ + \fB-K\fR \fItype\fR + .br + .ti +5 +-Specify the ICMP type. See docs/ICMP.txt for details on types. ++Specify the ICMP type. See the documentation in ICMP.txt. + .br + + \fB-C\fR \fIcode\fR + .br + .ti +5 +-Specify the ICMP code. See docs/ICMP.txt for details on codes. ++Specify the ICMP code. + .br + + \fBECHO REQUEST / ECHO REPLY OPTIONS\fR diff --git a/network/packit/patches/fix_inject_mode_segfault.patch b/network/packit/patches/fix_inject_mode_segfault.patch new file mode 100644 index 0000000000..5ea9cf5099 --- /dev/null +++ b/network/packit/patches/fix_inject_mode_segfault.patch @@ -0,0 +1,17 @@ +Description: fix segfault when using inject-mode + with no arguments. (Closes: 386150) +Author: Deniz Adrian <adrian@netzquadrat.de> +Last-Update: 2006-09-05 +Index: packit-1.0/src/main.c +=================================================================== +--- packit-1.0.orig/src/main.c ++++ packit-1.0/src/main.c +@@ -214,6 +214,8 @@ parse_inject_options(int argc, char *arg + } + } + ++print_usage(); ++ + parse_inject: + #ifdef DEBUG + fprintf(stdout, "DEBUG: parse_inject\n"); diff --git a/network/packit/patches/fix_spelling_errors.patch b/network/packit/patches/fix_spelling_errors.patch new file mode 100644 index 0000000000..dcbc0abf4e --- /dev/null +++ b/network/packit/patches/fix_spelling_errors.patch @@ -0,0 +1,59 @@ +Description: fix spelling errors in some files. +Author: Joao Eriberto Mota Filho +Last-Update: 2015-12-13 +Index: packit-1.0/man/packit.8.in +=================================================================== +--- packit-1.0.orig/man/packit.8.in ++++ packit-1.0/man/packit.8.in +@@ -665,10 +665,10 @@ Define the 32-bit original timestamp. Th + by default. + .br + +-\fB-k\fR \fIrecieved timestamp\fR ++\fB-k\fR \fIreceived timestamp\fR + .br + .ti +5 +-Define the 32-bit recieved timestamp. This value is 0 ++Define the 32-bit received timestamp. This value is 0 + .br + .ti +5 + by default. +Index: packit-1.0/src/print_injection.c +=================================================================== +--- packit-1.0.orig/src/print_injection.c ++++ packit-1.0/src/print_injection.c +@@ -134,7 +134,7 @@ print_injection_details() + case ICMP_TSTAMPREPLY: + fprintf(stdout, "ID: %d Seqn: %d\n", i4hdr_o.id, i4hdr_o.seqn); + fprintf(stdout, "\t Original Timestamp: %d\n", i4hdr_o.otime); +- fprintf(stdout, "\t Recieved Timestamp: %d\n", i4hdr_o.rtime); ++ fprintf(stdout, "\t Received Timestamp: %d\n", i4hdr_o.rtime); + fprintf(stdout, "\t Transmit Timestamp: %d", i4hdr_o.ttime); + + break; +Index: packit-1.0/src/usage.c +=================================================================== +--- packit-1.0.orig/src/usage.c ++++ packit-1.0/src/usage.c +@@ -107,7 +107,7 @@ print_usage() + fprintf(stdout, " -N id ID number\n"); + fprintf(stdout, " -Q seq Sequence number\n"); + fprintf(stdout, " -U ts Original timestamp\n"); +- fprintf(stdout, " -k ts Recieved timestamp\n"); ++ fprintf(stdout, " -k ts Received timestamp\n"); + fprintf(stdout, " -z ts Transmit timestamp\n"); + fprintf(stdout, "\n"); + +Index: packit-1.0/src/shape_ipv4_hdr.c +=================================================================== +--- packit-1.0.orig/src/shape_ipv4_hdr.c ++++ packit-1.0/src/shape_ipv4_hdr.c +@@ -38,7 +38,7 @@ shape_ipv4_hdr(libnet_t *pkt_d) + if(ip4hdr_o.s_addr == NULL) + { + if((ip4hdr_o.n_saddr = libnet_get_ipaddr4(pkt_d)) == -1) +- fatal_error("Unable to retreive local IP address: %s", libnet_geterror(pkt_d)); ++ fatal_error("Unable to retrieve local IP address: %s", libnet_geterror(pkt_d)); + + ip4hdr_o.s_addr = libnet_addr2name4(ip4hdr_o.n_saddr, 1); + } diff --git a/network/packit/patches/fix_typo_in_source_code.patch b/network/packit/patches/fix_typo_in_source_code.patch new file mode 100644 index 0000000000..2f8b625676 --- /dev/null +++ b/network/packit/patches/fix_typo_in_source_code.patch @@ -0,0 +1,17 @@ +Description: fixed a typo in option parsing code which made -D always + random when random -S was used. (Closes: #298799) +Author: Dennis Vshivkov <walrus@amur.ru> +Last-Update: 2005-03-10 +Index: packit-1.0/src/main.c +=================================================================== +--- packit-1.0.orig/src/main.c ++++ packit-1.0/src/main.c +@@ -473,7 +473,7 @@ parse_inject: + + case 'S': + if(strlen(optarg) == 1 && !strncmp(optarg, "R", 1)) +- rand_d_port = 1; ++ rand_s_port = 1; + else + rand_s_port = 0; + diff --git a/network/packit/patches/tcpdump.patch b/network/packit/patches/tcpdump.patch new file mode 100644 index 0000000000..5623499b62 --- /dev/null +++ b/network/packit/patches/tcpdump.patch @@ -0,0 +1,24 @@ +diff -Naur packit-1.0.orig/src/globals.h packit-1.0/src/globals.h +--- packit-1.0.orig/src/globals.h 2003-10-03 11:52:08.000000000 +0200 ++++ packit-1.0/src/globals.h 2008-12-14 22:18:49.000000000 +0100 +@@ -31,7 +31,7 @@ + #include <libnet.h> + #include <pcap.h> + #include <sys/types.h> +-#include <net/bpf.h> ++#include <pcap-bpf.h> + #include <signal.h> + #include <time.h> + #include <stdio.h> +diff -Naur packit-1.0.orig/src/main.h packit-1.0/src/main.h +--- packit-1.0.orig/src/main.h 2003-09-27 16:22:52.000000000 +0200 ++++ packit-1.0/src/main.h 2008-12-14 22:19:18.000000000 +0100 +@@ -26,7 +26,7 @@ + #include <libnet.h> + #include <pcap.h> + #include <sys/types.h> +-#include <net/bpf.h> ++#include <pcap-bpf.h> + #include <signal.h> + #include <time.h> + #include <stdio.h> diff --git a/network/packit/patches/update_homepage.patch b/network/packit/patches/update_homepage.patch new file mode 100644 index 0000000000..1e7e0aa930 --- /dev/null +++ b/network/packit/patches/update_homepage.patch @@ -0,0 +1,26 @@ +Description: update the upstream homepage in program help and manpage. +Author: Joao Eriberto Mota Filho <eriberto@debian.org> +Last-Update: 2015-12-14 +Index: packit-1.0/man/packit.8.in +=================================================================== +--- packit-1.0.orig/man/packit.8.in ++++ packit-1.0/man/packit.8.in +@@ -946,6 +946,6 @@ The latest version can be found at: + .br + .ti +7 + .ft I +-http://packit.sourceforge.net ++http://packetfactory.openwall.net/projects/packit + .ft + +Index: packit-1.0/src/version.h.in +=================================================================== +--- packit-1.0.orig/src/version.h.in ++++ packit-1.0/src/version.h.in +@@ -22,5 +22,5 @@ + + #define P_VERSION "@PACKIT_VERSION@" + #define P_AUTHOR "Darren Bounds <dbounds@intrusense.com>" +-#define P_SITE "http://packit.sourceforge.net" ++#define P_SITE "http://packetfactory.openwall.net/projects/packit" + |