From b3b92de25c3fc5f6bddc5e513027140591a0b2a5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 23 May 2024 00:06:40 +0100 Subject: gentoo auto-resync : 23:05:2024 - 00:06:39 --- app-crypt/tpm2-tss/Manifest | 2 + .../tpm2-tss-4.0.2-Hide-write-all-function.patch | 24 +++++ app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild | 110 +++++++++++++++++++++ 3 files changed, 136 insertions(+) create mode 100644 app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch create mode 100644 app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild (limited to 'app-crypt/tpm2-tss') diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index 249f56e8de1b..e6e594fcddff 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -2,6 +2,7 @@ AUX tpm2-tss-4.0.0-Dont-install-files-into-run.patch 880 BLAKE2B 8ae9b55e853dcd1 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 +AUX tpm2-tss-4.0.2-Hide-write-all-function.patch 573 BLAKE2B 17bfdc0ad81a4d26acfc10fe7efd86a5b9e1faa3d8cb6c1b757a7278421c57d05e562d3eb9583b02d3a9fb46de8516b78be107a6cc3d2554177602f4c5023275 SHA512 4f3b4af6097dea9a88f6e208964013abbdc5e3319a0e7302a6c5cb1cff871631dcaa2e44d432898f2c76a473d7f579f43c3e46ad6404d1a71f5fd58151effab6 AUX tpm2-tss-4.1.1-Remove-bash-syntax.patch 1293 BLAKE2B b13f767e097fb2fe4912c0ba3411498a91446429ac98f2737bd8afe116e8a760babb18661fc5d4ab32aec62ce561e7653189e2e99c36e304507449a816e625c1 SHA512 10730084d14317affa994f5298b57b64f9255aa263d7d18d0e9b56db91674de0b16fa35e92c782f4895553b7b9864b13cf106e0942f5cd191574a1426e84fb6f AUX tpm2-tss-4.1.1-int-log-compiler-common.sh-Remove-dependency-on-whic.patch 1052 BLAKE2B 67171fb9b1d2e37bbc71c70d5517930aedb68f7fe326cd63cc2a8cec29f4ca06a5e5823da155a06dccc4f7defa4a6c70bd92d3cc0547a23ab9ef9c6ff686aa39 SHA512 f93bae0037b5ded19ea78cf3dfbffc22db4072d01e0507648d85d581948863b873a468640b571bcd862e486dd5a8b267697ecdf14efa57ee6f83d0ea29580ae2 DIST tpm2-tss-4.0.1.tar.gz 1787139 BLAKE2B 627cdefeff6c64148f9da1425922a0a7a72debcee4930ffab208a3b9b66127c2d4f923e3e105bfd45410cdb13c19cb40cc15a720e9a05dd32ff622dabf5fcc32 SHA512 ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d @@ -9,6 +10,7 @@ DIST tpm2-tss-4.0.2.tar.gz 1833499 BLAKE2B 91e70bcc66099fe5d7d53cf98a2c46582e96f DIST tpm2-tss-4.1.1.tar.gz 1901759 BLAKE2B 96e154e0778caf8ba8d7299c82ff1614c26254fe741290a588fa251a3013bdda26f720c148d400dc068851746e85719ae78068d64eef1067f3d45c540a303284 SHA512 a8fdc85e44c4a7960cdc21fd46154fbdb63992e072cc4356f472c962a751a826906604848b7b2608344494f85f72d591f4c0bdf42e3df7491446bdecbe22f2af 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-r1.ebuild 2645 BLAKE2B ae4b32081dd9628b72daea77600cf15e891d6644923f75124fd5d8343972843a3fbb1d749745aa2af1980dd347506ca834c153bd45e119ee8ba6aadac65b3b8d SHA512 bf6340799f4d3abeb3c012e56f861cab2579a3eefd0c5804997c6e257bc2bd1b789464023b282dc3d3bee1a77f021801ecfdd091c4281b5fdc7d2849fb5cc3d4 EBUILD tpm2-tss-4.0.2.ebuild 2583 BLAKE2B dddc3558af2f942663de1157c99fb4d26a845d51684f94b9c2d95b3af82cd1744852fe69c45d7aeedf45e68a334f76ddb081b1fd1fe5db8208d5dd64ebac0afb SHA512 7df61c8d336026c2679071571ed48143d5a4c367677f2b40b514832a15d468c1d8bc03f0bea61922a42faf304b5743f000cce6903193b16ad63d72679eb7c873 EBUILD tpm2-tss-4.1.1-r1.ebuild 2652 BLAKE2B 274e9278d380cd4edbcc343fbc3a7af09fafef9892e4565ec1d601688ce6163ff6f837e3eea29cf4ba03d8a99d9b5a9803d456dec3d54add5bf2e00d66476163 SHA512 26318d63e67c5fc10ad0e5e8e3e668b1be2b6c668733d39f47a8667895ef7105edd9ac40770a2a0b4a9ed471def7c26f56dc7feb92a075fab273c6f7d137ec0b EBUILD tpm2-tss-4.1.1.ebuild 2434 BLAKE2B 6d9d66fa2e03c9a1933d14b7fe09f5146df232aa3b11cba4008ae5e1c1c7f247ab0bb38553f3a9bced5f3536fb2eb95b4c3bc8fe113a067c21b64481afb9ab05 SHA512 80bc38751bf15cbe7e65733f00af178e7cba5d66976fb87d39ed55108365997de41258fd3e0890fce34aec7521f31fdb6d0c1be6826585f8b99d1b45979866e2 diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch new file mode 100644 index 000000000000..bd682df53bac --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch @@ -0,0 +1,24 @@ +diff --git a/src/util/io.c b/src/util/io.c +index c6446826..50c0fd6c 100644 +--- a/src/util/io.c ++++ b/src/util/io.c +@@ -81,6 +81,7 @@ read_all ( + return recvd_total; + } + ++__attribute__ ((visibility("hidden"))) + ssize_t + write_all ( + SOCKET fd, +diff --git a/src/util/io.h b/src/util/io.h +index 25dd5c45..fec391d8 100644 +--- a/src/util/io.h ++++ b/src/util/io.h +@@ -70,6 +70,7 @@ read_all ( + * are detected. This is currently limited to interrupted system calls and + * short writes. + */ ++__attribute__ ((visibility("hidden"))) + ssize_t + write_all ( + SOCKET fd, diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild new file mode 100644 index 000000000000..1ada848dd5d2 --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild @@ -0,0 +1,110 @@ +# 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" + "${FILESDIR}/${PN}-4.0.2-Hide-write-all-function.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 +} -- cgit v1.2.3