Skip to content

Commit

Permalink
CP-51479: [maintenance]: join CLI/daemon packages into xapi-tools
Browse files Browse the repository at this point in the history
These weren't being installed previously during a spec build,
and had to be 'rm'-ed in the Makefile.
Join them into a single package instead to reduce the number of opam files.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
  • Loading branch information
edwintorok committed Sep 19, 2024
1 parent 371207d commit 2f4d066
Show file tree
Hide file tree
Showing 39 changed files with 85 additions and 682 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ install-dune1:
message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \
message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli \
xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \
xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli xapi-xenopsd-xc xapi-sdk\
xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck
xapi-rrd xapi-inventory clock xapi-sdk\
xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools

install-dune2:
dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe
Expand All @@ -176,7 +176,7 @@ install:
chmod +x $(DESTDIR)$(DOCDIR)/doc-convert.sh
# backward compat with existing specfile, to be removed after it is updated
find $(DESTDIR) -name '*.cmxs' -delete
for pkg in xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done;
for pkg in xapi-debug xapi xe xapi-tools xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done;


uninstall:
Expand All @@ -188,10 +188,10 @@ uninstall:
message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \
message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-log \
xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \
xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli\
xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck
xapi-rrd xapi-inventory clock xapi-sdk\
xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools
dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) xapi xe
dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-xenopsd-xc
dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-tools
dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug

compile_flags.txt: Makefile
Expand Down
148 changes: 31 additions & 117 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,6 @@
(name xe)
)

(package
(name xapi-xenopsd-xc)
)

(package
(name xapi-xenopsd-simulator)
)

(package
(name xapi-xenopsd-cli)
)

(package
(name xapi-types)
)
Expand Down Expand Up @@ -158,10 +146,6 @@
(name xapi-storage)
)

(package
(name xapi-squeezed)
)

(package
(name xapi-schema)
)
Expand All @@ -186,90 +170,10 @@
)
)

(package
(name xapi-rrdd)
(synopsis "Performance monitoring daemon for xapi")
(description "This daemon monitors 'datasources' i.e. time-varying values such as performance counters and records the samples in RRD archives. These archives can be used to examine historical performance trends.")
(depends
(ocaml (>= "4.02.0"))
(alcotest :with-test)
astring
cmdliner
(fmt :with-test)
(gzip (= :version))
(http-lib (= :version))
inotify
io-page
ipaddr
mtime
polly
ppx_deriving_rpc
rpclib
uri
(ezxenstore (= :version))
(uuid (= :version))
xapi-backtrace
(xapi-idl (= :version))
(xapi-rrd (= :version))
(xapi-stdext-threads (= :version))
(xapi-stdext-unix (= :version))
xapi-tracing
xenctrl
xenstore
xenstore_transport
xmlm
yojson
)
)

(package
(name xapi-rrd-transport-utils)
(synopsis "Shared-memory protocols for exposing performance counters")
(description "VMs running on a Xen host can use this library to expose performance counters which can be sampled by the xapi performance monitoring daemon.")
(authors "John Else")
(depends
ocaml
cmdliner
(rrd-transport (= :version))
(xapi-idl (= :version))
(xapi-rrd (= :version))
)
)

(package
(name xapi-open-uri)
)

(package
(name xapi-networkd)
(authors "Jon Ludlam")
(synopsis "The XCP networking daemon")
(depends
(alcotest :with-test)
astring
base-threads
(forkexec (= :version))
(http-lib (= :version))
integers
mtime
netlink
re
result
rresult
rpclib
uri
(xapi-idl (= :version))
xapi-inventory
(xapi-stdext-pervasives (= :version))
(xapi-stdext-std (= :version))
(xapi-stdext-threads (= :version))
(xapi-stdext-unix (= :version))
xapi-test-utils
(xen-api-client (= :version))
yojson
)
)

(package
(name xapi-nbd)
)
Expand Down Expand Up @@ -373,6 +277,37 @@
)
)

(package
(name xapi-tools)
(synopsis "Various daemons and CLI applications required by XAPI")
(description "Includes message-switch, xenopsd, forkexecd, ...")
(depends
astring
base64
cmdliner
cstruct-unix
fmt
logs
lwt
mtime
netlink
qmp
re
result
rpclib
rresult
uri
xenctrl
xmlm
yojson
(alcotest :with-test)
(ppx_deriving_rpc :with-test)
(qcheck-core :with-test)
(xapi-test-utils :with-test)
(xenstore_transport :with-test)
)
)

(package
(name xapi)
(synopsis "The toolstack daemon which implements the XenAPI")
Expand Down Expand Up @@ -462,23 +397,6 @@
)
)

(package
(name wsproxy)
(synopsis "Websockets proxy for VNC traffic")
(authors "Jon Ludlam" "Marcello Seri")
(license "LGPL-2.0-only WITH OCaml-LGPL-linking-exception")
(depends
(alcotest :with-test)
(base64 (>= "3.1.0"))
fmt
logs
(lwt (>= "3.0.0"))
re
uuid
(qcheck-core :with-test)
)
)

