Commit 4e18270e authored by Elijah Grubb's avatar Elijah Grubb

Removed unnecessary patches that have been committed to master

parent fdab0e1c
......@@ -27,17 +27,6 @@ if [ -z "$EMULABTMPSRC" ]; then
export EMULABSRC=/tmp/emulab-devel
cd /tmp
git clone https://gitlab.flux.utah.edu/emulab/emulab-devel.git $EMULABSRC
cd $EMULABSRC
cp $DIRNAME/alpine3/noimagezip.patch .
git apply noimagezip.patch
cp $DIRNAME/alpine3/iperf-alpine.patch .
git apply iperf-alpine.patch
cp $DIRNAME/alpine3/delay-agent.patch .
git apply delay-agent.patch
cp $DIRNAME/alpine3/tmcc-alpine-old.patch .
git apply tmcc-alpine-old.patch
cp $DIRNAME/alpine3/libvnode-docker.patch .
git apply libvnode-docker.patch
[ ! $? -eq 0 ] && exit 1
fi
if [ -z "$PUBSUBSRC" ]; then
......
diff --git a/clientside/event/delay-agent/main.h b/clientside/event/delay-agent/main.h
index 0929a31ff..2affb40cc 100644
--- a/clientside/event/delay-agent/main.h
+++ b/clientside/event/delay-agent/main.h
@@ -36,7 +36,6 @@
/* for setsockopt and stuff */
#include <sys/param.h>
#include <sys/socket.h>
-#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/wait.h>
#ifndef linux
diff --git a/clientside/tmcc/findif.c b/clientside/tmcc/findif.c
index 4e3ac4280..91b422f77 100644
--- a/clientside/tmcc/findif.c
+++ b/clientside/tmcc/findif.c
@@ -71,7 +71,6 @@
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <sys/sysctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/ethernet.h>
diff --git a/clientside/event/linktest/iperf/GNUmakefile.in b/clientside/event/linktest/iperf/GNUmakefile.in
index 3eeb943f0..9f1f7dcf5 100644
--- a/clientside/event/linktest/iperf/GNUmakefile.in
+++ b/clientside/event/linktest/iperf/GNUmakefile.in
@@ -25,7 +25,14 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
-TARBALL = iperf-2.0.2.tar.gz
+IPERFVERSION = 2.0.2
+GCCVERSION := $(shell gcc -v 2>&1 | sed -n -e 's/^gcc version \([0-9]*\)\..*$$/\1/p')
+ifneq ("",$(GCCVERSION))
+ifeq ("6","$(word 1,$(sort 6 $(GCCVERSION)))")
+IPERFVERSION = 2.0.10
+endif
+endif
+TARBALL = iperf-$(IPERFVERSION).tar.gz
include $(OBJDIR)/Makeconf
@@ -62,6 +69,8 @@ endif
all: $(TARGETS)
vars:
+ @echo "GCCVERSION=$(GCCVERSION)"
+ @echo "IPERFVERSION=$(IPERFVERSION)"
@echo "SYSTEM=$(SYSTEM)"
@echo "ISBROKEN=$(ISBROKEN)"
@echo "TARGETS=$(TARGETS)"
@@ -75,7 +84,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules
%-recursive: Makefile force
$(MAKE) -f Makefile $@
-src/emulab-iperf: iperf-2.0.2 config.status build-iperf
+src/emulab-iperf: iperf-$(IPERFVERSION) config.status build-iperf
build-iperf: Makefile
$(MAKE) -f Makefile all
@@ -90,10 +99,10 @@ client-install: $(ITARGETS)
# Note: GNU make wants to pass options in MAKEFLAGS (w) that are incompatible
# with BSD make. So we just force configure to assume/use gmake for BSD.
config.status:
- MAKE=$(MAKE) iperf-2.0.2/configure $(CONFIG_ARGS)
+ MAKE=$(MAKE) iperf-$(IPERFVERSION)/configure $(CONFIG_ARGS)
-iperf-2.0.2:
- $(SRCDIR)/iperf-fetch.sh $(SRCDIR) $(TARBALL)
+iperf-$(IPERFVERSION):
+ $(SRCDIR)/iperf-fetch.sh $(SRCDIR) $(TARBALL) $(IPERFVERSION)
clean:
if [ -r Makefile ]; then $(MAKE) -f Makefile clean; fi
@@ -101,7 +110,7 @@ clean:
reallyclean: clean
rm -rf config.status Makefile compat doc include src \
- iperf-2.0.2 $(TARBALL)
+ iperf-$(IPERFVERSION) $(TARBALL)
Makefile: config.status
diff --git a/clientside/event/linktest/iperf/iperf-fetch.sh b/clientside/event/linktest/iperf/iperf-fetch.sh
index bab79f21d..72b9143a7 100755
--- a/clientside/event/linktest/iperf/iperf-fetch.sh
+++ b/clientside/event/linktest/iperf/iperf-fetch.sh
@@ -22,8 +22,19 @@
# }}}
#
-version=2.0.2
-srcurl="http://sourceforge.net/projects/iperf/files/iperf/iperf 2.02 source"
+if [ -n "$3" ]; then
+ version="$3"
+fi
+if [ -z "$version" ]; then
+ version=2.0.2
+fi
+# The old versions use this funny old URL, and I can't make any sense of
+# why it still works. But of course it doesn't work for new versions.
+if [ "$version" = "2.0.2" ]; then
+ srcurl="http://sourceforge.net/projects/iperf/files/iperf/iperf 2.02 source"
+else
+ srcurl="https://sourceforge.net/projects/iperf2/files/iperf-${version}.tar.gz"
+fi
tarball="iperf-$version.tar.gz"
if [ -x /usr/bin/fetch ]; then
@@ -37,7 +48,7 @@ fi
if [ -n "$1" ]; then srcdir=$1; else srcdir=$PWD ; fi
if [ -n "$2" ]; then tarball=$2; fi
-if [ -n "$3" ]; then host=$3; else host=www.emulab.net ; fi
+if [ -n "$4" ]; then host=$4; else host=www.emulab.net ; fi
dir=`pwd`
if [ ! -d $dir/iperf-$version/src ]; then
@@ -67,7 +78,7 @@ if [ ! -d $dir/iperf-$version/src ]; then
srcdir="../$srcdir"
;;
esac
- cd iperf-$version && patch -p0 < $srcdir/iperf-patch || {
+ cd iperf-$version && patch -p0 < $srcdir/iperf-${version}.patch || {
echo "ERROR: iperf-fetch.sh: patch failed"
exit 1
}
diff --git a/clientside/event/linktest/iperf/iperf-patch b/clientside/event/linktest/iperf/iperf-patch
deleted file mode 100644
index 49aa96e29..000000000
--- a/clientside/event/linktest/iperf/iperf-patch
+++ /dev/null
@@ -1,403 +0,0 @@
-Index: config.guess
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/config.guess,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** config.guess 24 Oct 2005 15:18:31 -0000 1.1.1.1
---- config.guess 13 May 2015 22:06:39 -0000 1.2
-***************
-*** 3,9 ****
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-! timestamp='2005-02-10'
-
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
---- 3,9 ----
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-! timestamp='2015-05-13'
-
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
-***************
-*** 824,829 ****
---- 824,832 ----
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
-+ aarch64:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit 0 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
-Index: compat/Thread.c
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/compat/Thread.c,v
-retrieving revision 1.1.1.1
-diff -c -r1.1.1.1 Thread.c
-*** compat/Thread.c 24 Oct 2005 15:18:32 -0000 1.1.1.1
---- compat/Thread.c 22 Dec 2006 03:48:06 -0000
-***************
-*** 202,208 ****
- #if defined( HAVE_POSIX_THREAD )
- // Cray J90 doesn't have pthread_cancel; Iperf works okay without
- #ifdef HAVE_PTHREAD_CANCEL
-! pthread_cancel( oldTID );
- #endif
- #else // Win32
- // this is a somewhat dangerous function; it's not
---- 202,208 ----
- #if defined( HAVE_POSIX_THREAD )
- // Cray J90 doesn't have pthread_cancel; Iperf works okay without
- #ifdef HAVE_PTHREAD_CANCEL
-! pthread_cancel( thread->mTID );
- #endif
- #else // Win32
- // this is a somewhat dangerous function; it's not
-Index: include/Settings.hpp
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/include/Settings.hpp,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** include/Settings.hpp 24 Oct 2005 15:18:32 -0000 1.1.1.1
---- include/Settings.hpp 31 May 2006 17:20:59 -0000 1.2
-***************
-*** 125,130 ****
---- 125,131 ----
- int mBufLen; // -l
- int mMSS; // -M
- int mTCPWin; // -w
-+ int mAckTimo; // -A
- /* flags is a BitMask of old bools
- bool mBufLenSet; // -l
- bool mCompat; // -C
-***************
-*** 282,287 ****
---- 283,289 ----
-
-
- #define HEADER_VERSION1 0x80000000
-+ #define HEADER_VERSION2 0x40000000
- #define RUN_NOW 0x00000001
-
- // used to reference the 4 byte ID number we place in UDP datagrams
-***************
-*** 327,332 ****
---- 329,335 ----
- int32_t bufferlen;
- int32_t mWinBand;
- int32_t mAmount;
-+ int32_t mAckTimo;
- #else
- signed int flags : 32;
- signed int numThreads : 32;
-***************
-*** 334,339 ****
---- 337,343 ----
- signed int bufferlen : 32;
- signed int mWinBand : 32;
- signed int mAmount : 32;
-+ signed int mAckTimo : 32;
- #endif
- } client_hdr;
-
-Index: include/headers.h
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/include/headers.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** include/headers.h 24 Oct 2005 15:18:33 -0000 1.1.1.1
---- include/headers.h 24 Oct 2005 16:11:28 -0000 1.2
-***************
-*** 180,186 ****
---- 180,190 ----
- // from the gnu archive
-
- #include <iperf-int.h>
-+ #ifdef __FreeBSD__
-+ typedef uint64_t max_size_t;
-+ #else
- typedef uintmax_t max_size_t;
-+ #endif
-
- /* in case the OS doesn't have these, we provide our own implementations */
- #include "gettimeofday.h"
-Index: src/Client.cpp
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/src/Client.cpp,v
-retrieving revision 1.1.1.1
-retrieving revision 1.4
-diff -c -r1.1.1.1 -r1.4
-*** src/Client.cpp 24 Oct 2005 15:18:33 -0000 1.1.1.1
---- src/Client.cpp 31 May 2006 17:20:59 -0000 1.4
-***************
-*** 216,228 ****
- // perform write
- currLen = write( mSettings->mSock, mBuf, mSettings->mBufLen );
- if ( currLen < 0 ) {
-! WARN_errno( currLen < 0, "write2" );
-! break;
- }
-
-! // report packets
-! reportstruct->packetLen = currLen;
-! ReportPacket( mSettings->reporthdr, reportstruct );
-
- if ( delay > 0 ) {
- delay_loop( delay );
---- 216,231 ----
- // perform write
- currLen = write( mSettings->mSock, mBuf, mSettings->mBufLen );
- if ( currLen < 0 ) {
-! if (errno != ENOBUFS) {
-! WARN_errno( currLen < 0, "write2" );
-! break;
-! }
-! currLen = 0;
- }
-
-! // report packets
-! reportstruct->packetLen = currLen;
-! ReportPacket( mSettings->reporthdr, reportstruct );
-
- if ( delay > 0 ) {
- delay_loop( delay );
-***************
-*** 341,346 ****
---- 344,350 ----
- struct timeval timeout;
-
- int count = 0;
-+ int timo = (mSettings->mAckTimo < 0) ? 250 : mSettings->mAckTimo;
- while ( count < 10 ) {
- count++;
-
-***************
-*** 350,357 ****
- // wait until the socket is readable, or our timeout expires
- FD_ZERO( &readSet );
- FD_SET( mSettings->mSock, &readSet );
-! timeout.tv_sec = 0;
-! timeout.tv_usec = 250000; // quarter second, 250 ms
-
- rc = select( mSettings->mSock+1, &readSet, NULL, NULL, &timeout );
- FAIL_errno( rc == SOCKET_ERROR, "select", mSettings );
---- 354,361 ----
- // wait until the socket is readable, or our timeout expires
- FD_ZERO( &readSet );
- FD_SET( mSettings->mSock, &readSet );
-! timeout.tv_sec = (timo / 1000);
-! timeout.tv_usec = (timo % 1000) * 1000;
-
- rc = select( mSettings->mSock+1, &readSet, NULL, NULL, &timeout );
- FAIL_errno( rc == SOCKET_ERROR, "select", mSettings );
-***************
-*** 373,378 ****
- }
- }
-
-! fprintf( stderr, warn_no_ack, mSettings->mSock, count );
- }
- // end write_UDP_FIN
---- 377,382 ----
- }
- }
-
-! fprintf( stderr, warn_no_ack, mSettings->mSock, count, timo );
- }
- // end write_UDP_FIN
-Index: src/Locale.c
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/src/Locale.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** src/Locale.c 24 Oct 2005 15:18:33 -0000 1.1.1.1
---- src/Locale.c 31 May 2006 17:20:59 -0000 1.2
-***************
-*** 331,337 ****
- "WARNING: Path MTU Discovery may not be enabled.\n";
-
- const char warn_no_ack[]=
-! "[%3d] WARNING: did not receive ack of last datagram after %d tries.\n";
-
- const char warn_ack_failed[]=
- "[%3d] WARNING: ack of last datagram failed after %d tries.\n";
---- 331,337 ----
- "WARNING: Path MTU Discovery may not be enabled.\n";
-
- const char warn_no_ack[]=
-! "[%3d] WARNING: did not receive ack of last datagram after %d tries of %d ms.\n";
-
- const char warn_ack_failed[]=
- "[%3d] WARNING: ack of last datagram failed after %d tries.\n";
-Index: src/Settings.cpp
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/src/Settings.cpp,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** src/Settings.cpp 24 Oct 2005 15:18:33 -0000 1.1.1.1
---- src/Settings.cpp 31 May 2006 17:20:59 -0000 1.2
-***************
-*** 105,110 ****
---- 105,111 ----
- {"reportstyle",required_argument, NULL, 'y'},
-
- // more esoteric options
-+ {"ack_timeout",required_argument, NULL, 'A'},
- {"bind", required_argument, NULL, 'B'},
- {"compatibility", no_argument, NULL, 'C'},
- {"daemon", no_argument, NULL, 'D'},
-***************
-*** 167,173 ****
-
- #define SHORT_OPTIONS()
-
-! const char short_options[] = "1b:c:df:hi:l:mn:o:p:rst:uvw:x:y:B:CDF:IL:M:NP:RS:T:UVW";
-
- /* -------------------------------------------------------------------
- * defaults
---- 168,174 ----
-
- #define SHORT_OPTIONS()
-
-! const char short_options[] = "1b:c:df:hi:l:mn:o:p:rst:uvw:x:y:A:B:CDF:IL:M:NP:RS:T:UVW";
-
- /* -------------------------------------------------------------------
- * defaults
-***************
-*** 214,219 ****
---- 215,221 ----
- //main->mTCPWin = 0; // -w, ie. don't set window
-
- // more esoteric options
-+ main->mAckTimo = -1; // -A, -1 means default 250 ms
- //main->mLocalhost = NULL; // -B, none
- //main->mCompat = false; // -C, run in Compatibility mode
- //main->mDaemon = false; // -D, run as a daemon
-***************
-*** 540,545 ****
---- 542,551 ----
-
-
- // more esoteric options
-+ case 'A': // ms of delay between UDP Ack resends
-+ mExtSettings->mAckTimo = atoi( optarg );
-+ break;
-+
- case 'B': // specify bind address
- mExtSettings->mLocalhost = new char[ strlen( optarg ) + 1 ];
- strcpy( mExtSettings->mLocalhost, optarg );
-***************
-*** 790,795 ****
---- 796,804 ----
- (*client)->mHost, REPORT_ADDRLEN);
- }
- #endif
-+ if ( (flags & HEADER_VERSION2) != 0 ) {
-+ (*client)->mAckTimo = ntohl(hdr->mAckTimo);
-+ }
- } else {
- *client = NULL;
- }
-***************
-*** 804,809 ****
---- 813,821 ----
- void Settings_GenerateClientHdr( thread_Settings *client, client_hdr *hdr ) {
- if ( client->mMode != kTest_Normal ) {
- hdr->flags = htonl(HEADER_VERSION1);
-+ if ( hdr->mAckTimo >= 0 ) {
-+ hdr->flags |= htonl(HEADER_VERSION2);
-+ }
- } else {
- hdr->flags = 0;
- }
-***************
-*** 829,834 ****
---- 841,849 ----
- hdr->mAmount = htonl((long)client->mAmount);
- hdr->mAmount &= htonl( 0x7FFFFFFF );
- }
-+ if ( hdr->mAckTimo >= 0 ) {
-+ hdr->mAckTimo = htonl(client->mAckTimo);
-+ }
- if ( client->mMode == kTest_DualTest ) {
- hdr->flags |= htonl(RUN_NOW);
- }
-Index: src/main.cpp
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/src/main.cpp,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** src/main.cpp 24 Oct 2005 15:18:34 -0000 1.1.1.1
---- src/main.cpp 24 Oct 2005 16:11:28 -0000 1.2
-***************
-*** 163,168 ****
---- 163,173 ----
- // read settings from command-line parameters
- Settings_ParseCommandLine( argc, argv, ext_gSettings );
-
-+ // if needed, redirect the output into a specified file
-+ if ( !isSTDOUT( ext_gSettings ) ) {
-+ redirect( ext_gSettings->mOutputFileName );
-+ }
-+
- // Check for either having specified client or server
- if ( ext_gSettings->mThreadMode == kMode_Client
- || ext_gSettings->mThreadMode == kMode_Listener ) {
-Index: src/stdio.c
-===================================================================
-RCS file: /flux/CVS/emulab-iperf/src/stdio.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -c -r1.1.1.1 -r1.2
-*** src/stdio.c 24 Oct 2005 15:18:34 -0000 1.1.1.1
---- src/stdio.c 24 Oct 2005 16:11:28 -0000 1.2
-***************
-*** 255,262 ****
- * ------------------------------------------------------------------- */
-
- void redirect(const char *inOutputFileName) {
-- #ifdef WIN32
--
- FILE *fp;
-
- if ( inOutputFileName == NULL ) {
---- 255,260 ----
-***************
-*** 264,277 ****
- return;
- }
-
-! fp = freopen(inOutputFileName, "a+", stdout);
- if ( fp == NULL ) {
- fprintf(stderr, "redirect stdout failed!\n");
- return;
- }
--
-- #endif
--
- return;
- }
-
---- 262,272 ----
- return;
- }
-
-! fp = freopen(inOutputFileName, "a", stdout);
- if ( fp == NULL ) {
- fprintf(stderr, "redirect stdout failed!\n");
- return;
- }
- return;
- }
-
diff --git a/clientside/event/program-agent/program-agent.c b/clientside/event/program-agent/program-agent.c
index d6e337d44..4755b2a3a 100644
--- a/clientside/event/program-agent/program-agent.c
+++ b/clientside/event/program-agent/program-agent.c
@@ -1630,6 +1630,9 @@ start_program(struct proginfo *pinfo, unsigned long token, char *args)
* Exec the shell. We will reap children by catching SIGCHLD and
* causing an Elvin I/O handler to fire.
*/
+#ifndef _PATH_CSHELL
+#define _PATH_CSHELL "/bin/csh"
+#endif
execl(_PATH_CSHELL, "csh", "-f", "-c", pinfo->cmdline, (char *)NULL);
/* Ug */
--- /dev/null
+++ b/clientside/event/linktest/iperf/iperf-2.0.10.patch
@@ -0,0 +1,174 @@
+diff -Nurb include/Settings.hpp include/Settings.hpp
+--- include/Settings.hpp 2017-08-08 21:54:14.000000000 -0600
++++ include/Settings.hpp 2017-11-15 09:33:55.118085453 -0700
+@@ -139,6 +139,7 @@
+ int mBufLen; // -l
+ int mMSS; // -M
+ int mTCPWin; // -w
++ int mAckTimo; // -A
+ /* flags is a BitMask of old bools
+ bool mBufLenSet; // -l
+ bool mCompat; // -C
+@@ -342,7 +343,8 @@
+ * base flags, keep compatible with older versions
+ */
+ #define HEADER_VERSION1 0x80000000
+-#define HEADER_EXTEND 0x40000000
++#define HEADER_EMULAB 0x40000000
++#define HEADER_EXTEND 0x20000000
+ #define RUN_NOW 0x00000001
+ // newer flags
+ #define UNITS_PPS 0x00000001
+@@ -429,6 +431,7 @@
+ int32_t bufferlen;
+ int32_t mWinBand;
+ int32_t mAmount;
++ int32_t mAckTimo;
+ #else
+ signed int flags : 32;
+ signed int numThreads : 32;
+@@ -436,6 +439,7 @@
+ signed int bufferlen : 32;
+ signed int mWinBand : 32;
+ signed int mAmount : 32;
++ signed int mAckTimo : 32;
+ #endif
+ } client_hdr_v1;
+
+diff -Nurb src/Client.cpp src/Client.cpp
+--- src/Client.cpp 2017-08-08 21:54:14.000000000 -0600