This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git
The following commit(s) were added to refs/heads/main by this push:
new 8a5fd3d Updates for building fedora:39 (#251)
8a5fd3d is described below
commit 8a5fd3d673bf6001989435f14e3e40d172066cd2
Author: Brian Neradt <[email protected]>
AuthorDate: Fri Oct 20 16:37:10 2023 -0500
Updates for building fedora:39 (#251)
---
docker/fedora39/Dockerfile | 9 ++---
docker/fedora39/build_h3_tools.sh | 76 ++++++++++++++++++---------------------
2 files changed, 39 insertions(+), 46 deletions(-)
diff --git a/docker/fedora39/Dockerfile b/docker/fedora39/Dockerfile
index 9157a77..282ca64 100644
--- a/docker/fedora39/Dockerfile
+++ b/docker/fedora39/Dockerfile
@@ -6,10 +6,9 @@ FROM fedora:39
RUN <<EOF
set -e
- # TODO: Add these back in when fedora:39 hacks aren't needed anymore.
- #dnf -y install dnf-plugins-core
- #dnf repolist
- #dnf -y update
+ dnf -y install dnf-plugins-core
+ dnf repolist
+ dnf -y update
# Build tools.
dnf -y install \
@@ -51,6 +50,8 @@ RUN <<EOF
EOF
ARG PATH=/opt/bin:$PATH
+RUN pip3 install pipenv httpbin
+
#-------------------------------------------------------------------------------
# Install the HTTP/3 build tools, including openssl-quic.
#-------------------------------------------------------------------------------
diff --git a/docker/fedora39/build_h3_tools.sh
b/docker/fedora39/build_h3_tools.sh
index 3021e5d..5e2e463 100644
--- a/docker/fedora39/build_h3_tools.sh
+++ b/docker/fedora39/build_h3_tools.sh
@@ -37,7 +37,7 @@ set -e
# that it later removes.
# Update this as the draft we support updates.
-OPENSSL_BRANCH=${OPENSSL_BRANCH:-"openssl-3.1.0+quic+locks"}
+OPENSSL_BRANCH=${OPENSSL_BRANCH:-"openssl-3.1.2+quic"}
# Set these, if desired, to change these to your preferred installation
# directory
@@ -78,6 +78,14 @@ elif [ -e /etc/debian_version ]; then
echo
fi
+if [ `uname -s` = "Darwin" ]; then
+ echo
"+-------------------------------------------------------------------------+"
+ echo "| When building on a Mac, be aware that the Apple version of clang
may |"
+ echo "| fail to build curl due to the issue described here:
|"
+ echo "| https://github.com/curl/curl/issues/11391#issuecomment-1623890325
|"
+ echo
"+-------------------------------------------------------------------------+"
+fi
+
if [ -z ${QUICHE_BSSL_PATH+x} ]; then
QUICHE_BSSL_PATH=${TMP_QUICHE_BSSL_PATH:-"${BASE}/boringssl/lib"}
fi
@@ -114,33 +122,30 @@ else
OS="linux"
fi
-wget https://go.dev/dl/go1.20.1.${OS}-${ARCH}.tar.gz
-rm -rf ${BASE}/go && tar -C ${BASE} -xf go1.20.1.${OS}-${ARCH}.tar.gz
-rm go1.20.1.${OS}-${ARCH}.tar.gz
+wget https://go.dev/dl/go1.21.0.${OS}-${ARCH}.tar.gz
+rm -rf ${BASE}/go && tar -C ${BASE} -xf go1.21.0.${OS}-${ARCH}.tar.gz
+rm go1.21.0.${OS}-${ARCH}.tar.gz
+chmod -R a+rX ${BASE}
GO_BINARY_PATH=${BASE}/go/bin/go
if [ ! -d boringssl ]; then
git clone https://boringssl.googlesource.com/boringssl
cd boringssl
- git checkout 31bad2514d21f6207f3925ba56754611c462a873
+ git checkout e4f60679caa293c047be69f57fc48b46c7452327
cd ..
fi
cd boringssl
-mkdir -p build
-cd build
-
-# TODO: Remove -Wno-error=ignored-attributes when the following is fixed:
-# https://bugs.chromium.org/p/boringssl/issues/detail?id=642
cmake \
+ -B build \
-DGO_EXECUTABLE=${GO_BINARY_PATH} \
-DCMAKE_INSTALL_PREFIX=${BASE}/boringssl \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS='-Wno-error=ignored-attributes' \
- -DBUILD_SHARED_LIBS=1 ../
-
-${MAKE} -j ${num_threads}
-${MAKE} install
-cd ../..
+ -DBUILD_SHARED_LIBS=1
+cmake --build build -j ${num_threads}
+cmake --install build
+chmod -R a+rX ${BASE}
+cd ..
# Build quiche
# Steps borrowed from:
https://github.com/apache/trafficserver-ci/blob/main/docker/rockylinux8/Dockerfile
@@ -160,26 +165,27 @@ cp target/release/libquiche.a ${QUICHE_BASE}/lib/
[ -f target/release/libquiche.so ] && cp target/release/libquiche.so
${QUICHE_BASE}/lib/
cp quiche/include/quiche.h ${QUICHE_BASE}/include/
cp target/release/quiche.pc ${QUICHE_BASE}/lib/pkgconfig
+chmod -R a+rX ${BASE}
cd ..
-# OpenSSL needs special hackery ... Only grabbing the branch we need here...
Bryan has shit for network.
echo "Building OpenSSL with QUIC support"
[ ! -d openssl-quic ] && git clone -b ${OPENSSL_BRANCH} --depth 1
https://github.com/quictls/openssl.git openssl-quic
cd openssl-quic
-git checkout 6c41837e9234a8c250f02ae8aa30f44e91342ef6
./config enable-tls1_3 --prefix=${OPENSSL_PREFIX}
${MAKE} -j ${num_threads}
${MAKE} install_sw
+chmod -R a+rX ${BASE}
# The symlink target provides a more convenient path for the user while also
# providing, in the symlink source, the precise branch of the OpenSSL build.
ln -sf ${OPENSSL_PREFIX} ${OPENSSL_BASE}
+chmod -R a+rX ${BASE}
cd ..
# OpenSSL will install in /lib or lib64 depending upon the architecture.
-if [ -f "${OPENSSL_PREFIX}/lib/libssl.so" ]; then
+if [ -d "${OPENSSL_PREFIX}/lib" ]; then
OPENSSL_LIB="${OPENSSL_PREFIX}/lib"
-elif [ -f "${OPENSSL_PREFIX}/lib64/libssl.so" ]; then
+elif [ -d "${OPENSSL_PREFIX}/lib64" ]; then
OPENSSL_LIB="${OPENSSL_PREFIX}/lib64"
else
echo "Could not find the OpenSSL install library directory."
@@ -189,11 +195,7 @@ LDFLAGS=${LDFLAGS:-"-Wl,-rpath,${OPENSSL_LIB}"}
# Then nghttp3
echo "Building nghttp3..."
-if [ ! -d nghttp3 ]; then
- git clone --depth 1 -b v0.12.0 https://github.com/ngtcp2/nghttp3.git
- cd nghttp3
- cd ..
-fi
+[ ! -d nghttp3 ] && git clone --depth 1 -b v0.13.0
https://github.com/ngtcp2/nghttp3.git
cd nghttp3
autoreconf -if
./configure \
@@ -205,15 +207,12 @@ autoreconf -if
--enable-lib-only
${MAKE} -j ${num_threads}
${MAKE} install
+chmod -R a+rX ${BASE}
cd ..
# Now ngtcp2
echo "Building ngtcp2..."
-if [ ! -d ngtcp2 ]; then
- git clone --depth 1 -b v0.16.0 https://github.com/ngtcp2/ngtcp2.git
- cd ngtcp2
- cd ..
-fi
+[ ! -d ngtcp2 ] && git clone --depth 1 -b v0.17.0
https://github.com/ngtcp2/ngtcp2.git
cd ngtcp2
autoreconf -if
./configure \
@@ -225,18 +224,12 @@ autoreconf -if
--enable-lib-only
${MAKE} -j ${num_threads}
${MAKE} install
+chmod -R a+rX ${BASE}
cd ..
# Then nghttp2, with support for H3
echo "Building nghttp2 ..."
-if [ ! -d nghttp2 ]; then
- git clone https://github.com/tatsuhiro-t/nghttp2.git
- cd nghttp2
- # The following has a fix for builds on systems, like Mac, which do not have
- # libev. There isn't currently a release with this fix yet.
- git checkout 2c955ab76b42dfce58e812da6bbe8a526a125fea
- cd ..
-fi
+[ ! -d nghttp2 ] && git clone --depth 1 -b v1.55.1
https://github.com/tatsuhiro-t/nghttp2.git
cd nghttp2
autoreconf -if
if [ `uname -s` = "Darwin" ] || [ `uname -s` = "FreeBSD" ]
@@ -253,20 +246,18 @@ fi
PKG_CONFIG_PATH=${BASE}/lib/pkgconfig:${OPENSSL_LIB}/pkgconfig \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
+ LDFLAGS="${LDFLAGS} -L${OPENSSL_LIB}" \
--enable-http3 \
${ENABLE_APP}
${MAKE} -j ${num_threads}
${MAKE} install
+chmod -R a+rX ${BASE}
cd ..
# Then curl
echo "Building curl ..."
-[ ! -d curl ] && git clone https://github.com/curl/curl.git
+[ ! -d curl ] && git clone --depth 1 -b curl-8_2_1
https://github.com/curl/curl.git
cd curl
-# There isn't currently a released curl yet which has the updates for the above
-# ngtcp2 and nghttp3 library versions.
-git checkout 891e25edb8527bb8de79cdca6d943216c230e905
# On mac autoreconf fails on the first attempt with an issue finding ltmain.sh.
# The second runs fine.
autoreconf -fi || autoreconf -fi
@@ -281,4 +272,5 @@ autoreconf -fi || autoreconf -fi
LDFLAGS="${LDFLAGS}"
${MAKE} -j ${num_threads}
${MAKE} install
+chmod -R a+rX ${BASE}
cd ..