Opam: fixup required opam_version

This commit is contained in:
Pierre Boutillier 2018-06-27 23:49:57 +02:00 committed by Grégoire Henry
parent 99d0603a53
commit 7afc468082
3 changed files with 14 additions and 8 deletions

View File

@ -79,7 +79,7 @@ RUN mkdir ~/.ssh && \
RUN opam install --switch=/home/opam/tezos --yes opam-depext RUN opam install --switch=/home/opam/tezos --yes opam-depext
ENTRYPOINT [ "opam", "exec", "--" ] ENTRYPOINT [ "opam", "exec", "--set-switch", "--switch=/home/opam/tezos", "--" ]
CMD [ "/bin/bash" ] CMD [ "/bin/bash" ]
EOF EOF

View File

@ -50,9 +50,15 @@ done
# inline some of the test and doc dependencies. # inline some of the test and doc dependencies.
extra_packages="depext alcotest-lwt ocp-indent odoc ounit crowbar" extra_packages="depext alcotest-lwt ocp-indent odoc ounit crowbar"
git clone $opam_repository_url "$tmp_dir/opam-repository-master" if ! [ -f "$build_dir"/opam-repository-$opam_repository_tag.tar.gz ]; then
git -C "$tmp_dir"/opam-repository-master reset --hard $opam_repository_tag echo
rm -rf "$tmp_dir"/opam-repository-master/.git echo "### Fetching opam-repository-$opam_repository_tag.tar.gz ..."
echo
mkdir -p "$build_dir"
wget -O "$build_dir"/opam-repository-$opam_repository_tag.tgz \
https://gitlab.com/tezos/opam-repository/-/archive/$opam_repository_tag/opam-repository-$opam_repository_tag.tar.gz
fi
tar -C "$tmp_dir" -xzf "$build_dir"/opam-repository-$opam_repository_tag.tgz
## HACK: Once opam2 is released, we should use the `ocaml/opam` image ## HACK: Once opam2 is released, we should use the `ocaml/opam` image
## instead of this custom installation of ocaml and opam. ## instead of this custom installation of ocaml and opam.
@ -67,15 +73,15 @@ echo
cat <<EOF > "$tmp_dir"/Dockerfile cat <<EOF > "$tmp_dir"/Dockerfile
FROM alpine:3.7 FROM alpine:3.7
ENV PACKAGER "Tezos <ci@tezos.com>" ENV PACKAGER "Tezos <ci@tezos.com>"
COPY opam-repository-master opam-repository-master COPY opam-repository-$opam_repository_tag opam-repository-$opam_repository_tag
COPY opam /usr/local/bin/opam COPY opam /usr/local/bin/opam
RUN apk add --no-cache ocaml build-base m4 tar xz bzip2 curl perl rsync RUN apk add --no-cache ocaml build-base m4 tar xz bzip2 curl perl rsync
RUN opam init --disable-sandboxing --no-setup --yes default ./opam-repository-master RUN opam init --disable-sandboxing --no-setup --yes default ./opam-repository-$opam_repository_tag
RUN opam install --yes opam-bundle RUN opam install --yes opam-bundle
COPY opam-repository-tezos opam-repository-tezos COPY opam-repository-tezos opam-repository-tezos
RUN opam bundle --yes --output="tezos_bundle-$ocaml_version-$opam_repository_tag" \ RUN opam bundle --yes --output="tezos_bundle-$ocaml_version-$opam_repository_tag" \
--repository=opam-repository-tezos \ --repository=opam-repository-tezos \
--repository=opam-repository-master \ --repository=opam-repository-$opam_repository_tag \
--ocaml=$ocaml_version \ --ocaml=$ocaml_version \
$packages $extra_packages $packages $extra_packages
EOF EOF

View File

@ -6,7 +6,7 @@
alpine_version=3.6 alpine_version=3.6
ocaml_version=4.06.1 ocaml_version=4.06.1
hidapi_version=0.8.0_rc1 hidapi_version=0.8.0_rc1
opam_version=2.0.0~rc opam_version=2.0.0~rc3
opam_tag=2.0.0-rc3 opam_tag=2.0.0-rc3
opam_repository_tag=7db0db5dc53de44d1a0190b1310aa225e04df9ef opam_repository_tag=7db0db5dc53de44d1a0190b1310aa225e04df9ef
opam_repository_url=https://gitlab.com/tezos/opam-repository.git opam_repository_url=https://gitlab.com/tezos/opam-repository.git