(package
(name vhd-tool)
(synopsis "Manipulate .vhd files")
Expand Down Expand Up @@ -573,10 +491,6 @@ This package provides an Lwt compatible interface to the library.")
(name safe-resources)
)

(package
(name rrddump)
)

(package
(name rrd-transport)
(synopsis "Shared-memory protocols for exposing system metrics")
Expand Down
4 changes: 2 additions & 2 deletions ocaml/networkd/bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
)

(install
(package xapi-networkd)
(package xapi-tools)
(section man)
(files xcp-networkd.1)
)

(install
(package xapi-networkd)
(package xapi-tools)
(section sbin)
(files (networkd.exe as xcp-networkd))
)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/networkd/bin_db/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(executable
(name networkd_db)
(public_name networkd_db)
(package xapi-networkd)
(package xapi-tools)
(modes exe)
(libraries

Expand Down
2 changes: 1 addition & 1 deletion ocaml/networkd/test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

(rule
(alias runtest)
(package xapi-networkd)
(package xapi-tools)
(deps
(:x network_test.exe)
(source_tree jsonrpc_files)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/squeezed/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
)

(install
(package xapi-squeezed)
(package xapi-tools)
(section sbin)
(files (squeezed.exe as squeezed))
)
2 changes: 1 addition & 1 deletion ocaml/squeezed/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(test
(name squeeze_test_main)
(package xapi-squeezed)
(package xapi-tools)
(flags (:standard -bin-annot))
(libraries
alcotest
Expand Down
4 changes: 2 additions & 2 deletions ocaml/tests/dune
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
(rule
(deps ../xenopsd/xc/xenops_xc_main.exe)
(target xenops_xc_main.disasm)
(package xapi-xenopsd-xc)
(package xapi-tools)
(action
(with-stdout-to %{target}
(run objdump %{deps} --wide -d --no-show-raw-insn)
Expand All @@ -202,7 +202,7 @@
)
(rule
(alias runtest)
(package xapi-xenopsd-xc)
(package xapi-tools)
(deps (:script ./unix_select.gawk) (:disasm xenops_xc_main.disasm))
(action (run gawk -f ./%{script} %{disasm}))
)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/wsproxy/cli/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(executable
(name wsproxy)
(public_name wsproxy)
(package wsproxy)
(package xapi-tools)
(libraries
fmt
logs
Expand Down
2 changes: 1 addition & 1 deletion ocaml/wsproxy/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(test
(name wsproxy_tests)
(modes exe)
(package wsproxy)
(package xapi-tools)
(libraries alcotest qcheck-core wslib)
)
4 changes: 2 additions & 2 deletions ocaml/xapi-idl/rrd/dune
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
(executable
(name rrd_cli)
(public_name rrd-cli)
(package xapi-rrdd)
(package xapi-tools)
(modules rrd_cli)
(modes exe)
(libraries
Expand All @@ -60,6 +60,6 @@
(rule
(alias runtest)
(deps (:x rrd_cli.exe))
(package xapi-rrdd)
(package xapi-tools)
(action (run %{x} --help=plain)))

2 changes: 1 addition & 1 deletion ocaml/xcp-rrdd/bin/rrdd/dune
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
)

(install
(package xapi-rrdd)
(package xapi-tools)
(files (xcp_rrdd.exe as xcp-rrdd))
(section sbin)
)
2 changes: 1 addition & 1 deletion ocaml/xcp-rrdd/bin/rrddump/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
xapi-rrd.unix
xmlm
)
(package rrddump)
(package xapi-tools)
)

2 changes: 1 addition & 1 deletion ocaml/xcp-rrdd/bin/transport-rw/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(modes exe)
(names reader writer)
(public_names rrdreader rrdwriter)
(package xapi-rrd-transport-utils)
(package xapi-tools)
(libraries
cmdliner

Expand Down
2 changes: 1 addition & 1 deletion ocaml/xcp-rrdd/test/rrdd/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(test
(name test_rrdd_monitor)
(modes exe)
(package xapi-rrdd)
(package xapi-tools)
(libraries
alcotest

Expand Down
4 changes: 2 additions & 2 deletions ocaml/xenopsd/cli/dune
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(install
(files (main.exe as xenops-cli))
(section sbin)
(package xapi-xenopsd-cli)
(package xapi-tools)
)

(rule
Expand All @@ -49,5 +49,5 @@
(install
(section man)
(files xenops-cli.1.gz)
(package xapi-xenopsd-cli)
(package xapi-tools)
)
2 changes: 1 addition & 1 deletion ocaml/xenopsd/dbgring/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(executable
(name dbgring)
; (public_name dbgring)
; (package xapi-xenopsd-xc)
; (package xapi-tools)
(libraries

xapi_xenopsd
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xenopsd/list_domains/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(executable
(name list_domains)
(public_name list_domains)
(package xapi-xenopsd-xc)
(package xapi-tools)
(libraries xenctrl xapi-idl.memory ezxenstore.watch uuid)
)
Loading

0 comments on commit 2f4d066

Please sign in to comment.