mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-07-01 21:31:14 +02:00
travis: Switch to docker based builds
This requires to have distro specific install scripts and build.sh script. For now ibmswtpm2 is compiled just for native builds (depends on gcc, compiled natively). libtmps/swtpm could be used. Signed-off-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Bruno Meneguele <bmeneg@redhat.com>(Fedora,CentOS 8(RHEL actually)) [zohar@linux.ibm.com: removed debugging in travis/fedora.sh] Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
50
travis/alpine.sh
Executable file
50
travis/alpine.sh
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
|
||||
set -ex
|
||||
|
||||
if [ -z "$CC" ]; then
|
||||
echo "missing \$CC!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$TSS" in
|
||||
ibmtss) echo "No IBM TSS package, will be installed from git" >&2; TSS=;;
|
||||
tpm2-tss) TSS="tpm2-tss-dev";;
|
||||
'') echo "Missing TSS!" >&2; exit 1;;
|
||||
*) echo "Unsupported TSS: '$TSS'!" >&2; exit 1;;
|
||||
esac
|
||||
|
||||
# ibmswtpm2 requires gcc
|
||||
[ "$CC" = "gcc" ] || CC="gcc $CC"
|
||||
|
||||
apk update
|
||||
|
||||
apk add \
|
||||
$CC $TSS \
|
||||
asciidoc \
|
||||
attr \
|
||||
attr-dev \
|
||||
autoconf \
|
||||
automake \
|
||||
diffutils \
|
||||
docbook-xml \
|
||||
docbook-xsl \
|
||||
keyutils-dev \
|
||||
libtool \
|
||||
libxslt \
|
||||
linux-headers \
|
||||
make \
|
||||
musl-dev \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
pkgconfig \
|
||||
procps \
|
||||
sudo \
|
||||
wget \
|
||||
which \
|
||||
xxd
|
||||
|
||||
if [ ! "$TSS" ]; then
|
||||
apk add git
|
||||
../tests/install-tss.sh
|
||||
fi
|
1
travis/centos.sh
Symbolic link
1
travis/centos.sh
Symbolic link
@ -0,0 +1 @@
|
||||
fedora.sh
|
23
travis/debian.cross-compile.sh
Executable file
23
travis/debian.cross-compile.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
|
||||
set -ex
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
echo "missing \$ARCH!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$ARCH" in
|
||||
arm64) gcc_arch="aarch64";;
|
||||
ppc64el) gcc_arch="powerpc64le";;
|
||||
s390x) gcc_arch="$ARCH";;
|
||||
*) echo "unsupported arch: '$ARCH'!" >&2; exit 1;;
|
||||
esac
|
||||
|
||||
dpkg --add-architecture $ARCH
|
||||
apt update
|
||||
|
||||
apt install -y --no-install-recommends \
|
||||
dpkg-dev \
|
||||
gcc-${gcc_arch}-linux-gnu \
|
||||
libc6-dev-${ARCH}-cross
|
11
travis/debian.i386.sh
Executable file
11
travis/debian.i386.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
|
||||
set -ex
|
||||
|
||||
dpkg --add-architecture i386
|
||||
apt update
|
||||
|
||||
apt install -y --no-install-recommends \
|
||||
linux-libc-dev:i386 \
|
||||
gcc-multilib \
|
||||
pkg-config:i386
|
54
travis/debian.sh
Executable file
54
travis/debian.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
|
||||
set -ex
|
||||
|
||||
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 \
|
||||
gzip \
|
||||
libattr1-dev$ARCH \
|
||||
libkeyutils-dev$ARCH \
|
||||
libssl-dev$ARCH \
|
||||
libtool \
|
||||
make \
|
||||
openssl \
|
||||
pkg-config \
|
||||
procps \
|
||||
sudo \
|
||||
wget \
|
||||
xsltproc \
|
||||
|
||||
$apt xxd || $apt vim-common
|
||||
$apt libengine-gost-openssl1.1$ARCH || true
|
43
travis/fedora.sh
Executable file
43
travis/fedora.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
|
||||
set -e
|
||||
|
||||
if [ -z "$CC" ]; then
|
||||
echo "missing \$CC!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$TSS" in
|
||||
ibmtss) TSS="tss2-devel";;
|
||||
tpm2-tss) TSS="tpm2-tss-devel";;
|
||||
'') echo "Missing TSS!" >&2; exit 1;;
|
||||
*) echo "Unsupported TSS: '$TSS'!" >&2; exit 1;;
|
||||
esac
|
||||
|
||||
# ibmswtpm2 requires gcc
|
||||
[ "$CC" = "gcc" ] || CC="gcc $CC"
|
||||
|
||||
yum -y install \
|
||||
$CC $TSS \
|
||||
asciidoc \
|
||||
attr \
|
||||
autoconf \
|
||||
automake \
|
||||
diffutils \
|
||||
docbook-xsl \
|
||||
gzip \
|
||||
keyutils-libs-devel \
|
||||
libattr-devel \
|
||||
libtool \
|
||||
libxslt \
|
||||
make \
|
||||
openssl \
|
||||
openssl-devel \
|
||||
pkg-config \
|
||||
procps \
|
||||
sudo \
|
||||
vim-common \
|
||||
wget \
|
||||
which
|
||||
|
||||
yum -y install docbook5-style-xsl || true
|
1
travis/opensuse.sh
Symbolic link
1
travis/opensuse.sh
Symbolic link
@ -0,0 +1 @@
|
||||
tumbleweed.sh
|
45
travis/tumbleweed.sh
Executable file
45
travis/tumbleweed.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
|
||||
set -ex
|
||||
|
||||
if [ -z "$CC" ]; then
|
||||
echo "missing \$CC!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$TSS" in
|
||||
ibmtss) TSS="ibmtss-devel";;
|
||||
tpm2-tss) TSS="tpm2-0-tss-devel";;
|
||||
'') echo "Missing TSS!" >&2; exit 1;;
|
||||
*) echo "Unsupported TSS: '$TSS'!" >&2; exit 1;;
|
||||
esac
|
||||
|
||||
# clang has some gcc dependency
|
||||
[ "$CC" = "gcc" ] || CC="gcc $CC"
|
||||
|
||||
zypper --non-interactive install --force-resolution --no-recommends \
|
||||
$CC $TSS \
|
||||
asciidoc \
|
||||
attr \
|
||||
autoconf \
|
||||
automake \
|
||||
diffutils \
|
||||
docbook_5 \
|
||||
docbook5-xsl-stylesheets \
|
||||
gzip \
|
||||
ibmswtpm2 \
|
||||
keyutils-devel \
|
||||
libattr-devel \
|
||||
libopenssl-devel \
|
||||
libtool \
|
||||
make \
|
||||
openssl \
|
||||
pkg-config \
|
||||
procps \
|
||||
sudo \
|
||||
vim \
|
||||
wget \
|
||||
which \
|
||||
xsltproc
|
||||
|
||||
[ -f /usr/lib/ibmtss/tpm_server ] && ln -s /usr/lib/ibmtss/tpm_server /usr/local/bin
|
1
travis/ubuntu.sh
Symbolic link
1
travis/ubuntu.sh
Symbolic link
@ -0,0 +1 @@
|
||||
debian.sh
|
Reference in New Issue
Block a user