Commit 7181889f authored by Robert Ricci's avatar Robert Ricci

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents 30975e70 131079fe
......@@ -86,6 +86,10 @@ LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd \
snmp.4:${PORTSDIR}/net-mgmt/net-snmp4 \
ulsshxmlrpcpp.0:${PORTSDIR}/misc/ulsshxmlrpcpp
.if ${OSMAJOR} >= 6
LIB_DEPENDS+= xerces-c.27:${PORTSDIR}/textproc/xerces-c2
.endif
#
# Until/unless the pubsub Makefile is changed, we must include libelvin.
# This is because the pubsub libraries have to be built with ELVIN_COMPAT
......@@ -197,3 +201,4 @@ vars:
@echo "BUILD_DEPENDS=$(BUILD_DEPENDS)"
@echo "LIB_DEPENDS=$(LIB_DEPENDS)"
@echo "RUN_DEPENDS=$(RUN_DEPENDS)"
@echo "PERL_VER/ARCH=${PERL_VER}/${PERL_ARCH}"
......@@ -2798,6 +2798,9 @@ sub GenVirtLans($)
if ($emulated) {
$others->{'emulated'} = 1;
}
if ($layer == 1) {
$protocol = "wire";
}
if ($trivial_ok) {
$others->{'trivial_ok'} = 1;
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# Copyright (c) 2006-2010 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -12,12 +12,12 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tbsetup/nsverify
NS_VERSION=2.29
NS_TAR_VERSION=2.29.2
TCLCL_VERSION=1.17
NS_SRC_TARBALL=ns-allinone-$(NS_TAR_VERSION).tar.gz
# XXX these need to be in synch with ns-fetch.sh
NS_VERSION=2.34
TCLCL_VERSION=1.19
NS_SRC_TARBALL=ns-allinone-$(NS_VERSION).tar.gz
LOCALPKGHOST = @OUTERBOSS_NODENAME@
PKGHOST = www.emulab.net
FETCH = fetch -m
include $(OBJDIR)/Makeconf
......@@ -46,31 +46,9 @@ post-install:
chmod u+s $(INSTALL_LIBEXECDIR)/verify-ns
ns-allinone-$(NS_VERSION):
@if test -f /share/tarballs/$(NS_SRC_TARBALL); then \
echo "Unpacking $(NS_SRC_TARBALL)"; \
tar xfz /share/tarballs/$(NS_SRC_TARBALL); \
else \
( echo "Downloading $(NS_SRC_TARBALL)"; \
if [ -n "$(LOCALPKGHOST)" ]; then \
$(FETCH) http://$(LOCALPKGHOST)/downloads/$(NS_SRC_TARBALL);\
fi ; \
if [ ! -s $(NS_SRC_TARBALL) ]; then \
$(FETCH) http://$(PKGHOST)/downloads/$(NS_SRC_TARBALL); \
fi ;\
echo "Unpacking $(NS_SRC_TARBALL)"; \
tar xfz $(NS_SRC_TARBALL); ) \
fi
patch-ns-$(NS_VERSION):
patch -d ns-allinone-$(NS_VERSION)/ns-$(NS_VERSION) \
< $(SRCDIR)/ns-$(NS_VERSION).patch
if test -e $(SRCDIR)/tclcl-$(TCLCL_VERSION).patch; then \
patch -d ns-allinone-$(NS_VERSION)/tclcl-$(TCLCL_VERSION) \
< $(SRCDIR)/tclcl-$(TCLCL_VERSION).patch; \
fi
touch $@
nstb: ns-allinone-$(NS_VERSION) patch-ns-$(NS_VERSION)
$(SRCDIR)/ns-fetch.sh $(SRCDIR) $(NS_SRC_TARBALL) $(LOCALPKGHOST)
nstb: ns-allinone-$(NS_VERSION)
@cd $</tclcl-$(TCLCL_VERSION); \
./configure --with-tcl=/usr/local; \
$(MAKE)
......@@ -79,7 +57,7 @@ nstb: ns-allinone-$(NS_VERSION) patch-ns-$(NS_VERSION)
$(MAKE)
cp $</ns-$(NS_VERSION)/ns $@
control-install: nstb \
control-install: $(LIB_STUFF) $(LIBEXEC_STUFF) nstb \
$(addprefix $(INSTALL_LIBDIR)/nsverify/, $(LIB_STUFF)) \
$(addprefix $(INSTALL_LIBEXECDIR)/nsverify/, $(LIBEXEC_STUFF) nstb)
......@@ -104,3 +82,7 @@ $(INSTALL_DIR)/opsdir/libexec/nsverify/%: %
$(INSTALL) $< $@
clean:
rm -f $(LIB_STUFF) $(LIBEXEC_STUFF) $(BOSSLIBEXEC)
reallyclean:
rm -rf ns-allinone-$(NS_VERSION) $(NS_SRC_TARBALL)
diff -ur ./aomdv/aomdv.cc ../../ns-allinone-2.34-patched/ns-2.34/aomdv/aomdv.cc
--- ./aomdv/aomdv.cc 2009-06-14 10:35:44.000000000 -0700
+++ ../../ns-allinone-2.34-patched/ns-2.34/aomdv/aomdv.cc 2009-12-21 18:59:34.000000000 -0800
@@ -86,6 +86,7 @@
#include <aomdv/aomdv_packet.h>
#include <random.h>
#include <cmu-trace.h>
+#include <sys/socket.h>
//#include <energy-model.h>
#define max(a,b) ( (a) > (b) ? (a) : (b) )
diff -ur ./tcl/lan/vlan.tcl ../../ns-allinone-2.34-patched/ns-2.34/tcl/lan/vlan.tcl
--- ./tcl/lan/vlan.tcl 2009-06-14 10:35:40.000000000 -0700
+++ ../../ns-allinone-2.34-patched/ns-2.34/tcl/lan/vlan.tcl 2009-12-21 18:56:42.000000000 -0800
@@ -143,8 +143,12 @@
$src add-neighbor $self
set sid [$src id]
- set link_($sid:$id_) [new Vlink $ns_ $self $src $self $bw 0]
- set link_($id_:$sid) [new Vlink $ns_ $self $self $src $bw 0]
+ set link_($sid:$id_) [new Vlink $ns_ $self $src $self $bw $delay]
+ set link_($id_:$sid) [new Vlink $ns_ $self $self $src $bw $delay]
+
+ # linktest: add to the linktest set of links.
+ $ns_ addLTLink $sid:$id_
+ $ns_ addLTLink $id_:$sid
$src add-oif [$link_($sid:$id_) head] $link_($sid:$id_)
$src add-iif [[$nif set iface_] label] $link_($id_:$sid)
@@ -520,6 +524,12 @@
$lan addNode $nodelist $bw $delay $llType $ifqType $macType \
$phyType $mactrace $ifqLen
+ # linktest renaming
+ $self instvar id_counter
+ $lan set tbaltname_ tblan-lan[incr id_counter]
+ global last_lan
+ real_set last_lan $lan
+
return $lan
}
diff -ur ./tcl/lib/ns-lib.tcl ../../ns-allinone-2.34-patched/ns-2.34/tcl/lib/ns-lib.tcl
--- ./tcl/lib/ns-lib.tcl 2009-06-14 10:35:41.000000000 -0700
+++ ../../ns-allinone-2.34-patched/ns-2.34/tcl/lib/ns-lib.tcl 2009-12-21 18:56:42.000000000 -0800
@@ -261,6 +261,11 @@
$self multicast $args
}
eval $self next $args
+
+ # linktest renaming
+ $self set id_counter 0
+ global last_sim
+ real_set last_sim $self
}
Simulator instproc nullagent {} {
@@ -587,6 +592,13 @@
$node set ns_ $self
$self check-node-num
+
+ # linktest renaming
+ $self instvar id_counter
+ $node set tbaltname_ tbnode-n[incr id_counter]
+ global last_host
+ real_set last_host $node
+
return $node
}
@@ -1232,6 +1244,28 @@
$n1 set-neighbor [$n2 id]
$n2 set-neighbor [$n1 id]
}
+
+ ### linktest -- set up DupLink class to return
+ set dup [new Duplink]
+ $dup set from $link_($i1:$i2)
+ $dup set to $link_($i2:$i1)
+
+ # add the duplink ref to the simplex links.
+ $link_($i1:$i2) set linkRef_ $dup
+ $link_($i2:$i1) set linkRef_ $dup
+
+ # and add to the linktest list of links.
+ $self addLTLink $i1:$i2 $type
+ $self addLTLink $i2:$i1 $type
+
+ $self instvar id_counter
+ $dup set tbaltname_ tblink-l[incr id_counter]
+
+ # naming
+ global last_link
+ real_set last_link $dup
+
+ return $dup
}
Simulator instproc duplex-intserv-link { n1 n2 bw pd sched signal adc args } {
#!/bin/sh
version=2.34
tclversion=1.19
srcurl="http://heanet.dl.sourceforge.net/project/nsnam/allinone/ns-allinone-$version"
tarball="ns-allinone-$version.tar.gz"
if [ -x /usr/bin/fetch ]; then
fetch=/usr/bin/fetch
elif [ -x /usr/bin/wget ]; then
fetch=/usr/bin/wget
else
echo "ERROR: ns-fetch.sh: need either 'fetch' or 'wget' installed"
exit 1
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
# XXX do not use $PWD as it can be set wrong due to an old (<3.82) gmake bug
dir=`pwd`
if [ ! -d $dir/ns-allinone-$version ]; then
if [ ! -f "$tarball" ]; then
cd $dir
# since this is such a big bubba, grab from /share rather than http
if [ -f /share/tarballs/$tarball ]; then
echo "Using NFS cached version ..."
tarball=/share/tarballs/$tarball
else
echo "Downloading ns source from $host to $dir ..."
$fetch http://$host/$tarball
if [ $? -ne 0 ]; then
echo "Failed..."
echo "Downloading ns source from $srcurl to $dir ..."
$fetch $srcurl/$tarball || {
echo "ERROR: ns-fetch: $fetch failed"
exit 1
}
fi
fi
fi
echo "Unpacking/patching ns-$version source ..."
tar xzof $tarball || {
echo "ERROR: ns-fetch.sh: tar failed"
exit 1
}
patch -d ns-allinone-$version/ns-$version < $srcdir/ns-$version.patch || {
echo "ERROR: ns-fetch.sh: patch failed"
exit 1
}
if [ -e $srcdir/tclcl-$tclversion.patch ]; then \
echo "Patching tclcl-$tclversion ..."
patch -d ns-allinone-$version/tclcl-$tclversion \
< $srcdir/tclcl-$tclversion.patch; \
fi
find . -name '*.orig' -exec rm -f '{}' \;
fi
exit 0
diff -ur ./conf/configure.in.tcl ../../ns-allinone-2.34-patched/tclcl-1.19/conf/configure.in.tcl
--- ./conf/configure.in.tcl 2009-06-14 10:35:03.000000000 -0700
+++ ../../ns-allinone-2.34-patched/tclcl-1.19/conf/configure.in.tcl 2009-12-21 18:10:39.000000000 -0800
@@ -99,6 +99,9 @@
$d/include/tcl$TCL_HI_VERS \
$d/include/tcl$TCL_VERS \
$d/include/tcl$TCL_ALT_VERS \
+ $d/include/tcl$TCL_HI_VERS/generic \
+ $d/include/tcl$TCL_VERS/generic \
+ $d/include/tcl$TCL_ALT_VERS/generic \
$d/include \
/usr/local/include \
"
diff -ur ./configure ../../ns-allinone-2.34-patched/tclcl-1.19/configure
--- ./configure 2009-06-14 10:35:03.000000000 -0700
+++ ../../ns-allinone-2.34-patched/tclcl-1.19/configure 2009-12-21 18:15:38.000000000 -0800
@@ -6014,6 +6014,9 @@
$d/include/tcl$TCL_HI_VERS \
$d/include/tcl$TCL_VERS \
$d/include/tcl$TCL_ALT_VERS \
+ $d/include/tcl$TCL_HI_VERS/generic \
+ $d/include/tcl$TCL_VERS/generic \
+ $d/include/tcl$TCL_ALT_VERS/generic \
$d/include \
/usr/local/include \
"
......@@ -430,7 +430,8 @@ sub doboot()
$emulabconfig{OPS_PKG} = "emulab-ops-2.1";
$emulabconfig{BOSS_PKG} = "emulab-boss-2.1";
}
elsif ($FBSD_VERSION == 7.2) {
elsif ($FBSD_VERSION == 7.2 ||
$FBSD_VERSION == 7.3) {
$emulabconfig{FS_PKG_DIR} = "/share/freebsd/7.2/packages";
$emulabconfig{FS_PKG_DIR} .= ".elvincompat"
if ($emulabconfig{"CONFIG_ELVIN"});
......@@ -1079,8 +1080,22 @@ sub SetupOpsNode($)
SetupFatal("Could not get package info from Emulab!");
}
print "Removing conflicting packages.\n";
mysystem("pkg_delete -r -x mysql-client")
system("pkg_delete -r -x mysql-client")
if (-e "/usr/local/bin/mysql");
if ($FBSD_VERSION == 7.3) {
#
# XXX ick, perl 5.10.1 is installed by default.
# This causes lots of problems, so remove it.
#
system("pkg_delete -f -x perl-5.10.1")
if (-d "/usr/local/lib/perl5/5.10.1");
# XXX and some packages that are in the wrong place
system("pkg_delete -f -x p5-");
# XXX perl install doesn't do this?
mysystem("ln -sf /usr/local/bin/perl /usr/bin/perl");
}
print "Installing the ops metaport.\n";
RecreateDir("/usr/ports", 1);
......@@ -1509,10 +1524,24 @@ sub SetupBossNode()
SetupFatal("Could not get package info from Emulab!");
}
print "Removing conflicting packages.\n";
mysystem("pkg_delete -r -x mysql-client")
system("pkg_delete -r -x mysql-client")
if (-e "/usr/local/bin/mysql");
mysystem("pkg_delete -x net-snmp")
system("pkg_delete -x net-snmp")
if (-e "/usr/local/include/net-snmp");
if ($FBSD_VERSION == 7.3) {
#
# XXX ick, perl 5.10.1 is installed by default.
# This causes lots of problems, so remove it.
#
system("pkg_delete -f -x perl-5.10.1")
if (-d "/usr/local/lib/perl5/5.10.1");
# XXX and some packages that are in the wrong place
system("pkg_delete -f -x p5-");
# XXX perl install doesn't do this?
mysystem("ln -sf /usr/local/bin/perl /usr/bin/perl");
}
print "Installing the boss metaport.\n";
RecreateDir("/usr/ports", 1);
......@@ -1701,7 +1730,7 @@ sub SetupBossNode()
#
if ($FBSD_VERSION >= 6) {
print "Removing conflicting bind package.\n";
mysystem("pkg_delete -r -x bind9")
system("pkg_delete -r -x bind9")
if (-e "/usr/local/sbin/rndc");
}
......@@ -2051,7 +2080,15 @@ sub CreateDefsFile($)
}
last SWITCH;
};
/^PROTOGENI_SUPPORT$/ && do {
if ($emulabconfig{"LOAD_PROTOGENI"} && $FBSD_VERSION >= 6.2) {
print OUTDEFS "PROTOGENI_SUPPORT=1\n";
}
else {
print OUTDEFS "PROTOGENI_SUPPORT=0\n";
}
last SWITCH;
};
/^FSDIR_SCRATCH$/ && do {
if ($emulabconfig{"CONFIG_SCRATCHFS"}) {
print OUTDEFS "FSDIR_SCRATCH=$FSMOUNTDIR/scratch\n";
......@@ -2066,12 +2103,7 @@ sub CreateDefsFile($)
last SWITCH;
};
/^NSVERIFY$/ && do {
# XXX cannot build full ns on FBSD7 yet
if ($FBSD_VERSION > 6) {
print OUTDEFS "NSVERIFY=0\n";
} else {
print OUTDEFS "NSVERIFY=1\n";
}
print OUTDEFS "NSVERIFY=1\n";
last SWITCH;
};
......
......@@ -2739,8 +2739,8 @@ COMMAND_PROTOTYPE(dolinkdelay)
" i.node_id=d.node_id and i.iface=d.iface "
"left join vinterfaces as v on "
" v.node_id=d.node_id and v.IP=d.ip "
"where d.node_id='%s' %s",
28, reqp->pnodeid, buf);
"where d.node_id='%s' and d.exptidx='%d' %s",
28, reqp->pnodeid, reqp->exptidx, buf);
if (!res) {
error("LINKDELAY: %s: DB Error getting link delays!\n",
reqp->nodeid);
......
......@@ -640,6 +640,7 @@ sub commit_mail($\@$@) {
#
my $subject = "git commit: ";
my $ref_type;
my $short_rev;
if (defined($reponame)) {
$subject .= "[$reponame] ";
}
......@@ -665,6 +666,10 @@ sub commit_mail($\@$@) {
my $actionstring = ucfirst($ref_type) . ' ' . short_refname($refname) .
" has been $what_happened";
$short_rev = `git rev-parse --short $refname $STDERRNULL`;
chomp $short_rev;
$subject .= " ($short_rev)" if ($short_rev);
if ($ct eq $CT_REBASE) {
$actionstring .= ". The following commits are new or have been modified:";
} elsif ($ct eq $CT_REWIND) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment