Commit e99c3383 authored by Mike Hibler's avatar Mike Hibler

Add client-tarball target to create a tarball of scripts/binaries to

install on an existing image.  Implemented by doing a client-install into
an empty directory via DESTDIR.
parent f7719707
......@@ -36,7 +36,7 @@ install:
@echo "Choose tipserv-install for dedicated tip server machines."
#
# 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
......@@ -130,6 +130,7 @@ tipserv-install:
client-mkdirs:
-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)
client:
@$(MAKE) -C lib/libtb client
......@@ -158,6 +159,23 @@ endif
@$(MAKE) -C sensors client-install
@$(MAKE) -C tmcd client-install
TARBALLDESTDIR = /var/tmp/emulab-client
client-tarball:
@if [ `id -u` -ne 0 ]; then \
echo '*** Must run as root!'; \
false; \
fi
@if [ -d "$(TARBALLDESTDIR)" ]; then \
echo "$(TARBALLDESTDIR) already exists."; \
echo "Remove it and try again."; \
false; \
fi
echo "Building and installing client-side in $(TARBALLDESTDIR)..."
DESTDIR=$(TARBALLDESTDIR) $(MAKE) client-install
echo "Creating tarball..."
tar czf emulab-client.tar.gz -C $(TARBALLDESTDIR) .
destdircheck:
@if [ -z "$(DESTDIR)" ]; then \
echo "You must define DESTDIR for this target!"; \
......
......@@ -58,6 +58,7 @@ client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) program-agent$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/program-agent$(EXE)
chmod u+s-w $(DESTDIR)$(CLIENT_BINDIR)/program-agent
-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)/man8
$(INSTALL) -m 644 $(SRCDIR)/program-agent.8 $(DESTDIR)$(CLIENT_MANDIR)/man8/program-agent.8
clean:
......
......@@ -22,7 +22,7 @@ init: init.c pathnames.h
install:
client-install: client
install -s -o root -g wheel -m 500 -fschg -b -B.bak init /sbin/init
install -s -o root -g wheel -m 500 -fschg -b -B.bak init $(DESTDIR)/sbin/init
clean:
rm -f *.o core init
......@@ -22,7 +22,7 @@ init: init.c pathnames.h
install:
client-install: client
install -s -o root -g wheel -m 500 -fschg -b -B.bak init /sbin/init
install -s -o root -g wheel -m 500 -fschg -b -B.bak init $(DESTDIR)/sbin/init
clean:
rm -f *.o core init
......@@ -22,7 +22,7 @@ init: init.c pathnames.h
install:
client-install: client
install -s -o root -g wheel -m 500 -fschg -b -B.bak init /sbin/init
install -s -o root -g wheel -m 500 -fschg -b -B.bak init $(DESTDIR)/sbin/init
clean:
rm -f *.o core init
......@@ -14,15 +14,15 @@ include $(OBJDIR)/Makeconf
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')
ifeq ($(FBSDVERSION),FreeBSD4)
SUBDIR = 4
FSUBDIR = 4
endif
ifeq ($(FBSDVERSION),FreeBSD5)
SUBDIR = 5
FSUBDIR = 5
endif
ifeq ($(FBSDVERSION),FreeBSD6)
SUBDIR = 6
FSUBDIR = 6
endif
SUBDIRS = $(SUBDIR)
SUBDIRS = $(FSUBDIR)
all:
......@@ -30,8 +30,11 @@ include $(TESTBED_SRCDIR)/GNUmakerules
install:
client-mkdirs:
-mkdir -p $(DESTDIR)/sbin
client: client-subdirs
client-install: client client-install-subdirs
client-install: client client-mkdirs client-install-subdirs
clean: clean-subdirs
distclean: distclean-subdirs
......
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