public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/, app-crypt/trousers/files/
@ 2015-09-12 19:02 Alon Bar-Lev
  0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2015-09-12 19:02 UTC (permalink / raw
  To: gentoo-commits

commit:     0f224e6b06a558734e711ee9ab2abcaf63da4144
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 12 18:56:33 2015 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sat Sep 12 18:56:33 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f224e6b

app-crypt/trousers: fix gcc5 issue

Bug: 560202

Package-Manager: portage-2.2.20.1

 .../trousers/files/trousers-0.3.13-build.patch     | 77 ++++++++++++++++++++++
 app-crypt/trousers/trousers-0.3.13.ebuild          |  1 +
 2 files changed, 78 insertions(+)

diff --git a/app-crypt/trousers/files/trousers-0.3.13-build.patch b/app-crypt/trousers/files/trousers-0.3.13-build.patch
new file mode 100644
index 0000000..4e0e60e
--- /dev/null
+++ b/app-crypt/trousers/files/trousers-0.3.13-build.patch
@@ -0,0 +1,77 @@
+--- a/src/include/tcsps.h
++++ b/src/include/tcsps.h
+@@ -23,13 +23,8 @@ int		   get_file();
+ int		   put_file(int);
+ void		   close_file(int);
+ void		   ps_destroy();
+-#ifdef SOLARIS
+-TSS_RESULT  read_data(int, void *, UINT32);
+-TSS_RESULT  write_data(int, void *, UINT32);
+-#else
+-inline TSS_RESULT  read_data(int, void *, UINT32);
+-inline TSS_RESULT  write_data(int, void *, UINT32);
+-#endif
++TSS_RESULT	   read_data(int, void *, UINT32);
++TSS_RESULT	   write_data(int, void *, UINT32);
+ int		   write_key_init(int, UINT32, UINT32, UINT32);
+ TSS_RESULT	   cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32);
+ TSS_RESULT	   UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *);
+--- a/src/include/tspps.h
++++ b/src/include/tspps.h
+@@ -18,8 +18,8 @@
+ 
+ TSS_RESULT	   get_file(int *);
+ int		   put_file(int);
+-inline TSS_RESULT  read_data(int, void *, UINT32);
+-inline TSS_RESULT  write_data(int, void *, UINT32);
++TSS_RESULT	   read_data(int, void *, UINT32);
++TSS_RESULT	   write_data(int, void *, UINT32);
+ UINT32		   psfile_get_num_keys(int);
+ TSS_RESULT	   psfile_get_parent_uuid_by_uuid(int, TSS_UUID *, TSS_UUID *);
+ TSS_RESULT	   psfile_remove_key_by_uuid(int, TSS_UUID *);
+--- a/src/tcs/ps/ps_utils.c
++++ b/src/tcs/ps/ps_utils.c
+@@ -42,11 +42,7 @@
+ struct key_disk_cache *key_disk_cache_head = NULL;
+ 
+ 
+-#ifdef SOLARIS
+ TSS_RESULT
+-#else
+-inline TSS_RESULT
+-#endif
+ read_data(int fd, void *data, UINT32 size)
+ {
+ 	int rc;
+@@ -64,11 +60,7 @@ read_data(int fd, void *data, UINT32 size)
+ }
+ 
+ 
+-#ifdef SOLARIS
+ TSS_RESULT
+-#else
+-inline TSS_RESULT
+-#endif
+ write_data(int fd, void *data, UINT32 size)
+ {
+ 	int rc;
+--- a/src/tspi/ps/ps_utils.c
++++ b/src/tspi/ps/ps_utils.c
+@@ -22,7 +22,7 @@
+ #include "tspps.h"
+ #include "tsplog.h"
+ 
+-inline TSS_RESULT
++TSS_RESULT
+ read_data(int fd, void *data, UINT32 size)
+ {
+ 	int rc;
+@@ -39,7 +39,7 @@ read_data(int fd, void *data, UINT32 size)
+ 	return TSS_SUCCESS;
+ }
+ 
+-inline TSS_RESULT
++TSS_RESULT
+ write_data(int fd, void *data, UINT32 size)
+ {
+ 	int rc;

diff --git a/app-crypt/trousers/trousers-0.3.13.ebuild b/app-crypt/trousers/trousers-0.3.13.ebuild
index 56cad8b..a4c0a43 100644
--- a/app-crypt/trousers/trousers-0.3.13.ebuild
+++ b/app-crypt/trousers/trousers-0.3.13.ebuild
@@ -78,6 +78,7 @@ pkg_setup() {
 
 src_prepare() {
 	epatch "${FILESDIR}"/${P}-nouseradd.patch
+	epatch "${FILESDIR}"/${P}-build.patch
 	mv configure.in configure.ac || die
 	eautoreconf
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/, app-crypt/trousers/files/
@ 2020-06-25  8:08 Joonas Niilola
  0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2020-06-25  8:08 UTC (permalink / raw
  To: gentoo-commits

commit:     ab24dd5b2a618468b4ec566fdaad537a44847c21
Author:     Salah Coronya <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Sun Jun  7 17:49:53 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jun 25 08:07:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab24dd5b

app-crypt/trousers: Prevent install of stray static archive

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Salah Coronya <salah.coronya <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...ers-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch | 25 ++++++++++++++++++++++
 app-crypt/trousers/trousers-0.3.14-r2.ebuild       |  1 +
 2 files changed, 26 insertions(+)

diff --git a/app-crypt/trousers/files/trousers-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch b/app-crypt/trousers/files/trousers-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch
new file mode 100644
index 00000000000..f777b629ceb
--- /dev/null
+++ b/app-crypt/trousers/files/trousers-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch
@@ -0,0 +1,25 @@
+From 5b1dbb5f8eada9002ec10f4ebc0bc418272e58b2 Mon Sep 17 00:00:00 2001
+From: Salah Coronya <salah.coronya@gmail.com>
+Date: Sun, 7 Jun 2020 12:34:03 -0500
+Subject: [PATCH] src/tddl/Makefile.am: Mark tddl.a nodist
+
+This makes tddl.a nodist like the others, so it is not installed
+
+Signed-off-by: Salah Coronya <salah.coronya@gmail.com>
+---
+ src/tddl/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tddl/Makefile.am b/src/tddl/Makefile.am
+index 607eb8e..2cd599b 100644
+--- a/src/tddl/Makefile.am
++++ b/src/tddl/Makefile.am
+@@ -1,4 +1,4 @@
+-lib_LIBRARIES=libtddl.a
++noinst_LIBRARIES=libtddl.a
+ 
+ libtddl_a_SOURCES=tddl.c
+ libtddl_a_CFLAGS=-DAPPID=\"TCSD\ TDDL\" -I${top_srcdir}/src/include -fPIE -DPIE
+-- 
+2.26.2
+

diff --git a/app-crypt/trousers/trousers-0.3.14-r2.ebuild b/app-crypt/trousers/trousers-0.3.14-r2.ebuild
index b62a9eb9345..a36ff683073 100644
--- a/app-crypt/trousers/trousers-0.3.14-r2.ebuild
+++ b/app-crypt/trousers/trousers-0.3.14-r2.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-0.3.13-nouseradd.patch"
 	"${FILESDIR}/${P}-libressl.patch"
 	"${FILESDIR}/${P}-fno-common.patch"
+	"${FILESDIR}/${P}-Makefile.am-Mark-tddl.a-nodist.patch"
 )
 
 DOCS="AUTHORS ChangeLog NICETOHAVES README TODO"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/, app-crypt/trousers/files/
@ 2023-02-14  3:13 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-02-14  3:13 UTC (permalink / raw
  To: gentoo-commits

commit:     818d8486a6d06bd4fc7b4212d1755f927fd2f529
Author:     Stijn Tintel <stijn <AT> linux-ipv6 <DOT> be>
AuthorDate: Wed Feb  1 23:16:18 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 03:12:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=818d8486

app-crypt/trousers: add musl patch

[sam: This has been sent upstream but pending moderator approval.]

Bug: https://bugs.gentoo.org/713444
Signed-off-by: Stijn Tintel <stijn <AT> linux-ipv6.be>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...rs-0.3.15-tspi-drop-the-use-of-getpwent_r.patch | 69 ++++++++++++++++++++
 app-crypt/trousers/trousers-0.3.15-r1.ebuild       | 73 ++++++++++++++++++++++
 2 files changed, 142 insertions(+)

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 <stijn@linux-ipv6.be>
+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 <stijn@linux-ipv6.be>
+---
+ 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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-14  3:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-12 19:02 [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/, app-crypt/trousers/files/ Alon Bar-Lev
  -- strict thread matches above, loose matches on Subject: below --
2020-06-25  8:08 Joonas Niilola
2023-02-14  3:13 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox