pin utcp to 0.0.2
This commit is contained in:
parent
e2961214a0
commit
770cd5fa82
3 changed files with 35 additions and 16 deletions
45
GNUmakefile
45
GNUmakefile
|
|
@ -1,8 +1,9 @@
|
||||||
storage=./keys/secmod.fat
|
storage=./keys/secmod.fat
|
||||||
service=tap0
|
service=tap0
|
||||||
|
|
||||||
setup-switch:
|
switch:
|
||||||
opam switch create mte ocaml.5.4.1
|
opam switch create mte ocaml.5.4.1
|
||||||
|
eval $$(opam env)
|
||||||
opam update
|
opam update
|
||||||
opam install --yes . --deps-only
|
opam install --yes . --deps-only
|
||||||
|
|
||||||
|
|
@ -10,14 +11,21 @@ vendors: source.sh
|
||||||
@mkdir -p vendors
|
@mkdir -p vendors
|
||||||
@./source.sh
|
@./source.sh
|
||||||
|
|
||||||
.PHONY: clean
|
assets:
|
||||||
clean:
|
@cp -r default/assets ./
|
||||||
rm -rf _build/
|
|
||||||
rm -rf vendors/
|
build: vendors
|
||||||
|
@dune build @all
|
||||||
|
@dune build --workspace dune-workspace.solo5 src/mte.exe
|
||||||
|
|
||||||
|
manifest.json:
|
||||||
|
@dune exec src/mte.exe > src/manifest.json
|
||||||
|
|
||||||
keys:
|
keys:
|
||||||
@mkdir -p keys
|
@mkdir -p keys
|
||||||
@dune exec tools/offline.exe -- generate-eddsa-key --output ./keys/master
|
@dune exec tools/offline.exe -- generate-eddsa-key --output ./keys/master
|
||||||
|
|
||||||
|
postgres_password:
|
||||||
@read -sp "Enter postgres password: " POSTGRES_PASSWORD; \
|
@read -sp "Enter postgres password: " POSTGRES_PASSWORD; \
|
||||||
echo; \
|
echo; \
|
||||||
printf $${POSTGRES_PASSWORD} > ./keys/postgres_password
|
printf $${POSTGRES_PASSWORD} > ./keys/postgres_password
|
||||||
|
|
@ -25,19 +33,26 @@ keys:
|
||||||
secmod.fat:
|
secmod.fat:
|
||||||
mfat make --sectors=2048 $(storage)
|
mfat make --sectors=2048 $(storage)
|
||||||
|
|
||||||
assets:
|
|
||||||
@cp -r default/assets ./
|
|
||||||
|
|
||||||
config:
|
config:
|
||||||
@sed "s/%%MASTER_PUBLIC_KEY%%/$$(cat ./keys/master.pub)/" -i assets/mte.conf
|
@sed "s/%%MASTER_PUBLIC_KEY%%/$$(cat ./keys/master.pub)/" -i assets/mte.conf
|
||||||
|
|
||||||
src/manifest.json:
|
|
||||||
@dune exec src/mte.exe > src/manifest.json
|
|
||||||
|
|
||||||
build: vendors
|
|
||||||
@dune build @all
|
|
||||||
@dune build --workspace dune-workspace.solo5 src/mte.exe
|
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
@solo5-hvt --block:storage=$(storage) --net:service=$(service) -- ./_build/solo5/src/mte.exe \
|
@solo5-hvt --block:storage=$(storage) --net:service=$(service) -- ./_build/solo5/src/mte.exe \
|
||||||
--postgres-password=$$(cat ./keys/postgres_password)
|
--postgres-password=$$(cat ./keys/postgres_password)
|
||||||
|
|
||||||
|
clean-switch:
|
||||||
|
opam switch remove mte
|
||||||
|
|
||||||
|
clean-vendors:
|
||||||
|
rm -rf vendors/
|
||||||
|
|
||||||
|
clean-build:
|
||||||
|
rm -rf _build/
|
||||||
|
|
||||||
|
clean-assets:
|
||||||
|
rm -rf assets/
|
||||||
|
|
||||||
|
clean-keys:
|
||||||
|
rm -rf keys/
|
||||||
|
|
||||||
|
clean-all: clean-switch clean-vendors clean-build clean-assets clean-keys
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ MTE use the opam package manager and the dune build system.
|
||||||
Create a dedicated opam switch, pin libraries to the required version and install them.
|
Create a dedicated opam switch, pin libraries to the required version and install them.
|
||||||
|
|
||||||
```
|
```
|
||||||
make setup-switch
|
make switch
|
||||||
```
|
```
|
||||||
|
|
||||||
For compilation to a solo5 unikernel, we also need to "vendor" some libraries.
|
For compilation to a solo5 unikernel, we also need to "vendor" some libraries.
|
||||||
|
|
|
||||||
4
mte.opam
4
mte.opam
|
|
@ -48,12 +48,16 @@ depends: [
|
||||||
"caqti-mnet"
|
"caqti-mnet"
|
||||||
"caqti-driver-pgx"
|
"caqti-driver-pgx"
|
||||||
"pgx"
|
"pgx"
|
||||||
|
"mkernel"
|
||||||
|
"utcp"
|
||||||
]
|
]
|
||||||
build: [
|
build: [
|
||||||
[make "build"]
|
[make "build"]
|
||||||
]
|
]
|
||||||
pin-depends: [
|
pin-depends: [
|
||||||
[ "zarith.dev" "git+https://github.com/mirage/Zarith.git#df8969d9bb95cffca13e31a615189ab27ada0684" ]
|
[ "zarith.dev" "git+https://github.com/mirage/Zarith.git#df8969d9bb95cffca13e31a615189ab27ada0684" ]
|
||||||
|
[ "mkernel.dev" "git+https://github.com/robur-coop/mkernel.git#v0.0.2" ]
|
||||||
|
[ "utcp.dev" "git+https://github.com/robur-coop/utcp.git#0.0.2" ]
|
||||||
[ "mnet.dev" "git+https://github.com/robur-coop/mnet.git#v0.0.2" ]
|
[ "mnet.dev" "git+https://github.com/robur-coop/mnet.git#v0.0.2" ]
|
||||||
[ "mnet-tls.dev" "git+https://github.com/robur-coop/mnet.git#v0.0.2" ]
|
[ "mnet-tls.dev" "git+https://github.com/robur-coop/mnet.git#v0.0.2" ]
|
||||||
[ "mnet-happy-eyeballs.dev" "git+https://github.com/robur-coop/mnet.git#v0.0.2" ]
|
[ "mnet-happy-eyeballs.dev" "git+https://github.com/robur-coop/mnet.git#v0.0.2" ]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue