Permalink
Browse files

Move everything over to using Fhs.ml / @ substitution

Note that there should be no user visible change in this changeset;
everything should be the same as it was before.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
  • Loading branch information...
1 parent d6a7d77 commit 13b8348e30f1630c21941ce5bc38832ecd204b88 @jonludlam jonludlam committed Dec 6, 2011
Showing with 312 additions and 302 deletions.
  1. +2 −0 .gitignore
  2. +13 −5 Makefile
  3. +1 −1 OMakefile
  4. +3 −1 ocaml/OMakefile
  5. +1 −1 ocaml/auth/OMakefile
  6. +4 −4 ocaml/auth/extauth.ml
  7. +1 −1 ocaml/auth/extauth_plugin_ADlikewise.ml
  8. +1 −1 ocaml/cdrommon/OMakefile
  9. +3 −3 ocaml/database/OMakefile
  10. +1 −1 ocaml/database/redo_log.ml
  11. +1 −1 ocaml/db_process/OMakefile
  12. +1 −1 ocaml/gpg/OMakefile
  13. +1 −1 ocaml/gpg/gpg.ml
  14. +1 −1 ocaml/idl/ocaml_backend/OMakefile
  15. +3 −2 ocaml/license/OMakefile
  16. +1 −1 ocaml/license/v6client.ml
  17. +1 −1 ocaml/license/v6d_reopen_logs.ml
  18. +1 −1 ocaml/license/v6daemon.ml
  19. +1 −1 ocaml/lvhdrt/OMakefile
  20. +2 −2 ocaml/mpathalert/OMakefile
  21. +1 −1 ocaml/mpathalert/mpathalert.ml
  22. +4 −4 ocaml/perftest/OMakefile
  23. +1 −1 ocaml/perftest/apiperf.ml
  24. +1 −1 ocaml/perftest/client_stunnel.conf
  25. +1 −1 ocaml/perftest/perfutil.ml
  26. +2 −2 ocaml/ptoken/OMakefile
  27. +1 −1 ocaml/ptoken/genptoken.ml
  28. +4 −4 ocaml/sm-cli/OMakefile
  29. +1 −1 ocaml/sm-cli/main.ml
  30. +1 −1 ocaml/sm-cli/test.ml
  31. +3 −0 ocaml/util/OMakefile
  32. +1 −1 ocaml/util/util_globs_inventory.ml
  33. +1 −1 ocaml/util/util_inventory.ml
  34. +2 −2 ocaml/vncproxy/OMakefile
  35. +1 −1 ocaml/vncproxy/vncproxy.ml
  36. +2 −10 ocaml/xapi/OMakefile
  37. +1 −1 ocaml/xapi/certificates.ml
  38. +0 −1 ocaml/xapi/config_constants.ml.in
  39. +1 −1 ocaml/xapi/console.ml
  40. +1 −1 ocaml/xapi/create_misc.ml
  41. +1 −1 ocaml/xapi/events.ml
  42. +1 −1 ocaml/xapi/helpers.ml
  43. +1 −1 ocaml/xapi/monitor.ml
  44. +1 −1 ocaml/xapi/monitor_fake_common.ml
  45. +1 −1 ocaml/xapi/nm.ml
  46. +1 −1 ocaml/xapi/pool_db_backup.ml
  47. +1 −1 ocaml/xapi/quicktest_storage.ml
  48. +1 −1 ocaml/xapi/sm_exec.ml
  49. +1 −1 ocaml/xapi/sparse_dd_wrapper.ml
  50. +1 −1 ocaml/xapi/static_vdis.ml
  51. +1 −1 ocaml/xapi/static_vdis_list.ml
  52. +1 −1 ocaml/xapi/storage_impl.ml
  53. +1 −1 ocaml/xapi/vmops.ml
  54. +4 −4 ocaml/xapi/xapi.ml
  55. +34 −35 ocaml/xapi/xapi_globs.ml
  56. +9 −9 ocaml/xapi/xapi_ha.ml
  57. +3 −3 ocaml/xapi/xapi_host.ml
  58. +2 −2 ocaml/xapi/xapi_host_backup.ml
  59. +1 −1 ocaml/xapi/xapi_logs_download.ml
  60. +4 −4 ocaml/xapi/xapi_message.ml
  61. +1 −1 ocaml/xapi/xapi_mgmt_iface.ml
  62. +1 −1 ocaml/xapi/xapi_pci.ml
  63. +3 −3 ocaml/xapi/xapi_pool_patch.ml
  64. +1 −1 ocaml/xapi/xapi_services.ml
  65. +1 −1 ocaml/xapi/xapi_support.ml
  66. +1 −1 ocaml/xapi/xapi_sync.ml
  67. +1 −1 ocaml/xapi/xapi_templates_install.ml
  68. +4 −4 ocaml/xapi/xapi_udhcpd.ml
  69. +1 −1 ocaml/xapi/xapi_vif.ml
  70. +1 −1 ocaml/xapi/xha_interface.ml
  71. +2 −2 ocaml/xe-cli/OMakefile
  72. +1 −1 ocaml/xe-cli/cli.ml
  73. +1 −1 ocaml/xe-cli/newcli.ml
  74. +2 −2 ocaml/xenops/OMakefile
  75. +3 −3 ocaml/xenops/device.ml
  76. +1 −1 ocaml/xenops/xenguestHelper.ml
  77. +1 −1 ocaml/xenops/xenops.ml
  78. +1 −1 ocaml/xenops/xenvm.readme
  79. +2 −2 ocaml/xiu/OMakefile
  80. +3 −3 ocaml/xiu/xiu.ml
  81. +2 −2 scripts/InterfaceReconfigure.py
  82. +15 −15 scripts/OMakefile
  83. +3 −3 scripts/backup-metadata-cron
  84. +2 −2 scripts/bugtool-plugin/xapi/stuff.xml
  85. +1 −1 scripts/db.conf.skel
  86. +2 −2 scripts/examples/bash-cli/install-debian
  87. +2 −2 scripts/examples/bash-cli/install-debian.html
  88. +1 −1 scripts/examples/python/inventory.py
  89. +1 −1 scripts/examples/python/monitor-unwanted-domains.py
  90. +1 −1 scripts/fake-pv-drivers.sh
  91. +1 −1 scripts/fence
  92. +1 −1 scripts/host-backup-restore/host-restore
  93. +1 −1 scripts/host-bugreport-upload
  94. +2 −2 scripts/init.d-genptoken
  95. +2 −2 scripts/init.d-management-interface
  96. +2 −2 scripts/init.d-perfmon
  97. +4 −4 scripts/init.d-sdkinit
  98. +1 −1 scripts/init.d-squeezed
  99. +1 −1 scripts/init.d-v6d
  100. +4 −4 scripts/init.d-xapi
  101. +4 −4 scripts/init.d-xapi-domains
  102. +6 −6 scripts/init.d-xapissl
  103. +6 −6 scripts/init.d-xenservices
  104. +4 −0 scripts/install.sh
  105. +1 −1 scripts/interface-reconfigure
  106. +1 −1 scripts/interface-reconfigure-test
  107. +1 −1 scripts/interface-reconfigure-test-setup
  108. +1 −1 scripts/interface-visualise
  109. +2 −2 scripts/license-check.py
  110. +1 −1 scripts/mpathalert-daemon
  111. +1 −1 scripts/plugins/iovirt
  112. +1 −1 scripts/poweron/iLO.py
  113. +2 −2 scripts/rewrite-management-interface
  114. +1 −1 scripts/rio.db.conf.skel
  115. +1 −1 scripts/runtests
  116. +2 −2 scripts/set-dom0-memory-target-from-packs
  117. +1 −1 scripts/sm_diagnostics
  118. +1 −1 scripts/static-vdis
  119. +1 −1 scripts/sysconfig-perfmon
  120. +1 −1 scripts/templates/debian
  121. +1 −1 scripts/thread_diagnostics
  122. +1 −1 scripts/vif
  123. +2 −2 scripts/vncterm-wrapper
  124. +1 −1 scripts/with-vdi
  125. +1 −1 scripts/xapi-autostart-vms
  126. +1 −1 scripts/xapi-logrotate
  127. +2 −2 scripts/xapi-rolling-upgrade-miami
  128. +2 −2 scripts/xapi.conf
  129. +6 −6 scripts/xe-backup-metadata
  130. +3 −3 scripts/xe-edit-bootloader
  131. +2 −2 scripts/xe-mount-iso-sr
  132. +3 −3 scripts/xe-reset-networking
  133. +6 −6 scripts/xe-restore-metadata
  134. +3 −3 scripts/xe-set-iscsi-iqn
  135. +3 −3 scripts/xe-toolstack-restart
  136. +3 −3 scripts/xe-xentrace
  137. +4 −4 scripts/xen-backend.agent
  138. +4 −4 scripts/xen-backend.rules
  139. +1 −1 scripts/xen-frontend.rules
