Skip to content

Commit

Permalink
Merge pull request xapi-project#2870 from jonludlam/master-cleanups
Browse files Browse the repository at this point in the history
Master cleanups
  • Loading branch information
Jon Ludlam committed Jan 3, 2017
2 parents e23904b + 37970ea commit 515d438
Show file tree
Hide file tree
Showing 160 changed files with 740 additions and 6,183 deletions.
53 changes: 9 additions & 44 deletions .gitignore
Expand Up @@ -39,24 +39,28 @@ TAGS
dist
mk/.*
config.mk
ocaml/xapi-client/client.ml
ocaml/xapi-types/aPI.ml
ocaml/xapi/custom_actions.ml
ocaml/xapi/db_actions.ml
ocaml/xapi/rbac_static.csv
ocaml/xapi/rbac_static.ml
ocaml/xapi/server.ml
ocaml/idl/vm_lifecycle.eps
ocaml/idl/xen*-datamodel-graph.gif
ocaml/idl/xen*-datamodel-graph.map
ocaml/idl/xen*-datamodel.tex
ocaml/idl/xen*api.ps
ocaml/idl/xen*api.pdf
ocaml/stdlib2/t*.ml
ocaml/auth/testauth
ocaml/auth/testauthx
ocaml/xapi/testauth
ocaml/xapi/testauthx
ocaml/xapi/at_least_once_more
ocaml/xapi/cancel_tests
ocaml/xapi/config_constants.ml
ocaml/xapi/storage_impl_test
ocaml/xapi/storage_interface.mli
js/devweb/api.js
ocaml/util/pciutil
ocaml/autogen/*.*
ocaml/autogen/doc
ocaml/idl/c_backend/autogen/*
ocaml/idl/c_backend/autogen-ent/*
ocaml/idl/c_backend/libxen/*
Expand Down Expand Up @@ -100,26 +104,10 @@ ocaml/templates/templateParser.mli
ocaml/xapi/storage_impl_test
ocaml/util/version.ml

stunnel-4.15/Makefile
stunnel-4.15/config.status
stunnel-4.15/doc/Makefile
stunnel-4.15/libtool
stunnel-4.15/src/.deps/*.Po
stunnel-4.15/src/.deps/*.Plo
stunnel-4.15/src/.libs/*
stunnel-4.15/src/Makefile
stunnel-4.15/src/env.lo
stunnel-4.15/src/libstunnel.la
stunnel-4.15/src/stunnel
stunnel-4.15/src/stunnel3
stunnel-4.15/tools/Makefile
stunnel-4.15/tools/stunnel.conf-sample
stunnel-4.15/tools/stunnel.init
zurich/java/com/xensource/autogen/*.java
js/api.js
java
ocaml/cdrommon/cdrommon
ocaml/console/console
ocaml/database/db_filter_lex.ml
ocaml/database/db_filter_parse.ml
ocaml/database/db_filter_parse.mli
Expand All @@ -134,10 +122,7 @@ ocaml/doc/api
ocaml/doc/jsapi
ocaml/doc/components.js
ocaml/events/event_listen
ocaml/fdhelper/closeandexec
ocaml/fdhelper/closeandexec_static
ocaml/graph/graph
ocaml/guest/agent
ocaml/idl/datamodel
ocaml/idl/html_build
ocaml/idl/js_backend/api.js
Expand All @@ -146,15 +131,8 @@ ocaml/idl/json_backend/main
ocaml/idl/json_backend/*.json
ocaml/idl/ocaml_backend/gen_api_main
ocaml/mpathalert/mpathalert
ocaml/muxdemux/tar
ocaml/netdev/brctl
ocaml/p2v/p2v
ocaml/perftest/perftest
ocaml/rfb/rfb_randomtest
ocaml/sm-cli/sm
ocaml/util/file_access_test
ocaml/util/unix-domain-wrapper
ocaml/util/xmlpp
ocaml/vncproxy/vncproxy
ocaml/xapi/binpack
ocaml/xapi/database_store
Expand All @@ -164,16 +142,7 @@ ocaml/xapi/quicktest_encodings_module.ml
ocaml/xapi/quicktestbin
ocaml/xapi/stresstest
ocaml/xapi/xapi
ocaml/xe-cli/rt/geneva/cli_test
ocaml/xe-cli/rt/geneva/sm_stress
ocaml/xe-cli/rt/gtclient
ocaml/xe-cli/rt/gtserver_linux
ocaml/xe-cli/rt/test_host
ocaml/xe-cli/rt/xgetip
ocaml/xe-cli/xe
ocaml/xenguest/dumpcore
ocaml/xenguest/xenguest
ocaml/xenops-ts/runtest
ocaml/xenops/dbgring
ocaml/xenops/domain_sethandle
ocaml/xenops/fence
Expand All @@ -184,11 +153,7 @@ ocaml/xenops/xenops
ocaml/xenops/xenvm
ocaml/xenops/xenvm-cmd
ocaml/xenops/xs
ocaml/xenstored/xenstored
ocaml/xiu/xiu
ocaml/xsh/xsh
ocaml/xsrpc/xsrpc
ocaml/xsrpc/xsrpcd-util
ocaml/xstest/xsbench
ocaml/xstest/xstest
ocaml/xstest/xscheckperms
Expand Down
16 changes: 4 additions & 12 deletions OMakefile
Expand Up @@ -139,7 +139,7 @@ export
# Ocaml #############################################################################
OCAML_PHASE1= autogen_idl
OCAML_PHASE2= \
$(if $(BYTE_ENABLED), ocaml/idl/ocaml_backend/xapi_client.cma) $(if $(NATIVE_ENABLED), ocaml/idl/ocaml_backend/xapi_client.cmxa)
$(if $(BYTE_ENABLED), ocaml/xapi-client/xapi-client.cma) $(if $(NATIVE_ENABLED), ocaml/xapi-client/xapi-client.cmxa)

# JS ################################################################################
JS_PHASE1=
Expand Down Expand Up @@ -169,24 +169,16 @@ OCAML_PHASE3_XEN = \
#ocaml/xapi/monitor_fake_plugin

OCAML_PHASE3_NOXEN = \
ocaml/ptoken/genptoken \
ocaml/auth/testauth \
ocaml/auth/testauthx \
ocaml/ptoken/genptoken \
ocaml/xapi/testauth \
ocaml/xapi/testauthx \
ocaml/xe-cli/xe \
ocaml/xsh/xsh \
ocaml/xe-cli/rt/test_host \
ocaml/xe-cli/rt/gtclient \
ocaml/xe-cli/rt/gtserver_linux \
ocaml/xe-cli/rt/xgetip \
ocaml/xe-cli/rt/geneva/cli_test \
ocaml/xe-cli/rt/geneva/sm_stress \
ocaml/events/event_listen \
ocaml/console/console \
ocaml/graph/graph \
ocaml/rfb/rfb_randomtest \
ocaml/database/unit_test_marshall \
ocaml/database/block_device_io \
ocaml/toplevel \
ocaml/cdrommon/cdrommon \
ocaml/xapi/binpack \
ocaml/idl/datamodel \
Expand Down
20 changes: 2 additions & 18 deletions mk/Makefile
Expand Up @@ -7,13 +7,8 @@ include $(B_BASE)/rpmbuild.mk

REPO = $(call git_loc,xen-api)

STAGING = $(REPO)/dist/staging
OUTPUT_XAPI = $(MY_MAIN_PACKAGES)/xapi.tar.bz2
OUTPUT_XAPI_DEVEL = $(MY_OUTPUT_DIR)/xapi-devel.tar.gz
OUTPUT_XAPI_SRC = $(MY_SOURCES)/xen-api-src.tar.bz2

STAGING_CLI_RT = $(REPO)/dist/cli-rt
OUTPUT_CLI_RT = $(MY_OUTPUT_DIR)/cli-regress.tar.gz
OUTPUT_CLI_RPM_SOURCES = $(RPM_SOURCESDIR)/xe $(RPM_SOURCESDIR)/bash-completion

OUTPUT_DOCS = $(MY_OUTPUT_DIR)/sdkiso
Expand Down Expand Up @@ -56,30 +51,19 @@ $(OUTPUT_XAPI_SRC):
git archive --prefix=$$(echo $@ | sed -r "s/([^/]*\/)*([^./]*)(.[^./]*)*/\2\//") --format=tar HEAD | bzip2 -z > $@; \
fi; # git archive in xen-api/mk/Makefile

