* [gentoo-commits] repo/proj/libressl:master commit in: app-crypt/trousers/files/, app-crypt/trousers/
@ 2022-07-05 21:19 Quentin Retornaz
0 siblings, 0 replies; 2+ messages in thread
From: Quentin Retornaz @ 2022-07-05 21:19 UTC (permalink / raw
To: gentoo-commits
commit: 444f087022095af599ca2f9f8e4a8947b7daa3c5
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Jul 5 01:34:36 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Jul 5 21:18:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=444f0870
app-crypt/trousers: Merge changes from ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
app-crypt/trousers/files/tcsd.initd | 31 ++++++-------------------------
app-crypt/trousers/metadata.xml | 8 ++++----
app-crypt/trousers/trousers-0.3.15.ebuild | 16 ++++++++++++----
3 files changed, 22 insertions(+), 33 deletions(-)
diff --git a/app-crypt/trousers/files/tcsd.initd b/app-crypt/trousers/files/tcsd.initd
index 3740403..9b18c48 100644
--- a/app-crypt/trousers/files/tcsd.initd
+++ b/app-crypt/trousers/files/tcsd.initd
@@ -1,38 +1,19 @@
#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+command=/usr/sbin/tcsd
+description="TrouSerS' TCS daemon (tcsd)"
+command_user="tss:tss"
+
depend() {
use logger
need net
}
-checkconfig() {
- local mod
- if [ -n "${TPM_MODULES}" ] ; then
- for mod in ${TPM_MODULES} ; do
- lsmod | grep -q "^${mod}\b" \
- || modprobe ${mod} &>/dev/null \
- || ewarn "Failed to load module ${mod}"
- done
- # Should we sleep or something to wait for device creation?
- fi
+start_pre() {
if [ ! -c /dev/tpm ] && [ ! -c /dev/tpm0 ] ; then
eerror "No TPM device found!"
return 1
fi
- return 0
-}
-
-start() {
- ebegin "Starting TrouSerS' TCS daemon (tcsd)"
- checkconfig || eend $?
- start-stop-daemon --start --user tss --exec /usr/sbin/tcsd
- eend $?
-}
-
-stop() {
- ebegin "Stopping TrouSerS' TCS daemon (tcsd)"
- start-stop-daemon --stop --quiet --exec /usr/sbin/tcsd --user tss
- eend $?
}
diff --git a/app-crypt/trousers/metadata.xml b/app-crypt/trousers/metadata.xml
index 643c6bf..2eceffb 100644
--- a/app-crypt/trousers/metadata.xml
+++ b/app-crypt/trousers/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>salah.coronya@gmail.com</email>
- <name>Salah Coronya</name>
+ <name>Christopher Byrne</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
diff --git a/app-crypt/trousers/trousers-0.3.15.ebuild b/app-crypt/trousers/trousers-0.3.15.ebuild
index 3a31ad3..6c046bc 100644
--- a/app-crypt/trousers/trousers-0.3.15.ebuild
+++ b/app-crypt/trousers/trousers-0.3.15.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/trousers/${PN}/${P}.tar.gz"
LICENSE="CPL-1.0 GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~ppc ~ppc64 ~s390 ~x86"
+KEYWORDS="amd64 arm arm64 ~m68k ~ppc ppc64 ~riscv ~s390 x86"
IUSE="doc selinux" # gtk
# gtk support presently does NOT compile.
@@ -20,7 +20,8 @@ IUSE="doc selinux" # gtk
DEPEND="acct-group/tss
acct-user/tss
>=dev-libs/glib-2
- >=dev-libs/openssl-0.9.7:0="
+ >=dev-libs/openssl-0.9.7:0=
+ "
RDEPEND="${DEPEND}
selinux? ( sec-policy/selinux-tcsd )"
BDEPEND="virtual/pkgconfig"
@@ -57,9 +58,16 @@ src_install() {
keepdir /var/lib/tpm
use doc && dodoc doc/*
newinitd "${FILESDIR}"/tcsd.initd tcsd
- newconfd "${FILESDIR}"/tcsd.confd 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] 2+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: app-crypt/trousers/files/, app-crypt/trousers/
@ 2023-04-13 20:30 orbea
0 siblings, 0 replies; 2+ messages in thread
From: orbea @ 2023-04-13 20:30 UTC (permalink / raw
To: gentoo-commits
commit: 42e6f7e828e0194f6d9931aa8d12d652ee62d889
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Apr 13 20:28:48 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Thu Apr 13 20:28:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=42e6f7e8
app-crypt/trousers: add 0.3.15-r1
Signed-off-by: orbea <orbea <AT> riseup.net>
...rs-0.3.15-tspi-drop-the-use-of-getpwent_r.patch | 69 ++++++++++++++++++++
app-crypt/trousers/trousers-0.3.15-r1.ebuild | 74 ++++++++++++++++++++++
2 files changed, 143 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 0000000..ab6ef76
--- /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 0000000..7c56cab
--- /dev/null
+++ b/app-crypt/trousers/trousers-0.3.15-r1.ebuild
@@ -0,0 +1,74 @@
+# 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"
+ "${FILESDIR}/${P}-libressl.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] 2+ messages in thread
end of thread, other threads:[~2023-04-13 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 20:30 [gentoo-commits] repo/proj/libressl:master commit in: app-crypt/trousers/files/, app-crypt/trousers/ orbea
-- strict thread matches above, loose matches on Subject: below --
2022-07-05 21:19 Quentin Retornaz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox