Skip to content

Commit f338e3e

Browse files
ubuntu24.04 initial commit and several updates.
* The pip venv setup is skipped and passed by using "--break-system-packages" and setting "ENV PIP_BREAK_SYSTEM_PACKAGES=1" The pip upgrade is not necessary. * libgmp is added to compile swtpm * ubuntu18.04 fedora32-ossl3 ubuntu20.4 fedora-34-libressl removed * switched to ibmtpm1682 for opensuse-leap * ubuntu 22.04 use pip setuptools 62.0.0 Signed-off-by: Juergen Repp <juergen_repp@web.de>
1 parent 970c6b1 commit f338e3e

File tree

8 files changed

+120
-11
lines changed

8 files changed

+120
-11
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
distro: [
15-
"fedora-32", "fedora-32-ossl3", "fedora-34", "fedora-34-libressl",
15+
"fedora-32", "fedora-34",
1616
"opensuse-leap-15.2", "opensuse-leap", "opensuse-leap-ossl3",
17-
"ubuntu-18.04", "ubuntu-20.04",
18-
"ubuntu-20.04.arm32v7", "ubuntu-20.04.arm64v8",
1917
"fedora-32.ppc64le",
2018
"alpine-3.15",
21-
"ubuntu-20.04-ossl3", "ubuntu-22.04", "ubuntu-22.04-mbedtls-3.1"
19+
"ubuntu-22.04", "ubuntu-22.04-mbedtls-3.1", "ubuntu-24.04"
2220
]
2321
steps:
2422
-

fedora-32.docker.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ RUN dnf -y install \
6262
acl \
6363
json-glib-devel \
6464
libusb-devel \
65-
libftdi-devel
65+
libftdi-devel \
66+
gmp-devel
6667

