diff mbox series

[ima-evm-utils,v2,3/4] CI/CD: Prepare Ubuntu 24.04 (Noble) to run provider tests

Message ID 20240624220157.2248556-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 24, 2024, 10:01 p.m. UTC
From: Stefan Berger <stefanb@linux.ibm.com>

With provider support fixed for Ubuntu 24.04 (Noble), prepare for
enabling 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>
---
 ci/ubuntu.sh | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)
 mode change 120000 => 100755 ci/ubuntu.sh
diff mbox series

Patch

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