Skip to content

Commit

Permalink
Add support for Debian 12 (Azure#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
damonbarry authored Apr 23, 2024
1 parent b9fff6b commit d1cf0f5
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
matrix:
os:
- 'debian:11'
- 'debian:12'
# EL8 VMs spontaneously lose ssh after installing updates. Disable it for now.
# - 'platform:el8'
- 'platform:el9'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- 'centos:7'
- 'debian:10'
- 'debian:11'
- 'debian:12'
# EL8 VMs spontaneously lose ssh after installing updates. Disable it for now.
# - 'platform:el8'
- 'platform:el9'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
container_os:
- 'debian:11-slim'
- 'debian:12-slim'
- 'redhat/ubi8:latest'
- 'redhat/ubi9:latest'
- 'ubuntu:20.04'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
matrix:
container_os:
- 'debian:11-slim'
- 'debian:12-slim'
- 'redhat/ubi8:latest'
- 'redhat/ubi9:latest'
- 'ubuntu:20.04'
Expand Down Expand Up @@ -74,6 +75,7 @@ jobs:
matrix:
container_os:
- 'debian:11-slim'
- 'debian:12-slim'
- 'redhat/ubi8:latest'
- 'redhat/ubi9:latest'
- 'ubuntu:20.04'
Expand Down
18 changes: 18 additions & 0 deletions ci/e2e-tests/test-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ get_package() {
artifact_name='debian-11-slim'
;;

'debian:12')
artifact_name='debian-12-slim'
;;

'platform:el8')
artifact_name='redhat-ubi8-latest'
;;
Expand Down Expand Up @@ -172,6 +176,11 @@ get_package() {
printf '%s/%s\n' "$PWD" aziot-identity-service_*_amd64.deb
;;

'debian:12')
unzip -j package.zip 'debian12/amd64/aziot-identity-service_*_amd64.deb' >&2
printf '%s/%s\n' "$PWD" aziot-identity-service_*_amd64.deb
;;

'platform:el8')
unzip -j package.zip 'el8/amd64/aziot-identity-service-*.x86_64.rpm' -x '*-debuginfo-*.rpm' '*-devel-*.rpm' >&2
printf '%s/%s\n' "$PWD" aziot-identity-service-*.x86_64.rpm
Expand Down Expand Up @@ -540,6 +549,15 @@ case "$OS" in
vm_image='Debian:debian-11:11-gen2:latest'
;;

'debian:12')
# Not listed on the docs.microsoft.com page, but credativ doesn't publish Debian 10+ images.
#
# az vm image list --all \
# --publisher 'Debian' --offer 'debian-12' --sku '12-gen2' \
# --query "[?publisher == 'Debian' && offer == 'debian-12'].{ sku: sku, version: version, urn: urn }" --output table
vm_image='Debian:debian-12:12-gen2:latest'
;;

'platform:el8')
# az vm image list --all \
# --publisher 'almalinux' --offer 'almalinux' --sku '8_4-gen2' \
Expand Down
32 changes: 31 additions & 1 deletion ci/install-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
# OS packages

case "$OS:$ARCH" in
'debian:11:amd64'|'ubuntu:20.04:amd64'|'ubuntu:22.04:amd64')
'debian:11:amd64'|'debian:12:amd64'|'ubuntu:20.04:amd64'|'ubuntu:22.04:amd64')
export DEBIAN_FRONTEND=noninteractive
export TZ=UTC

Expand All @@ -38,6 +38,21 @@ case "$OS:$ARCH" in
llvm-dev pkg-config
;;

'debian:12:arm32v7')
export DEBIAN_FRONTEND=noninteractive
export TZ=UTC

dpkg --add-architecture armhf
apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends \
acl autoconf autoconf-archive automake build-essential ca-certificates \
clang cmake crossbuild-essential-armhf curl git jq \
libc-dev:armhf libclang1 libcurl4-openssl-dev:armhf \
libltdl-dev:armhf libssl-dev:armhf libtool libtss2-dev:armhf \
llvm-dev pkg-config:armhf
;;