View
@@ -197,3 +197,5 @@ ocaml/xenops/memory_breakdown
ocaml/xenops/squeezed
ocaml/xenops/squeezed_client
xapi.spec
+
+ocaml/fhs.*
View
@@ -32,13 +32,17 @@ PLUGINDIR=/etc/xapi.d/plugins
HOOKSDIR=/etc/xapi.d
INVENTORY=/etc/xensource-inventory
XAPICONF=/etc/xapi.conf
-LIBEXECDIR=$(OPTDIR)/libexec
+LIBEXECDIR=/opt/xensource/libexec
SCRIPTSDIR=/etc/xensource/scripts
+SHAREDIR=/opt/xensource
+WEBDIR=/opt/xensource/www
+XHADIR=/opt/xensource/xha
+BINDIR=/opt/xensource/bin
-export VARDIR ETCDIR OPTDIR PLUGINDIR HOOKSDIR INVENTORY VARPATCHDIR LIBEXECDIR XAPICONF SCRIPTSDIR
+export VARDIR ETCDIR OPTDIR PLUGINDIR HOOKSDIR INVENTORY VARPATCHDIR LIBEXECDIR XAPICONF SCRIPTSDIR SHAREDIR WEBDIR XHADIR BINDIR
.PHONY: all
-all: version
+all: version ocaml/fhs.ml
omake phase1
omake phase2
omake phase3
@@ -116,9 +120,13 @@ ocaml/fhs.ml :
let libexecdir=\"$(LIBEXECDIR)\"\n \
let xapiconf=\"$(XAPICONF)\"\n \
let scriptsdir=\"$(SCRIPTSDIR)\"\n \
- let varpatchdir=\"$(VARPATCHDIR)\"\n" \
+ let varpatchdir=\"$(VARPATCHDIR)\"\n \
+ let webdir=\"$(WEBDIR)\"\n \
+ let xhadir=\"$(XHADIR)\"\n \
+ let bindir=\"$(BINDIR)\"\n \
+ let sharedir=\"$(SHAREDIR)\"\n" \
> ocaml/fhs.ml
-
+
.PHONY: clean
clean:
View
@@ -79,7 +79,7 @@ export
.PHONY: none
# Ocaml #############################################################################
-OCAML_PHASE1= generate_constants autogen_idl
+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)
# JS ################################################################################
View
@@ -1,9 +1,11 @@
# You must set your XEN_ROOT env var before building
XEN_CFLAGS = -I$(XEN_ROOT)/usr/include
OCAMLINCLUDES = +ocamldoc
-OCAML_LIBS = $(ROOT)/ocaml/util/version $(ROOT)/ocaml/util/stats
+OCAML_LIBS = $(ROOT)/ocaml/fhs $(ROOT)/ocaml/util/version $(ROOT)/ocaml/util/stats
OCAMLPACKS = stdext log
+OCamlLibrary(fhs, fhs)
+
.SUBDIRS: \
ptoken \
autogen \
View
@@ -1,5 +1,5 @@
OTHER_CLIBS = -cclib -lpam
-OCAMLINCLUDES += ../autogen ../idl/ocaml_backend ../idl ../xapi
+OCAMLINCLUDES += ../autogen ../idl/ocaml_backend ../idl ../xapi ..
StaticCLibrary(auth_stubs, xa_auth xa_auth_stubs)
OCamlLibraryClib(pam, pam, auth_stubs)
View
@@ -74,7 +74,7 @@ struct
end
(* some constants *)
-let extauth_hook_script_name = "extauth-hook" (* script name in /etc/xapi.d/plugins/ *)
+let extauth_hook_script_name = "extauth-hook" (* script name in @PLUGINDIR@/ *)
let event_name_after_subject_add = "after-subject-add"
let event_name_after_subject_remove = "after-subject-remove"
let event_name_after_xapi_initialize = "after-xapi-initialize"
@@ -102,10 +102,10 @@ let can_execute_extauth_hook_script ~__context host event_name =
(* use the generic call below to avoid concurrency problems between the script and host.{enable,disable}_extauth *)
let call_extauth_hook_script_in_host_wrapper ~__context host event_name ~call_plugin_fn =
(* CP-709: call extauth-hook-script *)
- (* Forkhelpers.execute_command_get_output hook-script "/etc/xapi.d/plugins/extauth-hook" *)
+ (* Forkhelpers.execute_command_get_output hook-script "@PLUGINDIR@/extauth-hook" *)
(* fork a new thread and call new xapi.host.call-subject-add-hook-script method *)
(* see xapi_sync.ml *)
- (* host.call-plugins scriptname (calls /etc/xapi.d/plugins/scriptname*)
+ (* host.call-plugins scriptname (calls @PLUGINDIR@/scriptname*)
if can_execute_extauth_hook_script ~__context host event_name
then begin
@@ -148,7 +148,7 @@ let call_extauth_hook_script_in_host ~__context host event_name =
let call_plugin_fn () =
Helpers.call_api_functions ~__context (fun rpc session_id ->
Client.Client.Host.call_plugin rpc session_id host (* will call extauth plugin with mutex *)
- extauth_hook_script_name (* script name in /etc/xapi.d/plugins/ *)
+ extauth_hook_script_name (* script name in @PLUGINDIR@/ *)
event_name (* event name sent to script *)
event_params (* parameters sent to event name *)
)
@@ -700,7 +700,7 @@ let on_disable config_params =
debug "Doing a manual Likewise domain-leave cleanup...";
(* When likewise raises an exception during domain-leave, we try again, using *)
(* some of the command-line workarounds that Kyle describes in CA-27627: *)
- let lw_force_domain_leave_script = Xapi_globs.base_path ^ "/libexec/lw-force-domain-leave" in
+ let lw_force_domain_leave_script = Filename.concat Fhs.libexecdir "lw-force-domain-leave" in
(try
let output, stderr = Forkhelpers.execute_command_get_output lw_force_domain_leave_script [] in
debug "execute %s: stdout=[%s],stderr=[%s]" lw_force_domain_leave_script (Stringext.String.replace "\n" ";" output) (Stringext.String.replace "\n" ";" stderr)
View
@@ -1,4 +1,4 @@
-OCAML_LIBS = ../util/version ../idl/ocaml_backend/common
+OCAML_LIBS = ../fhs ../util/version ../idl/ocaml_backend/common
OCAMLINCLUDES = ../xapi
OCAMLPACKS += unix cdrom
View
@@ -1,5 +1,5 @@
-OCAMLINCLUDES = ../idl/ocaml_backend ../xapi ../idl ../util ../autogen
+OCAMLINCLUDES = ../idl/ocaml_backend ../xapi ../idl ../util ../autogen ..
OCAMLPACKS = xml-light2 stdext stunnel http-svr log sexpr rpc-light
#OCAMLPPFLAGS = -pp "camlp4o"
#OCAMLDEPFLAGS = -pp "camlp4o"
@@ -13,7 +13,7 @@ OCamlProgram(unit_test_sql, unit_test_sql)
BLOCK_DEVICE_IO_FILES = \
block_device_io_errors \
block_device_io \
- ../xapi/config_constants ../xapi/xapi_globs ../idl/ocaml_backend/ref \
+ ../xapi/xapi_globs ../idl/ocaml_backend/ref \
../xapi/helper_process ../xapi/helper_hostname ../idl/api_errors
OCamlProgram(block_device_io, $(BLOCK_DEVICE_IO_FILES))
@@ -28,7 +28,7 @@ section:
OCamlProgram(database_test, $(DATABASE_TEST_FILES))
section:
- OCAML_LIBS += ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../idl/ocaml_backend/server
+ OCAML_LIBS += ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../idl/ocaml_backend/server
OCamlProgram(unit_test_marshall, unit_test_marshall db_remote_cache_access_v1)
.PHONY: install
@@ -202,7 +202,7 @@ let string_to_redo_log_entry str =
exception RedoLogFailure of string
exception CommunicationsProblem of string
-let prog = Xapi_globs.base_path ^ "/libexec/block_device_io"
+let prog = Filename.concat Fhs.libexecdir "block_device_io"
let generation_size = 16
let length_size = 16
@@ -1,4 +1,4 @@
-OCAML_LIBS = ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../util/stats ../idl/ocaml_backend/server
+OCAML_LIBS = ../fhs ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../util/stats ../idl/ocaml_backend/server
OCAMLINCLUDES = ../idl/ocaml_backend ../xapi ../database
OCAMLPACKS = xml-light2 uuid sexpr log stunnel http-svr
View
@@ -1,4 +1,4 @@
-OCAMLINCLUDES += ../xapi
+OCAMLINCLUDES += ../xapi ..
.PHONY: clean
clean:
View
@@ -23,7 +23,7 @@ open D
let filename = ref ""
let gpg_binary_path = "/usr/bin/gpg"
-let gpg_homedir = Xapi_globs.base_path ^ "/gpg/"
+let gpg_homedir = Filename.concat Fhs.optdir "gpg/"
let gpg_pub_keyring = gpg_homedir ^ "pubring.gpg"
let allowed_gpg_checksum =
[ "be00ee82bffad791edfba477508d5d84"; (* centos52 version *)
@@ -52,7 +52,7 @@ autogen_idl: $(AUTOGEN_DIR)/client.ml $(AUTOGEN_DIR)/aPI.ml $(AUTOGEN_DIR)/serve
COMMON_OBJS = ref \
../datamodel_types event_types \
- ../api_errors ../api_messages ../../xapi/config_constants ../../xapi/xapi_globs \
+ ../api_errors ../api_messages ../../xapi/xapi_globs \
../constants
CLIENT_OBJS = $(AUTOGEN_DIR)/aPI $(AUTOGEN_DIR)/client event_helper
SERVER_OBJS = ../../database/escaping locking_helpers \
View
@@ -1,10 +1,11 @@
OCAML_LIBS = ../util/version ../idl/ocaml_backend/xapi_client
-OCAMLINCLUDES = ../idl/ocaml_backend ../idl ../autogen ../xapi ../gpg ../util
+OCAMLINCLUDES = ../idl/ocaml_backend ../idl ../autogen ../xapi ../gpg ../util ..
OCAMLPACKS = xml-light2 stdext stunnel http-svr log rpc-light
UseCamlp4(rpc-light.syntax, v6rpc v6errors)
V6FILES = \
+ ../fhs \
fakev6 \
v6rpc \
v6errors \
@@ -18,7 +19,7 @@ V6D = v6d
OCamlProgram($(V6D), $(V6FILES))
OCamlDocProgram($(V6D), $(V6FILES))
-OCamlProgram(v6d-reopen-logs, v6d_reopen_logs)
+OCamlProgram(v6d-reopen-logs, v6d_reopen_logs ../fhs)
.PHONY: install
install: $(V6D)
@@ -20,7 +20,7 @@ exception V6DaemonFailure
let retry = ref true
(* RPC function for communication with the v6 daemon *)
-let socket = "/var/xapi/v6"
+let socket = Filename.concat Fhs.vardir "v6"
let v6rpc call =
let open Xmlrpc_client in
XMLRPC_protocol.rpc ~transport:(Unix socket) ~http:(xmlrpc ~version:"1.0" "/") call
@@ -13,7 +13,7 @@
*)
(** Small executable that sends a reopen-logs XML/RPC message to the licensing daemon *)
-let socket = "/var/xapi/v6"
+let socket = Filename.concat Fhs.vardir "v6"
(* RPC function for communication with the v6 daemon *)
let v6rpc xml =
@@ -42,7 +42,7 @@ let daemon_init post_daemonize_hook process =
post_daemonize_hook ();
(* unix socket *)
- let unix_socket_path = "/var/xapi/v6" in
+ let unix_socket_path = Filename.concat Fhs.vardir "v6" in
Unixext.mkdir_safe (Filename.dirname unix_socket_path) 0o700;
Unixext.unlink_safe unix_socket_path;
let domain_sock = Http_svr.bind (Unix.ADDR_UNIX(unix_socket_path)) "unix_rpc" in
View
@@ -1,4 +1,4 @@
-OCAML_LIBS = ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
+OCAML_LIBS = ../fhs ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
OCAMLINCLUDES = ../xapi ../idl/ocaml_backend/ ../idl ../autogen
OCAMLPACKS = xml-light2 stdext stunnel http-svr log rpc-light
@@ -1,8 +1,8 @@
OCAML_LIBS = ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
-OCAMLINCLUDES = ../idl/ocaml_backend/ ../idl ../autogen
+OCAMLINCLUDES = ../idl/ocaml_backend/ ../idl ../autogen ..
OCAMLPACKS = xml-light2 stdext stunnel http-svr log rpc-light
-OCamlProgram(mpathalert, mpathalert)
+OCamlProgram(mpathalert, mpathalert ../fhs)
OCamlDocProgram(mpathalert, mpathalert)
.PHONY: clean
@@ -296,7 +296,7 @@ let _ =
let rpc xml =
let open Xmlrpc_client in
let http = xmlrpc ~version:"1.0" "/" in
- XML_protocol.rpc ~transport:(Unix "/var/xapi/xapi") ~http xml in
+ XML_protocol.rpc ~transport:(Unix (Filename.concat Fhs.vardir "xapi")) ~http xml in
let queue = Queue.create () in
let msg = Buffer.create 1024 in
View
@@ -1,11 +1,11 @@
-OCAML_LIBS = ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
-OCAMLINCLUDES = ../idl/ocaml_backend ../xapi ../idl ../autogen ../client_records
+OCAML_LIBS = ../fhs ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
+OCAMLINCLUDES = ../idl/ocaml_backend ../xapi ../idl ../autogen ../client_records ..
OCAMLPACKS = xml-light2 stdext stunnel http-svr log rpc-light
-PERFTEST_FILES = scenario perfutil createVM createpool testtypes perftest tests ../xapi/xapi_inventory perfdebug
+PERFTEST_FILES = scenario perfutil createVM createpool testtypes perftest tests ../xapi/xapi_inventory perfdebug
OCamlProgram(perftest, $(PERFTEST_FILES))
OCamlDocProgram(perftest, $(PERFTEST_FILES))
-OCamlProgram(apiperf, perfutil apiperf)
+OCamlProgram(apiperf, perfutil apiperf ../fhs)
OCamlProgram(histogram, statistics histogram gnuplot testtypes perfdebug graphutil)
OCamlProgram(cumulative_time, cumulative_time gnuplot testtypes perfdebug graphutil)
@@ -30,7 +30,7 @@ let use_stunnel_cache = ref false
let master = ref false
let slave_limit = ref 0
let threads = ref 1
-let url = ref "file:///var/xapi/xapi"
+let url = ref ("file://" ^ Fhs.vardir ^ "xapi")
type url =
@@ -9,6 +9,6 @@ client=yes
[localhost-xapi]
accept = 80
connect = 10.80.226.181:443
-cert = /etc/xensource/xapi-ssl.pem
+cert = @ETCDIR@/xapi-ssl.pem
@@ -18,7 +18,7 @@ open Stringext
let rpc xml =
let open Xmlrpc_client in
- XML_protocol.rpc ~transport:(Unix "/var/xapi/xapi") ~http:(xmlrpc ~version:"1.0" "/") xml
+ XML_protocol.rpc ~transport:(Unix (Filename.concat Fhs.vardir "xapi")) ~http:(xmlrpc ~version:"1.0" "/") xml
let remoterpc host xml =
let open Xmlrpc_client in
View
@@ -1,9 +1,9 @@
OCAMLPACKS = uuid
-
+OCAMLINCLUDES = ..
GENSECRET_SRC_FILES = genptoken.ml
section
- OCamlProgram(genptoken, genptoken)
+ OCamlProgram(genptoken, genptoken ../fhs)
.PHONY: clean
clean:
@@ -2,7 +2,7 @@
type options = { force : bool; tgtfile : string }
-let options = ref { force = false; tgtfile = "/etc/xensource/ptoken" }
+let options = ref { force = false; tgtfile = Filename.concat Fhs.etcdir "ptoken" }
let set_force _ = options := { !options with force = true }
let set_target s = options := { !options with tgtfile = s }
View
@@ -1,12 +1,12 @@
OCAML_LIBS =
-OCAMLINCLUDES = ../xapi
+OCAMLINCLUDES = ../xapi ..
OCAMLPACKS = xml-light2 stdext stunnel log http-svr oUnit
section
- OCAMLINCLUDES += .
+ OCAMLINCLUDES += .
OCAMLFLAGS = -dtypes -thread -warn-error F
- CLI_FILES = main ../xapi/storage_interface ../xapi/vdi_automaton
- TEST_FILES = test ../xapi/storage_interface ../xapi/vdi_automaton
+ CLI_FILES = main ../xapi/storage_interface ../xapi/vdi_automaton ../fhs
+ TEST_FILES = test ../xapi/storage_interface ../xapi/vdi_automaton ../fhs
OCamlProgram(sm, $(CLI_FILES))
OCamlDocProgram(sm, $(CLI_FILES))
OCamlProgram(smtest, $(TEST_FILES))
View
@@ -20,7 +20,7 @@ open Fun
open Stringext
open Xmlrpc_client
-let url = ref (Http.Url.File ({ Http.Url.path = "/var/xapi/storage" }, "/"))
+let url = ref (Http.Url.File ({ Http.Url.path = Filename.concat Fhs.vardir "storage" }, "/"))
module RPC = struct
let rpc call =
View
@@ -22,7 +22,7 @@ open Stringext
open Xmlrpc_client
-let default_path = "/var/xapi/storage"
+let default_path = Filename.concat Fhs.vardir "storage"
let transport = ref (Unix default_path)
let rpc call =
View
@@ -1,3 +1,6 @@
+OCAMLINCLUDES = ..
+OCAML_LIBS = ../fhs
+
#OCamlLibrary(util_globs_inventory, util_globs_inventory)
OCamlLibrary(util_inventory, util_globs_inventory util_inventory)
OCamlLibrary(version, util_globs_inventory util_inventory version)
@@ -1,2 +1,2 @@
(* path to the xensource inventory file *)
-let inventory_filename = "/etc/xensource-inventory"
+let inventory_filename = Fhs.inventory
@@ -81,7 +81,7 @@ let read_inventory_contents () =
match parse_inventory_entry line with
| Some (k, v) -> Hashtbl.add inventory k v
| None -> warn
- "Failed to parse line from xensource-inventory file: %s" line)
+ "Failed to parse line from inventory file: %s" line)
inventory_filename;
loaded_inventory := true
View
@@ -1,8 +1,8 @@
OCAML_LIBS = ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
-OCAMLINCLUDES = ../idl/ocaml_backend ../idl ../autogen
+OCAMLINCLUDES = ../idl/ocaml_backend ../idl ../autogen ..
OCAMLPACKS = xml-light2 stdext stunnel http-svr rpc-light
-OCamlProgram(vncproxy, vncproxy)
+OCamlProgram(vncproxy, vncproxy ../fhs)
.PHONY: install
install:
@@ -65,7 +65,7 @@ let _ =
let open Xmlrpc_client in
let http = xmlrpc ~version:"1.0" "/" in
match !server with
- | "" -> XML_protocol.rpc ~transport:(Unix "/var/xapi/xapi") ~http xml
+ | "" -> XML_protocol.rpc ~transport:(Unix (Filename.concat Fhs.vardir "xapi")) ~http xml
| host -> XML_protocol.rpc ~transport:(SSL(SSL.make ~use_fork_exec_helper:false (), host, 443)) ~http xml in
let find_vm rpc session_id vm =
Oops, something went wrong.

0 comments on commit 13b8348

Please sign in to comment.