From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C14F715808E for ; Tue, 19 Apr 2022 06:41:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5423E0863; Tue, 19 Apr 2022 06:41:44 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 34761E086A for ; Tue, 19 Apr 2022 06:41:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 067B3341893 for ; Tue, 19 Apr 2022 06:41:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4082F3B3 for ; Tue, 19 Apr 2022 06:41:37 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1650350491.47ff44c16ca48aa12e2d7c9ac1574a957e14325c.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/files/, app-crypt/trousers/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/trousers/files/tcsd.confd app-crypt/trousers/files/tcsd.initd app-crypt/trousers/trousers-0.3.15.ebuild X-VCS-Directories: app-crypt/trousers/files/ app-crypt/trousers/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 47ff44c16ca48aa12e2d7c9ac1574a957e14325c X-VCS-Branch: master Date: Tue, 19 Apr 2022 06:41:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fc56ff07-9b2d-4a9e-9701-f123070034bf X-Archives-Hash: 647b5176d3904b7e6c708ad00ce59fb2 commit: 47ff44c16ca48aa12e2d7c9ac1574a957e14325c Author: Christopher Byrne gmail com> AuthorDate: Sun Apr 10 22:44:24 2022 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Tue Apr 19 06:41:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47ff44c1 app-crypt/trousers: Cleanup and POSIXify init script Closes: https://bugs.gentoo.org/837383 Signed-off-by: Christopher Byrne gmail.com> Closes: https://github.com/gentoo/gentoo/pull/24984 Signed-off-by: Joonas Niilola gentoo.org> app-crypt/trousers/files/tcsd.confd | 9 --------- app-crypt/trousers/files/tcsd.initd | 31 ++++++------------------------- app-crypt/trousers/trousers-0.3.15.ebuild | 4 ++-- 3 files changed, 8 insertions(+), 36 deletions(-) diff --git a/app-crypt/trousers/files/tcsd.confd b/app-crypt/trousers/files/tcsd.confd deleted file mode 100644 index 78bedb9fda30..000000000000 --- a/app-crypt/trousers/files/tcsd.confd +++ /dev/null @@ -1,9 +0,0 @@ -# /etc/conf.d/tscd - -# Configuration file for the TrouSerS' TCS daemon (tcsd) init script -# Have a look on /etc/tcsd.conf too, there is more to configure there. - -# TPM_MODULES: name of the module(s) that should be loaded. You only need to -# set this if your driver is not compiled in kernel and is not already loaded -# on boot. (default: unset) -#TPM_MODULES="tpm_atmel" diff --git a/app-crypt/trousers/files/tcsd.initd b/app-crypt/trousers/files/tcsd.initd index c9c050cb06d9..9b18c48e1ee3 100644 --- a/app-crypt/trousers/files/tcsd.initd +++ b/app-crypt/trousers/files/tcsd.initd @@ -1,38 +1,19 @@ #!/sbin/openrc-run -# Copyright 1999-2018 Gentoo Foundation +# 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/trousers-0.3.15.ebuild b/app-crypt/trousers/trousers-0.3.15.ebuild index b3b23fa8f5c2..b25a3dfb4c72 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 @@ -57,9 +57,9 @@ 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 + udev_reload }