summaryrefslogtreecommitdiff
path: root/app-crypt/tpm2-openssl
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/tpm2-openssl')
-rw-r--r--app-crypt/tpm2-openssl/Manifest7
-rw-r--r--app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch28
-rw-r--r--app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch132
-rw-r--r--app-crypt/tpm2-openssl/files/tpm2-openssl-1.3.0-tests-remove-systemd-ism.patch12
-rw-r--r--app-crypt/tpm2-openssl/tpm2-openssl-1.3.0.ebuild (renamed from app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild)5
5 files changed, 17 insertions, 167 deletions
diff --git a/app-crypt/tpm2-openssl/Manifest b/app-crypt/tpm2-openssl/Manifest
index 11808a412dde..f4211a38ff48 100644
--- a/app-crypt/tpm2-openssl/Manifest
+++ b/app-crypt/tpm2-openssl/Manifest
@@ -1,6 +1,5 @@
AUX tpm2-openssl-1.1.1-build-Fix-undefined-references-when-using-slibtool.patch 975 BLAKE2B 6a7b744513e026cbcc916543d3aa17300a63185eb112c3f1afb1eb4ffb0a02554c18759106c0c7d82efab9bc7b8c9e9f8809f06959edf763d6b38458416d160e SHA512 a4bc43d08f4cd70ba39a3396351894454edbb4ef284344a3184c8538685b15d85a8554619077d03d694e1355dcac5ab57976531f47158f5d2575c5bf7207e966
-AUX tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch 800 BLAKE2B 8e7795ec80c60308e1c2f4a20ff1fb41cada0479a0a5fc6ad393d066174460e9088728f535b4b5cff1cb57392f3eef683639255e8684274b346632db42d9f6e8 SHA512 946891b571d109272a8c82efd985cac4071ef97cd5be7109cc14652a1e92b27f05d4df0cab27ab2ac7bf0cd54181ae9b480123dbc97c6ab0c6400d33f7c4bd30
-AUX tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch 3843 BLAKE2B 12447aa593fed49b360b6a6f51d53c363b5034f434fb9a8ae5099d13199a11b2359b79ed6a5d8af41a4ca98d77426ca652b72b322dbc7e830dfd722ed5c43b25 SHA512 1b26c5aef886cbfebd012088ecec6782d7abb63ef2dde27cd21fce0982c8394445686e08efc6760a4b0217bfb45560aa6594c242f61bb59fd35706110cc7cae1
-DIST tpm2-openssl-1.2.0.tar.gz 424967 BLAKE2B 9bcdc47b2eb94329caace24f10e8c234cdd92250ee7fdd4f6156c278328c0103a2285234e64f48f951f5e1b77e72341eb129ee996e628641a4032849fe5a62ce SHA512 4a12c83a0687768cd972a8d7e544f4bba2debcd24d7da2d2ee9adb097d1565bb1d69d1c448edff05f040b95700847293a8e33bfe92f43e536d13bc734ded1e1d
-EBUILD tpm2-openssl-1.2.0.ebuild 1083 BLAKE2B 7fcacbfd8cfe0569513244b5084897d9566027f00132f44a98370da2b3ac90424eafc089c31404b98a30fa375238a908b97d183469ad2e94946245647a0c6d0f SHA512 493e5735afb7b29c1b5ae5ad4af17d99f0d1ee15d269b2dec54bd490f810af73f0bd443056b2af2dbefd5127667ca456e87bd719e822011f36414253203d0c34
+AUX tpm2-openssl-1.3.0-tests-remove-systemd-ism.patch 369 BLAKE2B 0b476e113e58ce5ab5ed832aaa09ed25b8fd1ad2e47fc29fa6e5d14b129e7f13b77987ca0ed3c910c81703c0e16d261b22d72a45815a5b703d62f4df2bd1ae8f SHA512 aeb0568c9b5a803872f6b13630006132fe153163f7af90c487345b8017e79b0a6e46c30a47cab17e39140cb2e8f41ee2e88e6f5d26741fe7fbc2cb9c1bc6ad40
+DIST tpm2-openssl-1.3.0.tar.gz 432730 BLAKE2B 458cf61324f28b6c9c7d970afa7a4fe4b22f556db986e6ae4db823e876e680e338145b5519b1e351006e43adaf6b7ee7639f42cd7d1ef0b9d96f833b6016c1e4 SHA512 7f226a7a3040fb33863e24d2c3712b2cc816d872c907ac4e05f38502bf52a979a522cad5a27f1984d3ce6cc75b6d4c5098ba025cce9eedac1b7f605300210650
+EBUILD tpm2-openssl-1.3.0.ebuild 990 BLAKE2B 317d87daca6663816f1841f879eb47ed2a1f17b5734de3637b2c8efdeeba2cc6ff3d57ddd2c7ccc5604f570ba5298d706a3230d4cc2aa217b17e32b9cb8052e7 SHA512 37d71c1fd01839db3f91fa5938648a0117689cf20326f5acc7bfb75d0e9708583c1249fe7d7a59c5fae2c0ebaf005912acb6551784a729413ae23a1773797e3d
MISC metadata.xml 495 BLAKE2B 2859f35839200edede18d42a8c1e04c3eb2a8983e35a6aa73352d20f5f1a9b8e2685091ab6c121442bbc23ef232ab701cfe1e5eb2f1e2fbd8c3fa1cafd51b749 SHA512 cf93a17e4ef6cf8e9294fadd0b7a33ccf21196bf648f1239a99cb0d8675c130e7e5ab7990b9a292f0814072ee3d234085d92e250f72b86ad854d81a68a642879
diff --git a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch
deleted file mode 100644
index 326fb10767f9..000000000000
--- a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From be35c35ace48647bb73ae5028db7e8caaccd038d Mon Sep 17 00:00:00 2001
-From: Adrian Freihofer <adrian.freihofer@gmail.com>
-Date: Fri, 8 Dec 2023 14:24:17 +0100
-Subject: [PATCH 1/2] Makefile: add run-with-simulator to extra dists
-
-The run-with-simulator script is executed by the make check step of
-the rpm build process. Therefore it should be packaged into the release
-tar bundles.
-
-Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
----
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 160d84e..994a8e3 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -143,5 +143,6 @@ EXTRA_DIST = \
- VERSION \
- $(TESTS_SHELL) \
- $(SH_LOG_COMPILER) \
-+ test/run-with-simulator \
- test/ec_pki/openssl.cnf \
- test/rsa_pki/etc
---
-2.43.0
-
diff --git a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch
deleted file mode 100644
index 33b51b6b1028..000000000000
--- a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-diff --git a/home/salahx/Downloads/run-with-simulator b/home/salahx/Downloads/run-with-simulator
-new file mode 100755
-index 000000000000..e29b591f8d8b
---- /dev/null
-+++ b/test/run-with-simulator
-@@ -0,0 +1,126 @@
-+#!/bin/bash
-+# SPDX-License-Identifier: BSD-3-Clause
-+
-+SIM_PORT_DATA=2321
-+SIM_PORT_CMD=$((SIM_PORT_DATA+1))
-+
-+# Run from top dir of this repository
-+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-+TOP_DIR="$(realpath "$SCRIPT_DIR/..")"
-+cd "$TOP_DIR" || { echo "Error: cd to cd $TOP_DIR failed"; exit 1; }
-+
-+
-+verify_simulator_is_running() {
-+ local pid_tpm=$1
-+
-+ sleep 1
-+ ss -lntp4 2> /dev/null | grep "${pid_tpm}" | grep -q "${SIM_PORT_DATA}"
-+ ret_data=$?
-+ ss -lntp4 2> /dev/null | grep "${pid_tpm}" | grep -q "${SIM_PORT_CMD}"
-+ ret_cmd=$?
-+ if [ $ret_data -eq 0 ] && [ $ret_cmd -eq 0 ]; then
-+ echo "Simulator with PID ${pid_tpm} bound to port ${SIM_PORT_DATA} and ${SIM_PORT_CMD} successfully."
-+ return 0
-+ else
-+ echo "Error: Port conflict? Cleaning up PID: ${pid_tpm}"
-+ return 1
-+ fi
-+}
-+
-+build_tpm2_simulator_ibm() (
-+ test -d ibmtpm && return
-+ echo "---> compiling IBM tpm simulator"
-+ mkdir ibmtpm
-+ curl -Ls https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm1682.tar.gz | tar xz -C ibmtpm
-+ cd ibmtpm/src && make
-+)
-+
-+start_tpm2_simulator_ibm () {
-+ build_tpm2_simulator_ibm || return 1
-+
-+ echo "---> starting IBM tpm simulator"
-+ ibmtpm/src/tpm_server &
-+ pid_tpm=$!
-+ verify_simulator_is_running $pid_tpm
-+}
-+
-+start_tpm2_simulator_swtpm () {
-+ echo "---> starting swtpm simulator"
-+ swtpm socket --tpm2 \
-+ --server port=$SIM_PORT_DATA \
-+ --ctrl type=tcp,port=$SIM_PORT_CMD \
-+ --flags not-need-init \
-+ --tpmstate dir="$PWD" \
-+ --seccomp action=none &
-+ pid_tpm=$!
-+ verify_simulator_is_running $pid_tpm
-+}
-+
-+start_dbusd () {
-+ echo "---> starting dbus daemon"
-+ dbus-daemon --session --print-address > /tmp/bus-socket-path.txt &
-+ sleep 1
-+ DBUS_SESSION_BUS_ADDRESS="$(tail -n1 /tmp/bus-socket-path.txt)"
-+ export DBUS_SESSION_BUS_ADDRESS
-+}
-+
-+start_tpm2_abrmd() {
-+ local tabrmd_tcti=$1
-+
-+ echo "---> starting abrmd"
-+ local tabrmd_name="com.intel.tss2.Tabrmd${SIM_PORT_DATA}"
-+ tpm2-abrmd --session --dbus-name="${tabrmd_name}" --tcti "${tabrmd_tcti}:host=localhost,port=${SIM_PORT_DATA}" &
-+ TCTI_ADDRESS="tabrmd:bus_name=${tabrmd_name},bus_type=session"
-+ TPM2TOOLS_TCTI="$TCTI_ADDRESS"
-+ TPM2OPENSSL_TCTI="$TCTI_ADDRESS"
-+ export TPM2TOOLS_TCTI
-+ export TPM2OPENSSL_TCTI
-+ sleep 1
-+# busctl --address="${DBUS_SESSION_BUS_ADDRESS}" list | grep "$tabrmd_name"
-+}
-+
-+start_tpm2_sim_env() {
-+ local sim_type=$1
-+
-+ start_dbusd
-+
-+ if [ "$sim_type" = "swtpm" ]; then
-+ start_tpm2_simulator_swtpm || return 1
-+ start_tpm2_abrmd swtpm || return 1
-+ elif [ "$sim_type" = "ibm" ]; then
-+ start_tpm2_simulator_ibm || return 1
-+ start_tpm2_abrmd mssim || return 1
-+ else
-+ echo "invalid tpm simulator typ"
-+ return 1
-+ fi
-+}
-+
-+make_check () {
-+ echo "Running make check"
-+ openssl version
-+ tpm2_getcap properties-fixed | head -n 20
-+ make check
-+}
-+
-+function cleanup()
-+{
-+ pkill -P $$
-+}
-+trap cleanup EXIT
-+
-+build_tpm2_openssl() {
-+ ./bootstrap
-+ ./configure CC=gcc --enable-op-digest --enable-op-cipher
-+ make
-+}
-+
-+SIM_TYPE=${1:-swtpm}
-+SKIP_BUILD=${2:-build}
-+if [ "$SKIP_BUILD" = "skip-build" ]; then
-+ echo "Skipping the build"
-+else
-+ build_tpm2_openssl || { echo "Compiling tpm2-openssl failed"; exit 1; }
-+fi
-+start_tpm2_sim_env "${SIM_TYPE}" || { echo "Starting tpm2 simulator failed ($SIM_TYPE)"; exit 1; }
-+make_check || { echo "tpm2-openssl make check failed"; exit 1; }
diff --git a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.3.0-tests-remove-systemd-ism.patch b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.3.0-tests-remove-systemd-ism.patch
new file mode 100644
index 000000000000..128b47c18cbe
--- /dev/null
+++ b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.3.0-tests-remove-systemd-ism.patch
@@ -0,0 +1,12 @@
+diff --git a/test/run-with-simulator b/test/run-with-simulator
+index e29b591..570e7a5 100755
+--- a/test/run-with-simulator
++++ b/test/run-with-simulator
+@@ -76,7 +76,6 @@ start_tpm2_abrmd() {
+ export TPM2TOOLS_TCTI
+ export TPM2OPENSSL_TCTI
+ sleep 1
+- busctl --address="${DBUS_SESSION_BUS_ADDRESS}" list | grep "$tabrmd_name"
+ }
+
+ start_tpm2_sim_env() {
diff --git a/app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild b/app-crypt/tpm2-openssl/tpm2-openssl-1.3.0.ebuild
index 03767401d089..a8b8ade64d07 100644
--- a/app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild
+++ b/app-crypt/tpm2-openssl/tpm2-openssl-1.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -29,9 +29,8 @@ BDEPEND="
virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}/${PN}-1.2.0-tests-run-with-simulator-in-container.patch"
- "${FILESDIR}/${PN}-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch"
"${FILESDIR}/${PN}-1.1.1-build-Fix-undefined-references-when-using-slibtool.patch"
+ "${FILESDIR}/${PN}-1.3.0-tests-remove-systemd-ism.patch"
)
src_prepare() {