$(OUTPUT_CLI_RT) $(OUTPUT_SDK): $(MY_MAIN_PACKAGES)/.dirstamp $(RPM_DIRECTORIES)
$(OUTPUT_SDK): $(MY_MAIN_PACKAGES)/.dirstamp $(RPM_DIRECTORIES)
(cd $(REPO); ./configure)
$(MAKE) clean
$(MAKE) -C $(REPO) version
$(MAKE) -C $(REPO) srpm
mkdir -p $(RPM_RPMSDIR)/$(DOMAIN_ZERO_OPTIMIZED)
$(RPMBUILD) --rebuild --target $(DOMAIN0_ARCH_OPTIMIZED) $(MY_OUTPUT_DIR)/SRPMS/xapi-*.src.rpm
# extract the cli-rt/ binaries from xapi-tests
mkdir -p $(MY_OUTPUT_DIR)/tmp
(cd $(MY_OUTPUT_DIR); rpm2cpio $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-tests*.rpm | cpio -i --make-directories; cd cli-rt; tar -zcf $(OUTPUT_CLI_RT) .)
rm -rf $(MY_OUTPUT_DIR)/tmp

# extract the xapi-docs
mkdir -p $(OUTPUT_SDK_DIR)/tmp
(cd $(OUTPUT_SDK_DIR)/tmp; rpm2cpio $(RPM_RPMSDIR)/*/xapi-docs*.rpm | cpio -i --make-directories; tar -zcf $(OUTPUT_SDK) .;zip -9rv $(OUTPUT_WEBZIP) .)
rm -rf $(OUTPUT_SDK_DIR)/tmp

# Unpack the xapi-datamodel-devel RPM for now
rm -rf $(OUTPUT_DATAMODEL_DIR)
mkdir -p $(OUTPUT_DATAMODEL_DIR)/tmp
(cd $(OUTPUT_DATAMODEL_DIR)/tmp; rpm2cpio $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-datamodel-devel*.rpm | cpio -i --make-directories)
mv $(OUTPUT_DATAMODEL_DIR)/tmp/usr/*/ocaml/xapi-datamodel/* $(OUTPUT_DATAMODEL_DIR)
rm -rf $(OUTPUT_DATAMODEL_DIR)/tmp

# Make sure the right RPMs appear on the install CD
mkdir -p $(MY_MAIN_PACKAGES)
cp $(RPM_RPMSDIR)/$(DOMAIN0_ARCH_OPTIMIZED)/xapi-core-*.rpm $(MY_MAIN_PACKAGES)
Expand All @@ -89,7 +73,7 @@ $(OUTPUT_CLI_RT) $(OUTPUT_SDK): $(MY_MAIN_PACKAGES)/.dirstamp $(RPM_DIRECTORIES)

.PHONY: clean
clean:
rm -f $(OUTPUT_XAPI) $(OUTPUT_XAPI_DEVEL) $(OUTPUT_XAPI_SRC) $(OUTPUT_CLI_RT) $(OUTPUT_WEBZIP) $(OUTPUT_SDK)
rm -f $(OUTPUT_XAPI_SRC) $(OUTPUT_WEBZIP) $(OUTPUT_SDK)
rm -rf $(OUTPUT_DATAMODEL_DIR) $(OUTPUT_DOCS) $(OUTPUT_SDK_DIR)/tmp \
$(MY_OUTPUT_DIR)/SRPMS $(RPM_RPMSDIR) $(MY_MAIN_PACKAGES) $(MY_XCP_PACKAGES)
$(MAKE) -C $(REPO) clean
8 changes: 3 additions & 5 deletions ocaml/OMakefile
Expand Up @@ -6,30 +6,28 @@ OCAMLPACKS = stdext uuid gzip

.SUBDIRS: \
ptoken \
autogen \
xe-cli \
client_records \
idl \
util \
xapi \
xva \
console \
auth \
events \
graph \
license \
rfb \
database \
toplevel \
cdrommon \
gpg \
db_process \
vncproxy \
xsh \
perftest \
mpathalert \
doc \
test
test \
xapi-types \
xapi-client

clean:
rm -f $(CLEAN_OBJS)
10 changes: 1 addition & 9 deletions ocaml/auth/OMakefile
@@ -1,5 +1,4 @@
OTHER_CLIBS = -cclib -lpam
OCAMLINCLUDES += ../autogen ../idl/ocaml_backend ../idl ../xapi ..

StaticCLibrary(auth_stubs, xa_auth xa_auth_stubs)
OCamlLibraryClib(pam, pam, auth_stubs)
Expand All @@ -8,13 +7,6 @@ section
OCAML_LIBS += pam
OCAML_CLIBS += auth_stubs

OCamlProgram(testauth, testauth)
OCamlProgram(testauthx, testauthx authx auth_signature ../idl/api_errors)

.PHONY: clean
clean:
rm -rf $(CLEAN_OBJS) *.aux *.log *.fig testauth testauthx

.PHONY: install
install:
mkdir -p $(DESTDIR)$(OPTDIR)/bin
rm -rf $(CLEAN_OBJS)
27 changes: 0 additions & 27 deletions ocaml/autogen/OMakefile

This file was deleted.

3 changes: 1 addition & 2 deletions ocaml/cdrommon/OMakefile
@@ -1,5 +1,4 @@
OCAML_LIBS = ../util/version ../idl/ocaml_backend/common
OCAMLINCLUDES = ../xapi
OCAML_LIBS = ../util/version
OCAMLPACKS += unix cdrom xcp-inventory

OCamlProgram(cdrommon, cdrommon)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/cdrommon/cdrommon.ml
Expand Up @@ -14,7 +14,7 @@
let oldnotify = ref false

let disc_inserted name =
let args = [| !Xapi_globs.xe_path; "host-notify"; "type=cdrom"; "params=inserted:" ^ name |] in
let args = [| "xe" ; "host-notify"; "type=cdrom"; "params=inserted:" ^ name |] in
let ret = Stdext.Unixext.spawnvp args.(0) args in
(* check if we got an error, and record the fact *)
begin match ret with
Expand Down
2 changes: 1 addition & 1 deletion ocaml/client_records/OMakefile
@@ -1,5 +1,5 @@
OCAMLPACKS += http-svr
OCAMLINCLUDES += ../autogen ../idl ../idl/ocaml_backend ../database
OCAMLINCLUDES += ../idl ../database ../xapi-types ../xapi-client

.PHONY: clean
clean:
Expand Down
6 changes: 0 additions & 6 deletions ocaml/console/OMakefile

This file was deleted.

72 changes: 0 additions & 72 deletions ocaml/console/client.ml

This file was deleted.

0 comments on commit 515d438

Please sign in to comment.