* [PATCH] CI: Add GitHub Actions for ALT Linux
@ 2021-07-11 11:55 Vitaly Chikunov
2021-07-11 11:58 ` Vitaly Chikunov
2021-07-11 21:43 ` Mimi Zohar
0 siblings, 2 replies; 3+ messages in thread
From: Vitaly Chikunov @ 2021-07-11 11:55 UTC (permalink / raw)
To: Mimi Zohar, Dmitry Kasatkin, linux-integrity
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] CI: Add GitHub Actions for ALT Linux
2021-07-11 11:55 [PATCH] CI: Add GitHub Actions for ALT Linux Vitaly Chikunov
@ 2021-07-11 11:58 ` Vitaly Chikunov
2021-07-11 21:43 ` Mimi Zohar
1 sibling, 0 replies; 3+ messages in thread
From: Vitaly Chikunov @ 2021-07-11 11:58 UTC (permalink / raw)
To: Mimi Zohar, Dmitry Kasatkin, linux-integrity
Subject missing ima-evm-utils, I will resend.
Sorry,
On Sun, Jul 11, 2021 at 02:55:39PM +0300, Vitaly Chikunov wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] CI: Add GitHub Actions for ALT Linux
2021-07-11 11:55 [PATCH] CI: Add GitHub Actions for ALT Linux Vitaly Chikunov
2021-07-11 11:58 ` Vitaly Chikunov
@ 2021-07-11 21:43 ` Mimi Zohar
1 sibling, 0 replies; 3+ messages in thread
From: Mimi Zohar @ 2021-07-11 21:43 UTC (permalink / raw)
To: Vitaly Chikunov, Mimi Zohar, Dmitry Kasatkin, linux-integrity
Hi Vitaly,
For now Travis is still being supported. Perhaps the subject could be
"CI: add support for ALT linux".
On Sun, 2021-07-11 at 14:55 +0300, Vitaly Chikunov wrote:
> 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
This change isn't specific to ALT Linus. Could you separate this out
please?
>
> - 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
>
ditto
thanks,
Mimi
> 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 ../..
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-11 21:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-11 11:55 [PATCH] CI: Add GitHub Actions for ALT Linux Vitaly Chikunov
2021-07-11 11:58 ` Vitaly Chikunov
2021-07-11 21:43 ` Mimi Zohar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).