public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/files/, app-crypt/trousers/
Date: Tue, 19 Apr 2022 06:41:37 +0000 (UTC)	[thread overview]
Message-ID: <1650350491.47ff44c16ca48aa12e2d7c9ac1574a957e14325c.juippis@gentoo> (raw)

commit:     47ff44c16ca48aa12e2d7c9ac1574a957e14325c
Author:     Christopher Byrne <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Sun Apr 10 22:44:24 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> 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 <salah.coronya <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24984
Signed-off-by: Joonas Niilola <juippis <AT> 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
 }


             reply	other threads:[~2022-04-19  6:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  6:41 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-19  6:41 [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/files/, app-crypt/trousers/ Joonas Niilola
2020-11-24 10:39 Stefan Strogin
2020-08-15  0:57 Sam James
2020-04-28  7:44 Joonas Niilola
2018-09-27 23:55 Alon Bar-Lev
2017-02-25  6:03 Alon Bar-Lev
2016-12-07 16:33 Alon Bar-Lev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1650350491.47ff44c16ca48aa12e2d7c9ac1574a957e14325c.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox