From: "Daniel Weismüller" <daniel.weismueller@ipfire.org>
To: development@lists.ipfire.org
Cc: "Daniel Weismüller" <daniel.weismueller@ipfire.org>
Subject: [PATCH 2/3] libtpms: New package
Date: Tue, 8 Jul 2025 17:04:27 +0200 [thread overview]
Message-ID: <20250708150509.8131-2-daniel.weismueller@ipfire.org> (raw)
In-Reply-To: <20250708150509.8131-1-daniel.weismueller@ipfire.org>
This package is required for libvirt to emulate TPM devices.
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
---
config/rootfiles/packages/libtpms | 41 ++++++++++++++
lfs/libtpms | 91 +++++++++++++++++++++++++++++++
make.sh | 1 +
3 files changed, 133 insertions(+)
create mode 100644 config/rootfiles/packages/libtpms
create mode 100644 lfs/libtpms
diff --git a/config/rootfiles/packages/libtpms b/config/rootfiles/packages/libtpms
new file mode 100644
index 000000000..6fce3ebd8
--- /dev/null
+++ b/config/rootfiles/packages/libtpms
@@ -0,0 +1,41 @@
+#usr/include/libtpms
+#usr/include/libtpms/tpm_error.h
+#usr/include/libtpms/tpm_library.h
+#usr/include/libtpms/tpm_memory.h
+#usr/include/libtpms/tpm_nvfilename.h
+#usr/include/libtpms/tpm_tis.h
+#usr/include/libtpms/tpm_types.h
+#usr/lib/libtpms.a
+#usr/lib/libtpms.la
+#usr/lib/libtpms.so
+usr/lib/libtpms.so.0
+usr/lib/libtpms.so.0.10.1
+#usr/lib/pkgconfig/libtpms.pc
+#usr/share/man/man3/TPMLIB_CancelCommand.3
+#usr/share/man/man3/TPMLIB_ChooseTPMVersion.3
+#usr/share/man/man3/TPMLIB_DecodeBlob.3
+#usr/share/man/man3/TPMLIB_GetInfo.3
+#usr/share/man/man3/TPMLIB_GetState.3
+#usr/share/man/man3/TPMLIB_GetTPMProperty.3
+#usr/share/man/man3/TPMLIB_GetVersion.3
+#usr/share/man/man3/TPMLIB_MainInit.3
+#usr/share/man/man3/TPMLIB_Process.3
+#usr/share/man/man3/TPMLIB_RegisterCallbacks.3
+#usr/share/man/man3/TPMLIB_SetBufferSize.3
+#usr/share/man/man3/TPMLIB_SetDebugFD.3
+#usr/share/man/man3/TPMLIB_SetDebugLevel.3
+#usr/share/man/man3/TPMLIB_SetDebugPrefix.3
+#usr/share/man/man3/TPMLIB_SetProfile.3
+#usr/share/man/man3/TPMLIB_SetState.3
+#usr/share/man/man3/TPMLIB_Terminate.3
+#usr/share/man/man3/TPMLIB_ValidateState.3
+#usr/share/man/man3/TPMLIB_VolatileAll_Store.3
+#usr/share/man/man3/TPMLIB_WasManufactured.3
+#usr/share/man/man3/TPM_Free.3
+#usr/share/man/man3/TPM_IO_Hash_Data.3
+#usr/share/man/man3/TPM_IO_Hash_End.3
+#usr/share/man/man3/TPM_IO_Hash_Start.3
+#usr/share/man/man3/TPM_IO_TpmEstablished_Get.3
+#usr/share/man/man3/TPM_IO_TpmEstablished_Reset.3
+#usr/share/man/man3/TPM_Malloc.3
+#usr/share/man/man3/TPM_Realloc.3
diff --git a/lfs/libtpms b/lfs/libtpms
new file mode 100644
index 000000000..1f87a236c
--- /dev/null
+++ b/lfs/libtpms
@@ -0,0 +1,91 @@
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007-2025 IPFire Team <info@ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+SUMMARY = This library provides software emulation of a Trusted Platform Module (TPM 1.2 and TPM 2.0).
+
+VER = 0.10.1
+
+THISAPP = libtpms-$(VER)
+DL_FILE = $(THISAPP).tar.gz
+DL_FROM = $(URL_IPFIRE)
+DIR_APP = $(DIR_SRC)/$(THISAPP)
+TARGET = $(DIR_INFO)/$(THISAPP)
+PROG = libtpms
+PAK_VER = 1
+
+DEPS =
+
+SERVICES =
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = 39feead951a84b715e8e4db8cd6eab7f19728c00423df16150c99004230061691cde90fcf7aafc6a5748647ac58cb696b89a709368da4b8f0c684b22321ff1ea
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+ @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+ @$(LOAD)
+
+$(subst %,%_BLAKE2,$(objects)) :
+ @$(B2SUM)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+ @$(PREBUILD)
+ @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+ -mkdir -pv $(DIR_APP)
+ cd $(DIR_APP) && autoreconf -vfi
+ cd $(DIR_APP) && ./configure \
+ --prefix=/usr \
+ --with-tpm2 \
+ --with-openssl \
+ --disable-hardening
+ cd $(DIR_APP) && make $(MAKETUNING)
+ cd $(DIR_APP) && make install
+ @rm -rf $(DIR_APP)
+ @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 3412c8f5a..384c09407 100755
--- a/make.sh
+++ b/make.sh
@@ -2032,6 +2032,7 @@ build_system() {
lfsmake2 frr
lfsmake2 dmidecode
lfsmake2 mcelog
+ lfsmake2 libtpms
lfsmake2 libpciaccess
lfsmake2 ovmf
lfsmake2 libvirt
--
2.49.0
next prev parent reply other threads:[~2025-07-08 15:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 15:04 [PATCH 1/3] json-glib: " Daniel Weismüller
2025-07-08 15:04 ` Daniel Weismüller [this message]
2025-07-08 15:04 ` [PATCH 3/3] swtpm: " Daniel Weismüller
2025-07-08 18:32 ` [PATCH 1/3] json-glib: " Adolf Belka
2025-07-08 19:08 ` Michael Tremer
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=20250708150509.8131-2-daniel.weismueller@ipfire.org \
--to=daniel.weismueller@ipfire.org \
--cc=development@lists.ipfire.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox