Commit 976133e4 authored by Mike Hibler's avatar Mike Hibler

Improve the client-side install. With these changes, it should now be

possible to:

	gmake client
	sudo gmake client-install

on a FBSD4, FBSD5, RHL7.3, and RHL9.0 client node.

There are still some dependencies that are not explicit and which would
prevent a build/install from working on a "clean" OS.  Two that I know of are:
you must install our version of the elvin libraries and you must install boost.
parent a36ccc7b
......@@ -91,8 +91,17 @@ tipserv-install:
@$(MAKE) -C capture tipserv-install
@$(MAKE) -C tbsetup tipserv-install
client-install:
client-mkdirs:
-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
client:
@$(MAKE) -C lib/libtb client
@$(MAKE) -C event client
@$(MAKE) -C os client
@$(MAKE) -C sensors client
@$(MAKE) -C tmcd client
client-install: client client-mkdirs
@$(MAKE) -C event client-install
@$(MAKE) -C os client-install
@$(MAKE) -C sensors client-install
......
......@@ -1462,8 +1462,9 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/freebsd/supfile tmcd/freebsd/sethostname \
tmcd/linux/GNUmakefile tmcd/linux/supfile tmcd/linux/pump.conf \
tmcd/linux/sethostname tmcd/linux/sethostname.dhclient \
tmcd/freebsd5/GNUmakefile tmcd/openbsd/GNUmakefile \
tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
tmcd/linux9/GNUmakefile tmcd/linux9/supfile \
tmcd/freebsd5/GNUmakefile tmcd/freebsd5/supfile \
tmcd/openbsd/GNUmakefile tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \
utils/sshtb utils/create_image utils/node_admin utils/webcreateimage \
utils/firstuser utils/export_tables utils/eventping \
......
......@@ -441,7 +441,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
os/GNUmakefile os/split-image.sh os/imagezip/GNUmakefile \
os/imagezip/ffs/GNUmakefile os/imagezip/extfs/GNUmakefile \
os/frisbee.redux/GNUmakefile os/growdisk/GNUmakefile \
os/syncd/GNUmakefile os/dijkstra/GNUmakefile \
os/syncd/GNUmakefile os/dijkstra/GNUmakefile \
os/genhostsfile/GNUmakefile \
pxe/GNUmakefile pxe/bootinfo.restart \
security/GNUmakefile security/paperbag security/lastlog_daemon \
......@@ -507,8 +507,9 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/freebsd/supfile tmcd/freebsd/sethostname \
tmcd/linux/GNUmakefile tmcd/linux/supfile tmcd/linux/pump.conf \
tmcd/linux/sethostname tmcd/linux/sethostname.dhclient \
tmcd/freebsd5/GNUmakefile tmcd/openbsd/GNUmakefile \
tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
tmcd/linux9/GNUmakefile tmcd/linux9/supfile \
tmcd/freebsd5/GNUmakefile tmcd/freebsd5/supfile \
tmcd/openbsd/GNUmakefile tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \
utils/sshtb utils/create_image utils/node_admin utils/webcreateimage \
utils/firstuser utils/export_tables utils/eventping \
......
......@@ -36,16 +36,8 @@ install:
@$(MAKE) -C stated install
@$(MAKE) -C linktest install
client-install: lib/all.MAKE
ifeq ($(SYSTEM),FreeBSD)
@$(MAKE) -C delay-agent client-install
endif
@$(MAKE) -C link-agent client-install
@$(MAKE) -C tbgen client-install
@$(MAKE) -C program-agent client-install
@$(MAKE) -C trafgen client-install
@$(MAKE) -C proxy client-install
@$(MAKE) -C linktest client-install
client: client-subdirs
client-install: client client-install-subdirs
control-install:
@$(MAKE) -C lib control-install
......
......@@ -32,7 +32,8 @@ delay-agent: $(OBJS)
$(OBJS): main.h ../lib/libevent.a
client-install: delay-agent
client: delay-agent
client-install: client
$(INSTALL_PROGRAM) -s delay-agent $(DESTDIR)$(CLIENT_BINDIR)/delay-agent
clean:
......
......@@ -34,5 +34,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install: $(addprefix $(INSTALL_SBINDIR)/, eventdebug.pl)
# not a client thing
client:
client-install: client
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -12,10 +12,13 @@ SUBDIR = event/lib
include $(OBJDIR)/Makeconf
SYSTEM := $(shell uname -s)
PROGRAMS = libevent.a
LIBS = libevent.a
SWIGLIBS =
ifneq ($(SYSTEM),Linux)
PROGRAMS += libevent_r.a event.so _tbevent.so
LIBS += libevent_r.a
SWIGLIBS += event.so _tbevent.so
endif
PROGRAMS = $(LIBS) $(SWIGLIBS)
all: $(PROGRAMS)
......@@ -31,9 +34,14 @@ CFLAGS_NOWARN += `elvin-config --cflags vin4c`
ifeq ($(SYSTEM),Linux)
PCORE = -I/usr/lib/perl5/5.6.1/i386-linux/CORE
else
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')
ifeq ($(FBSDVERSION),FreeBSD5)
PCORE = -I/usr/local/lib/perl5/5.6.1/mach/CORE
else
PCORE = -I/usr/libdata/perl/5.00503/mach/CORE
PYCORE = -I/usr/local/include/python2.3
endif
endif
OBJS = event.o util.o
POBJS = event_r.o util.o
......@@ -102,14 +110,21 @@ install: $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF))
control-install: install
#
# Right now we don't bother with the dynamic libs since all of the existing
# clients are statically linked. Also, the dynamic libs include the SWIG stubs
# and that stuff needs work to build on Linux and FBSD5.
#
client: $(LIBS)
client-install: client # client-libinstall
#
# XXX Fix the python install location.
#
client-install:
client-libinstall:
$(INSTALL_PROGRAM) $(SRCDIR)/event.pm $(DESTDIR)$(CLIENT_BINDIR)/event.pm
$(INSTALL_PROGRAM) event.so $(DESTDIR)$(CLIENT_BINDIR)/event.so
$(INSTALL_PROGRAM) $(SRCDIR)/tbevent.py \
$(DESTDIR)$(CLIENT_BINDIR)/tbevent.py
$(INSTALL_PROGRAM) $(SRCDIR)/tbevent.py $(DESTDIR)$(CLIENT_BINDIR)/tbevent.py
$(INSTALL_PROGRAM) _tbevent.so $(DESTDIR)$(CLIENT_BINDIR)/_tbevent.so
clean:
......
......@@ -42,9 +42,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install: link-agent
$(INSTALL_PROGRAM) link-agent \
$(DESTDIR)$(CLIENT_BINDIR)/link-agent
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) -s link-agent $(DESTDIR)$(CLIENT_BINDIR)/link-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -61,15 +61,15 @@ $(LIBTBDIR)/%.o:
$(LIBEVENTDIR)/%.a:
@$(MAKE) -C $(LIBEVENTDIR) $(@F)
binaries: $(LOCAL_BINDIR)/$(DAEMON) $(LOCAL_BINDIR)/$(LTEVENT)
$(LOCAL_BINDIR):
-mkdir -p $(LOCAL_BINDIR)
$(LOCAL_BINDIR)/$(DAEMON): $(LOCAL_BINDIR) $(DAEMON_OBJS) $(LIBTB_OBJS)
binaries: $(LOCAL_BINDIR) $(LOCAL_BINDIR)/$(DAEMON) $(LOCAL_BINDIR)/$(LTEVENT)
$(LOCAL_BINDIR)/$(DAEMON): $(DAEMON_OBJS) $(LIBTB_OBJS)
$(CC) $(LDFLAGS) $(DAEMON_OBJS) $(LIBTB_OBJS) $(LIBS) -o $@
$(LOCAL_BINDIR)/$(LTEVENT): $(LOCAL_BINDIR) $(LTEVENT_OBJS) $(LIBTB_OBJS)
$(LOCAL_BINDIR)/$(LTEVENT): $(LTEVENT_OBJS) $(LIBTB_OBJS)
$(CC) $(LDFLAGS) $(LTEVENT_OBJS) $(LIBTB_OBJS) $(LIBS) -o $@
$(DAEMON_OBJS): linktest.h ../lib/libevent.a ../lib/event.h
......@@ -85,23 +85,17 @@ install:
control-install: install
client-install: all
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(DAEMON) \
$(DESTDIR)$(CLIENT_BINDIR)/$(DAEMON)
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(LTEVENT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(LTEVENT)
$(INSTALL_PROGRAM) $(SCRIPT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
$(INSTALL_PROGRAM) $(SCRIPT_RUN) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_RUN)
$(INSTALL_PROGRAM) $(SRCDIR)/$(SCRIPT_TBCOMPAT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_TBCOMPAT)
$(INSTALL_PROGRAM) $(NSTOIRDIR)/$(SCRIPT_NSTB_COMPAT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_NSTB_COMPAT)
client: all
client-install: client
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(DAEMON) $(DESTDIR)$(CLIENT_BINDIR)/$(DAEMON)
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(LTEVENT) $(DESTDIR)$(CLIENT_BINDIR)/$(LTEVENT)
$(INSTALL_PROGRAM) $(SCRIPT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
$(INSTALL_PROGRAM) $(SCRIPT_RUN) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_RUN)
$(INSTALL_PROGRAM) $(SRCDIR)/$(SCRIPT_TBCOMPAT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_TBCOMPAT)
$(INSTALL_PROGRAM) $(NSTOIRDIR)/$(SCRIPT_NSTB_COMPAT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_NSTB_COMPAT)
lt-install:
$(INSTALL_PROGRAM) $(SCRIPT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
$(INSTALL_PROGRAM) $(SCRIPT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
clean:
rm -f *.o $(TESTS)
......
......@@ -50,7 +50,14 @@ sup-install:
-mkdir -p $(INSTALL_SUPDIR)/usr/local/bin/
-cp $(INSTALL_NSE) $(INSTALL_SUPDIR)/usr/local/bin
client-install:
# XXX requires Shashi-magic right now
tmpmsg:
@echo "WARNING: do 'make real-<target>' if you really mean it"
client: tmpmsg
client-install: client
real-client: all
real-client-install:
cp -p $(INSTALL_FILES) $(DESTDIR)$(CLIENT_BINDIR)
if [ -x $(INSTALL_NSE) ]; then \
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/usr/local/bin; \
......
......@@ -42,9 +42,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install: program-agent
$(INSTALL_PROGRAM) -s program-agent \
$(DESTDIR)$(CLIENT_BINDIR)/program-agent
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) -s program-agent $(DESTDIR)$(CLIENT_BINDIR)/program-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -77,7 +77,8 @@ proxytest: proxytest.o $(LIBTBDIR)/log.o
$(PROGRAMS): ../lib/libevent.a ../lib/event.h
client-install: evproxy
client: evproxy
client-install: client
$(INSTALL_PROGRAM) -s evproxy $(DESTDIR)$(CLIENT_BINDIR)/evproxy
clean:
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2002, 2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -42,5 +42,9 @@ $(OBJS): event-sched.h ../lib/libevent.a
install: $(addprefix $(INSTALL_SBINDIR)/, event-sched)
# not a client thing
client:
client-install: client
clean:
/bin/rm -f *.o event-sched
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -22,3 +22,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules
install: all \
$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_STUFF)) \
$(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF))
# not a client thing
client:
client-install: client
......@@ -18,7 +18,6 @@ endif
include $(OBJDIR)/Makeconf
all: $(PROGRAMS)
client: tevc
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -50,9 +49,9 @@ endif
LIBS += -ldl
endif
# Link against some of the object files from libtb, instead of the
# whole library, since the latter cannot be built on clients (without mysql)
tevc: tevc.o $(LIBTBDIR)/log.o $(LIBTBDIR)/tbdefs.o
# Link against some of the object files from libtb, instead of the
# whole library, since the latter cannot be built on ops
$(CC) $(LDFLAGS) -static -o $@ tevc.o $(LIBTBDIR)/log.o \
$(LIBTBDIR)/tbdefs.o $(LIBS)
......@@ -68,7 +67,8 @@ install: $(INSTALL_SBINDIR)/tevd \
control-install: $(INSTALL_BINDIR)/tevc
client-install: tevc
client: tevc
client-install: client
$(INSTALL_PROGRAM) -s tevc $(DESTDIR)$(CLIENT_BINDIR)/tevc
clean:
......
......@@ -52,7 +52,7 @@ SYSTEM := $(shell uname -s)
ifeq ($(SYSTEM),FreeBSD)
# FreeBSD
CFLAGS += -DFREEBSD
YCFLAGS += -I. -DUSEEVENTS -DFREEBSD
YCFLAGS += -I. -I$(TGSRCDIR) -DUSEEVENTS -DFREEBSD
LIBS += -ll -lcompat
endif
......@@ -86,7 +86,8 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install: trafgen
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) -s trafgen $(DESTDIR)$(CLIENT_BINDIR)/trafgen
clean:
......
......@@ -15,6 +15,7 @@ all: libtb.a
client: libtb-nodb.a
mv libtb-nodb.a libtb.a
client-install: client
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -27,16 +27,25 @@ install: $(INSTALL_SBINDIR)/split-image.sh
control-install:
@$(MAKE) -C imagezip install
client-install:
client:
ifneq ($(SYSTEM),Linux)
$(MAKE) -C imagezip client
$(MAKE) -C growdisk client
endif
$(MAKE) -C syncd client
$(MAKE) -C dijkstra client
$(MAKE) -C genhostsfile client
client-install: client
$(INSTALL) -m 755 -o root -g wheel -d $(LBINDIR)
$(INSTALL_PROGRAM) $(SRCDIR)/install-tarfile $(LBINDIR)/install-tarfile
$(INSTALL_PROGRAM) $(SRCDIR)/install-rpm $(LBINDIR)/install-rpm
ifneq ($(SYSTEM),Linux)
$(INSTALL_PROGRAM) $(SRCDIR)/create-image $(LBINDIR)/create-image
$(MAKE) -C imagezip client-install
$(MAKE) -C growdisk client-install
endif
$(MAKE) -C syncd client-install
$(MAKE) -C growdisk client-install
$(MAKE) -C dijkstra client-install
$(MAKE) -C genhostsfile client-install
......
......@@ -22,7 +22,8 @@ dijkstra: dijkstra.o bitmath.o Compressor.o IpTree.o SingleSource.o \
Compressor.h lib.h
$(CXX) $(CXXFLAGS) -static dijkstra.o bitmath.o Compressor.o IpTree.o SingleSource.o $(LIBS) -o dijkstra
client-install: dijkstra
client: all
client-install: client
$(INSTALL_PROGRAM) dijkstra $(DESTDIR)$(CLIENT_BINDIR)/dijkstra
clean:
......
......@@ -25,8 +25,9 @@ wgraph.o: wgraph.cc wgraph.h
install: $(INSTALL_LIBEXECDIR)/genhostsfile
client-install: genhostsfile
$(INSTALL_PROGRAM) genhostsfile $(DESTDIR)$(CLIENT_BINDIR)/genhostsfile
client: genhostsfile
client-install: client
$(INSTALL_PROGRAM) -s genhostsfile $(DESTDIR)$(CLIENT_BINDIR)/genhostsfile
clean:
rm -f *.o genhostsfile genfromtopo genfromdb
......@@ -24,7 +24,8 @@ growdisk: growdisk.o
install:
client-install: growdisk
client: all
client-install: client
$(INSTALL_PROGRAM) growdisk $(DESTDIR)$(CLIENT_BINDIR)
clean:
......
......@@ -112,7 +112,8 @@ version.c: imagezip.c imageunzip.c imagedump.c
install: $(INSTALL_BINDIR)/imagezip $(INSTALL_BINDIR)/imageunzip $(INSTALL_BINDIR)/imagedump
client-install: all
client: all
client-install: client
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/usr/local/bin
$(INSTALL_PROGRAM) imagezip $(DESTDIR)/usr/local/bin/imagezip
$(INSTALL_PROGRAM) imageunzip $(DESTDIR)/usr/local/bin/imageunzip
......
......@@ -28,16 +28,13 @@ emulab-sync: emulab-sync.o version.o decls.h
version.c: emulab-syncd.c
echo >$@ "char build_info[] = \"Built `date +%d-%b-%Y` by `id -nu`@`hostname | sed 's/\..*//'`:`pwd`\";"
client-install: emulab-syncd emulab-sync
$(INSTALL_PROGRAM) -s emulab-syncd \
$(DESTDIR)$(CLIENT_BINDIR)/emulab-syncd
$(INSTALL_PROGRAM) -s emulab-sync \
$(DESTDIR)$(CLIENT_BINDIR)/emulab-sync
client: all
client-install: client
$(INSTALL_PROGRAM) -s emulab-syncd $(DESTDIR)$(CLIENT_BINDIR)/emulab-syncd
$(INSTALL_PROGRAM) -s emulab-sync $(DESTDIR)$(CLIENT_BINDIR)/emulab-sync
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)$(CLIENT_MANDIR)/man1
$(INSTALL_PROGRAM) $(SRCDIR)/emulab-syncd.1 \
$(DESTDIR)$(CLIENT_MANDIR)/man1/emulab-syncd.1
$(INSTALL_PROGRAM) $(SRCDIR)/emulab-sync.1 \
$(DESTDIR)$(CLIENT_MANDIR)/man1/emulab-sync.1
$(INSTALL_PROGRAM) $(SRCDIR)/emulab-syncd.1 $(DESTDIR)$(CLIENT_MANDIR)/man1/emulab-syncd.1
$(INSTALL_PROGRAM) $(SRCDIR)/emulab-sync.1 $(DESTDIR)$(CLIENT_MANDIR)/man1/emulab-sync.1
check:
sh $(SRCDIR)/syncd_test.sh
......
......@@ -4,7 +4,7 @@
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = lib
SUBDIR = sensors
include $(OBJDIR)/Makeconf
......@@ -20,7 +20,10 @@ slothd:
install:
@$(MAKE) -C slothd install
client-install:
client:
@$(MAKE) -C slothd client
client-install: client
@$(MAKE) -C slothd client-install
clean: subdir-clean
......
......@@ -52,7 +52,7 @@ version.c: slothd.c slothd.h sdcollectd.c sdcollectd.h
echo >$@ "char build_info[] = \"Built `date +%d-%b-%Y` by `id -nu`@`hostname | sed 's/\..*//'`:`pwd`\";"
client: slothd
-mkdir $(SLOTHD_DIR)
-mkdir -p $(SLOTHD_DIR)
$(CP) slothd $(SLOTHD_DIR)/slothd
install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS) sdcollectd)
......
......@@ -11,8 +11,9 @@ SYSTEM := $(shell uname -s)
include $(OBJDIR)/Makeconf
all: server client
client: tmcc tmcc-nossl findif
all: server fullclient client
fullclient: tmcc
client: tmcc-nossl findif
server: tmcd tmcd.restart
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -29,17 +30,27 @@ SSLFLAGS = -DWITHSSL
TMLIBS += -lssl -lcrypto
SSLOBJ = ssl.o
ifeq ($(SYSTEM),Linux)
RHLVERSION := $(shell cat /etc/redhat-release | sed -e 's/Red Hat Linux release \([0-9]\).*/Linux\1/')
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
TMLIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
endif
TMLIBS += -ldl
ifeq ($(RHLVERSION),Linux9)
MDSUBDIR = linux9
else
MDSUBDIR = linux
endif
endif
ifeq ($(SYSTEM),FreeBSD)
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')
ifeq ($(FBSDVERSION),FreeBSD5)
MDSUBDIR = freebsd5
else
MDSUBDIR = freebsd
endif
endif
ifeq ($(EVENTSYS),1)
TMCDCFLAGS = `elvin-config --cflags vin4c` \
......@@ -79,7 +90,7 @@ install: $(INSTALL_SBINDIR)/tmcd \
$(INSTALL_SBINDIR)/tmcd.restart
client-install: tmcc-nossl findif
client-install: client
@$(MAKE) -C $(MDSUBDIR) install
$(INSTALL_BINDIR)/tmcd/%: %
......
......@@ -32,7 +32,7 @@ TBBINDIR = $(DESTDIR)/usr/testbed/bin
TBLIBDIR = $(DESTDIR)/usr/testbed/lib
INSTALL = /usr/bin/install -c
install:
install client-install:
@echo "You should probably not run this install directly!"
@echo "If you do, be sure to install from the system specific "
@echo "directory afterwards."
......
......@@ -41,7 +41,7 @@ INSTALL = /usr/bin/install -c
injail: $(SRCDIR)/jail/injail.c
$(CC) $(CFLAGS) -O2 -o injail $<
install: common-install etc-install \
install client-install: common-install etc-install \
sup-install script-install bin-install jail-install
@echo "Remember to install the PEM files if necessary"
......
......@@ -29,6 +29,18 @@ my $SFSUSERS = "/etc/sfs/sfs_users";
my $SFSHOSTKEY = "/etc/sfs/sfs_host_key";
my $MOUNTINFO = "/var/db/mounttab";
#
# Dead wood in $BINDIR
# If you remove/move a script, list it here so that it goes away when the
# image is remade.
#
my @DEADFILES = ("rc.agents", "rc.delayagent", "rc.delta", "rc.healthd",
"rc.injail", "rc.ipod", "rc.mfs", "rc.progagent",
"rc.setup", "rc.slothd", "rc.testbed",
"batchcmddone", "bootsetup", "install-tarfile",
"jailsetup", "update_delays");
#
# Turn off line buffering on output
#
......@@ -189,3 +201,10 @@ foreach my $dir (@VARDIRS) {
}
}
print "Clearing out old Emulab scripts and binaries in $BINDIR ...\n";
foreach my $file (@DEADFILES) {
if (-f "$BINDIR/$file") {
unlink("$BINDIR/$file") or
warn("*** could not remove $BINDIR/$file\n");
}
}
......@@ -38,9 +38,27 @@ RCDIR = $(DESTDIR)/usr/local/etc/rc.d
ISMFS = $(ETCDIR)/ismfs
INSTALL = /usr/bin/install -c
install: basefbsd-install etc-install \
install client-install: basefbsd-install etc-install \
sup-install script-install bin-install # jail-install
destdircheck:
@if [ -z "$(DESTDIR)" ]; then \
echo "You must define DESTDIR for this target!"; \
false; \
fi
cdboot-install: destdircheck basefbsdcdboot-install etc-install \
script-install bin-install
rm -f $(SYSETCDIR)/start_if.*
rm -f $(SYSETCDIR)/rc.cdroot $(SYSETCDIR)/fstab.lbs
rm -f $(DESTDIR)/boot/loader.rc.lbs
$(INSTALL) -m 755 $(SRCDIR)/cdboot/rc.conf $(SYSETCDIR)/rc.conf
$(INSTALL) -m 755 $(SRCDIR)/cdboot/rc.cdboot $(BINDIR)/rc/rc.cdboot
$(INSTALL) -m 755 $(SRCDIR)/cdboot/cdroot $(SYSETCDIR)/rc.d/cdroot
cp $(SRCDIR)/cdboot/fstab $(SYSETCDIR)/fstab
cp $(SRCDIR)/cdboot/loader.conf $(DESTDIR)/boot/loader.conf
cp $(SRCDIR)/cdboot/.profile $(DESTDIR)/.profile
simple-install: script-install bin-install # jail-install
dir-install:
......@@ -63,6 +81,9 @@ basefbsd-install: dir-install
(cd ../freebsd; $(MAKE) all install)
rm -f $(SYSETCDIR)/start_if.*
basefbsdcdboot-install: dir-install
(cd ../freebsd; $(MAKE) DESTDIR=$(DESTDIR) all cdboot-install)
sup-install: dir-install supfile
$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
......
......@@ -37,13 +37,21 @@ RCDIR = $(SYSETCDIR)/rc.d
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
install: common-install etc-install \
install client-install: common-install etc-install \
sup-install script-install bin-install
@echo "Remember to install the PEM files if necessary"
simple-install: common-install script-install bin-install
dir-install:
$(INSTALL) -m 755 -o root -g wheel -d $(SYSETCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(SYSETCDIR)/sysconfig
$(INSTALL) -m 755 -o root -g wheel -d $(SYSETCDIR)/sysconfig/network-scripts
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)/init.d
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)/rc1.d
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)/rc3.d
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)/rc6.d
$(INSTALL) -m 755 -o root -g wheel -d $(ETCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(BINDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)
......
......@@ -13,7 +13,7 @@ require 'ctime.pl';
#
my $DUMPDATES = "/etc/dumpdates";
my @DBFILES = ();
my @VARDIRS = ("logs", "db", "jails", "boot", "lock");
my @VARDIRS = ("logs", "db", "jails", "boot", "lock", "lib/dhcp");
my $FSTAB = "/etc/fstab";
my $LOGDIR = "/var/log";
my $RUNDIR = "/var/run";
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
#
# XXX ONLY RUN THIS INSTALL ON A LINUX TESTBED NODE!
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tmcd/linux9
include $(OBJDIR)/Makeconf
SCRIPTS =
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: supfile ifcfgs
include $(TESTBED_SRCDIR)/GNUmakerules
DESTDIR =
SYSETCDIR = $(DESTDIR)/etc
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(SYSETCDIR)/rc.d
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
install client-install: baselinux-install common-install etc-install \
sup-install script-install bin-install
@echo "Remember to install the PEM files if necessary"
simple-install: common-install script-install bin-install
dir-install:
baselinux-install: dir-install
(cd ../linux; $(MAKE) client-install)
rm -f $(SYSETCDIR)/pump.conf
# rm -f $(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth?
common-install: dir-install
(cd ../common; $(MAKE) local-install)
sup-install: dir-install supfile
$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
bin-install: dir-install
etc-install: dir-install sysetc-remove sysetc-install
sysetc-install: ifcfgs dir-install
# $(INSTALL) -m 755 ifcfg-eth[0-9]* $(SYSETCDIR)/sysconfig/network-scripts
sysetc-remove:
script-install: dir-install $(SCRIPTS)
sfs-install:
# create ifcfg-eth? files
ifcfgs: $(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
# $(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
#
# Bump as needed
#
RHL90-STD base=@CLIENT_VARDIR@ prefix=/ preserve release=20040319
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -33,7 +33,7 @@ RCDIR = $(DESTDIR)/usr/local/etc/rc.d
ISMFS = $(ETCDIR)/ismfs
INSTALL = /usr/bin/install -c
install: common-install etc-install \
install client-install: common-install etc-install \
sup-install script-install bin-install jail-install
@echo "Remember to install the PEM files if necessary"
......
......@@ -97,7 +97,7 @@ tmcc:
@echo "prior to building the tarball."
@false
install:
install client-install:
rootball-install:
$(INSTALL_DATA) $(ROOTBALLNAME) $(INSTALL_ETCDIR)/plab
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -31,6 +31,7 @@ VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(DESTDIR)/usr/local/etc/rc.d
INSTALL = /usr/bin/install -c
client-install:
wa-install: wa-stuff doinstall
ron-install: ron-stuff doinstall
doinstall: common-install etc-install sysetc-install other-install \
......
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