'debian:11:aarch64')
export DEBIAN_FRONTEND=noninteractive
export TZ=UTC
Expand All @@ -52,6 +67,21 @@ case "$OS:$ARCH" in
libltdl-dev:arm64 libssl-dev:arm64 libtool libtss2-dev:arm64 \
llvm-dev pkg-config
;;

'debian:12:aarch64')
export DEBIAN_FRONTEND=noninteractive
export TZ=UTC

dpkg --add-architecture arm64
apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends \
acl autoconf autoconf-archive automake build-essential ca-certificates \
clang cmake crossbuild-essential-arm64 curl git jq \
libc-dev:arm64 libclang1 libcurl4-openssl-dev:arm64 \
libltdl-dev:arm64 libssl-dev:arm64 libtool libtss2-dev:arm64 \
llvm-dev pkg-config:arm64
;;

'platform:el8:amd64')
export VENDOR_LIBTSS=1
Expand Down
4 changes: 2 additions & 2 deletions ci/install-runtime-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ case "$OS" in
esac
;;

'debian:11'|'ubuntu:20.04'|'ubuntu:22.04')
'debian:11'|'debian:12'|'ubuntu:20.04'|'ubuntu:22.04')
# openssl 1.1.1 for Debian 11, Ubuntu 20.04, RHEL 8
# openssl 3.0 for Ubuntu 22.04, RHEL 9
# openssl 3.0 for Debian 12, Ubuntu 22.04, RHEL 9

apt-get update -y
DEBIAN_FRONTEND=noninteractive TZ=UTC apt-get install -y curl jq openssl ca-certificates libtss2-dev
Expand Down
7 changes: 6 additions & 1 deletion ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ case "$OS" in
"packages/$TARGET_DIR/"
;;

'debian:11'|'ubuntu:20.04'|'ubuntu:22.04')
'debian:11'|'debian:12'|'ubuntu:20.04'|'ubuntu:22.04')
DEBIAN_FRONTEND=noninteractive TZ=UTC apt-get install -y dh-make debhelper

make ARCH="$ARCH" PACKAGE_VERSION="$PACKAGE_VERSION" PACKAGE_RELEASE="$PACKAGE_RELEASE" VENDOR_LIBTSS="${VENDOR_LIBTSS:-0}" V=1 deb
Expand All @@ -59,6 +59,11 @@ case "$OS" in
DBGSYM_EXT='deb'
;;

'debian:12')
TARGET_DIR="debian12/$ARCH"
DBGSYM_EXT='deb'
;;

'ubuntu:20.04')
TARGET_DIR="ubuntu2004/$ARCH"
DBGSYM_EXT='ddeb'
Expand Down
2 changes: 1 addition & 1 deletion ci/test-aziot-key-openssl-engine-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd /src
. ./ci/install-runtime-deps.sh

case "$OS" in
'debian:11'|'platform:el8'|'platform:el9'|'ubuntu:20.04'|'ubuntu:22.04')
'debian:11'|'debian:12'|'platform:el8'|'platform:el9'|'ubuntu:20.04'|'ubuntu:22.04')
cp \
./target/debug/libaziot_key_openssl_engine_shared.so \
"$(openssl version -e | sed -E 's/^ENGINESDIR: "(.*)"$/\1/')/aziot_keys.so"
Expand Down
4 changes: 4 additions & 0 deletions docs-dev/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ This repository contains three services - `aziot-certd`, `aziot-identityd` and `
<td><code>debian:11-slim</code></td>
</tr>
<tr>
<td>Debian 12</td>
<td><code>debian:12-slim</code></td>
</tr>
<tr>
<td>Ubuntu 20.04</td>
<td><code>ubuntu:20.04</code></td>
</tr>
Expand Down

0 comments on commit d1cf0f5

Please sign in to comment.