Opam: remove tezos-deps.opam
All dependencies are now inlined in the various opam packages.
This commit is contained in:
parent
d8d54ce321
commit
de5935228f
@ -12,7 +12,7 @@ Build instructions
|
||||
------------------
|
||||
|
||||
To compile Tezos, you need an OCaml compiler (version 4.04.2) and all the
|
||||
libraries listed in `src/tezos-deps.opam`.
|
||||
libraries listed in the various `tezos-*.opam` files.
|
||||
|
||||
The best way to install all dependencies is by first installing
|
||||
[OPAM](https://opam.ocaml.org/), the OCaml package manager.
|
||||
|
@ -6,8 +6,7 @@ FROM $base_image
|
||||
## /!\ 'COPY'edfiles.
|
||||
## /!\ /!\ /!\ /!\/!\ /!\ /!\
|
||||
|
||||
COPY scripts/install_build_deps.sh scripts/version.sh tezos/scripts/
|
||||
COPY tezos-deps.opam tezos/
|
||||
$copy_files
|
||||
|
||||
RUN sudo apk update && \
|
||||
opam config exec -- ./tezos/scripts/install_build_deps.sh && \
|
||||
|
@ -23,12 +23,20 @@ cleanup () {
|
||||
}
|
||||
trap cleanup EXIT INT
|
||||
|
||||
opam_files=$(find -name \*.opam | sort)
|
||||
dependencies="$opam_files scripts/install_build_deps.sh scripts/version.sh scripts/opam-pin.sh scripts/opam-unpin.sh scripts/opam-remove.sh Dockerfile"
|
||||
|
||||
for file in $dependencies; do
|
||||
if [ "$file" = Dockerfile ]; then continue; fi
|
||||
copy_files="$copy_files\nCOPY $file ./tezos/$file"
|
||||
done
|
||||
|
||||
sed -e 's|$base_image|'"$base_image"'|g' \
|
||||
-e 's|$ocaml_version|'"$ocaml_version"'|g' \
|
||||
-e 's|$copy_files|'"$copy_files"'|g' \
|
||||
scripts/Dockerfile.build_deps.in > Dockerfile
|
||||
|
||||
## Lookup for for prebuilt dependencies...
|
||||
dependencies="scripts/install_build_deps.sh scripts/version.sh tezos-deps.opam Dockerfile"
|
||||
dependencies_sha1=$(docker inspect --format="{{ .RootFS.Layers }}" --type=image $base_image | sha1sum - $dependencies | sha1sum | tr -d ' -')
|
||||
if [ ! -z "$cached_image" ]; then
|
||||
echo
|
||||
|
@ -3,7 +3,7 @@
|
||||
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
||||
src_dir="$(dirname "$script_dir")"
|
||||
|
||||
. "$script_dir/version.sh"
|
||||
. "$script_dir"/version.sh
|
||||
|
||||
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
|
||||
echo ;
|
||||
@ -13,23 +13,10 @@ if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
### Temporary HACK
|
||||
|
||||
## Should be in sync with `opam-pin.sh` and `opam-unpin.sh`
|
||||
opam pin --yes add --no-action --dev-repo sodium
|
||||
opam pin --yes add --no-action --dev-repo ocp-ocamlres
|
||||
opam pin --yes add --no-action --dev-repo ocplib-json-typed
|
||||
|
||||
### End of temporary HACK
|
||||
|
||||
## Force opam to take account of the new `tezos-deps.opam`
|
||||
opam pin --yes remove tezos-deps
|
||||
opam pin --yes add --no-action tezos-deps $src_dir
|
||||
"$script_dir"/opam-unpin.sh
|
||||
. "$script_dir"/opam-pin.sh
|
||||
|
||||
opam list --installed depext || opam install depext
|
||||
opam depext tezos-deps
|
||||
opam depext $packages
|
||||
|
||||
opam install tezos-deps --deps-only
|
||||
opam install $packages --deps-only
|
||||
|
@ -5,7 +5,7 @@ set -e
|
||||
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
||||
src_dir="$(dirname "$script_dir")"
|
||||
|
||||
opams=$(find "$src_dir" -name tezos-deps.opam -prune -or -name \*.opam -print)
|
||||
opams=$(find "$src_dir" -name \*.opam -print)
|
||||
|
||||
export OPAMYES=yes
|
||||
|
||||
@ -22,11 +22,14 @@ packages=$(opam list --short --all --sort $packages)
|
||||
|
||||
### Temporary HACK
|
||||
|
||||
## Should be in sync with `install-build-deps.sh` and `opam-unpin.sh`
|
||||
## Should be in sync with `opam-unpin.sh`
|
||||
opam pin add --no-action --dev-repo sodium
|
||||
opam pin add --no-action --dev-repo ocp-ocamlres
|
||||
opam pin add --no-action --dev-repo ocplib-json-typed
|
||||
|
||||
opam remove tezos-deps || true
|
||||
|
||||
### End of temporary HACK
|
||||
|
||||
echo
|
||||
echo "Pinned packages:"
|
||||
echo "$packages" | sed 's/^/ /'
|
||||
echo
|
||||
|
@ -11,7 +11,7 @@ opam pin remove $packages
|
||||
|
||||
### Temporary HACK
|
||||
|
||||
## Should be in sync with `install-build-deps.sh` and `opam-pin.sh`
|
||||
## Should be in sync with `opam-pin.sh`
|
||||
opam pin remove --no-action sodium
|
||||
opam pin remove --no-action ocp-ocamlres
|
||||
opam pin remove --no-action ocplib-json-typed
|
||||
|
@ -38,7 +38,14 @@ let fork_node ?(timeout = 4) ?(port = 18732) ?sandbox () =
|
||||
let null_fd = Unix.(openfile "/dev/null" [O_RDONLY] 0o644) in
|
||||
let exe =
|
||||
let (//) = Filename.concat in
|
||||
Sys.getcwd () // ".." // "bin_node" // "main.exe" in
|
||||
try
|
||||
let path = Sys.argv.(1) in
|
||||
if Filename.is_relative path then
|
||||
Sys.getcwd () // ".." // path
|
||||
else
|
||||
path
|
||||
with _ -> Sys.getcwd () // ".." // "bin_node" // "main.exe" in
|
||||
Format.eprintf "EXE %s@." exe ;
|
||||
let pid =
|
||||
Unix.create_process exe
|
||||
[| "tezos-node" ;
|
||||
|
@ -30,31 +30,27 @@
|
||||
|
||||
(alias
|
||||
((name runtest_endorsement)
|
||||
(deps (../../bin_node/main.exe
|
||||
sandbox.json))
|
||||
(deps (sandbox.json))
|
||||
(locks (/tcp-port/18100))
|
||||
(action (run ${exe:test_endorsement.exe}))))
|
||||
(action (chdir ${ROOT} (run ${exe:test_endorsement.exe} ${bin:tezos-node})))))
|
||||
|
||||
(alias
|
||||
((name runtest_origination)
|
||||
(deps (../../bin_node/main.exe
|
||||
sandbox.json))
|
||||
(deps (sandbox.json))
|
||||
(locks (/tcp-port/18200))
|
||||
(action (run ${exe:test_origination.exe}))))
|
||||
(action (chdir ${ROOT} (run ${exe:test_origination.exe} ${bin:tezos-node})))))
|
||||
|
||||
(alias
|
||||
((name runtest_transaction)
|
||||
(deps (../../bin_node/main.exe
|
||||
sandbox.json))
|
||||
(deps (sandbox.json))
|
||||
(locks (/tcp-port/18300))
|
||||
(action (run ${exe:test_transaction.exe}))))
|
||||
(action (chdir ${ROOT} (run ${exe:test_transaction.exe} ${bin:tezos-node})))))
|
||||
|
||||
(alias
|
||||
((name runtest_vote)
|
||||
(deps (../../bin_node/main.exe
|
||||
sandbox-vote.json))
|
||||
(deps (sandbox-vote.json))
|
||||
(locks (/tcp-port/18400))
|
||||
(action (run ${exe:test_vote.exe}))))
|
||||
(action (chdir ${ROOT} (run ${exe:test_vote.exe} ${bin:tezos-node})))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
|
21
test/tezos-test.opam
Normal file
21
test/tezos-test.opam
Normal file
@ -0,0 +1,21 @@
|
||||
opam-version: "1.2"
|
||||
version: "dev"
|
||||
maintainer: "contact@tezos.com"
|
||||
authors: [ "Tezos devteam" ]
|
||||
homepage: "https://www.tezos.com/"
|
||||
bug-reports: "https://gitlab.com/tezos/tezos/issues"
|
||||
dev-repo: "https://gitlab.com/tezos/tezos.git"
|
||||
license: "unreleased"
|
||||
depends: [
|
||||
"ocamlfind" { build }
|
||||
"jbuilder" { build & >= "1.0+beta15" }
|
||||
"tezos-node"
|
||||
"tezos-client"
|
||||
"kaputt"
|
||||
]
|
||||
build: [
|
||||
[ "jbuilder" "build" "-p" name "-j" jobs "@buildtest" ]
|
||||
]
|
||||
build-test: [
|
||||
[ "jbuilder" "runtest" "-p" name "-j" jobs ]
|
||||
]
|
@ -1,33 +0,0 @@
|
||||
opam-version: "1.2"
|
||||
version: "dev"
|
||||
maintainer: "contact@tezos.com"
|
||||
authors: [ "Tezos devteam" ]
|
||||
homepage: "https://www.tezos.com/"
|
||||
bug-reports: "https://gitlab.com/tezos/tezos/issues"
|
||||
dev-repo: "https://gitlab.com/tezos/tezos.git"
|
||||
license: "unreleased"
|
||||
depends: [
|
||||
"ocamlfind" { build }
|
||||
"jbuilder" { build & >= "1.0+beta15" }
|
||||
"base-bigarray"
|
||||
"base-threads"
|
||||
"conf-libev"
|
||||
"calendar"
|
||||
"cohttp" { >= "1.0.0" }
|
||||
"conduit"
|
||||
"ezjsonm" { >= "0.5.0" }
|
||||
"irmin" { >= "1.3" }
|
||||
"lwt" { >= "3.0.0" }
|
||||
"lwt_ssl"
|
||||
"menhir"
|
||||
"mtime" { >= "1.0.0" }
|
||||
"ocp-ocamlres" { >= "dev" }
|
||||
"ocplib-endian"
|
||||
"ocplib-json-typed"
|
||||
"reactiveData"
|
||||
"sodium" { >= "0.3.0" }
|
||||
"magic-mime"
|
||||
"leveldb" { >= "1.1.2" }
|
||||
"kaputt" # { test }
|
||||
"bisect_ppx" # { test }
|
||||
]
|
Loading…
Reference in New Issue
Block a user