diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-16 13:45:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-16 13:45:36 +0100 |
commit | 29607d91fb1bf1c4456a0b90601ee172ea769283 (patch) | |
tree | 71a1c87ff8b0a522d0f8243a4f064f8f9b5d94e4 /app-crypt/tpm2-tss | |
parent | 22b96ae0ceb12f57b30fc2577770f565506bbac8 (diff) |
gentoo auto-resync : 16:07:2022 - 13:45:35
Diffstat (limited to 'app-crypt/tpm2-tss')
-rw-r--r-- | app-crypt/tpm2-tss/Manifest | 2 | ||||
-rw-r--r-- | app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch | 57 | ||||
-rw-r--r-- | app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild | 99 |
3 files changed, 158 insertions, 0 deletions
diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index cdfbf70df431..72618e7f004b 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1,4 +1,6 @@ AUX tpm2-tss-3.1.0-Dont-run-systemd-sysusers-in-Makefile.patch 1214 BLAKE2B 40f1005626205d440fabda7f88444b0eef344df8f6ead5716807bcbaf490e7b24afc12580ae25c506fcc45dfb4bac0789d9b897dfcaae943c6ba9795b2f4f1d8 SHA512 adbff50c66a22659b563344c216d60bb80951016c3d7180c07c0498c285c9099a60e5573ed0ce29c7732de28d4c390b8eac16bf695c739d0c614dd344f1bfb46 +AUX tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch 2556 BLAKE2B ea8799561378e718019ed2e3885a91f5b5a270f65eb22f11f952e4346fe066f40fc8ae21230d77c53f4a2ebee3d508342777f34e7e7aa6aa81fcd48fb766984e SHA512 ba555d93affd142c213cc023ddccdfbdfabc9aa05528005cca5bd51751f729c6b44111054443f7ed69c1316cf2986b1f84d5c470e918a1ac34f9c4760eb2e596 DIST tpm2-tss-3.2.0.tar.gz 1629211 BLAKE2B a89aa4d89a50bdfb5a9652874d30e2138747bd022049f2be2d0b56e296329d0c41254033ec3a062dbd64fde54a62e952f54446c551e5788231827cd53fae045a SHA512 cabb411f074dfa94919ba914849aac77a0ac2f50622e28a1406cf575369148774748e0e2b7a7c566ec83561a96d4b883bac5a3b1763f4cf48668a0c5d68c0a23 EBUILD tpm2-tss-3.2.0-r3.ebuild 2534 BLAKE2B c5a3f76cad79f06b1c0d2d6388dc454bcb91725948c0642112a25316f13aa72a1c561504f9c87022ccee8a854f1bc706427f402d0372138a09c989b1a8ccd95a SHA512 8cb08dfad94ddba79dfcb833d9f6f7d3e78d7973e3917162baaf167203bd3d9b9a828e7f5b1f8ec1ba62f09599dd6830850005844920559caf17f611f78a20e4 +EBUILD tpm2-tss-3.2.0-r4.ebuild 2539 BLAKE2B 2f8a9dd8648e6113fffb63f894b9cea090c6a1d9dd4a5b23ace670a7113ec07fdacc41d4cb21bfe343aa208fe60801a750abb42b5632943ec973231e31fd6a60 SHA512 bc0bfd683c04f970479178e33ebf3901205b7651af89132fc767d770cd57ec03677a49e28fa1dc699a96617173e2f5c285ffced0ad593236eb880218c3b0970d MISC metadata.xml 747 BLAKE2B 0462c5942012c444e13bf094be03e0cc142b3b5e3e613570506f84be45bb3019876f3f44454b078668c7e3cbd4a60819cd2ea57c588cab34bfe82f76f222bcf8 SHA512 dab6f379190e40b0321597f0c5fa03ee5731eb77e91dc5d82d2f57c896cf40a074598ba1dedd1575e4e23e1fc5ed306f83cb50992fca6cc2bc1a1db822765a7a diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index 000000000000..90b12801226b --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,57 @@ +diff --git a/Makefile.am b/Makefile.am +index ce19aac3..22a8c075 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -498,10 +498,9 @@ fapi-config.json: dist/fapi-config.json.in + -e 's|[@]userstatedir@|$(userstatedir)|g' \ + < "$<" > "$@" + +-sysusers_DATA = dist/sysusers.d/tpm2-tss.conf + tmpfiles_DATA = tpm2-tss-fapi.conf + +-EXTRA_DIST += dist/sysusers.d/tpm2-tss.conf dist/tmpfiles.d/tpm2-tss-fapi.conf.in ++EXTRA_DIST += dist/tmpfiles.d/tpm2-tss-fapi.conf.in + CLEANFILES += tpm2-tss-fapi.conf + + # We have to do this ourselves, in order to get absolute paths +@@ -726,13 +725,6 @@ EXTRA_DIST += dist/tpm-udev.rules + + install-dirs: + if HOSTOS_LINUX +-if SYSD_SYSUSERS +- @echo "systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf" +- @systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf || echo "WARNING Failed to create the tss user and group" +-else +- @echo "call make_tss_user_and_group" +- @$(call make_tss_user_and_group) || echo "WARNING Failed to create the tss user and group" +-endif + if SYSD_TMPFILES + @echo "systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf" + @systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf|| echo "WARNING Failed to create the FAPI directories with the correct permissions" +diff --git a/configure.ac b/configure.ac +index 6482944f..44c0e383 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -483,22 +483,9 @@ AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_cer + [AC_MSG_WARN([Running integration tests without EK certificate verification, use --enable-self-generated-certificate for full test coverage])]) + + # Check for systemd helper tools used by make install +-AC_CHECK_PROG(systemd_sysusers, systemd-sysusers, yes) +-AM_CONDITIONAL(SYSD_SYSUSERS, test "x$systemd_sysusers" = "xyes") + AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes) + AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes") + +-# Check all tools used by make install +-AS_IF([test "$HOSTOS" = "Linux"], +- [ AC_CHECK_PROG(useradd, useradd, yes) +- AC_CHECK_PROG(groupadd, groupadd, yes) +- AC_CHECK_PROG(adduser, adduser, yes) +- AC_CHECK_PROG(addgroup, addgroup, yes) +- AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ], +- [AC_MSG_ERROR([addgroup or groupadd are needed.])]) +- AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ], +- [AC_MSG_ERROR([adduser or useradd are needed.])])]) +- + AC_SUBST([PATH]) + + dnl --------- Doxy Gen ----------------------- diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild new file mode 100644 index 000000000000..4591425a0733 --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools 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/3" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls static-libs test" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls )" + +RDEPEND="acct-group/tss + acct-user/tss + 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-doc/doxygen )" + +PATCHES=( + "${FILESDIR}/${PN}-3.2.0-Dont-run-systemd-sysusers-in-Makefile.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 + + # See bug #833887 (and similar); eautoreconf means .pc file gets wrong version. + sed -i \ + "s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/" \ + "configure.ac" || die + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE=${S} econf \ + --localstatedir=/var \ + $(use_enable doc doxygen-doc) \ + $(use_enable fapi) \ + $(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- \ + --with-sysusersdir="/usr/lib/sysusers.d" \ + --with-tmpfilesdir="/usr/lib/tmpfiles.d" +} + +multilib_src_install() { + default + + if [[ ${PV} != $(sed -n -e 's/^Version: //p' "${ED}/usr/$(get_libdir)/pkgconfig/tss2-sys.pc" || die) ]] ; then + # Safeguard for bug #833887 + die "pkg-config file version doesn't match ${PV}! Please report a bug!" + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process tpm2-tss-fapi.conf + udev_reload +} + +pkg_postrm() { + udev_reload +} |