From 33b207d328644b9822aa799d682e11af30840ff2 Mon Sep 17 00:00:00 2001 From: Leigh B Stoller <stoller@flux.utah.edu> Date: Thu, 15 Nov 2018 12:08:23 -0700 Subject: [PATCH] Part of issue #472; move tip and client part of xmlrpc, into the clientside subdir so they can be installed on nodes. --- GNUmakefile.in | 18 +-- clientside/GNUmakefile.in | 5 +- clientside/configure | 9 +- clientside/configure.ac | 8 ++ {tip => clientside/tip}/GNUmakefile.in | 35 +++-- {tip => clientside/tip}/README | 0 {tip => clientside/tip}/cmds.c | 0 {tip => clientside/tip}/cmdtab.c | 0 {tip => clientside/tip}/console.boss.in | 0 {tip => clientside/tip}/console.in | 5 +- {tip => clientside/tip}/gentipacl.pl | 0 {tip => clientside/tip}/getcap.c | 0 {tip => clientside/tip}/hunt.c | 0 {tip => clientside/tip}/ntip.1 | 0 {tip => clientside/tip}/partab.c | 0 {tip => clientside/tip}/pathnames.h | 0 {tip => clientside/tip}/remcap.c | 0 {tip => clientside/tip}/remote.c | 0 {tip => clientside/tip}/tip.c | 0 {tip => clientside/tip}/tip.deprecation | 0 {tip => clientside/tip}/tip.h | 0 {tip => clientside/tip}/tipconf.h | 0 {tip => clientside/tip}/tiptunnel.c | 3 + {tip => clientside/tip}/value.c | 0 {tip => clientside/tip}/vars.c | 0 .../xmlrpc}/BasicXMLRPCServers.py.in | 0 clientside/xmlrpc/GNUmakefile.in | 126 ++++++++++++++++++ {xmlrpc => clientside/xmlrpc}/README | 0 .../xmlrpc}/emulabclient.py.in | 0 {xmlrpc => clientside/xmlrpc}/libxmlrpc.pm.in | 0 .../xmlrpc}/script_wrapper.py.in | 8 +- .../xmlrpc}/sslxmlrpc_client.py.in | 10 +- configure | 11 +- configure.ac | 10 +- xmlrpc/GNUmakefile.in | 77 +---------- 35 files changed, 210 insertions(+), 115 deletions(-) rename {tip => clientside/tip}/GNUmakefile.in (78%) rename {tip => clientside/tip}/README (100%) rename {tip => clientside/tip}/cmds.c (100%) rename {tip => clientside/tip}/cmdtab.c (100%) rename {tip => clientside/tip}/console.boss.in (100%) rename {tip => clientside/tip}/console.in (95%) rename {tip => clientside/tip}/gentipacl.pl (100%) rename {tip => clientside/tip}/getcap.c (100%) rename {tip => clientside/tip}/hunt.c (100%) rename {tip => clientside/tip}/ntip.1 (100%) rename {tip => clientside/tip}/partab.c (100%) rename {tip => clientside/tip}/pathnames.h (100%) rename {tip => clientside/tip}/remcap.c (100%) rename {tip => clientside/tip}/remote.c (100%) rename {tip => clientside/tip}/tip.c (100%) rename {tip => clientside/tip}/tip.deprecation (100%) rename {tip => clientside/tip}/tip.h (100%) rename {tip => clientside/tip}/tipconf.h (100%) rename {tip => clientside/tip}/tiptunnel.c (99%) rename {tip => clientside/tip}/value.c (100%) rename {tip => clientside/tip}/vars.c (100%) rename {xmlrpc => clientside/xmlrpc}/BasicXMLRPCServers.py.in (100%) create mode 100644 clientside/xmlrpc/GNUmakefile.in rename {xmlrpc => clientside/xmlrpc}/README (100%) rename {xmlrpc => clientside/xmlrpc}/emulabclient.py.in (100%) rename {xmlrpc => clientside/xmlrpc}/libxmlrpc.pm.in (100%) rename {xmlrpc => clientside/xmlrpc}/script_wrapper.py.in (99%) rename {xmlrpc => clientside/xmlrpc}/sslxmlrpc_client.py.in (97%) diff --git a/GNUmakefile.in b/GNUmakefile.in index c062f646e5..32e7960c63 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -52,7 +52,7 @@ ifeq ($(STANDALONE_CLEARINGHOUSE),0) SUBDIRS = \ clientside/lib \ db assign www @optional_subdirs@ clientside ipod security sensors \ - pxe tbsetup account tmcd utils backend tip ipod vis \ + pxe tbsetup account tmcd utils backend ipod vis \ sensors os xmlrpc autofs install/newnode_sshkeys \ tools/svn collab/exp-vis node_usage install ifeq ($(ISMAINSITE),1) @@ -153,14 +153,12 @@ ops-install: @$(MAKE) -C rc.d control-install @$(MAKE) -C tbsetup control-install @$(MAKE) -C security control-install - @$(MAKE) -C tip control-install @$(MAKE) -C db control-install @$(MAKE) -C utils control-install @$(MAKE) -C clientside control-install ifeq ($(EVENTSYS),1) @$(MAKE) -C event control-install endif - @$(MAKE) -C xmlrpc control-install @$(MAKE) -C account control-install ifeq ($(PELABSUPPORT),1) @$(MAKE) -C pelab control-install @@ -211,7 +209,7 @@ just-builddirs: tipserv-install: -mkdir -p $(INSTALL_TOPDIR)/log/tiplogs -mkdir -p $(INSTALL_TOPDIR)/etc - @$(MAKE) -C tip tipserv-install + @$(MAKE) -C clientside/tip tipserv-install @$(MAKE) -C clientside/os/capture tipserv-install @$(MAKE) -C tbsetup tipserv-install @@ -222,34 +220,22 @@ client-mkdirs: client: @$(MAKE) -C clientside client @$(MAKE) -C os client -ifneq ($(SYSTEM),CYGWIN_NT-5.1) - @$(MAKE) -C tip client -endif client-install: client client-mkdirs @$(MAKE) -C clientside client-install @$(MAKE) -C os client-install -ifneq ($(SYSTEM),CYGWIN_NT-5.1) - @$(MAKE) -C tip client-install -endif subboss: @$(MAKE) -C clientside subboss @$(MAKE) -C tbsetup subboss @$(MAKE) -C db subboss @$(MAKE) -C os subboss -ifneq ($(SYSTEM),CYGWIN_NT-5.1) - @$(MAKE) -C tip client -endif @$(MAKE) -C utils subboss subboss-install: subboss @$(MAKE) -C clientside subboss-install @$(MAKE) -C tbsetup subboss-install @$(MAKE) -C os subboss-install -ifneq ($(SYSTEM),CYGWIN_NT-5.1) - @$(MAKE) -C tip client-install -endif @$(MAKE) -C utils subboss-install @$(MAKE) -C db subboss-install @$(MAKE) -C rc.d subboss-install diff --git a/clientside/GNUmakefile.in b/clientside/GNUmakefile.in index 83031dbd6b..98a86a12a6 100644 --- a/clientside/GNUmakefile.in +++ b/clientside/GNUmakefile.in @@ -31,13 +31,16 @@ REL := $(shell $(SRCDIR)/tmcc/osstuff.sh -r) include $(OBJDIR)/Makeconf -SUBDIRS = lib tools os sensors protogeni +SUBDIRS = lib tools os sensors protogeni xmlrpc ifneq ($(EVENTSYS),0) SUBDIRS += event endif ifeq ($(MOBILESUPPORT),1) SUBDIRS += mobile endif +ifneq ($(SYSTEM),CYGWIN_NT-5.1) +SUBDIRS += tip +endif # tmcc should be last as the freenas* install targets mess with the hierarchy SUBDIRS += tmcc diff --git a/clientside/configure b/clientside/configure index f791e7545c..43acff8402 100755 --- a/clientside/configure +++ b/clientside/configure @@ -3,7 +3,7 @@ # Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012, 2018 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -647,6 +647,7 @@ EVENTSYS ELVIN_COMPAT TPM WITH_EMULAB +BOSSNODE PATH ELVIN_CONFIG RPM @@ -4042,6 +4043,8 @@ WITH_EMULAB=0 # TPM stuff. See option below. TPM=0 +# Need this in a couple of places that share with Emulab. +BOSSNODE="boss" # # Elvin compat option, which we still need. Always turn on event system. @@ -4637,6 +4640,10 @@ outfiles="Makeconf GNUmakefile setversion \ tmcc/plab/GNUmakefile tmcc/cygwinseven/GNUmakefile \ tmcc/centos6/GNUmakefile \ tmcc/centos7/GNUmakefile \ + xmlrpc/GNUmakefile xmlrpc/emulabclient.py \ + xmlrpc/sslxmlrpc_client.py \ + xmlrpc/script_wrapper.py xmlrpc/libxmlrpc.pm \ + tip/GNUmakefile \ tmcc/onie/GNUmakefile \ os/GNUmakefile os/syncd/GNUmakefile \ os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile \ diff --git a/clientside/configure.ac b/clientside/configure.ac index f85cae8a22..7a5705f440 100644 --- a/clientside/configure.ac +++ b/clientside/configure.ac @@ -83,6 +83,10 @@ AC_SUBST(WITH_EMULAB) TPM=0 AC_SUBST(TPM) +# Need this in a couple of places that share with Emulab. +BOSSNODE="boss" +AC_SUBST(BOSSNODE) + # # Elvin compat option, which we still need. Always turn on event system. # @@ -326,6 +330,10 @@ outfiles="Makeconf GNUmakefile setversion \ tmcc/centos6/GNUmakefile \ tmcc/centos7/GNUmakefile \ tmcc/onie/GNUmakefile \ + tip/GNUmakefile \ + xmlrpc/GNUmakefile xmlrpc/emulabclient.py \ + xmlrpc/sslxmlrpc_client.py \ + xmlrpc/script_wrapper.py xmlrpc/libxmlrpc.pm \ os/GNUmakefile os/syncd/GNUmakefile \ os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile \ os/frisbee.redux/GNUmakefile \ diff --git a/tip/GNUmakefile.in b/clientside/tip/GNUmakefile.in similarity index 78% rename from tip/GNUmakefile.in rename to clientside/tip/GNUmakefile.in index caa6012632..2a2f7bb35b 100644 --- a/tip/GNUmakefile.in +++ b/clientside/tip/GNUmakefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2000-2014 University of Utah and the Flux Group. +# Copyright (c) 2000-2018 University of Utah and the Flux Group. # # {{{EMULAB-LICENSE # @@ -22,13 +22,13 @@ # SRCDIR = @srcdir@ TESTBED_SRCDIR = @top_srcdir@ -OBJDIR = .. -SUBDIR = tip +OBJDIR = @top_builddir@ +SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR)) include $(OBJDIR)/Makeconf all: tip tiptunnel console.bin console console.boss tippty -client: tippty +client: console.bin console include $(TESTBED_SRCDIR)/GNUmakerules @@ -44,7 +44,7 @@ ifneq ($(wildcard /usr/kerberos/bin/krb5-config),) endif endif -CFLAGS = -g -O2 -DUSESOCKETS -I$(TESTBED_SRCDIR)/clientside/os/capture \ +CFLAGS = -g -O2 -DUSESOCKETS -I$(SRCDIR)/../os/capture \ -I$(OBJDIR) OBJS = cmds.o cmdtab.o hunt.o partab.o \ @@ -60,10 +60,10 @@ LIBS= tip.old: $(OBJS) $(CC) $(CFLAGS) $(LDSTATIC) -o tip $(OBJS) $(LIBS) -tip: $(TESTBED_SRCDIR)/tip/tip.deprecation - cp $(TESTBED_SRCDIR)/tip/tip.deprecation tip +tip: tip.deprecation + cp $< tip -tiptunnel.o: tiptunnel.c $(TESTBED_SRCDIR)/clientside/os/capture/capdecls.h +tiptunnel.o: tiptunnel.c $(SRCDIR)/../os/capture/capdecls.h $(CC) $(CFLAGS) $(SSLFLAGS) -o tiptunnel.o -c $< tiptunnel: tiptunnel.o @@ -71,13 +71,13 @@ tiptunnel: tiptunnel.o # 'console' is tiptunnel, without SSL, and with localmode on by default. -console.bin.o: tiptunnel.c $(TESTBED_SRCDIR)/clientside/os/capture/capdecls.h +console.bin.o: tiptunnel.c $(SRCDIR)/../os/capture/capdecls.h $(CC) $(CFLAGS) -DLOCALBYDEFAULT -o console.bin.o -c $< console.bin: console.bin.o $(CC) $(CFLAGS) -o console.bin console.bin.o -tippty.o: tiptunnel.c $(TESTBED_SRCDIR)/clientside/os/capture/capdecls.h +tippty.o: tiptunnel.c $(SRCDIR)/../os/capture/capdecls.h $(CC) $(CFLAGS) -DTIPPTY -o $@ -c $< tippty: tippty.o @@ -86,7 +86,8 @@ tippty: tippty.o $(OBJS): tipconf.h tip.h client-install: client - $(INSTALL_PROGRAM) tippty$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/tippty$(EXE) + $(INSTALL_PROGRAM) console.bin $(DESTDIR)/usr/local/bin/console.bin + $(INSTALL_PROGRAM) console $(DESTDIR)/usr/local/bin/console control-install tipserv-install: all $(INSTALL_BINDIR)/tip $(INSTALL_BINDIR)/tiptunnel $(INSTALL_BINDIR)/console.bin $(INSTALL_BINDIR)/console @@ -100,5 +101,17 @@ install: all $(INSTALL_BINDIR)/tip \ $(INSTALL_PROGRAM) console $(INSTALL_DIR)/opsdir/bin/console $(INSTALL_PROGRAM) console.bin $(INSTALL_DIR)/opsdir/bin/console.bin +# Tip not installed in these targets. +subboss: +subboss-install: +post-install: +fs-install: +mfs: +mfs-install: +frisbee-mfs: +frisbee-mfs-install: +newnode-mfs: +newnode-mfs-install: + clean: rm -f $(OBJS) *.o tip tiptunnel console console.bin tippty diff --git a/tip/README b/clientside/tip/README similarity index 100% rename from tip/README rename to clientside/tip/README diff --git a/tip/cmds.c b/clientside/tip/cmds.c similarity index 100% rename from tip/cmds.c rename to clientside/tip/cmds.c diff --git a/tip/cmdtab.c b/clientside/tip/cmdtab.c similarity index 100% rename from tip/cmdtab.c rename to clientside/tip/cmdtab.c diff --git a/tip/console.boss.in b/clientside/tip/console.boss.in similarity index 100% rename from tip/console.boss.in rename to clientside/tip/console.boss.in diff --git a/tip/console.in b/clientside/tip/console.in similarity index 95% rename from tip/console.in rename to clientside/tip/console.in index 8827479d08..386bf97ca6 100644 --- a/tip/console.in +++ b/clientside/tip/console.in @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# Copyright (c) 2005-2015 University of Utah and the Flux Group. +# Copyright (c) 2005-2018 University of Utah and the Flux Group. # # {{{EMULAB-LICENSE # @@ -41,7 +41,6 @@ my @opts = (); # Configure variables # my $TB = "@prefix@"; -my $TBOPS = "@TBOPSEMAIL@"; my $WRAPPER = "$TB/bin/script_wrapper.py"; my $CONSOLEBIN = "$TB/bin/console.bin"; my $aclfile; @@ -88,7 +87,7 @@ my $node = $ARGV[0]; # $ENV{'TMPDIR'} = "/tmp"; -my $tempfile = `mktemp -t tipacl`; +my $tempfile = `mktemp -t tipacl.XXXXXX`; if ($?) { die("*** $0:\n". " Could not create a temporary file!\n"); diff --git a/tip/gentipacl.pl b/clientside/tip/gentipacl.pl similarity index 100% rename from tip/gentipacl.pl rename to clientside/tip/gentipacl.pl diff --git a/tip/getcap.c b/clientside/tip/getcap.c similarity index 100% rename from tip/getcap.c rename to clientside/tip/getcap.c diff --git a/tip/hunt.c b/clientside/tip/hunt.c similarity index 100% rename from tip/hunt.c rename to clientside/tip/hunt.c diff --git a/tip/ntip.1 b/clientside/tip/ntip.1 similarity index 100% rename from tip/ntip.1 rename to clientside/tip/ntip.1 diff --git a/tip/partab.c b/clientside/tip/partab.c similarity index 100% rename from tip/partab.c rename to clientside/tip/partab.c diff --git a/tip/pathnames.h b/clientside/tip/pathnames.h similarity index 100% rename from tip/pathnames.h rename to clientside/tip/pathnames.h diff --git a/tip/remcap.c b/clientside/tip/remcap.c similarity index 100% rename from tip/remcap.c rename to clientside/tip/remcap.c diff --git a/tip/remote.c b/clientside/tip/remote.c similarity index 100% rename from tip/remote.c rename to clientside/tip/remote.c diff --git a/tip/tip.c b/clientside/tip/tip.c similarity index 100% rename from tip/tip.c rename to clientside/tip/tip.c diff --git a/tip/tip.deprecation b/clientside/tip/tip.deprecation similarity index 100% rename from tip/tip.deprecation rename to clientside/tip/tip.deprecation diff --git a/tip/tip.h b/clientside/tip/tip.h similarity index 100% rename from tip/tip.h rename to clientside/tip/tip.h diff --git a/tip/tipconf.h b/clientside/tip/tipconf.h similarity index 100% rename from tip/tipconf.h rename to clientside/tip/tipconf.h diff --git a/tip/tiptunnel.c b/clientside/tip/tiptunnel.c similarity index 99% rename from tip/tiptunnel.c rename to clientside/tip/tiptunnel.c index 968bf867f0..6719990245 100644 --- a/tip/tiptunnel.c +++ b/clientside/tip/tiptunnel.c @@ -778,6 +778,9 @@ acceptor: #ifdef WITHSSL +#ifndef TBROOT +#define TBROOT "/usr/testbed/etc/" +#endif #define DEFAULT_CERTFILE TBROOT"/etc/capture.pem" diff --git a/tip/value.c b/clientside/tip/value.c similarity index 100% rename from tip/value.c rename to clientside/tip/value.c diff --git a/tip/vars.c b/clientside/tip/vars.c similarity index 100% rename from tip/vars.c rename to clientside/tip/vars.c diff --git a/xmlrpc/BasicXMLRPCServers.py.in b/clientside/xmlrpc/BasicXMLRPCServers.py.in similarity index 100% rename from xmlrpc/BasicXMLRPCServers.py.in rename to clientside/xmlrpc/BasicXMLRPCServers.py.in diff --git a/clientside/xmlrpc/GNUmakefile.in b/clientside/xmlrpc/GNUmakefile.in new file mode 100644 index 0000000000..446106b1ea --- /dev/null +++ b/clientside/xmlrpc/GNUmakefile.in @@ -0,0 +1,126 @@ +# +# Copyright (c) 2004-2018 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@ +TESTBED_SRCDIR = @top_srcdir@ +OBJDIR = @top_builddir@ +SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR)) + +include $(OBJDIR)/Makeconf + +BIN_SCRIPTS = sslxmlrpc_client.py +LIB_STUFF = emulabclient.py libxmlrpc.pm +DOWNLOAD_STUFF = emulabclient.py README \ + script_wrapper.py sslxmlrpc_client.py + +# +# These are the ones installed on plastic (users, control, etc). +# +CLIENTBINS = script_wrapper.py sslxmlrpc_client.py +USERLIBS = emulabclient.py libxmlrpc.pm BasicXMLRPCServers.py +SYMLINKS = node_admin node_reboot os_load create_image node_list \ + delay_config wilink_config savelogs portstats \ + eventsys_control \ + readycount nscheck startexp batchexp startexp swapexp endexp \ + modexp expinfo node_avail tbuisp expwait template_commit \ + template_export template_swapin template_swapout \ + template_stoprun template_instantiate template_startrun \ + template_checkout node_avail_list mkblob rmblob \ + createdataset deletedataset showdataset extenddataset + +LINKS = cd $(INSTALL_BINDIR) && \ + list='$(SYMLINKS)'; for file in $$list; do \ + rm -f $$file; \ + ln -s script_wrapper.py $$file; \ + done; + +OPSLINKS = cd $(INSTALL_DIR)/opsdir/bin && \ + list='$(SYMLINKS)'; for file in $$list; do \ + rm -f $$file; \ + ln -s script_wrapper.py $$file; \ + done; + +# +# Force dependencies on the scripts so that they will be rerun through +# configure if the .in file is changed. +# +all: $(BIN_SCRIPTS) $(LIB_STUFF) \ + $(DOWNLOAD_STUFF) $(CLIENTBINS) $(USERLIBS) BasicXMLRPCServers.py + +include $(TESTBED_SRCDIR)/GNUmakerules + +install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \ + $(addprefix $(INSTALL_WWWDIR)/downloads/xmlrpc/, $(DOWNLOAD_STUFF)) \ + $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF)) \ + $(addprefix $(INSTALL_DIR)/opsdir/lib/, $(USERLIBS)) \ + $(addprefix $(INSTALL_DIR)/opsdir/bin/, $(CLIENTBINS)) + $(OPSLINKS) + +$(INSTALL_WWWDIR)/%: % + @echo "Installing $<" + -mkdir -p $(patsubst %/,%,$(dir $@)) + $(INSTALL_DATA) $(subst $$,\$$,$<) $(subst $$,\$$,$@) + +$(INSTALL_WWWDIR)/downloads/xmlrpc/%: % + @echo "Installing $<" + -mkdir -p $(patsubst %/,%,$(dir $@)) + $(INSTALL_DATA) $(subst $$,\$$,$<) $(subst $$,\$$,$@) + +$(INSTALL_DIR)/opsdir/bin/%: % + @echo "Installing $<" + -mkdir -p $(INSTALL_DIR)/opsdir/bin + $(INSTALL) $< $@ + +$(INSTALL_DIR)/opsdir/lib/%: % + @echo "Installing $<" + -mkdir -p $(INSTALL_DIR)/opsdir/lib + $(INSTALL) $< $@ + +# +# Control node installation (okay, plastic) +# +control-install: $(CLIENTBINS) $(USERLIBS) \ + $(addprefix $(INSTALL_LIBDIR)/, $(USERLIBS)) \ + $(addprefix $(INSTALL_BINDIR)/, $(CLIENTBINS)) + $(LINKS) + +client: + +client-install: client $(CLIENTBINS) $(USERLIBS) \ + $(addprefix $(INSTALL_LIBDIR)/, $(USERLIBS)) \ + $(addprefix $(INSTALL_BINDIR)/, $(CLIENTBINS)) + $(LINKS) + +# Nothing installed in these targets. +subboss: +subboss-install: +post-install: +fs-install: +mfs: +mfs-install: +frisbee-mfs: +frisbee-mfs-install: +newnode-mfs: +newnode-mfs-install: + +clean: + diff --git a/xmlrpc/README b/clientside/xmlrpc/README similarity index 100% rename from xmlrpc/README rename to clientside/xmlrpc/README diff --git a/xmlrpc/emulabclient.py.in b/clientside/xmlrpc/emulabclient.py.in similarity index 100% rename from xmlrpc/emulabclient.py.in rename to clientside/xmlrpc/emulabclient.py.in diff --git a/xmlrpc/libxmlrpc.pm.in b/clientside/xmlrpc/libxmlrpc.pm.in similarity index 100% rename from xmlrpc/libxmlrpc.pm.in rename to clientside/xmlrpc/libxmlrpc.pm.in diff --git a/xmlrpc/script_wrapper.py.in b/clientside/xmlrpc/script_wrapper.py.in similarity index 99% rename from xmlrpc/script_wrapper.py.in rename to clientside/xmlrpc/script_wrapper.py.in index 35ef3f6254..db8176ab77 100755 --- a/xmlrpc/script_wrapper.py.in +++ b/clientside/xmlrpc/script_wrapper.py.in @@ -38,6 +38,9 @@ import re import xmlrpclib from emulabclient import * +# When building on the clientside, there are a few minor differences. +WITH_EMULAB = @WITH_EMULAB@ + ## # The package version number # @@ -63,7 +66,10 @@ impotent = 0 # meaningless unless you are an Emulab developer; they will be rejected # at the server most ungraciously. # -SERVER_PATH = "@prefix@" +if WITH_EMULAB: + SERVER_PATH = "@prefix@" +else: + SERVER_PATH = "/usr/testbed" SERVER_DIR = "sbin" DEVEL_DIR = "devel" develuser = None diff --git a/xmlrpc/sslxmlrpc_client.py.in b/clientside/xmlrpc/sslxmlrpc_client.py.in similarity index 97% rename from xmlrpc/sslxmlrpc_client.py.in rename to clientside/xmlrpc/sslxmlrpc_client.py.in index 364d033b6c..b58a4c2ec6 100755 --- a/xmlrpc/sslxmlrpc_client.py.in +++ b/clientside/xmlrpc/sslxmlrpc_client.py.in @@ -1,6 +1,6 @@ #! /usr/bin/env python # -# Copyright (c) 2004-2013 University of Utah and the Flux Group. +# Copyright (c) 2004-2018 University of Utah and the Flux Group. # # {{{EMULAB-LICENSE # @@ -39,6 +39,9 @@ from emulabclient import * from M2Crypto.m2xmlrpclib import SSL_Transport from M2Crypto import SSL +# When building on the clientside, there are a few minor differences. +WITH_EMULAB = @WITH_EMULAB@ + ## # The package version number # @@ -56,7 +59,10 @@ xmlrpc_port = XMLRPC_PORT module = "experiment" # The default path -path = TBROOT +if WITH_EMULAB: + path = TBROOT +else: + path = "/usr/testbed" # Where to find the default certificate in the users home dir. default_cert = "/.ssl/emulab.pem" diff --git a/configure b/configure index c0da2b3ef6..88991f5062 100755 --- a/configure +++ b/configure @@ -7074,7 +7074,6 @@ outfiles="$outfiles Makeconf GNUmakefile \ tbsetup/panic tbsetup/tbrsync tbsetup/nfstrace \ tbsetup/checkup/GNUmakefile tbsetup/checkup/checkup_daemon \ tbsetup/libtblog.pm tbsetup/template_cvsroot/GNUmakefile \ - tip/GNUmakefile tip/console \ tmcd/GNUmakefile tmcd/tmcd.restart \ utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \ utils/sshtb utils/create_image utils/node_admin \ @@ -7114,10 +7113,10 @@ outfiles="$outfiles Makeconf GNUmakefile \ $pelabfiles \ $mobilefiles \ apache/GNUmakefile apache/php.ini \ - xmlrpc/GNUmakefile xmlrpc/emulabclient.py xmlrpc/emulabserver.py \ + xmlrpc/GNUmakefile xmlrpc/emulabserver.py \ xmlrpc/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \ - xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \ - xmlrpc/webxmlrpc xmlrpc/script_wrapper.py xmlrpc/libxmlrpc.pm \ + xmlrpc/sslxmlrpc_server.py \ + xmlrpc/webxmlrpc \ xmlrpc/emulab xmlrpc/node xmlrpc/experiment xmlrpc/fs xmlrpc/user \ xmlrpc/imageid xmlrpc/osid xmlrpc/server xmlrpc/xmlrpcbag \ cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \ @@ -7246,6 +7245,10 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \ clientside/os/imagezip/hashmap/GNUmakefile \ clientside/os/imagezip/libndz/GNUmakefile \ clientside/os/capture/GNUmakefile \ + clientside/tip/GNUmakefile clientside/tip/console \ + clientside/xmlrpc/GNUmakefile clientside/xmlrpc/emulabclient.py \ + clientside/xmlrpc/sslxmlrpc_client.py \ + clientside/xmlrpc/script_wrapper.py clientside/xmlrpc/libxmlrpc.pm \ clientside/protogeni/GNUmakefile" # diff --git a/configure.ac b/configure.ac index 09d788a697..f6faf7a9f2 100644 --- a/configure.ac +++ b/configure.ac @@ -1428,10 +1428,10 @@ outfiles="$outfiles Makeconf GNUmakefile \ $pelabfiles \ $mobilefiles \ apache/GNUmakefile apache/php.ini \ - xmlrpc/GNUmakefile xmlrpc/emulabclient.py xmlrpc/emulabserver.py \ + xmlrpc/GNUmakefile xmlrpc/emulabserver.py \ xmlrpc/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \ - xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \ - xmlrpc/webxmlrpc xmlrpc/script_wrapper.py xmlrpc/libxmlrpc.pm \ + xmlrpc/sslxmlrpc_server.py \ + xmlrpc/webxmlrpc \ xmlrpc/emulab xmlrpc/node xmlrpc/experiment xmlrpc/fs xmlrpc/user \ xmlrpc/imageid xmlrpc/osid xmlrpc/server xmlrpc/xmlrpcbag \ cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \ @@ -1560,6 +1560,10 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \ clientside/os/imagezip/hashmap/GNUmakefile \ clientside/os/imagezip/libndz/GNUmakefile \ clientside/os/capture/GNUmakefile \ + clientside/tip/GNUmakefile clientside/tip/console \ + clientside/xmlrpc/GNUmakefile clientside/xmlrpc/emulabclient.py \ + clientside/xmlrpc/sslxmlrpc_client.py \ + clientside/xmlrpc/script_wrapper.py clientside/xmlrpc/libxmlrpc.pm \ clientside/protogeni/GNUmakefile" # diff --git a/xmlrpc/GNUmakefile.in b/xmlrpc/GNUmakefile.in index 5c48d5c03d..ad821e6153 100644 --- a/xmlrpc/GNUmakefile.in +++ b/xmlrpc/GNUmakefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2004-2014 University of Utah and the Flux Group. +# Copyright (c) 2004-2018 University of Utah and the Flux Group. # # {{{EMULAB-LICENSE # @@ -25,108 +25,39 @@ SRCDIR = @srcdir@ TESTBED_SRCDIR = @top_srcdir@ OBJDIR = .. SUBDIR = xmlrpc -UNIFIED = @UNIFIED_BOSS_AND_OPS@ include $(OBJDIR)/Makeconf -BIN_SCRIPTS = sslxmlrpc_client.py SBIN_SCRIPTS = xmlrpcbag sslxmlrpc_server.py -LIB_STUFF = emulabserver.py emulabclient.py libxmlrpc.pm +LIB_STUFF = emulabserver.py LIBEXEC_STUFF = webxmlrpc WWW_STUFF = xmlrpcapi.php3 -DOWNLOAD_STUFF = emulabclient.py README \ - script_wrapper.py sslxmlrpc_client.py DEBUG_STUFF = experiment node imageid osid fs user emulab server -EXPANDCOPYRIGHT = /usr/site/lib/copyright/expand-copyr - -# -# These are the ones installed on plastic (users, control, etc). -# -CLIENTBINS = script_wrapper.py sslxmlrpc_client.py -USERLIBS = emulabclient.py libxmlrpc.pm \ - BasicXMLRPCServers.py -SYMLINKS = node_admin node_reboot os_load create_image node_list \ - delay_config wilink_config savelogs portstats eventsys_control \ - readycount nscheck startexp batchexp startexp swapexp endexp \ - modexp expinfo node_avail tbuisp expwait template_commit \ - template_export template_swapin template_swapout \ - template_stoprun template_instantiate template_startrun \ - template_checkout node_avail_list mkblob rmblob \ - createdataset deletedataset showdataset extenddataset - -ifneq ($(UNIFIED),1) -LINKS = cd $(INSTALL_BINDIR) && \ - list='$(SYMLINKS)'; for file in $$list; do \ - rm -f $$file; \ - ln -s script_wrapper.py $$file; \ - done; -OPSLINKS = cd $(INSTALL_DIR)/opsdir/bin && \ - list='$(SYMLINKS)'; for file in $$list; do \ - rm -f $$file; \ - ln -s script_wrapper.py $$file; \ - done; -endif - # # Force dependencies on the scripts so that they will be rerun through # configure if the .in file is changed. # -all: $(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(LIB_STUFF) $(LIBEXEC_STUFF) \ - $(DOWNLOAD_STUFF) $(DEBUG_STUFF) $(CLIENTBINS) BasicXMLRPCServers.py +all: $(SBIN_SCRIPTS) $(LIB_STUFF) $(LIBEXEC_STUFF) $(DEBUG_STUFF) include $(TESTBED_SRCDIR)/GNUmakerules -install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \ - $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \ +install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \ $(addprefix $(INSTALL_SBINDIR)/xmlrpc/, $(DEBUG_STUFF)) \ $(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_STUFF)) \ $(addprefix $(INSTALL_WWWDIR)/, $(WWW_STUFF)) \ - $(addprefix $(INSTALL_WWWDIR)/downloads/xmlrpc/, $(DOWNLOAD_STUFF)) \ $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF)) \ - $(addprefix $(INSTALL_DIR)/opsdir/lib/, $(USERLIBS)) \ - $(addprefix $(INSTALL_DIR)/opsdir/bin/, $(CLIENTBINS)) -rm -f $(INSTALL_SBINDIR)/paperbag ln -s xmlrpcbag $(INSTALL_SBINDIR)/paperbag - $(OPSLINKS) $(INSTALL_WWWDIR)/%: % @echo "Installing $<" -mkdir -p $(patsubst %/,%,$(dir $@)) $(INSTALL_DATA) $(subst $$,\$$,$<) $(subst $$,\$$,$@) -$(INSTALL_WWWDIR)/downloads/xmlrpc/%: % - @echo "Installing $<" - -mkdir -p $(patsubst %/,%,$(dir $@)) - $(INSTALL_DATA) $(subst $$,\$$,$<) $(subst $$,\$$,$@) - $(INSTALL_SBINDIR)/xmlrpc/%: % @echo "Installing $<" -mkdir -p $(INSTALL_SBINDIR)/xmlrpc $(INSTALL_PROGRAM) $< $@ -$(INSTALL_DIR)/opsdir/bin/%: % - @echo "Installing $<" - -mkdir -p $(INSTALL_DIR)/opsdir/bin - $(INSTALL) $< $@ - -$(INSTALL_DIR)/opsdir/lib/%: % - @echo "Installing $<" - -mkdir -p $(INSTALL_DIR)/opsdir/lib - $(INSTALL) $< $@ - -# -# Control node installation (okay, plastic) -# -control-install: $(CLIENTBINS) $(USERLIBS) \ - $(addprefix $(INSTALL_LIBDIR)/, $(USERLIBS)) \ - $(addprefix $(INSTALL_BINDIR)/, $(CLIENTBINS)) - $(LINKS) - -client: - -client-install: client $(CLIENTBINS) $(USERLIBS) \ - $(addprefix $(INSTALL_LIBDIR)/, $(USERLIBS)) \ - $(addprefix $(INSTALL_BINDIR)/, $(CLIENTBINS)) - clean: -- GitLab