diff options
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/Manifest.gz | bin | 24945 -> 24942 bytes | |||
-rw-r--r-- | app-crypt/tpm2-tools/Manifest | 4 | ||||
-rw-r--r-- | app-crypt/tpm2-tools/tpm2-tools-5.6.1.ebuild | 87 | ||||
-rw-r--r-- | app-crypt/tpm2-tools/tpm2-tools-5.7.ebuild | 83 | ||||
-rw-r--r-- | app-crypt/tpm2-tss/Manifest | 5 | ||||
-rw-r--r-- | app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch | 26 | ||||
-rw-r--r-- | app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild | 109 | ||||
-rw-r--r-- | app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild | 107 |
8 files changed, 421 insertions, 0 deletions
diff --git a/app-crypt/Manifest.gz b/app-crypt/Manifest.gz Binary files differindex 7e3ef60997f9..1da20835077a 100644 --- a/app-crypt/Manifest.gz +++ b/app-crypt/Manifest.gz diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest index 7b0c6ee84cc9..16449c2e8796 100644 --- a/app-crypt/tpm2-tools/Manifest +++ b/app-crypt/tpm2-tools/Manifest @@ -4,7 +4,11 @@ AUX tpm2-tools-5.6-test-eventlog-fix-check-eventlog.sh-if-efivar.h-exis.patch 41 AUX tpm2-tools-5.6-test-eventlog.sh-Fix-accidental-deletions.patch 2805 BLAKE2B f8d1f063fef10c3a8d2324a70b4ee6efc99a4a4a08ce79db822169a65319d4fc50dc6a62036d74a1da43d09a008d33d09fd1efcb2c109e5e67ffed9e56b36412 SHA512 c01d78bf67ecc57a6f594739a20ec6e4c0e78ef2c062e7f82594d17cec86b907b0c2aacbb44be119a7d2b2a01f3d0931ad558d2e775ba1d75eac2ddeb1570b8c DIST tpm2-tools-5.5.tar.gz 1241390 BLAKE2B 2225f9e0835988351f84ed06f914616e25fd65bacaa93b51d0bb04185314efb9a6f60eb3539b250f54b2c2ba590f1b76594df3e625e45c8d37e38d13371bea26 SHA512 24f72a3e9840d531d900e96771a863baae1c71a76fcad0fda8020dff06acd8e3b65b86401ace21f034766403caf9ae97ce710ff6013bb7ed25657a6ecf325470 DIST tpm2-tools-5.6-tpm2_eventlog-Create-raw-and-pretty-print-format-for.patch.xz 47916 BLAKE2B 1bbc84f58ad46507417c89be1b4ce2450fb33cf3abe8f080c23890d96be85379f135ef1dbf4b580e1a386fa6d5ebc4fbaab351b5238bbf1011bb97b0f49a847b SHA512 3db0daa39a8dc756d7cb25e3673149dc3eeafd7410f2c6537464431b501e3704a886d9b7a9acd71440d6d419649dd471fd6f9247d593c89a30b05774a8d1b3de +DIST tpm2-tools-5.6.1.tar.gz 1255474 BLAKE2B 7fda0084283bbd592c3323605f598ebb77ba267ebb900e62b2eff2742257378d95f99b48aab090f80438a6c86f168e1863f9350c18571a23e17eea90a1b9bdd9 SHA512 7a5903db0578a1364c44ca8ac3672c3cae745e2b0ab66ddf6a91fdb75146441af32dfe4ccad6825bea343fea74bed97f9e45bf752594ee56f32e4cb7be2bed33 DIST tpm2-tools-5.6.tar.gz 1266731 BLAKE2B fe88722c26d62128cd6dfbdd8ef2568656a75fe27b1443fed28387d0db1f50b7d0651819d34dfa98acde785b4cfb4e7c11420b110bb5333ed2bb6b67cdd4fc70 SHA512 14216f29ed3ecca5fbe356ed3744c8b6b25a62ff11b2aed596d11101328c8bfd29a02f6ca5a218f9a4477a5e9648c50f0ae96e71de0b4ff5ea1f98ebeeb73cd7 +DIST tpm2-tools-5.7.tar.gz 1339035 BLAKE2B 3984f25176e0b092793a33a0b40b396bc650de989e0b600989d11439cccdf7bc410535c01e1a0e985ab67b36b63eb02d392342aa1746b86727ba22d67d522389 SHA512 629b0b1826815877f452935285f7b3fe0f32bd24fe9130eb169a2dc9b7b254a737797043af9eea68be706b87c32ab2b7189151360c9c00bc5c31dce62a799670 EBUILD tpm2-tools-5.5.ebuild 1643 BLAKE2B 5029ad3299b8db9d0005866660db88884833619fade7131a6b4b7b42f1ce62a2fe8eb94ad175b889bd2d9c2b6d4bf5d91d2455bd0ea0a9ad8e0c59565c73b1e2 SHA512 195dc492373400638ec7baa5c191e7eeea646523f296ff16422ae56d7347e5e6fdea12d199e8d32bc700790f9a206b5e84b0e52348f67b4ad681e6889cf1703e EBUILD tpm2-tools-5.6-r1.ebuild 2230 BLAKE2B 29bd871f43e77ad687efdaf30866929b0c78b7013e2fb3aec8ffe6aee30bb184efee7b96a3e0cd487bd4c6510494f7b8df91ddecfc43c53b711cdbc45f69271f SHA512 ddc4b86bf59291e6fdbb0b443435f135992d4e0ba9e7b69ab0a5efb0f950ed8004fa9a3155cbb1fc26c41b59241769d6c16e65180ae474b48b43ce8e27d20a9f +EBUILD tpm2-tools-5.6.1.ebuild 2336 BLAKE2B b34bcd328d8ab683c93124394f3d74e3edab45a40aef38187fa823dd8601500c19d6bb4945a4e83fdb77b88c970d473b2953aa2ff0e081475d6a74023aa5ca8d SHA512 29e987ac648a72356b0748d59cfed1fd6a9ea3c83a4a683bd23c435b61f7e42afbad227afa509e51b1f1bec2330525761276ca1c14523087bfdf7862a7bffbb5 +EBUILD tpm2-tools-5.7.ebuild 1951 BLAKE2B a84b0009cdc1030cd74536793394e810f6ead975a7bb89be70116e0cad2c04d7147e1d4df2302e8df2ea1c4bf5e09cb3ccb64ddb999ea0cbc155868de7a9db08 SHA512 9eca66c3cddcbdd2d9482b0a77666a1fe4e64c1f51ca32fd37b204f2a208531cb342aa740f7d04ca9d8d5c0eb2336c6f63d998803bd85bf5cffa6e0cc5f64346 MISC metadata.xml 560 BLAKE2B fe8daaba2a7586247537f8ed7b92769676b20f2c1377f7bb582dff49e06cf3f9beba4f79e28f10ea76d67d089eb152b060b091414dd9b47c5694ca153211421f SHA512 a744fcc50c7e44b1939190150404aee9054eab8e921e6f63cafa58dc80be5f20692632509de85399b6a9633701da72fd951e8bcfbe9e5177f315fa1dcbcc9ee5 diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.6.1.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.6.1.ebuild new file mode 100644 index 000000000000..923ae66847d9 --- /dev/null +++ b/app-crypt/tpm2-tools/tpm2-tools-5.6.1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit autotools bash-completion-r1 flag-o-matic python-any-r1 + +DESCRIPTION="Tools for the TPM 2.0 TSS" +HOMEPAGE="https://github.com/tpm2-software/tpm2-tools" +SRC_URI="https://github.com/tpm2-software/tpm2-tools/releases/download/${PV}/${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/tpm2-tools-5.6-tpm2_eventlog-Create-raw-and-pretty-print-format-for.patch.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="+fapi test" + +RESTRICT="!test? ( test )" + +RDEPEND=">=app-crypt/tpm2-tss-3.0.1:=[fapi?] + dev-libs/openssl:= + net-misc/curl + sys-libs/efivar:=" +DEPEND="${RDEPEND} + test? ( + app-crypt/swtpm + app-crypt/tpm2-abrmd + dev-util/cmocka + )" +BDEPEND="virtual/pkgconfig + dev-build/autoconf-archive + test? ( + app-editors/vim-core + dev-tcltk/expect + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]') + ) + ${PYTHON_DEPS}" + +PATCHES=( + "${FILESDIR}/${PN}-5.6-test-eventlog-fix-check-eventlog.sh-if-efivar.h-exis.patch" + "${WORKDIR}/${PN}-5.6-tpm2_eventlog-Create-raw-and-pretty-print-format-for.patch" + "${FILESDIR}/${PN}-5.6-Makefile-am-Dont-require-pandoc-for-tests.patch" + "${FILESDIR}/${PN}-5.6-test-eventlog.sh-Fix-accidental-deletions.patch" +) + +python_check_deps() { + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # tests fail with LTO enabbled. See bug 865275 and 865277 + filter-lto + econf \ + $(use_enable fapi) \ + $(use_enable test unit) \ + --with-bashcompdir=$(get_bashcompdir) \ + --enable-hardening +} + +src_install() { + default + mv "${ED}"/$(get_bashcompdir)/tpm2{_completion.bash,} || die + local utils=( "${ED}"/usr/bin/tpm2_* ) + utils=("${utils[@]##*/}") + # these utiltites don't have bash completions + local nobashcomp=( tpm2_encodeobject tpm2_getpolicydigest\ + tpm2_sessionconfig tpm2_tr_encode) + mapfile -d $'\0' -t utils < <(printf '%s\0' "${utils[@]}" | grep -Ezvw "${nobashcomp[@]/#/-e}") + bashcomp_alias tpm2 "${utils[@]}" +} + +src_test() { +# This hook doesn't get invoked consisently, so call it manually +# else one of the tests will fail + emake prepare-check + default +} diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.7.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.7.ebuild new file mode 100644 index 000000000000..f0c382e9893b --- /dev/null +++ b/app-crypt/tpm2-tools/tpm2-tools-5.7.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit autotools bash-completion-r1 flag-o-matic python-any-r1 + +DESCRIPTION="Tools for the TPM 2.0 TSS" +HOMEPAGE="https://github.com/tpm2-software/tpm2-tools" +SRC_URI="https://github.com/tpm2-software/tpm2-tools/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="+fapi test" + +RESTRICT="!test? ( test )" + +RDEPEND=">=app-crypt/tpm2-tss-3.0.1:=[fapi?] + dev-libs/openssl:= + net-misc/curl + sys-libs/efivar:=" +DEPEND="${RDEPEND} + test? ( + app-crypt/swtpm + app-crypt/tpm2-abrmd + dev-util/cmocka + )" +BDEPEND="virtual/pkgconfig + dev-build/autoconf-archive + test? ( + app-editors/vim-core + dev-tcltk/expect + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]') + ) + ${PYTHON_DEPS}" + +PATCHES=( + "${FILESDIR}/${PN}-5.6-Makefile-am-Dont-require-pandoc-for-tests.patch" +) + +python_check_deps() { + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # tests fail with LTO enabbled. See bug 865275 and 865277 + filter-lto + econf \ + $(use_enable fapi) \ + $(use_enable test unit) \ + --with-bashcompdir=$(get_bashcompdir) \ + --enable-hardening +} + +src_install() { + default + mv "${ED}"/$(get_bashcompdir)/tpm2{_completion.bash,} || die + local utils=( "${ED}"/usr/bin/tpm2_* ) + utils=("${utils[@]##*/}") + # these utiltites don't have bash completions + local nobashcomp=( tpm2_encodeobject tpm2_getpolicydigest\ + tpm2_sessionconfig tpm2_tr_encode) + mapfile -d $'\0' -t utils < <(printf '%s\0' "${utils[@]}" | grep -Ezvw "${nobashcomp[@]/#/-e}") + bashcomp_alias tpm2 "${utils[@]}" +} + +src_test() { +# This hook doesn't get invoked consisently, so call it manually +# else one of the tests will fail + emake prepare-check + default +} diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index a62b3cd1e086..9417d2283860 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1,7 +1,12 @@ AUX tpm2-tss-4.0.0-Dont-install-files-into-run.patch 880 BLAKE2B 8ae9b55e853dcd117730eebc274252ea7afc4e3e415eafb21d3994690687cc9daa796a97536597da8cbfc4f54567cbb678fe61ba4eb4fdc1dee6d851d472efa3 SHA512 811dd1d2597557cf9fd08d7231cd5f48a8dd9dc76adf33bc4a0ee978dc8973fc5309bdc7386cbd9878b78dba1b4a8ecf9c2e2f856c887b141a423f0d94e3244e AUX tpm2-tss-4.0.1-Do-not-consider-failures-to-write-files-in-sys-hard.patch 1493 BLAKE2B 4e22a79f54758295905625ce907ee1d718ec8ab34e1917f376c2e318beabbcd424588458bb0360757d8027b87ca7fb14279585fb35e29a7bd53d7eb3fdb43c99 SHA512 f4badedc611e9903daa034306c6cca3b0a3f3ed56350af18f48586c67ffba9f4b5cc8784e4d008b123b885c33b7a3fbfd1c5bc846aa35ab648cd48be3476deb1 AUX tpm2-tss-4.0.1-Make-sysusers-and-tmpfiles-optional.patch 1814 BLAKE2B 259a2b4618eeaf34228a07d6e9479658e04b7e36affa6d8d894563014a3f9ba571f1676623b744c1158ceb2fd738fe627fad76014b1893471a9467da41847f2e SHA512 78f1f6d5a448f29fd5dfbfadfb1913464d8e55eabebc9c0eca16c70031bcee9198742b1567eba2bae444cf11e32bea3c3663db155eb1e8da750ba8bb78d725c0 +AUX tpm2-tss-4.0.2-Dont-install-files-into-run.patch 878 BLAKE2B 8a3d248dcb89b08bf61834aa0cbde89e7086d561826da154104eb6cddd760fd42538f3c353ba1d3df072617bdfa9a2976f7c7ba6947600578e8aa398f3091bea SHA512 02a354429a3f1b803364c1277b4791f0a406b2510e320dff13dc4988efa443d06aec3fe325ec05439597ebf78beef2983e4dabfd557d4cdf6c43c4b7042a1797 DIST tpm2-tss-4.0.1.tar.gz 1787139 BLAKE2B 627cdefeff6c64148f9da1425922a0a7a72debcee4930ffab208a3b9b66127c2d4f923e3e105bfd45410cdb13c19cb40cc15a720e9a05dd32ff622dabf5fcc32 SHA512 ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d +DIST tpm2-tss-4.0.2.tar.gz 1833499 BLAKE2B 91e70bcc66099fe5d7d53cf98a2c46582e96f204fc7bcb89c46497cc811ca1eb39c752be077a6e8132fc980a6581a2df075fcc6670d646d1270e642c144f043c SHA512 e92038de985ac928bf87a707b0f9b190aaa936827923ea5e3cbdda216cbc6cf8590af650c59c2e1e420ad9914dc6c1f14232ab7930ffc1a50fb0c49fdef6d3f0 +DIST tpm2-tss-4.1.0.tar.gz 1902337 BLAKE2B 72e2b13d9d65cdf8db136dd9ee75b0f53f8d8482391c27c0a52d6aa4945d05d54334f9667b96aef78f92c7e2d6e4eb655568182ef3a79477c52937b0ccfa605d SHA512 b8fa5d093b188dbb5df9888da9ea893a7eea2b88f4a93f1e349eaa1718a4d87f6cd91f029ff49afce163252ab98f859728360491d6d2019f8342afb78f0018eb EBUILD tpm2-tss-4.0.1-r1.ebuild 2588 BLAKE2B b9a58449aa540dd800e5453091c464edeba60987e0119044cf0caccfbb14ef7d15c7fc28ee27d45d80044f4b6d4df9c56cbead18fffd4819afd53dde921692f0 SHA512 bad17cc8511c05ff8295c1812ac78f48c097563efe2224d9bcf6d3f1cd131149571596f1fc47a7423ee10b88b7221ae8f52bbe05a01ab402369a66ba0a8e62d5 EBUILD tpm2-tss-4.0.1.ebuild 2492 BLAKE2B a31affba60e4b53ba69ba9bc3dece3bfca550cad98eb21d5cabb4b24e427b321fdb4104cabe6676e8128719d1e0dbf8992ad778df025f2709aefe078e01c3458 SHA512 502461ec7f03aba7d346ede6db2b0f365f16c5e37d4272f27467f62d84c09c12258994f22733f33e3869fa90fefe1fb2e3004e4ec38e5276a67f1ada32442749 +EBUILD tpm2-tss-4.0.2.ebuild 2588 BLAKE2B 5a6740620d1546b54e3b41338ba40c33841a16eb55a0a96fce1dbdeea11ebc599c37bc6664868420503ae197513a60aa7ed33a9c3a4710627e304446cff08651 SHA512 ced915ebeb436a665fe50967e87123267d848aa654deee218d13616a8b6b5e0eced0e4f6953acda89e46f219b37fbe5a13d0643c8b433c882a49e61e19f5ad83 +EBUILD tpm2-tss-4.1.0.ebuild 2434 BLAKE2B 6d9d66fa2e03c9a1933d14b7fe09f5146df232aa3b11cba4008ae5e1c1c7f247ab0bb38553f3a9bced5f3536fb2eb95b4c3bc8fe113a067c21b64481afb9ab05 SHA512 80bc38751bf15cbe7e65733f00af178e7cba5d66976fb87d39ed55108365997de41258fd3e0890fce34aec7521f31fdb6d0c1be6826585f8b99d1b45979866e2 MISC metadata.xml 835 BLAKE2B 58fcbb63b8fd77dd42f081e060cec1fc5593d13ad9237bd644462fd839a1fea9936342d5339a3ec8d339106ca6074c73ac31e7546feb0f1c5f0f212b21831d8a SHA512 941bfce986619b387410d49fe046218a388243c257a3164293033f8ebb4e2d64d7ff06d35dd4ef770a9e9194035839d68dcf1f00edbe439272c2e9c01ecb3c6b diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch new file mode 100644 index 000000000000..022cd6145c18 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile.am b/Makefile.am +index 07b7a2bf..e478fc77 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -770,13 +770,11 @@ define set_tss_permissions + endef + + define make_fapi_dirs +- ($(call make_tss_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/) || true) && \ + ($(call make_tss_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) + endef + + define set_fapi_permissions + if test -z "${DESTDIR}"; then \ +- ($(call set_tss_permissions,$(DESTDIR)$(runstatedir)/tpm2-tss)) && \ + ($(call set_tss_permissions,$(DESTDIR)$(localstatedir)/lib/tpm2-tss)) \ + fi + endef +@@ -787,7 +785,6 @@ endef + + define check_fapi_dirs + if test -z "${DESTDIR}"; then \ +- ($(call check_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/)) && \ + ($(call check_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) \ + fi; + endef diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild new file mode 100644 index 000000000000..0c4f132f9e5c --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev + +DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" +HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0/4" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls +policy static-libs test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls ) + policy? ( openssl !mbedtls ) +" + +RDEPEND=" + acct-group/tss + acct-user/tss + sys-apps/util-linux:=[${MULTILIB_USEDEP}] + fapi? ( + dev-libs/json-c:=[${MULTILIB_USEDEP}] + >=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] + ) + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] ) + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${RDEPEND} + test? ( app-crypt/swtpm + dev-libs/uthash + dev-util/cmocka + fapi? ( >=net-misc/curl-7.80.0 ) ) +" + +BDEPEND=" + sys-apps/acl + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.2-Dont-install-files-into-run.patch" + "${FILESDIR}/${PN}-4.0.1-Make-sysusers-and-tmpfiles-optional.patch" + "${FILESDIR}/${PN}-4.0.1-Do-not-consider-failures-to-write-files-in-sys-hard.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~TCG_TPM" + linux-info_pkg_setup + kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required" +} + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + # Fails with inlining + filter-flags -fno-semantic-interposition + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + + local myconf=( + --localstatedir=/var + $(multilib_native_use_enable doc doxygen-doc) + $(use_enable fapi) + $(use_enable policy) + $(use_enable static-libs static) + $(multilib_native_use_enable test unit) + $(multilib_native_use_enable test integration) + $(multilib_native_use_enable test self-generated-certificate) + --disable-tcti-libtpms + --disable-defaultflags + --disable-weakcrypto + --with-crypto="$(usex mbedtls mbed ossl)" + --with-runstatedir=/run + --with-udevrulesdir="$(get_udevdir)/rules.d" + --with-udevrulesprefix=60- + --without-sysusersdir + --with-tmpfilesdir="/usr/lib/tmpfiles.d" + ) + + ECONF_SOURCE=${S} econf "${myconf[@]}" +} + +multilib_src_install() { + default + keepdir /var/lib/tpm2-tss/system/keystore + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process tpm2-tss-fapi.conf + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild new file mode 100644 index 000000000000..7e6bf442977f --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev + +DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" +HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0/4" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls +policy static-libs test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls ) + policy? ( openssl !mbedtls ) +" + +RDEPEND=" + acct-group/tss + acct-user/tss + sys-apps/util-linux:=[${MULTILIB_USEDEP}] + fapi? ( + dev-libs/json-c:=[${MULTILIB_USEDEP}] + >=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] + ) + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] ) + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${RDEPEND} + test? ( app-crypt/swtpm + dev-libs/uthash + dev-util/cmocka + fapi? ( >=net-misc/curl-7.80.0 ) ) +" + +BDEPEND=" + sys-apps/acl + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.2-Dont-install-files-into-run.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~TCG_TPM" + linux-info_pkg_setup + kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required" +} + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + # Fails with inlining + filter-flags -fno-semantic-interposition + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + + local myconf=( + --localstatedir=/var + $(multilib_native_use_enable doc doxygen-doc) + $(use_enable fapi) + $(use_enable policy) + $(use_enable static-libs static) + $(multilib_native_use_enable test unit) + $(multilib_native_use_enable test integration) + $(multilib_native_use_enable test self-generated-certificate) + --disable-tcti-libtpms + --disable-defaultflags + --disable-weakcrypto + --with-crypto="$(usex mbedtls mbed ossl)" + --with-runstatedir=/run + --with-udevrulesdir="$(get_udevdir)/rules.d" + --with-udevrulesprefix=60- + --without-sysusersdir + --with-tmpfilesdir="/usr/lib/tmpfiles.d" + ) + + ECONF_SOURCE=${S} econf "${myconf[@]}" +} + +multilib_src_install() { + default + keepdir /var/lib/tpm2-tss/system/keystore + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process tpm2-tss-fapi.conf + udev_reload +} + +pkg_postrm() { + udev_reload +} |