diff options
Diffstat (limited to 'app-crypt/tpm2-pkcs11')
6 files changed, 104 insertions, 86 deletions
diff --git a/app-crypt/tpm2-pkcs11/Manifest b/app-crypt/tpm2-pkcs11/Manifest index 244978e5b0d1..bc5672346cb0 100644 --- a/app-crypt/tpm2-pkcs11/Manifest +++ b/app-crypt/tpm2-pkcs11/Manifest @@ -1 +1 @@ -DIST tpm2-pkcs11-1.5.0.tar.gz 1355121 BLAKE2B 9c00deb62bf30e22ef346bcdf951252913709f6c953f45e68df35cea434e55f79a960fea16aaa46794650c0cceaf979f4250af8cc835e48f34aca5b2306f2685 SHA512 999adf3ea031dfbb0eadefbd6b2c5457bff738bad231efa70218032f851fe5ba466e37bdf47b5bce380c378b97e88b2a76c9b59a264db5c5f380a9ba3cce58a0 +DIST tpm2-pkcs11-1.9.0.tar.gz 1396590 BLAKE2B a5880b61463154d8f17549c442c7eca49b7a438335c264022d81fa93079b83633cba8ff8c3377f5829a896e6f5f55688018d8c3a78cb8223a888c7d6bfcaf555 SHA512 e88e78790a8d4d5a67713855106860e90dd18da00dc738ca7bfebf7979cdde54ce5089d0be015e7a208117bf393db700ca7739986c5e8138ee0e3b37344614b0 diff --git a/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch b/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch deleted file mode 100644 index 7aae19c7c71f..000000000000 --- a/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 3088817..d789ce9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -460,7 +460,6 @@ AS_IF([test x"$enable_hardening" != xno], [ - - add_hardened_c_flag([-Wall]) - add_hardened_c_flag([-Wextra]) -- add_hardened_c_flag([-Werror]) - - add_hardened_c_flag([-Wformat]) - add_hardened_c_flag([-Wformat-security]) diff --git a/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.9.0-Remove-incorrect-append-in-configure-ac.patch b/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.9.0-Remove-incorrect-append-in-configure-ac.patch new file mode 100644 index 000000000000..10272341fe42 --- /dev/null +++ b/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.9.0-Remove-incorrect-append-in-configure-ac.patch @@ -0,0 +1,26 @@ +From 03bc2732826443328550358ba8f2c79195922bc8 Mon Sep 17 00:00:00 2001 +From: Christopher Byrne <salah.coronya@gmail.com> +Date: Wed, 7 Feb 2024 14:55:38 -0600 +Subject: [PATCH] configure: Change mistaken += to = + +Signed-off-by: Christopher Byrne <salah.coronya@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 771004b..0f1457e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -540,7 +540,7 @@ and submitting patches upstream!]) + # Rather than nesting these and making them ugly just use a counter. + AX_CHECK_COMPILE_FLAG([-fdata-sections], [strip=y]) + AX_CHECK_COMPILE_FLAG([-ffunction-sections], [strip="y$strip"]) +-AX_CHECK_LINK_FLAG([[-Wl,--gc-sections]], [strip+="y$strip"]) ++AX_CHECK_LINK_FLAG([[-Wl,--gc-sections]], [strip="y$strip"]) + + AS_IF([test x"$strip" = xyyy], [ + EXTRA_CFLAGS="$EXTRA_CFLAGS -fdata-sections -ffunction-sections" +-- +2.43.0 + diff --git a/app-crypt/tpm2-pkcs11/metadata.xml b/app-crypt/tpm2-pkcs11/metadata.xml index 428d019c9ce4..4b7a498cda7f 100644 --- a/app-crypt/tpm2-pkcs11/metadata.xml +++ b/app-crypt/tpm2-pkcs11/metadata.xml @@ -1,16 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> + <maintainer type="person" proxied="yes"> <email>salah.coronya@gmail.com</email> - <name>Salah Coronya</name> + <name>Christopher Byrne</name> </maintainer> - <maintainer type="project"> + <maintainer type="project" proxied="proxy"> <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> <use> <flag name="fapi">Enable feature API backend</flag> </use> + <upstream> + <remote-id type="github">tpm2-software/tpm2-pkcs11</remote-id> + </upstream> </pkgmetadata> - diff --git a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.5.0.ebuild b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.5.0.ebuild deleted file mode 100644 index 37841aeebeb0..000000000000 --- a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.5.0.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_REQ_USE="sqlite" - -inherit autotools distutils-r1 - -DESCRIPTION="A PKCS#11 interface for TPM2 hardware" -HOMEPAGE="https://tpm2-software.github.io/" -SRC_URI="https://github.com/tpm2-software/tpm2-pkcs11/releases/download/${PV}/${P}.tar.gz" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="fapi" - -# python-pkcs11 is required but not in Portage. python-pkcs11 in turn requires -# aenum which is ALSO not in portage. Futhermore, aenum has a dead homepage. -RESTRICT="test" - -RDEPEND="app-crypt/p11-kit - app-crypt/tpm2-abrmd - app-crypt/tpm2-tools[fapi?] - !fapi? ( app-crypt/tpm2-tss ) - fapi? ( >=app-crypt/tpm2-tss-3.0.1[fapi] ) - dev-db/sqlite:3 - dev-libs/openssl:= - dev-python/cryptography[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyasn1-modules[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] " - -DEPEND="${RDEPEND}" -BDEPEND="sys-devel/autoconf-archive - virtual/pkgconfig" - -PATCHES=( - "$FILESDIR/${PN}-1.3.2-Remove-WError.patch" -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - econf \ - $(use_enable fapi) -} - -src_compile() { - default - cd "${S}/tools" || die - BUILD_DIR="${S}/tools" python_foreach_impl distutils-r1_python_compile -} - -src_install() { - default - cd "${S}/tools" || die - BUILD_DIR="${S}/tools" python_foreach_impl distutils-r1_python_install - dobin "${S}/tools/tpm2_ptool" - find "${D}" -name '*.la' -delete || die -} diff --git a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.9.0-r2.ebuild b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.9.0-r2.ebuild new file mode 100644 index 000000000000..2efa0a2d8d04 --- /dev/null +++ b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.9.0-r2.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_REQ_USE="sqlite" + +inherit autotools python-single-r1 + +DESCRIPTION="A PKCS#11 interface for TPM2 hardware" +HOMEPAGE="https://tpm2-software.github.io/" +SRC_URI="https://github.com/tpm2-software/tpm2-pkcs11/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="fapi test" +REQUIRED_USE="( ${PYTHON_REQUIRED_USE} )" + +# Units tests only for now +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + app-crypt/p11-kit + app-crypt/tpm2-abrmd + app-crypt/tpm2-tools[fapi?] + !fapi? ( app-crypt/tpm2-tss:= ) + fapi? ( >=app-crypt/tpm2-tss-3.0.1:=[fapi] ) + dev-db/sqlite:3 + dev-libs/libyaml + dev-libs/openssl:= + $(python_gen_cond_dep ' + dev-python/bcrypt[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + dev-python/pyasn1-modules[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/tpm2-pytss[${PYTHON_USEDEP}] + ') +" + +DEPEND="test? ( dev-util/cmocka ) + ${RDEPEND}" +BDEPEND="${PYTHON_DEPS} + dev-build/autoconf-archive + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-1.9.0-Remove-incorrect-append-in-configure-ac.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable fapi) \ + $(use_enable test unit) +} + +src_install() { + default + python_domodule tools/tpm2_pkcs11 + python_newscript tools/tpm2_ptool.py tpm2_ptool + find "${ED}" -name '*.la' -delete || die +} |