X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=.ci%2Fdeps.sh;h=b29ee12a7904b7b67db6444174b498b06bde05f2;hb=bead5aa5a467833171c69e5576595d28e7a5a6f4;hp=096f9934ae713751dd53551af9489923f385a8ed;hpb=7b8e06bde9b32a46b9b129d14886cb0fe0d52118;p=tinc diff --git a/.ci/deps.sh b/.ci/deps.sh index 096f9934..b29ee12a 100755 --- a/.ci/deps.sh +++ b/.ci/deps.sh @@ -6,25 +6,28 @@ deps_linux_alpine() { apk upgrade apk add \ - git binutils make autoconf automake gcc linux-headers diffutils texinfo \ - procps socat shadow sudo libgcrypt-dev \ - openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev + git binutils meson pkgconf gcc linux-headers diffutils \ + procps socat shadow sudo libgcrypt-dev texinfo gzip \ + openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev cmocka-dev } -deps_linux_debian() { - export DEBIAN_FRONTEND=noninteractive - - HOST=${HOST:-} +deps_linux_debian_mingw() { + apt-get install -y \ + mingw-w64 mingw-w64-tools \ + wine wine-binfmt \ + libgcrypt-mingw-w64-dev \ + "$@" +} +deps_linux_debian_linux() { if [ -n "$HOST" ]; then dpkg --add-architecture "$HOST" fi apt-get update - apt-get upgrade -y apt-get install -y \ - git binutils make autoconf automake gcc diffutils sudo texinfo netcat-openbsd procps socat \ + binutils make gcc \ zlib1g-dev:"$HOST" \ libssl-dev:"$HOST" \ liblzo2-dev:"$HOST" \ @@ -34,10 +37,41 @@ deps_linux_debian() { libgcrypt-dev:"$HOST" \ libminiupnpc-dev:"$HOST" \ libvdeplug-dev:"$HOST" \ + libcmocka-dev:"$HOST" \ "$@" if [ -n "$HOST" ]; then apt-get install -y crossbuild-essential-"$HOST" qemu-user + else + linux_openssl3 + fi +} + +deps_linux_debian() { + export DEBIAN_FRONTEND=noninteractive + + apt-get update + apt-get upgrade -y + apt-get install -y git pkgconf diffutils sudo texinfo \ + netcat-openbsd procps socat + + HOST=${HOST:-} + if [ "$HOST" = mingw ]; then + deps_linux_debian_mingw "$@" + else + deps_linux_debian_linux "$@" + fi + + . /etc/os-release + + # Debian Buster ships an old version of meson (0.49). + # MinGW cross-compilation requires something newer than 0.55 that ships in Bullseye, + # or it fails when looking for dependencies in the OpenSSL wrap. + if [ "${ID:-}/${VERSION_CODENAME:-}" = debian/buster ] || [ "$HOST" = mingw ]; then + apt-get install -y python3 python3-pip ninja-build + pip3 install meson + else + apt-get install -y meson fi } @@ -54,7 +88,7 @@ deps_linux_rhel() { yum upgrade -y yum install -y \ - git binutils make autoconf automake gcc diffutils sudo texinfo netcat procps systemd \ + git binutils make meson pkgconf gcc diffutils sudo texinfo-tex netcat procps systemd perl-IPC-Cmd \ findutils socat lzo-devel zlib-devel lz4-devel ncurses-devel readline-devel libgcrypt-devel "$@" if yum info openssl11-devel; then @@ -68,6 +102,29 @@ deps_linux_rhel() { fi } +linux_openssl3() { + src=/usr/local/src/openssl + ssl3=/opt/ssl3 + + mkdir -p $src + + git clone --depth 1 --branch openssl-3.0.2 https://github.com/openssl/openssl $src + cd $src + + ./Configure --prefix=$ssl3 --openssldir=$ssl3 + make -j"$(nproc)" + make install_sw + + if [ -f /etc/ld.so.conf ]; then + echo $ssl3/lib64 >>/etc/ld.so.conf + ldconfig -v + else + ldconfig -v $ssl3/lib64 + fi + + cd - +} + deps_linux() { . /etc/os-release @@ -82,6 +139,7 @@ deps_linux() { centos | almalinux | fedora) deps_linux_rhel "$@" + linux_openssl3 ;; *) exit 1 ;; @@ -89,7 +147,7 @@ deps_linux() { } deps_macos() { - brew install coreutils netcat automake lzo lz4 miniupnpc libgcrypt "$@" + brew install coreutils netcat lzo lz4 miniupnpc libgcrypt openssl meson "$@" pip3 install --user compiledb }