Skip to content

Commit

Permalink
Cherry-pick for release/2.4 (#4462)
Browse files Browse the repository at this point in the history
* Delete Prepare Machine and Checkout from Linux Package Testing (#4456)

* Prepare Machine and msquic checkout should not be necessary for testing linux packages

* Install dependencies with package

* Try to fix dependencies

* Fix validated set

* Publish package to more distros and refactoring (#4455)

* Publish package to more distros and refactoring

* fix?

* fix

* fix

* fix file dependencies

* fix

* fix

* fix

* fix

* Make rpm package for x86_64 (#4459)

* Make rpm package for x86_64

* Accidentally deleted debug flag

* fix syntax

* add azure linux3 arm

* increment patch 2.4.4

---------

Co-authored-by: Ahmet Ibrahim Aksoy <[email protected]>
  • Loading branch information
ami-GS and liveans authored Aug 15, 2024
1 parent 4a0265d commit 9a7a9d7
Show file tree
Hide file tree
Showing 19 changed files with 199 additions and 179 deletions.
12 changes: 6 additions & 6 deletions .azure/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ extends:
- container: linux_build_container # Default container
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-cross'
type: Linux
- container: ubuntu_2204_cross
- container: kernel5_15_cross
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-cross'
type: Linux
- container: ubuntu_2404_cross
- container: kernel6_8_cross
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-24.04-cross'
type: Linux

Expand Down Expand Up @@ -179,23 +179,23 @@ extends:
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Release
os: ubuntu_2204
kernel: "kernel5_15"
tls: openssl3
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
os: ubuntu_2204
kernel: "kernel5_15"
tls: openssl3
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Release
os: ubuntu_2404
kernel: "kernel6_8"
tls: openssl3
xdp: "-UseXdp"
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
os: ubuntu_2404
kernel: "kernel6_8"
tls: openssl3
xdp: "-UseXdp"

Expand Down
2 changes: 1 addition & 1 deletion .azure/OneBranch.Package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ extends:
ob_createvpack_owneralias: quicdev
ob_createvpack_description: msquic.$(Build.SourceBranchName)
ob_createvpack_versionAs: string
ob_createvpack_version: 2.4.3-$(Build.BuildId)
ob_createvpack_version: 2.4.4-$(Build.BuildId)
steps:
- task: DownloadPipelineArtifact@2
inputs:
Expand Down
188 changes: 99 additions & 89 deletions .azure/OneBranch.Publish.yml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .azure/OneBranch.PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ extends:
- container: linux_build_container # Default container
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-cross'
type: Linux
- container: ubuntu_2204_cross
- container: kernel5_15_cross
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-cross'
type: Linux
- container: ubuntu_2404_cross
- container: kernel6_8_cross
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-24.04-cross'
type: Linux

Expand Down Expand Up @@ -175,23 +175,23 @@ extends:
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Release
os: ubuntu_2204
kernel: "kernel5_15"
tls: openssl3
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
os: ubuntu_2204
kernel: "kernel5_15"
tls: openssl3
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Release
os: ubuntu_2404
kernel: "kernel6_8"
tls: openssl3
xdp: "-UseXdp"
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
os: ubuntu_2404
kernel: "kernel6_8"
tls: openssl3
xdp: "-UseXdp"

Expand Down
12 changes: 6 additions & 6 deletions .azure/obtemplates/build-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,39 @@ jobs:
- template: ./download-artifacts.yml
parameters:
platform: linux
linuxos: ubuntu_2004
kernel: kernel5_4
config: Release
tls: openssl
- template: ./download-artifacts.yml
parameters:
platform: linux
linuxos: ubuntu_2004
kernel: kernel5_4
config: Debug
tls: openssl

- template: ./download-artifacts.yml
parameters:
platform: linux
linuxos: ubuntu_2204
kernel: kernel5_15
config: Release
tls: openssl3
- template: ./download-artifacts.yml
parameters:
platform: linux
linuxos: ubuntu_2204
kernel: kernel5_15
config: Debug
tls: openssl3

- template: ./download-artifacts.yml
parameters:
platform: linux
linuxos: ubuntu_2404
kernel: kernel6_8
config: Release
tls: openssl3
- template: ./download-artifacts.yml
parameters:
platform: linux
linuxos: ubuntu_2404
kernel: kernel6_8
config: Debug
tls: openssl3

Expand Down
16 changes: 6 additions & 10 deletions .azure/obtemplates/build-linux-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ jobs:
strategy:
matrix:
ubuntu_2004:
os: ubuntu_2004
tls: openssl
kernel: "kernel5_4"
ubuntu_2204:
os: ubuntu_2204
tls: openssl3
kernel: "kernel5_15"
ubuntu_2404:
os: ubuntu_2404
tls: openssl3
kernel: "kernel6_8"
pool:
type: linux
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/artifacts/dist
ob_artifactSuffix: _$(os)_$(tls)
ob_artifactSuffix: _$(kernel) # drop_package_linux_${{ jobname }}_${{ kernel }}
steps:
- task: PowerShell@2
displayName: Prepare Build Machine
Expand All @@ -29,12 +26,12 @@ jobs:
arguments: -ForContainerBuild
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_build_$(os)_$(tls)_Debug
artifact: drop_build_linux_$(kernel)_Debug
path: $(Build.SourcesDirectory)/artifacts/bin/linux
pattern: '*.tar'
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_build_$(os)_$(tls)_Release
artifact: drop_build_linux_$(kernel)_Release
path: $(Build.SourcesDirectory)/artifacts/bin/linux
pattern: '*.tar'
- script: | # rebuild artifacts with correct permissions and symlink attributes.
Expand All @@ -46,7 +43,6 @@ jobs:
inputs:
pwsh: false
filePath: scripts/package-distribution.ps1
arguments: -OS $(os)
- script: | # prepare 2 sets of packages for signing with different keys (gen = general purpose, cbl = cbl-mariner)
mkdir $(Build.SourcesDirectory)/artifacts/dist/gen
find $(Build.SourcesDirectory)/artifacts/dist -type f -exec mv -t $(Build.SourcesDirectory)/artifacts/dist/gen/ {} +
Expand Down
38 changes: 19 additions & 19 deletions .azure/obtemplates/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ parameters:
config: ''
tls: 'openssl'
platform: 'linux'
os: 'ubuntu_2004'
kernel: 'kernel5_4'
xdp: ''

jobs:
- job: build_${{ parameters.os }}_${{ parameters.tls }}_${{ parameters.config }}
displayName: ${{ parameters.os }} ${{ parameters.tls }} ${{ parameters.config }}
- job: ${{ parameters.kernel }}_${{ parameters.config }} # this job name becomes artifact suffix in the build pipeline
displayName: ${{ parameters.platform }} ${{ parameters.kernel }} ${{ parameters.tls }} ${{ parameters.config }}
pool:
type: linux
variables:
Expand All @@ -17,48 +17,48 @@ jobs:
steps:
- task: PowerShell@2
displayName: Prepare Build Machine
${{ if eq(parameters.os, 'ubuntu_2004') }}:
${{ if eq(parameters.kernel, 'kernel5_4') }}:
target: linux_build_container
${{ elseif eq(parameters.os, 'ubuntu_2204') }}:
target: ubuntu_2204_cross
${{ elseif eq(parameters.kernel, 'kernel5_15') }}:
target: kernel5_15_cross
${{ else }}:
target: ubuntu_2404_cross
target: kernel6_8_cross
inputs:
pwsh: true
filePath: scripts/prepare-machine.ps1
arguments: -Tls ${{ parameters.tls }} -ForContainerBuild
- task: PowerShell@2
displayName: x64
${{ if eq(parameters.os, 'ubuntu_2004') }}:
${{ if eq(parameters.kernel, 'kernel5_4') }}:
target: linux_build_container
${{ elseif eq(parameters.os, 'ubuntu_2204') }}:
target: ubuntu_2204_cross
${{ elseif eq(parameters.kernel, 'kernel5_15') }}:
target: kernel5_15_cross
${{ else }}:
target: ubuntu_2404_cross
target: kernel6_8_cross
inputs:
pwsh: true
filePath: scripts/build.ps1
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} ${{ parameters.xdp }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
- task: PowerShell@2
displayName: arm64
${{ if eq(parameters.os, 'ubuntu_2004') }}:
${{ if eq(parameters.kernel, 'kernel5_4') }}:
target: linux_build_container
${{ elseif eq(parameters.os, 'ubuntu_2204') }}:
target: ubuntu_2204_cross
${{ elseif eq(parameters.kernel, 'kernel5_15') }}:
target: kernel5_15_cross
${{ else }}:
target: ubuntu_2404_cross
target: kernel6_8_cross
inputs:
pwsh: true
filePath: scripts/build.ps1
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch arm64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
- task: PowerShell@2
displayName: arm
${{ if eq(parameters.os, 'ubuntu_2004') }}:
${{ if eq(parameters.kernel, 'kernel5_4') }}:
target: linux_build_container
${{ elseif eq(parameters.os, 'ubuntu_2204') }}:
target: ubuntu_2204_cross
${{ elseif eq(parameters.kernel, 'kernel5_15') }}:
target: kernel5_15_cross
${{ else }}:
target: ubuntu_2404_cross
target: kernel6_8_cross
inputs:
pwsh: true
filePath: scripts/build.ps1
Expand Down
4 changes: 2 additions & 2 deletions .azure/obtemplates/download-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

parameters:
platform: ''
linuxos: 'ubuntu_2004'
kernel: 'kernel5_4'
tls: ''
config: ''

Expand All @@ -16,7 +16,7 @@ steps:
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
${{ if eq(parameters.platform, 'linux') }}:
artifact: drop_build_${{ parameters.platform }}_build_${{ parameters.linuxos }}_${{ parameters.tls }}_${{ parameters.config }}
artifact: drop_build_${{ parameters.platform }}_${{ parameters.kernel }}_${{ parameters.config }}
${{ else }}:
artifact: drop_build_${{ parameters.platform }}_build_${{ parameters.platform }}_${{ parameters.tls }}_${{ parameters.config }}
path: $(Build.SourcesDirectory)/artifacts/bin/${{ parameters.platform }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/package-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ jobs:
]
runs-on: ${{ matrix.vec.os }}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }}
- name: Download Package
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
Expand All @@ -80,7 +73,7 @@ jobs:
sudo apt-add-repository ppa:lttng/stable-2.13
sudo apt-get update
sudo apt-get install -y lttng-tools
sudo find -name "*.deb" -exec dpkg -i {} \;
sudo find -name "*.deb" -exec sudo apt install -y ./{} \;
rm artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}/libmsquic.so*
ls artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-reuse-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
find -name "*.tar" -exec tar -xvf '{}' \;
- name: Build Package
shell: pwsh
run: scripts/package-distribution.ps1
run: scripts/package-distribution.ps1 -OS ${{ inputs.os }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ message(STATUS "Platform version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

set(QUIC_MAJOR_VERSION 2)
set(QUIC_FULL_VERSION 2.4.3)
set(QUIC_FULL_VERSION 2.4.4)

if (WIN32)
set(CX_PLATFORM "windows")
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "msquic"
version = "2.4.3-beta"
version = "2.4.4-beta"
edition = "2018"
authors = ["Microsoft"]
description = "Microsoft implementation of the IETF QUIC protocol"
Expand Down
43 changes: 33 additions & 10 deletions scripts/make-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,41 @@ echo "ARCH=$ARCH PKGARCH=$PKGARCH ARTIFACTS=$ARTIFACTS"
mkdir -p ${OUTPUT}

if [ "$OS" == "linux" ]; then
# RedHat/CentOS
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}"
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
fi
if [ "$PKGARCH" == 'aarch64' ] || [ "$PKGARCH" == 'x86_64' ]; then
BITS='64bit'
fi
# XDP is only validated on Ubuntu 24.04 and x64
if [ "$XDP" == "False" ] || [[ "$ARCH" == arm* ]]; then
if [ "$XDP" == "True" ] && [[ "$ARCH" == x* ]]; then
echo "Building rpm package (XDP)"
fpm \
--force \
--input-type dir \
--output-type rpm \
--architecture ${PKGARCH} \
--name ${NAME} \
--provides ${NAME} \
--depends "libcrypto.so.${TLSVERSION}()(${BITS})" \
--depends "libnuma.so.1()(${BITS})" \
--depends "libxdp >= 1.4.0" \
--depends "libnl3 >= 3.0" \
--conflicts ${CONFLICTS} \
--version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
--description "${DESCRIPTION}" \
--vendor "${VENDOR}" \
--maintainer "${MAINTAINER}" \
--package "${OUTPUT}" \
--license MIT \
--url https://github.com/microsoft/msquic \
--log error \
${FILES} ${ARTIFACTS}/datapath_raw_xdp_kern.o=/usr/${LIBDIR}/datapath_raw_xdp_kern.o
else
echo "Building rpm package"
# RedHat/CentOS
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}"
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
fi
if [ "$PKGARCH" == 'aarch64' ] || [ "$PKGARCH" == 'x86_64' ]; then
BITS='64bit'
fi
fpm \
--force \
--input-type dir \
Expand Down
Loading

0 comments on commit 9a7a9d7

Please sign in to comment.