Skip to content

Commit b65f9a2

Browse files
JuergenReppSITAndreasFuchsTPM
authored andcommitted
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 <[email protected]>
1 parent 970c6b1 commit b65f9a2

11 files changed

+126
-17
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
-

.github/workflows/publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
distro: [
16-
"fedora-32", "fedora-32-ossl3", "fedora-34", "fedora-34-libressl",
16+
"fedora-32", "fedora-34",
1717
"opensuse-leap-15.2", "opensuse-leap", "opensuse-leap-ossl3",
18-
"ubuntu-18.04", "ubuntu-20.04",
19-
"ubuntu-20.04.arm32v7", "ubuntu-20.04.arm64v8",
2018
"fedora-32.ppc64le",
2119
"alpine-3.15",
22-
"ubuntu-20.04-ossl3", "ubuntu-22.04", "ubuntu-22.04-mbedtls-3.1"
20+
"ubuntu-22.04", "ubuntu-22.04-mbedtls-3.1", "ubuntu-24.04"
2321
]
2422
if: "github.repository_owner == 'tpm2-software'"
2523
steps:

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')

fedora-32.ppc64le.docker.m4

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

6869
# The last python cryptography version that allows no rust
6970
# per https://github.com/pyca/cryptography/blob/75be92de8e3bce9adcec42ef3967bed0d4500902/CHANGELOG.rst#3500---2021-09-29

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-22.04-mbedtls-3.1.docker.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ RUN apt-get update && \
5656
acl \
5757
libjson-glib-dev \
5858
libusb-1.0-0-dev \
59-
libftdi-dev
59+
libftdi-dev \
60+
libgmp-dev
6061

6162
include(`pip3.m4')
6263

0 commit comments

Comments
 (0)