diff mbox series

[ima-evm-utils,3/3] CI/CD: Also enable Ubuntu 24.04 (Noble) and run provider tests

Message ID 20240621005912.1365462-4-stefanb@linux.vnet.ibm.com (mailing list archive)
State New
Headers show
Series Enable and disable OpenSSL provider tests | expand

Commit Message

Stefan Berger June 21, 2024, 12:59 a.m. UTC
From: Stefan Berger <stefanb@linux.ibm.com>

With provider support fixed for Ubuntu 24.04 (Noble), enable testing with
it. To test provider support on Ubuntu, make a copy of the debian.sh
install file and enable the installation of provider support there.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 .github/workflows/ci.yml |  5 ++++
 .travis.yml              |  4 +++
 ci/ubuntu.sh             | 63 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 71 insertions(+), 1 deletion(-)
 mode change 120000 => 100755 ci/ubuntu.sh

Comments

Mimi Zohar June 21, 2024, 11:08 a.m. UTC | #1
On Thu, 2024-06-20 at 20:59 -0400, Stefan Berger wrote:
> From: Stefan Berger <stefanb@linux.ibm.com>
> 
> With provider support fixed for Ubuntu 24.04 (Noble), enable testing with
> it. To test provider support on Ubuntu, make a copy of the debian.sh
> install file and enable the installation of provider support there.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
>  .github/workflows/ci.yml |  5 ++++
>  .travis.yml              |  4 +++
>  ci/ubuntu.sh             | 63 +++++++++++++++++++++++++++++++++++++++-
>  3 files changed, 71 insertions(+), 1 deletion(-)
>  mode change 120000 => 100755 ci/ubuntu.sh
> 
> diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
> index 5d67c70..772eb34 100644
> --- a/.github/workflows/ci.yml
> +++ b/.github/workflows/ci.yml
> @@ -143,6 +143,11 @@ jobs:
>                CC: gcc
>                TSS: ibmtss
>  
> +          - container: "ubuntu:noble"
> +            env:
> +              CC: gcc
> +              TSS: ibmtss
> +
>            - container: "ubuntu:xenial"
>              env:
>                CC: clang
> diff --git a/.travis.yml b/.travis.yml
> index af82040..0c78958 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -43,6 +43,10 @@ matrix:
>            env: DISTRO=ubuntu:mantic TSS=ibmtss
>            compiler: gcc
>  
> +        - os: linux
> +          env: DISTRO=ubuntu:noble TSS=ibmtss
> +          compiler: gcc
> +

There needs to be a balance between testing all releases and a good subset. 
There's already 3 Ubuntu releases - jammy, mantic, xenial.  Please don't add
another release, but roll them - noble, mantic, xenial (or bionic).

>          - os: linux
>            env: DISTRO=ubuntu:jammy TSS=ibmtss COMPILE_SSL=openssl-3.0.5
>            compiler: gcc
> diff --git a/ci/ubuntu.sh b/ci/ubuntu.sh
> deleted file mode 120000
> index 0edcb8b..0000000
> --- a/ci/ubuntu.sh
> +++ /dev/null
> @@ -1 +0,0 @@
> -debian.sh
> \ No newline at end of file
> diff --git a/ci/ubuntu.sh b/ci/ubuntu.sh
> new file mode 100755
> index 0000000..e1bae43
> --- /dev/null
> +++ b/ci/ubuntu.sh
> @@ -0,0 +1,62 @@
> +#!/bin/sh
> +# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
> +set -ex
> +
> +# workaround for Ubuntu impish asking to interactively configure tzdata
> +export DEBIAN_FRONTEND="noninteractive"
> +
> +if [ -z "$CC" ]; then
> +	echo "missing \$CC!" >&2
> +	exit 1
> +fi
> +
> +# debian.*.sh must be run first
> +if [ "$ARCH" ]; then
> +	ARCH=":$ARCH"
> +	unset CC
> +else
> +	apt update
> +fi
> +
> +# ibmswtpm2 requires gcc
> +[ "$CC" = "gcc" ] || CC="gcc $CC"
> +
> +case "$TSS" in
> +ibmtss) TSS="libtss-dev";;
> +tpm2-tss) TSS="libtss2-dev";;
> +'') echo "Missing TSS!" >&2; exit 1;;
> +*) [ "$TSS" ] && echo "Unsupported TSS: '$TSS'!" >&2; exit 1;;
> +esac
> +
> +apt="apt install -y --no-install-recommends"
> +
> +$apt \
> +	$CC $TSS \
> +	asciidoc \
> +	attr \
> +	autoconf \
> +	automake \
> +	diffutils \
> +	debianutils \
> +	docbook-xml \
> +	docbook-xsl \
> +	e2fsprogs \
> +	gzip \
> +	libattr1-dev$ARCH \
> +	libkeyutils-dev$ARCH \
> +	libssl-dev$ARCH \
> +	libtool \
> +	make \
> +	openssl \
> +	pkg-config \
> +	procps \
> +	sudo \
> +	util-linux \
> +	wget \
> +	xsltproc \
> +	gawk
> +
> +$apt xxd || $apt vim-common
> +$apt libengine-gost-openssl || true
> +$apt softhsm2 gnutls-bin libengine-pkcs11-openssl || true
> +$apt softhsm2 gnutls-bin pkcs11-provider || true
diff mbox series

Patch

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5d67c70..772eb34 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -143,6 +143,11 @@  jobs:
               CC: gcc
               TSS: ibmtss
 
+          - container: "ubuntu:noble"
+            env:
+              CC: gcc
+              TSS: ibmtss
+
           - container: "ubuntu:xenial"
             env:
               CC: clang
diff --git a/.travis.yml b/.travis.yml
index af82040..0c78958 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,6 +43,10 @@  matrix:
           env: DISTRO=ubuntu:mantic TSS=ibmtss
           compiler: gcc
 
+        - os: linux
+          env: DISTRO=ubuntu:noble TSS=ibmtss
+          compiler: gcc
+
         - os: linux
           env: DISTRO=ubuntu:jammy TSS=ibmtss COMPILE_SSL=openssl-3.0.5
           compiler: gcc
diff --git a/ci/ubuntu.sh b/ci/ubuntu.sh
deleted file mode 120000
index 0edcb8b..0000000
--- a/ci/ubuntu.sh
+++ /dev/null
@@ -1 +0,0 @@ 
-debian.sh
\ No newline at end of file
diff --git a/ci/ubuntu.sh b/ci/ubuntu.sh
new file mode 100755
index 0000000..e1bae43
--- /dev/null
+++ b/ci/ubuntu.sh
@@ -0,0 +1,62 @@ 
+#!/bin/sh
+# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
+set -ex
+
+# workaround for Ubuntu impish asking to interactively configure tzdata
+export DEBIAN_FRONTEND="noninteractive"
+
+if [ -z "$CC" ]; then
+	echo "missing \$CC!" >&2
+	exit 1
+fi
+
+# debian.*.sh must be run first
+if [ "$ARCH" ]; then
+	ARCH=":$ARCH"
+	unset CC
+else
+	apt update
+fi
+
+# ibmswtpm2 requires gcc
+[ "$CC" = "gcc" ] || CC="gcc $CC"
+
+case "$TSS" in
+ibmtss) TSS="libtss-dev";;
+tpm2-tss) TSS="libtss2-dev";;
+'') echo "Missing TSS!" >&2; exit 1;;
+*) [ "$TSS" ] && echo "Unsupported TSS: '$TSS'!" >&2; exit 1;;
+esac
+
+apt="apt install -y --no-install-recommends"
+
+$apt \
+	$CC $TSS \
+	asciidoc \
+	attr \
+	autoconf \
+	automake \
+	diffutils \
+	debianutils \
+	docbook-xml \
+	docbook-xsl \
+	e2fsprogs \
+	gzip \
+	libattr1-dev$ARCH \
+	libkeyutils-dev$ARCH \
+	libssl-dev$ARCH \
+	libtool \
+	make \
+	openssl \
+	pkg-config \
+	procps \
+	sudo \
+	util-linux \
+	wget \
+	xsltproc \
+	gawk
+
+$apt xxd || $apt vim-common
+$apt libengine-gost-openssl || true
+$apt softhsm2 gnutls-bin libengine-pkcs11-openssl || true
+$apt softhsm2 gnutls-bin pkcs11-provider || true