CentOS7 build-script
moonbaseDelta opened this issue · 2 comments
I found that comby may save many of my time and time of my collegues, but our network is full of CentOS7 machines.
I guess the build-script is yet sub-optimal, but it do it's job, and ready-to-ship files are in .../comby/_build/install/default/*
.
The only library found needed for client machines is libev
which can be installed right from yum.
# supposed that all lines are executing by root-user
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) # there will be a single prompt about path
mkdir /usr/share/tools -p
cd /usr/share/tools
yum install -y epel-release
yum group install -y "Development Tools"
yum install -y unzip bubblewrap patch zlib-devel.x86_64
yum install -y gmp gmp-devel libev-devel pcre-devel sqlite-devel
# that block needed for proper build of hacl_x25519 package
# 'cause by default CentOS uses gcc 4.8.5 which does not work with modern instuction sets
yum install -y centos-release-scl
yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++
source scl_source enable devtoolset-8
opam init -a
eval $(opam env)
opam switch create 4.11.0 4.11.0
eval $(opam env)
opam install dune
git clone https://github.com/comby-tools/comby
cd comby && opam install . --deps-only -y
eval $(opam env)
opam install cohttp-lwt-unix -y
make
make test
make install
Thanks for the note! I think this would work well as an extra script, and then something to point to in the README and comby.dev that mentions CentOS support.
As far as I know, for other distros (even for Gentoo) steps will be the same:
- Get basic dev-tools
- Install opam, init it, and install dune
- Clone sources
- Try to install opam-dependencies and then pick up what ever additional sys-packages you need to provide
- Run Make
- If all worked well just rearrange shell-history into nice script (and try to test it again on fresh environment)
More tough task will be to provide actual packages for package-repos or releases. It should be on community request, but if somebody need this I'll try to help