From 2e4747a36a51fd58c21f3f00db959709e83fe08b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 14 Feb 2023 07:56:51 +0000 Subject: gentoo auto-resync : 14:02:2023 - 07:56:50 --- app-crypt/trousers/Manifest | 2 + ...rs-0.3.15-tspi-drop-the-use-of-getpwent_r.patch | 69 ++++++++++++++++++++ app-crypt/trousers/trousers-0.3.15-r1.ebuild | 73 ++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 app-crypt/trousers/files/trousers-0.3.15-tspi-drop-the-use-of-getpwent_r.patch create mode 100644 app-crypt/trousers/trousers-0.3.15-r1.ebuild (limited to 'app-crypt/trousers') diff --git a/app-crypt/trousers/Manifest b/app-crypt/trousers/Manifest index 25e4ace3b903..c505362d2c16 100644 --- a/app-crypt/trousers/Manifest +++ b/app-crypt/trousers/Manifest @@ -3,6 +3,8 @@ AUX tcsd.initd 363 BLAKE2B c8142c8939fe92ce902cd225910af4098cae15d7a47f858c9384e AUX tcsd.service 131 BLAKE2B db7995ca078c6008daba2bee50b892d5ae0fceb184c966f67578185dbdd81b8a3a55000029215d28d99e8e3ccd73f64b85b66cc4f4a337f28ee9d9ade4222067 SHA512 e516bde8ce45fe4ad687aaaabae475da9c20a9fbd8ebee736d09ceb6efa597efb6f3bb99840a4c0d2c9eb77c2824df6ee45985b46dc8cf924b4eed67eeec1468 AUX trousers-0.3.13-nouseradd.patch 606 BLAKE2B 7e4a479fe1bdc75f743263c1321f2d99cfe99d04d8196b57a158bd2ce75335526b2001c2af8aa0f8b17ddfefa304685e237385be0bc4113d5ca366dd464fa85d SHA512 a6c9074e535429f09ce5e850d943378348b54bed479b7fef0fff7bb18ab2547421407900aa35533749a764275a241ddbd083c4e2f3d6a9ad6f9b1d40d090f783 AUX trousers-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch 746 BLAKE2B 91dec77a329a4931487cdff54ab8c77ae302af6bc741da3db61bc34b416d29615808799c8a4c5b39a293021dc1cc16642461037fcb367507ceadcc4456565715 SHA512 704a87fd4b5e50356ac6a0ad68aec04eebb2030d9818c9e23a40f2e621d6e2d5e5660b81997b459e67a8059a0d88a254a41baa833806ce99268ee24b1190ae0b +AUX trousers-0.3.15-tspi-drop-the-use-of-getpwent_r.patch 2114 BLAKE2B a24415a49a81376303d96654eb5147db5843865a139f2f8f226f3f6d647b4a78c1314ee17384809020fca514117b6aaa43f057fad3e3ba0008133db56109b0e3 SHA512 5402a8c3b41fe5f53d8da29a58e5052990ba254b05c4b2455e5068c0d0ca52513e3b29c6f344abd59c0cefd2192077c194628955154d7474e4f6b3c8464dd59b DIST trousers-0.3.15.tar.gz 4699936 BLAKE2B 53c60498ed6a9d3d87295b00676e5d0d82452918c35af6b98c7979ffa2dc04dd817e7cd3f4a33ca17c30b90eab53d80b2bb25306fe9db7bda2125019edfed280 SHA512 769c7d891c6306c1b3252448f86e3043ee837e566c9431f5b4353512113e2907f6ce29c91e8044c420025b79c5f3ff2396ddce93f73b1eb2a15ea1de89ac0fdb +EBUILD trousers-0.3.15-r1.ebuild 1600 BLAKE2B 0b47918d58b924d5d8cb80c4b16abfaccab6952bbb47566a12647c7c16c924b2a532d720aec2be92a3b7e959e2819d057d6dfe70c4fbc6198394625dc9d59776 SHA512 3d3bea454af9f36fd68df36e923b2999d99ad43f3d23b7774d6fb39fcdaf57e299700859b10b71e3f347f0a4f973c1cd18056140f61c2f4e74a92f55dba465fe EBUILD trousers-0.3.15.ebuild 1537 BLAKE2B d25c6df85b82c68da044c52b46cb551b8071b10ade85f868fb526d6763ae721d8d582c059814f2bd9f66099ec034fe37db4b6d9b095a936acf49509450f6d64b SHA512 9d06c08b97b57cbef371c10d46cdb389848fe15514d5750257f0cd6def5c0924f761978e157448d4720a546b9cb0e2b780a6292347d92a9370c40c6afe1c7c08 MISC metadata.xml 542 BLAKE2B 07459ff82ec6f21116e860820a212a751bd07fcad1b175417d8d3b12709c870c523776e228c19aa7f824ac13d304afb533c697c22551ef977b3b9c687d2f6b00 SHA512 c980dfc26aaf0c6718fb9088d91296760db245807f0293a6c7abe412774e9bc297c401153df71ebeeddbc28e92441e3e1e78a5e16c5fca8d3445fe0558faadb1 diff --git a/app-crypt/trousers/files/trousers-0.3.15-tspi-drop-the-use-of-getpwent_r.patch b/app-crypt/trousers/files/trousers-0.3.15-tspi-drop-the-use-of-getpwent_r.patch new file mode 100644 index 000000000000..ab6ef762bce1 --- /dev/null +++ b/app-crypt/trousers/files/trousers-0.3.15-tspi-drop-the-use-of-getpwent_r.patch @@ -0,0 +1,69 @@ +https://bugs.gentoo.org/713444 + +From 2299eadf77ae7a7ec52148b6a8f4ea37e217eafa Mon Sep 17 00:00:00 2001 +From: Stijn Tintel +Date: Thu, 2 Feb 2023 01:06:15 +0200 +Subject: [PATCH] tspi: drop the use of getpwent_r + +On systems with musl libc, libtspi.so is unusable due to the lack of +getpwent_r. As there are multiple historical functions named getpwent_r +that all behave differently, let's just play it safe and stop using it +altogether. + +Signed-off-by: Stijn Tintel +--- + src/tspi/ps/tspps.c | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/src/tspi/ps/tspps.c b/src/tspi/ps/tspps.c +index b5e83d0..ae7b3df 100644 +--- a/src/tspi/ps/tspps.c ++++ b/src/tspi/ps/tspps.c +@@ -51,9 +51,7 @@ + + static int user_ps_fd = -1; + static MUTEX_DECLARE_INIT(user_ps_lock); +-#if (defined (__FreeBSD__) || defined (__OpenBSD__)) + static MUTEX_DECLARE_INIT(user_ps_path); +-#endif + static struct flock fl; + + +@@ -66,9 +64,6 @@ get_user_ps_path(char **file) + TSS_RESULT result; + char *file_name = NULL, *home_dir = NULL; + struct passwd *pwp; +-#if (defined (__linux) || defined (linux) || defined(__GLIBC__)) +- struct passwd pw; +-#endif + struct stat stat_buf; + char buf[PASSWD_BUFSIZE]; + uid_t euid; +@@ -96,16 +91,6 @@ get_user_ps_path(char **file) + #else + setpwent(); + while (1) { +-#if (defined (__linux) || defined (linux) || defined(__GLIBC__)) +- rc = getpwent_r(&pw, buf, PASSWD_BUFSIZE, &pwp); +- if (rc) { +- LogDebugFn("USER PS: Error getting path to home directory: getpwent_r: %s", +- strerror(rc)); +- endpwent(); +- return TSPERR(TSS_E_INTERNAL_ERROR); +- } +- +-#elif (defined (__FreeBSD__) || defined (__OpenBSD__)) + if ((pwp = getpwent()) == NULL) { + LogDebugFn("USER PS: Error getting path to home directory: getpwent: %s", + strerror(rc)); +@@ -113,7 +98,6 @@ get_user_ps_path(char **file) + MUTEX_UNLOCK(user_ps_path); + return TSPERR(TSS_E_INTERNAL_ERROR); + } +-#endif + if (euid == pwp->pw_uid) { + home_dir = strdup(pwp->pw_dir); + break; +-- +2.39.1 + diff --git a/app-crypt/trousers/trousers-0.3.15-r1.ebuild b/app-crypt/trousers/trousers-0.3.15-r1.ebuild new file mode 100644 index 000000000000..fd92b70007d2 --- /dev/null +++ b/app-crypt/trousers/trousers-0.3.15-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools linux-info readme.gentoo-r1 systemd udev + +DESCRIPTION="An open-source TCG Software Stack (TSS) v1.1 implementation" +HOMEPAGE="http://trousers.sf.net" +SRC_URI="mirror://sourceforge/trousers/${PN}/${P}.tar.gz" + +LICENSE="CPL-1.0 GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="doc selinux" # gtk + +# gtk support presently does NOT compile. +# gtk? ( >=x11-libs/gtk+-2 ) + +DEPEND="acct-group/tss + acct-user/tss + >=dev-libs/glib-2 + >=dev-libs/openssl-0.9.7:0= + " +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-tcsd )" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-0.3.13-nouseradd.patch" + "${FILESDIR}/${PN}-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch" + "${FILESDIR}/${P}-tspi-drop-the-use-of-getpwent_r.patch" +) + +DOCS="AUTHORS ChangeLog NICETOHAVES README TODO" + +DOC_CONTENTS=" + If you have problems starting tcsd, please check permissions and + ownership on /dev/tpm* and ~tss/system.data +" + +CONFIG_CHECK="~TCG_TPM" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # econf --with-gui=$(usex gtk gtk openssl) + econf --with-gui=openssl +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die + + keepdir /var/lib/tpm + use doc && dodoc doc/* + newinitd "${FILESDIR}"/tcsd.initd tcsd + systemd_dounit "${FILESDIR}"/tcsd.service + udev_dorules "${FILESDIR}"/61-trousers.rules + fowners tss:tss /var/lib/tpm + readme.gentoo_create_doc +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} -- cgit v1.2.3