aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-29 17:39:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-11-07 16:46:09 +0000
commit8701281984bf0f0d8c6df677e2c7c7b5a296fee1 (patch)
tree35d2ae00ca913d009fd493fa138159caa9eab036
parent7546e4ff0a79edb1fb4ed57e7e8c77c2db19c744 (diff)
downloadaports-8701281984bf0f0d8c6df677e2c7c7b5a296fee1.tar.gz
aports-8701281984bf0f0d8c6df677e2c7c7b5a296fee1.tar.bz2
aports-8701281984bf0f0d8c6df677e2c7c7b5a296fee1.tar.xz
main/sipp: upgrade to 3.5.2
-rw-r--r--main/sipp/APKBUILD42
-rw-r--r--main/sipp/fix-stdin.patch19
-rw-r--r--main/sipp/musl-fixes.patch142
3 files changed, 11 insertions, 192 deletions
diff --git a/main/sipp/APKBUILD b/main/sipp/APKBUILD
index 5035cd3570..ca9f2fb2c4 100644
--- a/main/sipp/APKBUILD
+++ b/main/sipp/APKBUILD
@@ -2,57 +2,37 @@
# Contributor: Robert Boisvert <rdboisvert@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=sipp
-pkgver=3.3
-pkgrel=10
+pkgver=3.5.2
+pkgrel=0
pkgdesc="A test tool / traffic generator for the SIP protocol"
-url="http://sipp.sourceforge.net/"
+url="https://github.com/SIPp/sipp"
arch="all"
license="GPL-2.0-or-later"
depends=""
depends_dev=""
-makedepends="linux-headers autoconf automake libressl-dev libpcap-dev ncurses-dev lksctp-tools-dev"
+makedepends="linux-headers autoconf automake openssl-dev libpcap-dev ncurses-dev lksctp-tools-dev"
install=""
subpackages=""
-source="https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
- fix-stdin.patch
- musl-fixes.patch
+source="https://github.com/SIPp/sipp/releases/download/v$pkgver/sipp-$pkgver.tar.gz
"
-_builddir="$srcdir"/$pkgname-$pkgver
-
-prepare() {
- cd "$srcdir"/$pkgname-$pkgver
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- autoreconf -ivf
-}
+builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
+ CFLAGS="$CFLAGS -D_GNU_SOURCE" \
./configure --prefix=/usr \
--with-openssl \
--with-pcap \
- --with-sctp \
- || return 1
+ --with-sctp
make
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir"/usr/share/"$pkgname"
install -m444 -D pcap/* "$pkgdir"/usr/share/"$pkgname"/
}
-md5sums="8c1d513423f9dabee799e738b737e311 sipp-3.3.tar.gz
-887a871ffd6cfb9a831d59c9a69ac294 fix-stdin.patch
-71ac59d3b54d211eca3bd9e07e74a880 musl-fixes.patch"
-sha256sums="17fd02e6aa71d44a90c65e84a1aa39d3aa329990d4aa48e4fb4b895304dbc920 sipp-3.3.tar.gz
-bba2f98200bddf3b2ea83afa43e5689b83af28003b29fd407c934d6831003230 fix-stdin.patch
-d83fa627760551b698ed7f096446065345d8a5e7af375650844807690592e6f8 musl-fixes.patch"
-sha512sums="ab42a71426ae381b9cd1f36e1d64d5c4bfccc1359973e1909f9e9d0ce3b3a4391056250371708b12be0e7de998e88b9224c9f307b1d2ce437942103b6ad10d2b sipp-3.3.tar.gz
-67c9382e6c29642b633bba418ce2ea331c258a682791bd1205e64f4592e8cee0353051e902a7a68879ca3a12000a7808505ffb5ef033b69a28bc1901a727e82e fix-stdin.patch
-8171a26361f3489580970a28aed9090ba50d6b62ea1552068c442275fe40b95794e0602a03c13976741d1ab7866047ff91760a15a6aeb32edc009ba5332f61c0 musl-fixes.patch"
+sha512sums="8285d29afa4c9d6a2396e2352d1442e64c649fcd9cc524e221e22246da49c21cab73128ca6b806aa76bd78598f8f5cbc4a23ee58c5d7ab09035655306adfa725 sipp-3.5.2.tar.gz"
diff --git a/main/sipp/fix-stdin.patch b/main/sipp/fix-stdin.patch
deleted file mode 100644
index c420d5dceb..0000000000
--- a/main/sipp/fix-stdin.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./sipp.cpp.orig 2013-09-23 15:05:15.164194852 +0000
-+++ ./sipp.cpp 2013-09-23 15:07:12.685491835 +0000
-@@ -1989,8 +1989,15 @@
- }
- }
-
-+static int stdin_mode;
-+void reset_stdin_socket() {
-+ fcntl(fileno(stdin), F_SETFL, stdin_mode);
-+}
-+
- void setup_stdin_socket() {
-- fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL) | O_NONBLOCK);
-+ stdin_mode = fcntl(fileno(stdin), F_GETFL);
-+ atexit(reset_stdin_socket);
-+ fcntl(fileno(stdin), F_SETFL, stdin_mode | O_NONBLOCK);
- stdin_socket = sipp_allocate_socket(0, T_UDP, fileno(stdin), 0);
- if (!stdin_socket) {
- ERROR_NO("Could not setup keyboard (stdin) socket!\n");
diff --git a/main/sipp/musl-fixes.patch b/main/sipp/musl-fixes.patch
deleted file mode 100644
index 378b50fcc6..0000000000
--- a/main/sipp/musl-fixes.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-diff --git a/auth.c b/auth.c
-index 544e1a9..e1551ff 100644
---- a/auth.c
-+++ b/auth.c
-@@ -42,24 +42,24 @@ extern char *auth_uri;
- /* AKA */
-
- #define KLEN 16
--typedef u_char K[KLEN];
-+typedef unsigned char K[KLEN];
- #define RANDLEN 16
--typedef u_char RAND[RANDLEN];
-+typedef unsigned char RAND[RANDLEN];
- #define AUTNLEN 16
--typedef u_char AUTN[AUTNLEN];
-+typedef unsigned char AUTN[AUTNLEN];
-
- #define AKLEN 6
--typedef u_char AK[AKLEN];
-+typedef unsigned char AK[AKLEN];
- #define AMFLEN 2
--typedef u_char AMF[AMFLEN];
-+typedef unsigned char AMF[AMFLEN];
- #define MACLEN 8
--typedef u_char MAC[MACLEN];
-+typedef unsigned char MAC[MACLEN];
- #define CKLEN 16
--typedef u_char CK[CKLEN];
-+typedef unsigned char CK[CKLEN];
- #define IKLEN 16
--typedef u_char IK[IKLEN];
-+typedef unsigned char IK[IKLEN];
- #define SQNLEN 6
--typedef u_char SQN[SQNLEN];
-+typedef unsigned char SQN[SQNLEN];
- #define AUTSLEN 14
- typedef char AUTS[AUTSLEN];
- #define AUTS64LEN 29
-@@ -69,7 +69,7 @@ typedef unsigned char RES[RESLEN+1];
- #define RESHEXLEN 17
- typedef char RESHEX[RESHEXLEN];
- #define OPLEN 16
--typedef u_char OP[OPLEN];
-+typedef unsigned char OP[OPLEN];
-
- AMF amfstar="\0\0";
- SQN sqn_he={0x00,0x00,0x00,0x00,0x00,0x00};
-diff --git a/prepare_pcap.c b/prepare_pcap.c
-index 07ccb26..d6dd102 100644
---- a/prepare_pcap.c
-+++ b/prepare_pcap.c
-@@ -15,6 +15,7 @@
- *
- * Author : Guillaume TEISSIER from FTR&D 02/02/2006
- */
-+#define _GNU_SOURCE
- #include <pcap.h>
- #include <stdlib.h>
- #include <netinet/in.h>
-@@ -84,11 +85,11 @@ char errbuf[PCAP_ERRBUF_SIZE];
- int prepare_pkts(char *file, pcap_pkts *pkts) {
- pcap_t *pcap;
- struct pcap_pkthdr *pkthdr = NULL;
-- u_char *pktdata = NULL;
-+ unsigned char *pktdata = NULL;
- int n_pkts = 0;
-- u_long max_length = 0;
-+ unsigned long max_length = 0;
- u_int16_t base = 0xffff;
-- u_long pktlen;
-+ unsigned long pktlen;
- pcap_pkt *pkt_index;
- ether_hdr *ethhdr;
- struct iphdr *iphdr;
-@@ -102,7 +103,7 @@ int prepare_pkts(char *file, pcap_pkts *pkts) {
- ERROR("Can't open PCAP file '%s'", file);
-
- #if HAVE_PCAP_NEXT_EX
-- while (pcap_next_ex (pcap, &pkthdr, (const u_char **) &pktdata) == 1)
-+ while (pcap_next_ex (pcap, &pkthdr, (const unsigned char **) &pktdata) == 1)
- {
- #else
- #ifdef __HPUX
-@@ -112,7 +113,7 @@ int prepare_pkts(char *file, pcap_pkts *pkts) {
- #endif
- if (!pkthdr)
- ERROR("Can't allocate memory for pcap pkthdr");
-- while ((pktdata = (u_char *) pcap_next (pcap, pkthdr)) != NULL)
-+ while ((pktdata = (unsigned char *) pcap_next (pcap, pkthdr)) != NULL)
- {
- #endif
- ethhdr = (ether_hdr *)pktdata;
-@@ -124,7 +125,7 @@ int prepare_pkts(char *file, pcap_pkts *pkts) {
- iphdr = (struct iphdr *)((char *)ethhdr + sizeof(*ethhdr));
- if (iphdr && iphdr->version == 6) {
- //ipv6
-- pktlen = (u_long) pkthdr->len - sizeof(*ethhdr) - sizeof(*ip6hdr);
-+ pktlen = (unsigned long) pkthdr->len - sizeof(*ethhdr) - sizeof(*ip6hdr);
- ip6hdr = (ipv6_hdr *)(void *) iphdr;
- if (ip6hdr->nxt_header != IPPROTO_UDP) {
- fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n");
-@@ -139,13 +140,13 @@ int prepare_pkts(char *file, pcap_pkts *pkts) {
- }
- #if defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__)
- udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2) + 4);
-- pktlen = (u_long)(ntohs(udphdr->uh_ulen));
-+ pktlen = (unsigned long)(ntohs(udphdr->uh_ulen));
- #elif defined ( __HPUX)
- udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2));
-- pktlen = (u_long) pkthdr->len - sizeof(*ethhdr) - sizeof(*iphdr);
-+ pktlen = (unsigned long) pkthdr->len - sizeof(*ethhdr) - sizeof(*iphdr);
- #else
- udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2));
-- pktlen = (u_long)(ntohs(udphdr->len));
-+ pktlen = (unsigned long)(ntohs(udphdr->len));
- #endif
- }
- if (pktlen > PCAP_MAXPACKET) {
-diff --git a/prepare_pcap.h b/prepare_pcap.h
-index ae90556..e89ab52 100644
---- a/prepare_pcap.h
-+++ b/prepare_pcap.h
-@@ -52,8 +52,8 @@ struct iphdr
-
- typedef struct
- {
-- u_char *data;
-- u_long pktlen;
-+ unsigned char *data;
-+ unsigned long pktlen;
- struct timeval ts;
- int partial_check;
- } pcap_pkt;
-@@ -63,7 +63,7 @@ typedef struct
- {
- char *file;
- u_int16_t base;
-- u_long max_length;
-+ unsigned long max_length;
- pcap_pkt *max;
- pcap_pkt *pkts;
- } pcap_pkts;