Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alex_orange/emulab-devel
  • hakasapl/emulab-devel
  • cecchet/emulab-devel
  • srirams/emulab-devel
  • chuck/emulab-devel
  • crd/emulab-devel
  • kwebb/emulab-devel
  • moate/emulab-devel
  • grubb/emulab-devel
  • nasir/emulab-devel
  • asydney/emulab-devel
  • kdownie/emulab-devel
  • wvdemeer/emulab-devel
  • anilmr/emulab-devel
  • bvermeul/emulab-devel
  • emulab/emulab-devel
16 results
Show changes
Commits on Source (22993)
VERSION export-subst
# Files that already had DOS-style line endings and those
# that require them should be added to the list below.
clientside/sensors/slothd/idlemon.vbs -crlf
clientside/tmcc/cygwinseven/SetupComplete.cmd -crlf
clientside/tmcc/cygwinseven/unattend-x86.xml.in -crlf
clientside/tmcc/cygwinxp/cygwin-tcsh.bat -crlf
clientside/tmcc/cygwinxp/resolv.conf -crlf
clientside/tmcc/cygwinxp/site-lisp/cygwin-mount.el -crlf
clientside/tmcc/cygwinxp/site-lisp/site-start.el -crlf
clientside/tmcc/cygwinxp/sysprep.inf -crlf
delay/linux/iptables_mods/iptables-1.3.6-imq.diff -crlf
hyperviewer/hv.dsp -crlf
hyperviewer/hv.dsw -crlf
hyperviewer/hypview.bat -crlf
hyperviewer/hypviewer/examples/mfc/h3.cpp -crlf
hyperviewer/hypviewer/examples/mfc/h3Doc.cpp -crlf
hyperviewer/hypviewer/examples/mfc/h3Doc.h -crlf
hyperviewer/hypviewer/examples/mfc/h3.dsp -crlf
hyperviewer/hypviewer/examples/mfc/h3.dsw -crlf
hyperviewer/hypviewer/examples/mfc/h3.h -crlf
hyperviewer/hypviewer/examples/mfc/h3.rc -crlf
hyperviewer/hypviewer/examples/mfc/H3View.cpp -crlf
hyperviewer/hypviewer/examples/mfc/H3View.h -crlf
hyperviewer/hypviewer/examples/mfc/main.cpp -crlf
hyperviewer/hypviewer/examples/mfc/MainFrm.cpp -crlf
hyperviewer/hypviewer/examples/mfc/MainFrm.h -crlf
hyperviewer/hypviewer/examples/mfc/main.h -crlf
hyperviewer/hypviewer/examples/mfc/res/h3.rc2 -crlf
hyperviewer/hypviewer/examples/mfc/Resource.h -crlf
hyperviewer/hypviewer/examples/mfc/StdAfx.cpp -crlf
hyperviewer/hypviewer/examples/mfc/StdAfx.h -crlf
hyperviewer/win32/sets.py -crlf
image-test/tests/linkdelay/nsfile.ns -crlf
image-test/tests/traffic-gen/nsfile.ns -crlf
mote/powermon/powerMeasure/exceptions.cpp -crlf
mote/powermon/powerMeasure/exceptions.h -crlf
mote/powermon/powerMeasure/main.cpp -crlf
mote/powermon/powerMeasure/Makefile -crlf
mote/powermon/powerMeasure/powerMeasure.cpp -crlf
mote/powermon/powerMeasure/powerMeasure.h -crlf
pelab/magent/Command.h -crlf
pelab/magent/CommandInput.h -crlf
pelab/magent/CommandOutput.h -crlf
pelab/magent/Connection.cc -crlf
pelab/magent/KernelTcp.cc -crlf
pelab/magent/lib.cc -crlf
pelab/magent/main.cc -crlf
pelab/magent/SensorList.h -crlf
pelab/stub/lookup.cc -crlf
pelab/stub/stub.h -crlf
protogeni/demo/speed-test/Main.as -crlf
protogeni/demo/speed-test.php -crlf
protogeni/demo/src/AbstractNodes.as -crlf
protogeni/demo/src/ActiveNodes.as -crlf
protogeni/demo/src/AddLinkClip.as -crlf
protogeni/demo/src/com/mattism/http/xmlrpc/MethodFault.as -crlf
protogeni/demo/src/ComponentView.as -crlf
protogeni/demo/src/Console.as -crlf
protogeni/demo/src/CustomCellRenderer.as -crlf
protogeni/demo/src/Link.as -crlf
protogeni/demo/src/ListItem.as -crlf
protogeni/demo/src/Node.as -crlf
protogeni/demo/src/Queue.as -crlf
protogeni/demo/src/QueueNode.as -crlf
protogeni/demo/src/RemoveLinkClip.as -crlf
protogeni/demo/src/RequestReleaseTicket.as -crlf
protogeni/demo/src/RequestSliceEmbedding.as -crlf
protogeni/demo/src/RequestSliverCreate.as -crlf
protogeni/demo/src/RequestSliverDestroy.as -crlf
protogeni/demo/src/RequestSliverStart.as -crlf
protogeni/demo/src/RequestSliverUpdate.as -crlf
protogeni/demo/src/SimpleNodeClip.as -crlf
protogeni/demo/src/SliceWait.as -crlf
tbsetup/ipassign/dre/prepass/pistream.h -crlf
tbsetup/ipassign/dre/prepass/postream.h -crlf
tbsetup/ipassign/etc/autocheck.conf -crlf
tbsetup/plab/libdslice/xmlrpcserver.py -crlf
www/csshover.htc -crlf
www/cssmenu.css -crlf
www/cssmenu-new.css -crlf
www/emulab-mime-winxp.reg -crlf
www/hardware-cmuemlab.html -crlf
www/js/mootools-core.js -crlf
www/js/mootools-tips.js -crlf
www/js/treemap.js -crlf
www/rdp-mime-winxp.c -crlf
www/rdp-mime-winxp.pl -crlf
www/ssh-mime-windows.pl -crlf
www/ssh-mime-winxp.c -crlf
www/ssh-mime-winxp.pl -crlf
www/style.css -crlf
www/style-new.css -crlf
.merge-build
clientside/tmcc/cygwinseven/unattend-7pro-x86.xml.in
extendCMV
\ No newline at end of file
[submodule "protogeni/rspec-geni"]
path = protogeni/rspec-geni
url = git://git-public.flux.utah.edu/geni-rspec.git
......@@ -2,10 +2,24 @@ configure
autoconf/config.guess
autoconf/config.sub
autoconf/install.sh
clientside/configure
clientside/autoconf/config.guess
clientside/autoconf/config.sub
clientside/autoconf/install.sh
clientside/os/imagezip/fat
clientside/os/imagezip/ntfs/liblocale
clientside/lib/event/event_wrap*
clientside/tmcc/cygwinxp/site-lisp
clientside/tmcc/freebsd/init
clientside/tmcc/plab
os/shd
www/cvsweb
robots/vmcd/camera_data/output_camera*
event/lib/event_wrap*
robots/mezzanine
robots/mtp/*.java
robots/mtp/xdr_sizeof.c
robots/vmcd/etc
lib/event_wrap*
doc/ChangeLog
tmcd/cygwinxp/site-lisp
tmcd/plab
......@@ -26,3 +40,18 @@ tbsetup/plab/libdslice
tool/svn/svn_load_dirs.pl
copyrights
hyperviewer/hypviewer
www/sec-check
www/tutorial
sql
doc
www/doc
GPL-COPYING
LGPL-COPYING
AGPL-COPYING
TODO.plab
MOVED-TO-WIKI
VERSION
protogeni/flack/js/forge
protogeni/flack/src/com/hurlant
protogeni/flack/src/com/mattism
protogeni/protogeniflash/src/com/mattism
This diff is collapsed.
[This file is absolutely not up to date and is no longer maintained.]
*** cvsupd. - Sep 17 2001 - Fixed by Mike on Sep 24 2001
The old version of cvsupd had the billenium bug, whereby number of
seconds since the epoc is greater than 1billion, and thus breaking
cvsupd. Upgrading was a disaster on Linux. It appears the new version
was trashing the boot block in Linux, and so nodes were not booting
after a cvsupd run.
*** mountd/exports - Sep 17 2001 - Needs to be fixed
Reported by Matt on Sep 17 2001, but actually a known bug with the
exports_setup script and the current mountd/kernel impl, which wipes
out all mounts before installing the new set. This causes transient
failures in NFS access from the testbed nodes since the mounts become
momentarily invalid.
*** Batch Mode Nits - Sep 18 2001 - Fixed by LBS on Sep 25 2001
Reported by Mike.
Nit: experiment create date in Experiment Info "header" is not set.
Is this field meaningless or just not filled in correctly?
Nit: there are two "header" tables shown
I assume this is bacause the batch code prints out a header and then calls
the regular experiment info script to do the rest. Anyway, the second table
is missing lots of date info as well.
Nit: web page for expr takes forever to show the nodes that were allocated.
For a regular experiment, the allocated nodes show up almost immediately,
presumably as soon as assign is done. For a batch experiment, it seems to
take minutes. I can go out and look at assign.log and see that nodes have
been assigned almost right away, they just doesn't wind up in the report
(the DB?) for awhile.
*** Shell experiments - Sep 18 2001 - Needs to be fixed
Reported by Rob.
Perhaps a feature instead of a bug. Shell experiments remain in the
"new" state, and are thus not cleaned up (nodes frees) when the
experiment is terminating. I view that as intended behaviour, but its
easy to change, so we should.
*** Broken lilo.conf - Sep 17 2001 - Partially fixed by LBS on Sep 24 2001
Reported by Matt (and then Rob).
According to Matt, our lilo.conf file is broken. In the next version
of the disk image, we should fix it. Matt sent a fixed version to
testbed-ops on Sep. 17 that we could use as a base.
Partially fixed means I hardwired some assembly code to the serial
line at 115200. A bug was causing it to go to the VGA all the time,
and the higher speeds are just a mess in lilo and I did not want to
mess with the assembly language. Too much of a time sink.
*** IPOD support - Sep 17 2001 - Needs to be fixed.
Reported by Rob.
Our Linux kernel needs to be rebuilt with ping of death support.
*** DummyNet support - Sept 19 2001 - Needs to be fixed.
Reported by Jay.
We need to pass through more DummyNet pipe configuration parameters
for delay nodes. It basically needs some front end parser work (not
too hard), and some changes to the DB where we store that stuff (a few
tables, not too hard), the tmcd to return the additional stuff (not
too hard), and the client delay configuration to use the additional
stuff when configuring the pipes (not too hard).
*** Multiple batch/reload daemons. - Sept 24 2001 - Needs to be fixed.
It is possible to start multiple batch and reload daemons (and many
other TB daemons). Can really mess things up!
*** No text box in approve user page - Sept 24 2001 - Needs to be fixed.
Reported by Mac.
We need to add a text box for sending a message to the applicant, just
like we have in the project approval page.
*** Cleanup of batch experiments - Sep 26 2001 - Needs to be fixed.
Reported by LBS.
Batch experiment system was created before Chris' big rework of the
tb system. At this point, it would be cleaner to combine the batch
experiment table into the normal experiment table (would result in a
couple of extra slots). The two tables make for consistency and
locking problems. What I do like about the current batch system is
that it is more scriptable cause most stuff is done in the backend
script; the web interface does just a bit of checking and then passes
the whole thing off. The normal experiment creation path should look
like this too, since splitting stuff between the web interface and the
perl scripts is messy, and the PHP DB interface is not as nice or
robust as the perl interface.
*** LastLogin info in web page - Sep 27 2001 - Done by LBS on Oct 1 2001.
From: Jay Lepreau <lepreau@cs.utah.edu>
To: "Leigh B. Stoller" <stoller@moab.cs.utah.edu>
Cc: testbed@fast.cs.utah.edu
Subject: Re: cvs commit: testbed/www showproject_list.php3
Date: Wed, 26 Sep 2001 19:11:11 MDT
If it were pretty easy to get wtmp info from plastic
into the database, and displayed in a separate column
on this page, that would be great.
It's the info we need to know who's really active and who's inactive,
which is not only interesting but affects who we ask to free up nodes.
LBS Comment: Probably want last web login info too. This would be
easy to add with a last_login DB table that would be updated in
DOLOGIN in the web server.
*** Need to install ssh on Linux - Sep 27 2001 - Needs to be done.
Suggested by Jay.
I think we should install xinetd and rsh by default. (But not turn on
rsh.) For one thing, many computational cluster users will want MPI.
RPMS: /proj/parmc/rpms/xinetd-2.1.8.9pre14-6.i386.rpm
/proj/parmc/rpms/rsh-server-0.17-2.5.i386.rpm
*** Needs web page to change proj trust - Oct 3 2001 - Needs to be fixed.
Reported by James Griffioen.
No way to change the trust level for a user in a project. Need to
provide a web page for it.
*** Paperbag/plasticwrap bug - Oct 5 2001 -- Fixed by Rob.
Reported by magnus.
magnus@ops ~> os_load -i UTAHPC-FBSD+LINUX -w pc121 pc122 pc123 pc124
pc125 pc126 pc127
Sorry, you used a forbidden character
**********
SSH failed. You may need to run the following commands:
mkdir -m 0755 /users/magnus/.ssh
ssh-keygen -P '' -f /users/magnus/.ssh/identity
cp /users/magnus/.ssh/identity.pub /users/magnus/.ssh/authorized_keys
chmod 600 /users/magnus/.ssh/authorized_keys
**********
*** Inconsistent exit in scripts. Oct 3 2001 - Needs to be fixed
When going to background we should a __DIE__ hook to make sure that
the log file gets emailed off. Generally, the fatal error amd email
stuff is very inconsistent. Normal users should get warm fuzzies.
Informational stuff should go to us.
*** Per User info change - Oct 8 2001 - Needs to be fixed
From: Jay Lepreau <lepreau@cs.utah.edu>
To: Leigh Stoller <stoller@fast.cs.utah.edu>
Subject: Re: Feature Request
Date: Mon, 08 Oct 2001 06:14:43 MDT
After I sent that, I just checked it out. Realized that you
(logically) display the info on the general user info page. What I
was originally wanting was more accurate and precise data for the
general project info page. That would take a bunch of processing: for
each proj, go thru its users, find the minimum time for each type of
login and display that.
Don't need it right now, but eventually we're going to need the kind
of info to move projects to 'inactive'.
The same info is what we'll need to deschedule experiments, or arm twist
their users. But for expts we have the creator, who will usually
be the one using the machines.
*** Node control changes lost on swapin/out - Oct 30 2001 - Fixed by LBS
> From: Mac Newbold <newbold@cs.utah.edu>
> Subject: Re: swapin/out anomoly
> Date: Tue, 30 Oct 2001 15:53:45 -0700 (MST)
>
> Sometimes when we update settings, we update only the physical, and not
> the virtual, and the virtual is all that persists between swaps. IMHO, I
> think what we need to do is evaluate which things make sense to keep
> between swaps, which things don't, and which things should offer a
> choice. This affects OSs, delay params, and potentially other things
> too. Perhaps there's even a unified solution we can implement as part of
> the swapout process.
Its probably a good idea to take the nodecontrol web page and remove the
stuff that changes the DB. Instead, lets use a backend perl script that
will update the DB appropriately (and can be used from the command line
too). Basically, I'm not happy about doing that much DB munging in the web
interface, especially virt_nodes and virt_lans (since it would be nice to
present a web interface to change the delay params at some point).
*** Frisbee sucks up CPU - Nov 10 2001 - Needs to be fixed
Frisbee is sucking up 15% of the CPU. Needs to be profiled.
*** Add virtual name to node control for. - Nov 12 2001 -
Fixed by Leigh on Nov 28 2001.
Requested by Dave.
*** Add quotas on /users. - Nov 12 2001 - Needs to be done.
Need to build and install a kernel on ops with quotas configured in.
*** Have Linux kernel source available - Nov 12 2001 - Needs to be done.
Requested by Jay.
*** Use switch port for 10MBs - Nov 28 2001 - Needs to be done.
LBS - Nov 28th: I worked on this. Turns out the switches do not
like it when the nodes force their ports into 10MB full duplex,
and the switch disables the port.
*** Add "Must Change Password" state. - Dec 3rd 2001 - Needs to be done.
Suggested by Mac. When we change the password and email it, we
should require that user changes his password next time he logs
in.
*** Mysterious TCP drop problem - Nov 21 2001 - Needs to be fixed.
From: Tian Bu <tbu@cs.umass.edu>
To: Mike Hibler <mike@fast.cs.utah.edu>
cc: <testbed-ops@fast.cs.utah.edu>
Subject: News on packet drop
Date: Thu, 29 Nov 2001 14:52:04 -0500 (EST)
After spending sometime on investigating why the packet drop occur
between a pair of linux nodes, I found that this problem is not
related to the OS. Instead, the mysterious packet drop only occurs
between a pair of nodes where one end is PC850 and the other end
is PC600. The settting I first saw the drop was a link between
a PC850 and a PC600. I did report that the drop does not appear
between a pair of freeBSD nodes. That is misleading because it was
measured on a different setting where the pair of nodes I reserved happen
to be both PC850. :-). Today I start another experiment where there are
a pair of PC850 running Linux and observe no mysterious packet drop
between them. I guess there may be some incompatible features between
either the interfaces installed on these two different types of machines.
#
# Copyright (c) 2000-2021 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
# Testbed Makefile
#
SRCDIR = @srcdir@
......@@ -7,7 +28,11 @@ SUBDIR =
TESTBED_SRCDIR = @top_srcdir@
DISTCLEAN_FILES = @DISTCLEAN_FILES@
EVENTSYS = @EVENTSYS@
PELABSUPPORT = @PELABSUPPORT@
PGENISUPPORT = @PROTOGENI_SUPPORT@
ISMAINSITE = @TBMAINSITE@
SPEWFROMOPS = @SPEWFROMOPS@
MOBILESUPPORT = @MOBILESUPPORT@
SYSTEM := $(shell uname -s)
include Makeconf
......@@ -20,33 +45,78 @@ include Makeconf
# @optional_subdirs@ (has event)
# ipod os security sensors
# Then things that only depend on stuff we've done:
# pxe tbsetup tmcd utils www tip capture vis
# pxe tbsetup tmcd utils backend www tip vis
# Then things that depend on stuff we just did:
#
SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \
pxe tbsetup account tmcd utils tip capture ipod vis \
sensors os xmlrpc install/newnode_sshkeys mote tools/whol \
wiki bugdb collab
ifeq ($(STANDALONE_CLEARINGHOUSE),0)
SUBDIRS = \
clientside/lib \
db assign www @optional_subdirs@ clientside ipod security sensors \
pxe tbsetup account tmcd utils wbstore backend ipod vis \
sensors os xmlrpc autofs install/newnode_sshkeys \
tools/svn collab/exp-vis node_usage install
ifeq ($(ISMAINSITE),1)
SUBDIRS += tools/whol
endif
ifeq ($(PGENISUPPORT),1)
SUBDIRS += protogeni apt powder
endif
else
SUBDIRS = db tbsetup account protogeni
endif
all: all-subdirs just-builddirs
all: all-subdirs
#
# We used to statically link our event agents. We no longer do this, but
# if you want "old style" agents, use this target.
#
all-static:
@LDSTATIC=-static $(MAKE) all
ifeq ($(STANDALONE_CLEARINGHOUSE),0)
install:
@echo "Choose either boss-install, ops-install or fs-install"
@echo "Choose opsfs-install instead of ops-install for a combined ops/fs machine"
@echo "Choose tipserv-install for dedicated tip server machines."
else
install: clrhouse-install
endif
#
# For installation on boss node (okay, paper).
# For installation on boss node
#
boss-install: install-schemacheck install-sitevarscheck install-dbfillcheck \
install-subdirs install-mkdirs install-setbuildinfo
@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
boss-install: install-checks \
install-subdirs install-mkdirs \
install-setbuildinfo
@echo "Boss node installed!"
#
# Same target, with the install-schemacheck dependency omitted
#
# Same target, with the checks omitted
boss-install-force: install-subdirs install-mkdirs install-setbuildinfo
@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
@echo "Boss node installed!"
# Skip only the schema checks, but do the other checks.
boss-install-noschemacheck: install-updatecheck \
install-sitevarscheck install-dbfillcheck \
install-genischemacheck install-subdirs install-mkdirs \
install-setbuildinfo
# Skip the update check.
boss-install-noupdatecheck: install-schemacheck \
install-sitevarscheck install-dbfillcheck \
install-genischemacheck install-subdirs install-mkdirs \
install-setbuildinfo
# Only the checks:
install-checks: \
install-updatecheck \
install-schemacheck \
install-sitevarscheck \
install-dbfillcheck install-genischemacheck
@echo "Installation checks completed!"
clrhouse-install: install-subdirs install-mkdirs
@echo "CleaingHouse code installed!"
post-install:
@$(MAKE) -C db post-install
......@@ -59,12 +129,15 @@ post-install:
ifeq ($(EVENTSYS),1)
@$(MAKE) -C event post-install
endif
@$(MAKE) -C mote post-install
ifeq ($(MOBILESUPPORT),1)
@$(MAKE) -C mobile
endif
@$(MAKE) -C tools post-install
@$(MAKE) -C wiki post-install
@$(MAKE) -C bugdb post-install
@$(MAKE) -C collab post-install
@$(MAKE) -C utils post-install
ifeq ($(NODE_USAGE_SUPPORT),1)
@$(MAKE) -C node_usage post-install
endif
#
# For installation on the 'ops' or 'users' node (okay, plastic)
......@@ -73,86 +146,120 @@ ops-install:
-mkdir -p $(INSTALL_TOPDIR)/log
-mkdir -p $(INSTALL_TOPDIR)/log/mysql
-chmod 770 $(INSTALL_TOPDIR)/log/mysql
-chown mysql.mysql $(INSTALL_TOPDIR)/log/mysql
-chown mysql $(INSTALL_TOPDIR)/log/mysql
-chgrp mysql $(INSTALL_TOPDIR)/log/mysql
-mkdir -p $(INSTALL_TOPDIR)/log/logfiles
-chmod 777 $(INSTALL_TOPDIR)/log/logfiles
@$(MAKE) -C rc.d control-install
@$(MAKE) -C tbsetup control-install
@$(MAKE) -C security control-install
@$(MAKE) -C tip control-install
# @$(MAKE) -C os control-install
@$(MAKE) -C db control-install
@$(MAKE) -C tbsetup control-install
@$(MAKE) -C utils control-install
@$(MAKE) -C lib control-install
@$(MAKE) -C clientside control-install
ifeq ($(EVENTSYS),1)
@$(MAKE) -C event control-install
endif
@$(MAKE) -C sensors control-install
@$(MAKE) -C xmlrpc control-install
@$(MAKE) -C tmcd control-install
@$(MAKE) -C account control-install
ifeq ($(PELABSUPPORT),1)
@$(MAKE) -C pelab control-install
endif
fs-install:
@$(MAKE) -C rc.d fs-install
@$(MAKE) -C tbsetup fs-install
@$(MAKE) -C clientside fs-install
@$(MAKE) -C sensors fs-install
opsfs-install: ops-install fs-install
@echo "Combined ops/fs install done."
install-mkdirs:
-mkdir -p $(INSTALL_TOPDIR)/opsdir
-mkdir -p $(INSTALL_TOPDIR)/db
-mkdir -p $(INSTALL_TOPDIR)/locks
-mkdir -p $(INSTALL_TOPDIR)/log
-mkdir -p $(INSTALL_TOPDIR)/log/mysql
-mkdir -p $(INSTALL_TOPDIR)/etc
-mkdir -p $(INSTALL_TOPDIR)/www
-mkdir -p $(INSTALL_TOPDIR)/suidbin
-mkdir -p $(INSTALL_TOPDIR)/ssl
-chmod 770 $(INSTALL_TOPDIR)/ssl
ifeq ($(STANDALONE_CLEARINGHOUSE),0)
-mkdir -p $(INSTALL_TOPDIR)/opsdir
-mkdir -p $(INSTALL_TOPDIR)/log/exports
-mkdir -p $(INSTALL_TOPDIR)/lists
-mkdir -p $(INSTALL_TOPDIR)/backup
-mkdir -p $(INSTALL_TOPDIR)/etc
-mkdir -p $(INSTALL_TOPDIR)/expwork
-mkdir -p $(INSTALL_TOPDIR)/batch
-chmod 777 $(INSTALL_TOPDIR)/batch
-mkdir -p $(INSTALL_TOPDIR)/expinfo
-chmod 777 $(INSTALL_TOPDIR)/expinfo
-mkdir -p $(INSTALL_TOPDIR)/exparchive
-chmod 777 $(INSTALL_TOPDIR)/exparchive
-mkdir -p $(INSTALL_TOPDIR)/exparchive/Archive
-chmod 777 $(INSTALL_TOPDIR)/exparchive/Archive
-mkdir -p $(INSTALL_TOPDIR)/images
-chmod 775 $(INSTALL_TOPDIR)/images
-ln -s /usr/testbed/bin/nse $(INSTALL_TOPDIR)/bin
-mkdir -p $(INSTALL_TOPDIR)/ssl
-chmod 770 $(INSTALL_TOPDIR)/ssl
-ln -sf /usr/testbed/bin/nse $(INSTALL_TOPDIR)/bin
endif
just-builddirs:
@$(MAKE) -C rc.d all
@$(MAKE) -C apache all
tipserv-install:
-mkdir -p $(INSTALL_TOPDIR)/log/tiplogs
-mkdir -p $(INSTALL_TOPDIR)/etc
@$(MAKE) -C tip tipserv-install
@$(MAKE) -C capture tipserv-install
@$(MAKE) -C clientside/tip tipserv-install
@$(MAKE) -C clientside/os/capture tipserv-install
@$(MAKE) -C tbsetup tipserv-install
client-mkdirs:
-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)
client:
@$(MAKE) -C lib/libtb client
ifeq ($(EVENTSYS),1)
@$(MAKE) -C event client
endif
@$(MAKE) -C clientside client
@$(MAKE) -C os client
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
@$(MAKE) -C capture client
@$(MAKE) -C tip client
@$(MAKE) -C tools client
endif
@$(MAKE) -C sensors client
@$(MAKE) -C tmcd client
client-install: client client-mkdirs
ifeq ($(EVENTSYS),1)
@$(MAKE) -C event client-install
endif
@$(MAKE) -C clientside client-install
@$(MAKE) -C os client-install
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
@$(MAKE) -C capture client-install
@$(MAKE) -C tip client-install
@$(MAKE) -C tools client-install
endif
@$(MAKE) -C sensors client-install
@$(MAKE) -C tmcd client-install
subboss:
@$(MAKE) -C clientside subboss
@$(MAKE) -C tbsetup subboss
@$(MAKE) -C db subboss
@$(MAKE) -C os subboss
@$(MAKE) -C utils subboss
subboss-install: subboss
@$(MAKE) -C clientside subboss-install
@$(MAKE) -C tbsetup subboss-install
@$(MAKE) -C os subboss-install
@$(MAKE) -C utils subboss-install
@$(MAKE) -C db subboss-install
@$(MAKE) -C rc.d subboss-install
@$(MAKE) -C dhcpd subboss-install
# Hack: this should probably be done by a subboss-install
# script, but there isn't a huge need for that yet
@rm -f $(INSTALL_RCDIR)/isc-dhcpd
TARBALLDESTDIR = /var/tmp/emulab-client
client-tarball:
@$(MAKE) -C clientside client-tarball
client-src-tarball:
@rm -f emulab-client-src.tar.gz
tar clzf emulab-client-src.tar.gz -C clientside
# This is not finished yet.
client-shadow-rpm:
-$(RM) -rf rpmbuild
mkdir -p rpmbuild/SOURCES rpmbuild/SRPMS
$(CP) emulab-client-src.tar.gz rpmbuild/SOURCES
$(RPM) -v -bs --nodeps --define='_topdir $(TOPDIR)/rpmbuild' \
clientside/shadow.spec
destdircheck:
@if [ -z "$(DESTDIR)" ]; then \
......@@ -166,34 +273,102 @@ destdircheck:
mfsoscheck:
@if [ `uname -s` != "FreeBSD" ]; then \
echo "Must build MFS files on a FreeBSD system!"; \
echo "Must build CDROM/MFS files on a FreeBSD system!"; \
false; \
fi
mfs: mfsoscheck
@$(MAKE) -C os mfs
@$(MAKE) -C sensors mfs
@$(MAKE) -C tmcd mfs
@$(MAKE) -C clientside mfs
mfs-nostatic: mfsoscheck
@NOSTATIC=1 $(MAKE) -C clientside mfs
mfs-install: destdircheck mfs client-mkdirs
@$(MAKE) -C os mfs-install
@$(MAKE) -C sensors mfs-install
@$(MAKE) -C tmcd mfs-install
@$(MAKE) -C clientside mfs-install
mfs-nostatic-install: destdircheck mfs-nostatic client-mkdirs
@$(MAKE) -C clientside mfs-install
frisbee-mfs: mfsoscheck
@$(MAKE) -C cdrom/groklilo client
@$(MAKE) -C os frisbee-mfs
@$(MAKE) -C tmcd frisbee-mfs
@$(MAKE) -C clientside frisbee-mfs
frisbee-mfs-nostatic: mfsoscheck
@NOSTATIC=1 $(MAKE) -C clientside frisbee-mfs
frisbee-mfs-install: destdircheck frisbee-mfs
@CLIENT_BINDIR=/etc/testbed $(MAKE) -e -C cdrom/groklilo client-install
@$(MAKE) -C clientside frisbee-mfs-install
frisbee-mfs-nostatic-install: destdircheck frisbee-mfs-nostatic
@$(MAKE) -C clientside frisbee-mfs-install
newnode-mfs: mfsoscheck
@$(MAKE) -C clientside newnode-mfs
newnode-mfs-nostatic: mfsoscheck
@NOSTATIC=1 $(MAKE) -C clientside newnode-mfs
newnode-mfs-install: destdircheck newnode-mfs client-mkdirs
@$(MAKE) -C clientside newnode-mfs-install
newnode-mfs-nostatic-install: destdircheck newnode-mfs-nostatic client-mkdirs
@$(MAKE) -C clientside newnode-mfs-install
cdboot: mfsoscheck client
@echo "CD/Dongle files built"
cdboot-install: destdircheck cdboot
@$(MAKE) -C cdrom client-install
@$(MAKE) -C clientside/tmcc/freebsd6 cdboot-install
flashboot: mfsoscheck client
@echo "Flash dongle files built"
flashboot-install: destdircheck flashboot
@$(MAKE) -C clientside/tmcc/freebsd6 cdboot-install
@$(MAKE) -C os frisbee-mfs-install
@$(MAKE) -C tmcd frisbee-mfs-install
@$(MAKE) -C flash client-install
@$(MAKE) -C clientside frisbee-mfs-install
#
# A check to see if this is a 'real' install. Kinda hacky, but as far as I can
# tell, you can't put ifeq()'s inside of targets
#
ifeq ($(TBROOT),/usr/testbed)
UPDATETESTBED= @cd $(OBJDIR)/install && perl update-testbed
else
UPDATETESTBED= @echo "Skipping update check, since prefix isn't /usr/testbed"
endif
ifeq ($(ISMAINSITE),1)
update-testbed: update-testbed-nostop
else
update-testbed: update-testbed-install
endif
update-testbed-install:
@echo "Updating the testbed ..."
$(UPDATETESTBED) -i -s
update-testbed-noinstall:
@echo "Updating the testbed ..."
$(UPDATETESTBED)
update-testbed-nostop:
@echo "Updating the testbed ..."
$(UPDATETESTBED) -i
update-testbed-force:
@echo "Updating the testbed in force mode ..."
$(UPDATETESTBED) -f
ifeq ($(TBROOT),/usr/testbed)
UPDATECHECK= @cd $(OBJDIR)/install && perl update-testbed -v
else
UPDATECHECK= @echo "Skipping update checks, since prefix isn't /usr/testbed"
endif
install-updatecheck:
@echo "Checking to see if updates need to be run"
$(UPDATECHECK)
ifeq ($(TBROOT),/usr/testbed)
SCHEMACHECK= cd $(OBJDIR)/db && perl schemacheck
else
......@@ -230,15 +405,97 @@ install-setbuildinfo:
@echo "Setting the Build and Version info"
$(SETBUILDINFO)
install-genischemacheck:
ifeq ($(PGENISUPPORT),1)
@$(MAKE) -C protogeni install-genischemacheck
endif
@echo "Done"
BRANCHCHECK=
BRANCHECHO= @echo "Skipping branch check since not the Mothership"
ifeq ($(ISMAINSITE),1)
ifeq ($(TBROOT),/usr/testbed)
BRANCHCHECK= cd $(SRCDIR) && \
git status --porcelain -s -b | head -1 | grep -q -s current
BRANCHECHO= @echo "Checking to make sure you are on the mothership branch"
endif
endif
install-branchcheck:
$(BRANCHECHO)
$(BRANCHCHECK)
# We use separate src and obj trees in Emulab, so the traditional distclean to
# clean "made" files from a mingled source-and-obj tree is unnecessary.
# However, this may be useful if you mistakenly configure and make a src tree.
clean: clean-subdirs
distclean: distclean-subdirs
rm -f Makeconf GNUmakefile config.h config.status config.cache config.log
rm -f $(DISTCLEAN_FILES)
elabinelab:
#
# Be careful, do not run these unless you are updating your installation
# with a new IP subnet or domain name.
#
boss-updateip-clean: clean
@$(MAKE) -C rc.d clean
@$(MAKE) -C apache clean
@$(MAKE) -C named clean
@$(MAKE) -C dhcpd clean
ops-updateip-clean: clean
@$(MAKE) -C rc.d clean
@$(MAKE) -C apache clean
update-rcd:
@$(MAKE) -C rc.d all
@$(MAKE) -C rc.d install
#
# Here's a different approch to recover from just configure problems. It cleans
# all files from an obj tree that have a corresponding .in file in the src tree.
undo-configure:
find $SRCDIR -name '*.in' -a -not -name configure.in | \
sed -e "s;$SRCDIR;$OBJDIR;" -e 's;[.]in$;;' | xargs rm -f
#
# XXX a "temporary" hack for scripts that were evolving fast.
# We didn't want to have to remake the client image whenever we changed these.
# They are copied over to the embryonic boss and ops during setup.
#
elabinelab-scripts:
mkdir -p $(INSTALL_TOPDIR)/etc
cp -f $(SRCDIR)/clientside/tmcc/freebsd/mkextrafs.pl $(INSTALL_TOPDIR)/etc/
cp -f $(SRCDIR)/clientside/tmcc/common/config/rc.mkelab $(INSTALL_TOPDIR)/etc/
ifeq ($(SPEWFROMOPS),1)
elabinelab-nogit: elabinelab-scripts
-mkdir -p /share/emulab
rm -f /share/emulab/emulab-src.tar.gz
tar czf /share/emulab/emulab-src.tar.gz -C $(SRCDIR) --exclude=.git .
elabinelab-git: elabinelab-scripts
-mkdir -p /share/emulab
rm -f /share/emulab/emulab-src.tar.gz
(cd $(SRCDIR); \
git archive HEAD > /share/emulab/emulab-src.tar)
tar rf /share/emulab/emulab-src.tar -C $(SRCDIR) \
--exclude=.git protogeni/rspec-geni
gzip /share/emulab/emulab-src.tar
else
elabinelab-nogit: elabinelab-scripts
-mkdir -p $(INSTALL_TOPDIR)/src
rm -f $(INSTALL_TOPDIR)/src/emulab-src.tar.gz
tar czf $(INSTALL_TOPDIR)/src/emulab-src.tar.gz -C $(SRCDIR) .
tar czf $(INSTALL_TOPDIR)/src/emulab-src.tar.gz -C $(SRCDIR) --exclude=.git .
elabinelab-git: elabinelab-scripts
-mkdir -p $(INSTALL_TOPDIR)/src
rm -f $(INSTALL_TOPDIR)/src/emulab-src.tar.gz
(cd $(SRCDIR); \
git archive HEAD > $(INSTALL_TOPDIR)/src/emulab-src.tar)
tar rf $(INSTALL_TOPDIR)/src/emulab-src.tar -C $(SRCDIR) \
--exclude=.git protogeni/rspec-geni
gzip $(INSTALL_TOPDIR)/src/emulab-src.tar
endif
# How to recursively descend into subdirectories to make general
# targets such as `all'.
......@@ -249,7 +506,10 @@ elabinelab:
# By default, make any target by descending into subdirectories.
%: %-subdirs ;
.PHONY: post-install install-mkdirs
.PHONY: post-install install-mkdirs clrhouse-install install \
boss-install-noupdatecheck boss-install-noschemacheck \
boss-install-force update-testbed update-testbed-install \
update-testbed-noinstall update-testbed-nostop
# Get rid of a bunch of nasty built-in implicit rules.
.SUFFIXES:
#
# Insert Copyright Here.
#
# Copyright (c) 2000-2012, 2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
# Get rid of a bunch of nasty built-in implicit rules,
# to avoid bogus circular dependencies and make things go faster.
......@@ -35,13 +53,76 @@ $(INSTALL_ETCDIR)/%: %
-mkdir -p $(INSTALL_ETCDIR)
$(INSTALL_DATA) $< $@
$(addprefix $(INSTALL_SBINDIR)/, $(SETUID_SBIN_PROGS)): $(INSTALL_SBINDIR)/%: %
echo "Installing (setuid) $<"
-mkdir -p $(INSTALL_SBINDIR)
$(SUDO) $(INSTALL) -o root -m 4755 $< $@
$(addprefix $(INSTALL_BINDIR)/, $(SETUID_BIN_PROGS)): $(INSTALL_BINDIR)/%: %
echo "Installing (setuid) $<"
-mkdir -p $(INSTALL_BINDIR)
$(SUDO) $(INSTALL) -o root -m 4755 $< $@
$(addprefix $(INSTALL_LIBEXECDIR)/, $(SETUID_LIBX_PROGS)): $(INSTALL_LIBEXECDIR)/%: %
echo "Installing (setuid) $<"
-mkdir -p $(INSTALL_LIBEXECDIR)
$(SUDO) $(INSTALL) -o root -m 4755 $< $@
$(addprefix $(INSTALL_SBINDIR)/, $(SETUID_SBIN_SCRIPTS)): $(INSTALL_SBINDIR)/%: % $(INSTALL_SUIDDIR)/%
echo "Installing (link to wrapper) $<"
-mkdir -p $(INSTALL_SBINDIR)
-rm -f $@
ln -s $(INSTALL_LIBEXECDIR)/runsuid $@
$(addprefix $(INSTALL_BINDIR)/, $(SETUID_BIN_SCRIPTS)): $(INSTALL_BINDIR)/%: % $(INSTALL_SUIDDIR)/%
echo "Installing (link to wrapper) $<"
-mkdir -p $(INSTALL_BINDIR)
-rm -f $@
ln -s $(INSTALL_LIBEXECDIR)/runsuid $@
$(addprefix $(INSTALL_LIBEXECDIR)/, $(SETUID_LIBX_SCRIPTS)): $(INSTALL_LIBEXECDIR)/%: % $(INSTALL_SUIDDIR)/%
echo "Installing (link to wrapper) $<"
-mkdir -p $(INSTALL_LIBEXECDIR)
-rm -f $@
ln -s $(INSTALL_LIBEXECDIR)/runsuid $@
# Special libexec rule for scripts invoked by suexec (cannot be a symlink)
$(addprefix $(INSTALL_LIBEXECDIR)/, $(SETUID_SUEXEC_SCRIPTS)): $(INSTALL_LIBEXECDIR)/%: % $(INSTALL_SUIDDIR)/%
echo "Installing (hard link to wrapper) $<"
-mkdir -p $(INSTALL_LIBEXECDIR)
-rm -f $@
ln $(INSTALL_LIBEXECDIR)/runsuid $@
$(INSTALL_SUIDDIR)/%: %
echo "Installing (real script) $<"
-mkdir -p $(INSTALL_SUIDDIR)
$(SUDO) $(INSTALL_PROGRAM) $< $@
CFLAGS += $(LOCALCFLAGS)
clean:
distclean: clean
# This is to avoid warnings about duplicate targets.
distclean: default-clean
default-clean:
rm -f GNUmakefile
# This is to avoid warnings about duplicate targets.
default-install-notusing:
ifeq ($(ISMAINSITE),1)
ifeq ($(TBROOT),/usr/testbed)
(cd $(SRCDIR) ; \
git status --porcelain -s -b | head -1 | grep -q -s current)
else
/usr/bin/true
endif
else
/usr/bin/true
endif
#install: default-install
#
# Where to find source files.
# Using specific patterns instead of the catch-all VPATH variable
......@@ -80,7 +161,7 @@ vpath % $(SRCDIR) $(MOSTLY_SRCDIRS)
#
# Rules to regen configure written files.
#
%: %.in
%: %.in $(OBJDIR)/config.status
@echo "Regenerating $@"
cd $(OBJDIR) && CONFIG_FILES=$(SUBDIR)/$@ ./config.status
......@@ -100,3 +181,25 @@ check: $(TESTS)
fi \
done
endif
ifeq ($(MERGE_BUILD),1)
.PRECIOUS: ${SRCDIR}/*
#
# I really want to say something like:
# ${TESTBED_SRCDIR}/.merged: $(wildcard ${OBJDIR}/${MERGE_BUILD_SANDBOX}/${SUBDIR}/*)
# but that causes problems if one the prereq. has a rule for it (such
# as when both GNUmakefile and GNUmakefile.in exist in the source tree),
# thus I do the equivalent manually
#
newest=$(shell ls -rtd "${OBJDIR}/${MERGE_BUILD_SANDBOX}/${SUBDIR}/"* "${TESTBED_SRCDIR}/.merged" | tail -n 1)
ifneq ($(newest),${TESTBED_SRCDIR}/.merged)
${TESTBED_SRCDIR}/.merged:
cd ${TESTBED_SRCDIR} && utils/merge-build sync
.PHONY: ${TESTBED_SRCDIR}/.merged
else
${TESTBED_SRCDIR}/.merged:
endif
${SRCDIR}/*: ${TESTBED_SRCDIR}/.merged
endif
EMULAB SOFTWARE SNAPSHOT LICENSE TERMS
Except for any files marked with the GNU General Public License, or that
bear non-Utah copyrights and are unchanged from the original (e.g., cracklib
and healthd), this Emulab code snapshot comes with RESTRICTED RIGHTS.
Permission to use, copy, and modify this software is hereby
granted provided that the following conditions are met.
This snapshot of the Emulab/Netbed code:
-is for use only for research and education, by you and by those
who use services that you provide using this software,
-cannot be used for commercial purposes, and
-cannot be redistributed outside your research group.
By accepting this software, you agree
-to retain this notice and all included copyright and credit notices,
-that in order to improve the common platform, to return improvements to
the University of Utah under terms that allow us, without charge, to
use and redistribute them under this license,
-to prominently give appropriate credit to "Emulab" and the University of
Utah in the primary user interface(s) to systems that use this
software, and in talks and all written and promotional material that
mention features or use of this software. In the Web interface this
includes maintaining the portion of the page header banner which
links to Utah's site and says "Built with Emulab" or, at our discretion,
a subsequent version which includes a reference to "Utah."
-to take reasonable steps to ensure these conditions are met (e.g.,
make your group's members aware of these terms, limit source access
to your group's members, and ensure your users are non-commercial).
We request that you ask your users to cite the Emulab/Netbed OSDI 2002 paper
in papers containing results obtained from services based on this software.
It is the University of Utah's intention to provide you future improvements
it makes to the software. The University cannot commit to any support.
THE UNIVERSITY OF UTAH ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
CONDITION. THE UNIVERSITY OF UTAH DISCLAIMS ANY LIABILITY OF ANY KIND
FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
Contact emulab-dist@flux.utah.edu or 801-585-3271 if you wish to
explore alternate license terms. The terms may become more liberal in
a future formal release.
November 4, 2004
Flux Research Group
School of Computing
University of Utah
50 S. Central Campus Dr. Rm. 3190
Salt Lake City, UT 84112
# The following documentation files are now available on the WIKI at
# at http://users.emulab.net/trac/emulab/wiki/<PAGE>
#
FILE WIKI PAGE
doc/arch-hier.txt ArchHeir
doc/arch.txt Arch
doc/boot-scaling-issues.txt BootScalingIssues
doc/care-and-feeding.txt CareAndFeeding
doc/cisco-voodoo.txt CiscoVoodoo
doc/client-selfconfig.txt ClientSelfConfig
doc/create-generic-image.txt CreateGenericImage
doc/cross-compiling.txt CrossCompiling
doc/customize-image.txt CustomizeImage
doc/customize-mfs.txt CustomizeMfs
doc/dbtoir.txt dbtoir
doc/delay-implementation.txt DelayImplementation
doc/errorcodes.txt ErrorCodes
doc/hardware-mail.mbox HardwareMail
doc/ip-assumptions.txt IP Assumptions
doc/kernel-patches.txt KernelPatches
doc/linux-kernel.txt LinuxKernel
doc/multiplexed-links.txt MultiplexedLinks
doc/newimage.txt NewImage
doc/newnode-from-admin.txt NewnodeFromAdmin
doc/overview.txt Overview
doc/package-building.txt PackageBuilding
doc/port2-serial-console.txt Port2SerialConsole
doc/security.txt SecurityNotes
doc/setup-elabinelab.txt SetupElabinelab
doc/setup-plc.txt SetupPLC
doc/shellonboss.txt ShellOnBoss
doc/snmpit-internals.txt SnmpitInternals
doc/tftpboot-setup.txt TftpbootSetup
doc/tim-stack.nits TimStackNits
doc/uk-image.txt UK Image
doc/ulsshxmlrpcpp.txt ulsshxmlrpcpp
doc/update-mfs.txt UpdateMFS
doc/update-node.txt UpdateNode
doc/updating-RHL/ UpdatingRHL
doc/vnode-impl.txt VnodeImpl
doc/vnode-setup.txt VnodeSetup
doc/webglimpse.txt WebGlimpse
event/linktest/linktest.html linktest
www/auth.html Auth
www/doc.php3 .
www/doc/emotes.html emotes
www/doc/exclasses.html Classes
www/doc/hw-recommend.html HWRecommend
www/doc/jail.html jail
www/doc/linkdelays.html linkdelays
www/doc/netbuilddoc.html netbuilddoc
www/doc/pc2000.html pc2000
www/doc/pc3000.html pc3000
www/doc/plab.html plab
www/doc/windows.html Windows
www/groups.html Groups
www/hardware-emulab.net.html UtahHardware
www/otheremulabs.html OtherEmulabs
www/policies.html AdminPolicies
www/rdp-mime.html rdp_mime
www/security.html SecReqs
www/software.html software
www/ssh-mime.html ssh_mine
www/swapping.html Swapping
www/tutorial/advanced.html AdvancedExample
www/tutorial/behindthescenes.html behindthescenes
www/tutorial/elabinelab.php3 elabinelab
www/tutorial/eventsystem.html eventsystem
www/tutorial/firewall.html firewall
www/tutorial/gnuradio.html gnuradio
www/tutorial/ixp.html ixp
www/tutorial/netfpga.html netfpga
www/tutorial/nscommands.html nscommands
www/tutorial/nse.html nse
www/tutorial/routing.html routing
www/tutorial/secure.html secure
www/tutorial/tutorial.html Tutorial
www/tutorial/tutorial.php3 Tutorial
www/tutorial/vnodes.html vnodes
www/tutorial/widearea.html widearea
www/tutorial/wireless.html wireless
www/widearea.html wideareaAUP
#
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
# Most of the configure-substitution magic is done here.
# All the other makefiles in the NodeOS include
......@@ -23,7 +44,9 @@ export JAR = @JAR@
prefix = @prefix@
exec_prefix = @exec_prefix@
ISMAINSITE = @TBMAINSITE@
TBROOT = @prefix@
TBDEFS = @TBDEFS@
TBDBNAME = @TBDBNAME@
TBADMINGROUP = @TBADMINGROUP@
TBOPSEMAIL = @TBOPSEMAIL@
......@@ -32,6 +55,8 @@ TBLOGSEMAIL = @TBLOGSEMAIL@
TBAUDITEMAIL = @TBAUDITEMAIL@
TBACTIVEARCHIVE = @TBACTIVEARCHIVE@
TBUSERSARCHIVE = @TBUSERSARCHIVE@
TBERRORSEMAIL = @TBERRORSEMAIL@
TBAPPROVALEMAIL = @TBAPPROVALEMAIL@
BOSSNODE = @BOSSNODE@
USERNODE = @USERNODE@
FSNODE = @FSNODE@
......@@ -55,6 +80,7 @@ INSTALL_LIBEXECDIR = @libexecdir@
INSTALL_ETCDIR = @sysconfdir@
INSTALL_INCDIR = @includedir@
INSTALL_WWWDIR = @exec_prefix@/www
INSTALL_SUIDDIR = @exec_prefix@/suidbin
INSTALL_RCDIR = @INSTALL_RCDIR@
INSTALL_APACHE_CONFIG = @INSTALL_APACHE_CONFIG@
......@@ -62,6 +88,7 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL@ -m 755
EXE = @EXEEXT@
INSTALL_DATA = @INSTALL@ -m 444
SUDO = @SUDO@
CLIENT_ETCDIR = @CLIENT_ETCDIR@
CLIENT_BINDIR = @CLIENT_BINDIR@
......@@ -71,10 +98,27 @@ CLIENT_MANDIR = @CLIENT_MANDIR@
LOG_TESTBED = @LOG_TESTBED@
EVENTSYS = @EVENTSYS@
ELVIN_COMPAT = @ELVIN_COMPAT@
HAVE_MEZZANINE = @HAVE_MEZZANINE@
GTK_CONFIG = @GTK_CONFIG@
BRAINSTEM_DIR = @BRAINSTEM_DIR@
WITH_EMULAB = @WITH_EMULAB@
OPSVM_ENABLE = @OPSVM_ENABLE@
OPSVM_MOUNTPOINT= @OPSVM_MOUNTPOINT@
APACHE_VERSION = @APACHE_VERSION@
APACHE_START_COMMAND = @APACHE_START_COMMAND@
host_cpu = @host_cpu@
HAVE_ULXMLRPCPP = @HAVE_ULXMLRPCPP@
STANDALONE_CLEARINGHOUSE = @STANDALONE_CLEARINGHOUSE@
NODE_USAGE_SUPPORT = @NODE_USAGE_SUPPORT@
MERGE_BUILD = @MERGE_BUILD@
MERGE_BUILD_SANDBOX = @MERGE_BUILD_SANDBOX@
EXP_VIS_SUPPORT = @EXP_VIS_SUPPORT@
TESTBED_LIBSRCDIR = ${TESTBED_SRCDIR}/clientside/lib
TESTBED_LIBOBJDIR = ${OBJDIR}/clientside/lib
TESTBED_IMAGEZIPSRCDIR = ${TESTBED_SRCDIR}/clientside/os/imagezip
This is a snapshot of the current source code for the software that runs
Netbed (Emulab++) at the University of Utah, as well as testbeds at other
sites:
http://www.emulab.net/
Welcome to Emulab!
This is a snapshot of a rapidly-evolving system, rather than an engineered
release. It contains all Netbed source required to build a running testbed, but
interaction with Utah will almost certainly be required to get things up and
running.
This is the "official" source code for the software that runs the Emulab
network testbed at the University of Utah, as well as dozens of testbeds at
other sites around the world.
Netbed is being actively developed, so there will be features on deployed
Netbeds that are not included in this snapshot. Contact us (contact info at the
bottom of this file) if you are interested in receiving an updated version of
this source.
http://www.emulab.net/
This is a snapshot of a rapidly evolving system. It contains all Emulab
source required to build a running testbed, but interaction with Emulab
admins at Utah and elsewhere will likely be required to get things up
and running.
IMPORTANT NOTE
See the file LICENSE for restrictions on this snapshot.
In summary, you can't redistribute it, use it for commercial
purposes, must give appropriate credit to Utah and Emulab,
and return improvements to us. These terms may become more
liberal in a future formal release.
Emulab is being actively developed, so there may be features in deployed
Emulabs (in particular, Utah's) that are not included in this release.
Emulab is also a research project, and is rapidly evolving to satisfy the
needs of both our research needs and external researchers. For that reason,
you might find bugs! We hope you will tell us about them (nicely) and maybe
even help us to fix them. More on this below.
HOW TO SETUP
Copy and localize the 'defs-example' file for your environment
and run "./configure". See doc/setup.txt for details.
HOW TO SETUP AN EMULAB
The Emulab installation documentation is located on the Utah Emulab Wiki:
https://users.emulab.net/trac/emulab/wiki/InstallRoot
This source currently only builds on FreeBSD, and requires several packages;
the dependencies can be found in the Makefile for our 'meta-port' in
install/ports/emulab-boss .
HOW TO UPDATE
Start by looking at doc/update-testbed.txt.
HOW TO UPDATE AN EMULAB
Updating your existing Emulab is a bit harder than a fresh install, but is
mostly automated. A process that we hope will work for most sites is
located on the Utah Emulab Wiki:
http://users.emulab.net/trac/emulab/wiki/InstallRoot
under "Upgrade Documentation."
TRACKING THE EMULAB SOURCE CODE
We encourage you to track the Emulab source code in real time and stay
current with our stable versions. More info on how to access the
Emulab source code repository is here:
http://users.emulab.net/trac/emulab/wiki/GitRepository
MAILING LISTS
If you are bringing up an Emulab, be sure to join the mailing list:
emulab-admins@googlegroups.com
http://groups.google.com/group/emulab-admins
which has open archives.
Users of your Emulab should join the Emulab users group, which is intended
for all users of Emulabs anywhere, to help each other:
emulab-users@googlegroups.com
http://groups.google.com/group/emulab-users
HELP/CONTACT INFORMATION
For help and to report bugs and problems, mail to
emulab-admins@googlegroups.com
Don't be shy! In most cases, you will have the same questions other people
have. Search the archives, too! There is lots of good information there.
COPYRIGHT, LICENSE, AND DISTRIBUTION
Emulab is copyrighted by the Flux Research Group and the University of Utah.
This release of the Emulab software is distributed under the terms of the GNU
Affero General Public License, version 3 (AGPLv3). The AGPLv3 is a popular
open source license; see the file AGPL-COPYING for licensing conditions. The
AGPLv3 consists of the GNU General Public License version 3 (GPLv3) with a
single short addition (Section 13), which requires that the source be freely
available to all users who interact with the software through a network.
The Emulab source tree contains various third-party, open-source packages that
are used by Emulab. These third-party packages are copyrighted and licensed as
described in their source files.
The development of Emulab has been supported by numerous organizations
including NSF, DARPA, Intel, HP, Microsoft, Novell, Nortel, and the University
of Utah. We thank all of these organizations for making Emulab possible.
The following statement is required by DARPA and pertains to DARPA's support
for portions of the Emulab software:
DoD Distribution Statement A: Approved for public release; distribution is
unlimited.
DOCUMENTATION
This is a snapshot, not a formal distribution, so don't expect
great documentation.
doc/* contains documentation for developers.
www/*.html and www/doc/*.html contain end-user documentation.
Good places to start would include:
- The doc/papers directory, which contains papers published about Netbed
- The user tutorial (www/tutorial/tutorial.html)
- The user FAQ (www/faq.html)
- The user authorization document (www/auth.html)
- Some powerpoint slides on Emulab internals, found at:
http://www.cs.utah.edu/flux/testbed-doc/internals/
These include two files especially useful for setting up your own
testbed: "build-operate.ppt" and the first part of "security-all.ppt".
- Software architecture preliminary diagram (doc/arch-diagram.ps)
- Notes on the source tree and architecture (doc/arch.txt)
- Overview of some major systems (doc/overview.txt)
- Diagrams and brief explanations of the state machines used in the
system (www/doc/states.html and www/doc/*.gif)
- The instructions for building a running system from scratch (doc/setup*.txt)
- Mail we have exchanged with others about hardware recommendations
(doc/hardware-mail.mbox)
All of the Emulab documentation is available from the Utah Emulab site:
http://users.emulab.net/trac/emulab/wiki
QUICK TOUR
- The Database maintains most testbed state.
- LibDB (db/libdb.pm.in) is the main DB interface for testbed software.
- sql/database-create.sql contains the DB schema.
- The Web Interface (www/*) is the primary means of managing the system.
We encourage people to help us improve our documentation. If you want to
make changes, please apply for an account at Utah; anyone with an account
at the Utah Emulab is allowed to edit the Wiki pages.
Other good places to start would include:
- The search box at www.emulab.net
- The Emulab Wiki (http://users.emulab.net/trac/emulab/wiki)
- Getting Started document (http://users.emulab.net/trac/emulab/wiki/Auth)
- The user tutorial (http://users.emulab.net/trac/emulab/wiki/Tutorial)
- The user FAQ (http://users.emulab.net/trac/emulab/wiki/FAQ)
- Papers and talks about Emulab (http://www.emulab.net/pubs.php3)
- Papers using Emulab (http://www.emulab.net/expubs.php)
- startexp (tbsetup/startexp.in) is the backend for experiment creation;
Important scripts it calls include tbprerun (tbsetup/tbprerun.in)
and tbswap (tbsetup/tbswap.in).
- ns2ir (tbsetup/ns2ir/*) converts NS files to DB state (via TCL).
QUICK TOUR
- The database maintains most testbed state.
* Assorted modules (db/*.pm.in) are the main DB interface for testbed
software.
* sql/database-create.sql contains the DB schema.
- The Web interface (www/*) is the primary means of managing and
interfacing with the system. There is also an experimental
standalone GUI that uses this interface.
- The tbsetup and backend directories contain the bulk of the server-side
experiment setup and management code.
* startexp (tbsetup/startexp.in) is the back end for experiment creation.
Important scripts it calls include tbprerun (tbsetup/tbprerun.in)
and tbswap (tbsetup/tbswap.in).
* ns2ir (tbsetup/ns2ir/*) converts NS files to DB state (via TCL and XML).
* snmpit (tbsetup/snmpit.in) configures VLANs on switch hardware.
- assign (assign/*) maps experiments to available hardware.
- snmpit (tbsetup/snmpit.in) configures VLANs on switch hardware.
- frisbee (os/frisbee.redux/*) uses multicast to rapidly deploy disk images.
- tmcd (tmcd/*) is contacted by nodes as they boot up, to get configuration.
- The frisbee subsystem (os/frisbee.redux, os/imagezip) is used for the
creation and rapid deployment of disk images.
- The client-driven node configuration is handled by scripts on the client
which communicate with the server via a custom configuration protocol.
The server- and client-side of this mechanism is in the tmcd subdir.
- capture and console (capture/*, tip/*) provide serial line access to nodes.
- dynamic node and experiment control is provided via the Emulab event
system and its assorted agents (event/*).
SOURCE TREE ORGANIZATION
account - Account creation and management
apache - Apache HTTPD configuration
assign - Resource allocation software
backend - Server-side of the Emulab XML-RPC interface
bugdb - Optional per-project bug database
capture - Node serial line server software
cdrom - Software related to CD-booting local and remote machines
db - Variety of interfaces to testbed state
collab - Optional per-project "collaboration" tools: CVS, jabber, mailman
db - Variety of interfaces to testbed state
delay - RHL9 patches for supporting "end-node" traffic shaping
dhcpd - DHCPD configuration
doc - Documentation (mainly internal)
event - Event System
hyperviewer - 3D experiment visualization tool
firewall - Code and notes for per-experiment control net firewalls
flash - Software related to flash-dongle-booting local and remote machines
hyperviewer - 3D experiment visualization tool (not used)
image-test - Test framework for auto-testing of new OS images
install - Site installation scripts
ipod - "Ping of Death" software
ir - NS-to-database interpreter (in TCL)
ipod - "Ping of Death" software/patches
lib - C/C++ interface libraries
mote - Initial testbed support for Berkeley/Crossbow motes
named - BIND configuration files
os - Client-side software (disk loading, route calculation, etc.)
patches - Patches needed to compile standard software packages
pelab - Preliminary support for "Flexlab," an Emulab/PlanetLab hybrid
(see http://www.cs.utah.edu/flux/flexlab/)
protogeni - Evolving software for a prototype GENI system based on Emulab
(see http://www.protogeni.net/)
pxe - Software related to PXE-booting machines
rc.d - Server-side startup scripts
robots - Support for mobile wireless (Garcia robots)
security - Tools for secure boss node access
sensors - Node monitoring daemons
sql - Database schema and initialization
......@@ -106,20 +176,12 @@ tbsetup - Experiment creation and manipulation
testsuite - Automated testing suite
tip - Node serial line client software
tmcd - Testbed master control daemon and client (for node configuration)
tools - Misc. infrastructure tools
utils - Testbed configuration and maintenence tools
tools - Miscellaneous infrastructure tools
utils - Testbed configuration and maintenance tools
vis - Experiment visualization
wiki - Support for per-project Wikis
www - Web Interface / User Documentation
xmlrpc - Programatic XML-RPC interface to testbed
HELP/CONTACT INFORMATION
For help and to report bugs and problems, mail
testbed-ops@flux.utah.edu
Don't be shy!
We are happy to get on the phone with you, too,
for "big picture" issues and problems.
Jay Lepreau, lepreau@cs.utah.edu, 801-581-4285, and the Utah testbed crew.
February 1, 2004
]
Good luck!
The Emulab Team
Version: $Format:%H %ci$
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
use English;
#
# This gets invoked from the Web interface. Simply a wrapper ...
# Automatically generated from the template in the toplevel dir.
#
#
# Configure variables
#
my $PROG = "@PROGTOINVOKE@";
#
# Run the real thing, and never return.
#
exec $PROG, @ARGV;
die("Could not exec $PROG: $!");
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
# Copyright (c) 2000-2024 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
SRCDIR = @srcdir@
......@@ -12,22 +29,53 @@ UNIFIED = @UNIFIED_BOSS_AND_OPS@
include $(OBJDIR)/Makeconf
SBIN_STUFF = tbacct addsfskey addpubkey mkusercert quotamail genpubkeys
LIBEXEC_STUFF = webtbacct webaddsfskey webaddpubkey webmkusercert
SBIN_STUFF = tbacct addsfskey addpubkey mkusercert quotamail genpubkeys \
newuser newproj mksyscert spewcert dumpuser dumpproject \
manageremote regencerts
LIBEXEC_STUFF = webtbacct webaddsfskey webaddpubkey webmkusercert \
webnewuser webnewproj webspewcert webmanageremote
CTRLSBIN_STUFF = adduserhook accountsetup
# These scripts installed setuid, with sudo.
SETUID_BIN_SCRIPTS =
SETUID_SBIN_SCRIPTS = tbacct addpubkey mkusercert mksyscert
SETUID_LIBX_SCRIPTS =
ifeq ($(PROTOGENI_SUPPORT),1)
SBIN_STUFF += manageremote
SETUID_SBIN_SCRIPTS += manageremote
endif
#
# Targets
#
ifeq ($(STANDALONE_CLEARINGHOUSE),0)
TARGETS = $(SBIN_STUFF) $(LIBEXEC_STUFF) $(CTRLSBIN_STUFF)
else
TARGETS = mksyscert
SETUID_SBIN_SCRIPTS = mksyscert
endif
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(SBIN_STUFF) $(LIBEXEC_STUFF)
all: $(TARGETS)
include $(TESTBED_SRCDIR)/GNUmakerules
install: all script-install
ifeq ($(STANDALONE_CLEARINGHOUSE),0)
install: boss-install
else
install: clrhouse-install
endif
boss-install: all script-install
@echo "Don't forget to do a post-install as root"
script-install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_STUFF)) \
$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_STUFF))
$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_STUFF)) \
$(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRLSBIN_STUFF))
post-install:
chmod 775 $(INSTALL_BINDIR)
......@@ -41,8 +89,28 @@ post-install:
chown root $(INSTALL_SBINDIR)/mkusercert
chmod u+s $(INSTALL_SBINDIR)/mkusercert
control-install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_STUFF))
control-install:
hook-install: $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRLSBIN_STUFF))
# Clearinghouse install.
clrhouse-install: $(INSTALL_SBINDIR)/mksyscert
# This rule says what web* script depends on which installed binary directory.
$(LIBEXEC_STUFF): $(INSTALL_SBINDIR)
# Just in case the dirs are not yet created,
$(INSTALL_SBINDIR):
# And then how to turn the template into the actual script.
$(LIBEXEC_STUFF): $(TESTBED_SRCDIR)/WEBtemplate.in
@echo "Generating $@"
cat $< | sed -e 's,@PROGTOINVOKE@,$(word 2,$^)/$(subst web,,$@),' > $@
clean:
rm -f *.o core
$(INSTALL_DIR)/opsdir/sbin/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/opsdir/sbin
$(INSTALL) $< $@
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
# Copyright (c) 2000-2004, 2006 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
use English;
use Getopt::Std;
......@@ -34,7 +51,6 @@ my $nobody = 0;
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $TBAUDIT = "@TBAUDITEMAIL@";
my $HOMEDIR = "/users";
my $SFSUPDATE = "$TB/sbin/sfskey_update";
# Locals
......@@ -54,6 +70,8 @@ use libtestbed;
#
sub fatal($);
my $HOMEDIR = USERROOT();
#
# Turn off line buffering on output
#
......
#!/usr/bin/perl -w
#
# Copyright (c) 2008 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
use strict;
use English;
use Getopt::Std;
#
# A hook invoked from boss after a new user is added to ops.
#
sub usage()
{
print "Usage: adduserhook <uid>\n";
exit(-1);
}
my $optlist = "d";
my $debug = 0;
#
# Configure variables
#
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
#
# Turn off line buffering on output
#
$| = 1;
#
# Untaint the path
#
$ENV{'PATH'} = "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin";
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Only real root can run this script.
#
if ($UID != 0) {
die("*** $0:\n".
" Must be root to run this script!\n");
}
#
# Testbed Support libraries
#
use lib "@prefix@/lib";
use libtestbed;
# Protos
#
# Parse command arguments. Once we return from getopts, all that should be
# left are the required arguments.
#
my %options = ();
if (! getopts($optlist, \%options)) {
usage();
}
if (defined($options{"d"})) {
$debug = 1;
}
if (@ARGV != 1) {
usage();
}
my $user = shift(@ARGV);
#
# Add your code here, but remember you are running as root. Be careful.
#
exit(0);
sub fatal($)
{
my($mesg) = $_[0];
die("*** $0:\n".
" $mesg\n");
}
#!/usr/bin/perl -w
#
# Copyright (c) 2010-2011 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
use English;
use strict;
use Getopt::Std;
use CGI;
use Data::Dumper;
#
# Dump a project in XML format suitable for reading into newproj script.
#
sub usage()
{
print("Usage: dumpproject [-d] <pid>\n");
exit(-1);
}
my $optlist = "d";
my $debug = 0;
#
# Configure variables
#
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
#
# Untaint the path
#
$ENV{'PATH'} = "$TB/bin:$TB/sbin:/bin:/usr/bin:/usr/bin:/usr/sbin";
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Turn off line buffering on output
#
$| = 1;
#
# Load the Testbed support stuff.
#
use lib "@prefix@/lib";
use libdb;
use libtestbed;
use User;
use Project;
# Protos
sub fatal($);
sub DumpProject($);
#
# Parse command arguments. Once we return from getopts, all that should be
# left are the required arguments.
#
my %options = ();
if (! getopts($optlist, \%options)) {
usage();
}
if (defined($options{"d"})) {
$debug = 1;
}
if (@ARGV != 1) {
usage();
}
my $pid = $ARGV[0];
# Map invoking user to object.
my $this_user = User->ThisUser();
if (! defined($this_user)) {
fatal("You ($UID) do not exist!");
}
#
# Figure out who called us. Must have admin status to do this.
#
if (!$this_user->IsAdmin()) {
fatal("You must be a TB administrator to run this script!");
}
# Map target user to object.
my $project = Project->Lookup($pid);
if (! defined($project)) {
fatal("$pid does not exist!");
}
DumpProject($project);
exit(0);
#
# Dump the project in XML.
#
sub DumpProject($)
{
my ($project) = @_;
# Array of string values to print.
my %xmlnames = (
"pid" => {"tag" => "name",
"optional" => 0 },
"head_uid" => {"tag" => "leader",
"optional" => 0 },
"description" => {"tag" => "short description",
"optional" => 0 },
"URL" => {"tag" => "URL",
"optional" => 0 },
"funders" => {"tag" => "funders",
"optional" => 0 },
"why" => {"tag" => "long description",
"optional" => 0 },
"public" => {"tag" => "public",
"optional" => 0 },
"num_pcs" => {"tag" => "num_pcs",
"optional" => 0 },
"linked_to_us" => {"tag" => "linkedtous",
"optional" => 0 },
);
print "<project>\n";
foreach my $key (keys(%xmlnames)) {
my $ref = $xmlnames{$key};
my $tag = $ref->{'tag'};
my $optional = $ref->{'optional'};
my $val = $project->$key();
next
if (!defined($val) && $optional);
$val = "None"
if (!defined($val) &&
($key eq "funders" || $key eq "why"));
print " <attribute name=\"$tag\">";
print "<value>" . CGI::escapeHTML($val) . "</value>";
print "</attribute>\n";
}
print "</project>\n";
}
sub fatal($)
{
my ($mesg) = @_;
print STDERR "*** $0:\n".
" $mesg\n";
exit(-1);
}