Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update msquic for Ubuntu 22 #808

Merged
merged 4 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/ubuntu/22.04/helix/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,36 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python && \
pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \
pip install ./helix_scripts-*-py3-none-any.whl

# Build MsQuic as we don't have binary package.
# Ubuntu 22 does not have OpenSSL 1.1.1 package and MsQuic releases currently do not work with OpenSSL 3.
# Support for OpenSSL 3 is early progress in msquic/main.
RUN apt-get update && \
apt-get install -qq -y \
liblttng-ust-dev \
ruby-dev && \
gem install fpm && \
cd /tmp && \
git clone --depth 1 --single-branch --branch main --recursive https://github.com/dotnet/msquic && \
cd msquic/src/msquic && \
cmake -B build/linux/x64_openssl3 \
-DQUIC_OUTPUT_DIR=/tmp/msquic/src/msquic/artifacts/bin/linux/x64_Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/x64_openssl3 --config Release && \
./scripts/make-packages.sh --tls openssl3 --config Release && \
dpkg -i artifacts/packages/linux/x64_Release_openssl3/libmsquic_*.deb && \
rm -rf /tmp/msquic && \
apt-get remove -y \
liblttng-ust-dev \
ruby-dev && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*

# create helixbot user and give rights to sudo without password
RUN /usr/sbin/adduser --disabled-password --gecos '' --uid 1000 --shell /bin/bash --ingroup adm helixbot && \
chmod 755 /root && \
Expand Down
42 changes: 28 additions & 14 deletions src/ubuntu/22.04/helix/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,35 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python && \
export CRYPTOGRAPHY_DONT_BUILD_RUST=1 && \
pip install ./helix_scripts-*-py3-none-any.whl

# build MsQuic as we don't have binary package.
# Ubuntu 22 does not have OpenSSL 1.1.1 package and Quic releases currently do not work with OpenSsl3
# support for OpenSSL3 is early progress in msquic/main
RUN cd /tmp && \
mkdir pwsh && \
cd pwsh && \
curl -LO https://github.com/PowerShell/PowerShell/releases/download/v7.2.5/powershell-7.2.5-linux-arm64.tar.gz && \
echo "709265A0B99232CD8AB6F8A02C01F3AEE94262B959E1A4B0FD871C8789C07396 powershell-7.2.5-linux-arm64.tar.gz" | sha256sum --check - && \
tar xf powershell-7.2.5-linux-arm64.tar.gz && \
cd .. && \
git clone --depth 1 --single-branch --branch main --recursive https://github.com/dotnet/msquic && \
cd msquic/src/msquic && PATH=~/.dotnet/tools:$PATH /tmp/pwsh/pwsh scripts/build.ps1 -arch arm64 -Config Release -DisableTools -DisableTest -DisablePerf -UseSystemOpenSSLCrypto && \
cp artifacts/bin/linux/arm64_Release_openssl3/libmsquic.so.2 artifacts/bin/linux/arm64_Release_openssl3/libmsquic.lttng.so.2.2.0 /usr/lib/aarch64-linux-gnu && \
#Build MsQuic as we don't have binary package.
# Ubuntu 22 does not have OpenSSL 1.1.1 package and MsQuic releases currently do not work with OpenSSL 3.
# Support for OpenSSL 3 is early progress in msquic/main.
RUN apt-get update && \
apt-get install -qq -y \
liblttng-ust-dev \
ruby-dev && \
gem install fpm && \
cd /tmp && \
rm -r pwsh msquic
git clone --depth 1 --single-branch --branch main --recursive https://github.com/dotnet/msquic && \
cd msquic/src/msquic && \
cmake -B build/linux/arm64_openssl3 \
-DQUIC_OUTPUT_DIR=/tmp/msquic/src/msquic/artifacts/bin/linux/arm64_Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/arm64_openssl3 --config Release && \
./scripts/make-packages.sh --tls openssl3 --config Release && \
dpkg -i artifacts/packages/linux/arm64_Release_openssl3/libmsquic_*.deb && \
rm -rf /tmp/msquic && \
apt-get remove -y \
liblttng-ust-dev \
ruby-dev && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*

# (we use two users here to ensure volume mounting works with two possible UIDs of the host UID)
RUN adduser --disabled-password --gecos '' --uid 1001 --shell /bin/bash --ingroup adm helixbot && \
Expand Down