Skip to content

Commit 00594ab

Browse files
committed
[qcow-tool packaging] package it in xapi
remove dune-project from `ocaml/qcow-tool` that was here from the first import. Now we are building qcow-tool with xapi. This patch creates the package in the toplevel dune-project and removes uneeded build stuff from the original repository. To be able to build qcow-tool we added the following packages to xs-opam: - asetmap - ezjsonm - mirage-block-combinators - mirage-types (deprecated) - mirage-types-lwt (deprecated) - prometheus - unix-type-representations Signed-off-by: Guillaume <guillaume.thouvenin@vates.tech>
1 parent f70e4d2 commit 00594ab

8 files changed

Lines changed: 127 additions & 125 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ DUNE_IU_PACKAGES3=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(
173173
install-dune3:
174174
dune install $(DUNE_IU_PACKAGES3)
175175

176-
DUNE_IU_PACKAGES4=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool
176+
DUNE_IU_PACKAGES4=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool qcow-tool
177177

178178
install-dune4:
179179
dune install $(DUNE_IU_PACKAGES4)

dune-project

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,34 @@
405405
)
406406
)
407407

408+
(package
409+
(name qcow-tool)
410+
(synopsis "Manipulate .qcow files")
411+
(tags ("org.mirage" "org:xapi-project"))
412+
(depends
413+
asetmap
414+
astring
415+
cmdliner
416+
cstruct
417+
ezjsonm
418+
fmt
419+
io-page
420+
logs
421+
lwt
422+
mirage-block
423+
mirage-block-combinators
424+
mirage-block-unix
425+
mirage-time
426+
mirage-types-lwt
427+
ounit
428+
prometheus
429+
result
430+
sexplib
431+
sha
432+
unix-type-representations
433+
)
434+
)
435+
408436
(package
409437
(name vhd-tool)
410438
(synopsis "Manipulate .vhd files")

ocaml/qcow-tool/cli/dune

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
11
(executable
2-
(name main)
3-
(public_name qcow-tool)
4-
(package qcow-tool)
5-
(libraries qcow io-page logs logs.fmt sha unix-type-representations
6-
cmdliner sexplib mirage-block-combinators)
7-
(preprocess
8-
(pps ppx_sexp_conv)))
2+
(name main)
3+
(libraries
4+
astring
5+
cmdliner
6+
cstruct
7+
cstruct-lwt
8+
fmt
9+
io-page logs
10+
logs.fmt
11+
lwt
12+
lwt.unix
13+
mirage-block
14+
mirage-block-unix
15+
mirage-block-combinators
16+
mirage-time
17+
qcow
18+
sexplib
19+
sha
20+
unix-type-representations
21+
)
22+
(preprocess
23+
(pps ppx_sexp_conv)
24+
)
25+
)
26+
27+
(install
28+
(package qcow-tool)
29+
(section bin)
30+
(files (main.exe as qcow-tool))
31+
)

ocaml/qcow-tool/dune-project

Lines changed: 0 additions & 2 deletions
This file was deleted.

ocaml/qcow-tool/lib/dune

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
(library
2-
(name qcow)
3-
(public_name qcow)
4-
(libraries astring cstruct logs lwt mirage-block mirage-block-unix
5-
mirage-types.lwt prometheus io-page sexplib stdlib-shims
6-
mirage-time)
7-
(wrapped false)
8-
(preprocess
9-
(pps ppx_sexp_conv)))
2+
(name qcow)
3+
(libraries
4+
astring
5+
cstruct
6+
logs
7+
lwt
8+
mirage-block
9+
mirage-block-unix
10+
mirage-types.lwt
11+
prometheus
12+
io-page
13+
sexplib
14+
stdlib-shims
15+
mirage-time fmt
16+
)
17+
(wrapped false)
18+
(preprocess
19+
(pps ppx_sexp_conv)
20+
)
21+
)
1022

1123
(rule
1224
(targets qcow_word_size.ml)

ocaml/qcow-tool/qcow-tool.opam

Lines changed: 0 additions & 44 deletions
This file was deleted.

ocaml/qcow-tool/qcow.opam

Lines changed: 0 additions & 63 deletions
This file was deleted.

qcow-tool.opam

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This file is generated by dune, edit dune-project instead
2+
opam-version: "2.0"
3+
synopsis: "Manipulate .qcow files"
4+
maintainer: ["Xapi project maintainers"]
5+
authors: ["xen-api@lists.xen.org"]
6+
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
7+
tags: ["org.mirage" "org:xapi-project"]
8+
homepage: "https://xapi-project.github.io/"
9+
bug-reports: "https://github.com/xapi-project/xen-api/issues"
10+
depends: [
11+
"dune" {>= "3.15"}
12+
"asetmap"
13+
"astring"
14+
"cmdliner"
15+
"cstruct"
16+
"ezjsonm"
17+
"fmt"
18+
"io-page"
19+
"logs"
20+
"lwt"
21+
"mirage-block"
22+
"mirage-block-combinators"
23+
"mirage-block-unix"
24+
"mirage-time"
25+
"mirage-types-lwt"
26+
"ounit"
27+
"prometheus"
28+
"result"
29+
"sexplib"
30+
"sha"
31+
"unix-type-representations"
32+
"odoc" {with-doc}
33+
]
34+
build: [
35+
["dune" "subst"] {dev}
36+
[
37+
"dune"
38+
"build"
39+
"-p"
40+
name
41+
"-j"
42+
jobs
43+
"@install"
44+
"@runtest" {with-test}
45+
"@doc" {with-doc}
46+
]
47+
]
48+
dev-repo: "git+https://github.com/xapi-project/xen-api.git"

0 commit comments

Comments
 (0)