6768
include(`pip3.m4')
6869
include(`autoconf.m4')

modules/ibmtpm1682.m4

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ARG ibmtpm_name=ibmtpm1682
2+
RUN cd /tmp \
3+
&& wget $WGET_EXTRA_FLAGS -L "https://downloads.sourceforge.net/project/ibmswtpm2/$ibmtpm_name.tar.gz" \
4+
&& sha1sum $ibmtpm_name.tar.gz | grep ^651800d0b87cfad55b004fbdace4e41dce800a61 \
5+
&& mkdir -p $ibmtpm_name \
6+
&& tar xv --no-same-owner -f $ibmtpm_name.tar.gz -C $ibmtpm_name \
7+
&& rm $ibmtpm_name.tar.gz \
8+
&& cd $ibmtpm_name/src \
9+
&& sed -i 's/0x300000ff/0x310000ff/' TpmToOsslMath.h \
10+
&& sed -i 's/-DTPM_NUVOTON/-DTPM_NUVOTON $(CFLAGS)/' makefile \
11+
&& CFLAGS="-DNV_MEMORY_SIZE=32768 -DMIN_EVICT_OBJECTS=7" make -j$(nproc) \
12+
&& cp tpm_server /usr/local/bin \
13+
&& rm -fr /tmp/$ibmtpm_name

modules/pip3-withoutupgrade.m4

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# upgrade pip first so packages are not reinstalled using a version other than what may have been specified
3+
#
4+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
5+
# install everything in one shot so we don't get a newer version of a package we specified. Ie if a module has dep on cryptogtraphy
6+
# and we install it in different phases pip will upgrade cryptography
7+
RUN pkgs="cryptography==$PYCRYPTO_VERSION pyyaml cpp-coveralls pyasn1 pyasn1_modules python-pkcs11 \
8+
bcrypt==$PYBCRYPT_VERSION setuptools"; \
9+
pkgs=$(echo "$pkgs" | sed -E 's/==\s+/ /g'); \
10+
python3 -m pip install $pkgs --break-system-packages

modules/pip3.m4

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
RUN python3 -m pip install --upgrade pip
55
# install everything in one shot so we don't get a newer version of a package we specified. Ie if a module has dep on cryptogtraphy
66
# and we install it in different phases pip will upgrade cryptography
7-
RUN pkgs="cryptography==$PYCRYPTO_VERSION pyyaml cpp-coveralls pyasn1 pyasn1_modules python-pkcs11 \
8-
bcrypt==$PYBCRYPT_VERSION setuptools"; \
7+
RUN pkgs="cryptography==$PYCRYPTO_VERSION pyyaml cpp-coveralls pyasn1 pyasn1_modules \
8+
bcrypt==$PYBCRYPT_VERSION setuptools==62.0.0"; \
9+
echo $pkgs; \
910
pkgs=$(echo "$pkgs" | sed -E 's/==\s+/ /g'); \
10-
python3 -m pip install $pkgs
11+
python3 -m pip install $pkgs; \
12+
python3 -m pip install python-pkcs11

opensuse-leap-15.2.docker.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ RUN zypper -n in \
5555
python \
5656
python-pip \
5757
libusb-devel \
58-
libftdi1-devel
58+
libftdi1-devel \
59+
gmp-devel
5960

6061
include(`autoconf.m4')
6162
include(`python3.7.2.m4')

opensuse-leap.docker.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ RUN zypper -n in \
5555
libftdi1-devel \
5656
libnettle-devel \
5757
p11-kit-devel \
58-
openssh-common
58+
openssh-common \
59+
gmp-devel
5960

6061
include(`autoconf.m4')
6162
include(`python3.7.2.m4')
@@ -74,7 +75,7 @@ RUN stat /usr/share/aclocal-1.15/python.m4
7475
RUN patch -d / -p1 < /tmp/python.patch
7576
RUN rm /tmp/python.patch
7677

77-
include(`ibmtpm1637.m4')
78+
include(`ibmtpm1682.m4')
7879

7980
ENV LIBTPMS_AUTOGEN_EXTRA="--libdir=/usr/lib64"
8081
ENV SWTPM_MAKE_EXTRA="CFLAGS=\"-I/usr/include/libseccomp/\""

ubuntu-24.04.docker.m4

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
FROM ubuntu:noble
2+
3+
LABEL org.opencontainers.image.source https://github.com/tpm2-software/tpm2-software-container
4+
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV PIP_REQUIRE_VIRTUALENV=0
7+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
8+
RUN apt-get update && \
9+
apt-get install -y \
10+
autoconf-archive \
11+
curl \
12+
libcmocka0 \
13+
libcmocka-dev \
14+
net-tools \
15+
build-essential \
16+
git \
17+
pkg-config \
18+
gcc \
19+
g++ \
20+
m4 \
21+
libtool \
22+
automake \
23+
libgcrypt20-dev \
24+
libssl-dev \
25+
autoconf \
26+
gnulib \
27+
wget \
28+
doxygen \
29+
libdbus-1-dev \
30+
libglib2.0-dev \
31+
clang \
32+
clang-tools \
33+
pandoc \
34+
lcov \
35+
libcurl4-openssl-dev \
36+
dbus-x11 \
37+
vim-common \
38+
libsqlite3-dev \
39+
iproute2 \
40+
libtasn1-6-dev \
41+
socat \
42+
libseccomp-dev \
43+
expect \
44+
gawk \
45+
libjson-c-dev \
46+
libengine-pkcs11-openssl \
47+
default-jre \
48+
default-jdk \
49+
sqlite3 \
50+
libnss3-tools \
51+
python3 \
52+
python3-pip \
53+
libyaml-dev \
54+
libmbedtls-dev \
55+
uuid-dev \
56+
opensc \
57+
gnutls-bin \
58+
rustc \
59+
acl \
60+
libjson-glib-dev \
61+
libusb-1.0-0-dev \
62+
libftdi-dev \
63+
uthash-dev
64+
65+
include(`pip3-withoutupgrade.m4')
66+
67+
ARG ibmtpm_name=ibmtpm1682
68+
RUN cd /tmp \
69+
&& wget $WGET_EXTRA_FLAGS -L "https://downloads.sourceforge.net/project/ibmswtpm2/$ibmtpm_name.tar.gz" \
70+
&& sha256sum $ibmtpm_name.tar.gz | grep ^3cb642f871a17b23d50b046e5f95f449c2287415fc1e7aeb4bdbb8920dbcb38f \
71+
&& mkdir -p $ibmtpm_name \
72+
&& tar xv --no-same-owner -f $ibmtpm_name.tar.gz -C $ibmtpm_name \
73+
&& rm $ibmtpm_name.tar.gz \
74+
&& cd $ibmtpm_name/src \
75+
&& sed -i 's/-DTPM_NUVOTON/-DTPM_NUVOTON $(CFLAGS)/' makefile \
76+
&& CFLAGS="-DNV_MEMORY_SIZE=32768 -DMIN_EVICT_OBJECTS=7" make -j$(nproc) \
77+
&& cp tpm_server /usr/local/bin \
78+
&& rm -fr /tmp/$ibmtpm_name
79+
80+
include(`autoconf.m4')
81+
include(`junit.m4')
82+
83+
WORKDIR /

0 commit comments

Comments
 (0)