From: Vitaly Chikunov <vt@altlinux.org>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
linux-integrity@vger.kernel.org
Subject: [PATCH] CI: Add GitHub Actions for ALT Linux
Date: Sun, 11 Jul 2021 14:55:39 +0300 [thread overview]
Message-ID: <20210711115539.2400162-1-vt@altlinux.org> (raw)
Build on Sisyphus branch which is bleeding edge repo.
Package manager is apt-rpm (not APT as it may look from the scripts).
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
.github/workflows/ci.yml | 13 ++++++++++++-
ci/alt.sh | 24 ++++++++++++++++++++++++
tests/install-swtpm.sh | 14 +++++++++++---
3 files changed, 47 insertions(+), 4 deletions(-)
create mode 100755 ci/alt.sh
diff --git .github/workflows/ci.yml .github/workflows/ci.yml
index f08733a..088c041 100644
--- .github/workflows/ci.yml
+++ .github/workflows/ci.yml
@@ -92,6 +92,11 @@ jobs:
CC: clang
TSS: ibmtss
+ - container: "alt:sisyphus"
+ env:
+ CC: gcc
+ TSS: libtpm2-tss-devel
+
container:
image: ${{ matrix.container }}
env: ${{ matrix.env }}
@@ -112,7 +117,13 @@ jobs:
ARCH="$ARCH" CC="$CC" TSS="$TSS" ./ci/$INSTALL.sh
- name: Build swtpm
- run: if [ ! "$VARIANT" ]; then which tpm_server || which swtpm || ./tests/install-swtpm.sh; fi
+ run: |
+ if [ ! "$VARIANT" ]; then
+ which tpm_server || which swtpm || \
+ if which tssstartup; then
+ ./tests/install-swtpm.sh;
+ fi
+ fi
- name: Compiler version
run: $CC --version
diff --git ci/alt.sh ci/alt.sh
new file mode 100755
index 0000000..4996890
--- /dev/null
+++ ci/alt.sh
@@ -0,0 +1,24 @@
+#!/bin/sh -ex
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Build env install script for ALT Linux.
+
+apt-get update -y
+
+# rpm-build brings basic build envirenment with gcc, make, autotools, etc.
+apt-get install -y \
+ $CC \
+ $TSS \
+ asciidoc \
+ attr \
+ docbook-style-xsl \
+ libattr-devel \
+ libkeyutils-devel \
+ libssl-devel \
+ openssl \
+ openssl-gost-engine \
+ rpm-build \
+ wget \
+ xsltproc \
+ xxd
+
diff --git tests/install-swtpm.sh tests/install-swtpm.sh
index 2666748..b344a69 100755
--- tests/install-swtpm.sh
+++ tests/install-swtpm.sh
@@ -1,5 +1,13 @@
-#!/bin/sh
-set -ex
+#!/bin/sh -ex
+
+# No need to run via sudo if we already have permissions, such as in Docker.
+# Some distros do not have sudo configured for root:
+# `root is not in the sudoers file. This incident will be reported.'
+if [ -w /usr/local/bin ]; then
+ SUDO=
+else
+ SUDO=sudo
+fi
version=1637
@@ -9,5 +17,5 @@ cd ibmtpm$version
tar --no-same-owner -xvzf ../download
cd src
make -j$(nproc)
-sudo cp tpm_server /usr/local/bin/
+$SUDO cp tpm_server /usr/local/bin/
cd ../..
--
2.29.3
next reply other threads:[~2021-07-11 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-11 11:55 Vitaly Chikunov [this message]
2021-07-11 11:58 ` [PATCH] CI: Add GitHub Actions for ALT Linux Vitaly Chikunov
2021-07-11 21:43 ` Mimi Zohar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210711115539.2400162-1-vt@altlinux.org \
--to=vt@altlinux.org \
--cc=dmitry.kasatkin@gmail.com \
--cc=linux-integrity@vger.kernel.org \
--cc=zohar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.