app-crypt/trousers: Apply Flatcar modifications

This commit is contained in:
Kai Lüke 2020-08-07 13:38:10 +02:00
parent 16dbf342bc
commit f282ca0fd4
4 changed files with 27 additions and 2 deletions

View File

@ -1,5 +1,6 @@
[Unit] [Unit]
Description=TCG Core Services Daemon Description=TCG Core Services Daemon
ConditionPathExists=/dev/tpm0
[Service] [Service]
User=tss User=tss

View File

@ -0,0 +1,3 @@
d /var/lib/tpm 0755 tss tss - -
C /etc/tcsd.conf 0600 tss tss - /usr/share/trousers/tcsd.conf
C /var/lib/tpm/system.data 0600 tss tss - /usr/share/trousers/system.data

View File

@ -1,3 +1,8 @@
# Flatcar modifications:
# - added "Flatcar:" customizations
# - added condition to files/tcsd.service
# - created files/tmpfiles.d/trousers.conf
# - created files/system.data
# Copyright 1999-2020 Gentoo Authors # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
@ -59,10 +64,25 @@ src_install() {
keepdir /var/lib/tpm keepdir /var/lib/tpm
use doc && dodoc doc/* use doc && dodoc doc/*
newinitd "${FILESDIR}"/tcsd.initd tcsd # Flatcar:
newconfd "${FILESDIR}"/tcsd.confd tcsd # (removed newinitd and newconfd)
fowners tss:tss /etc/tcsd.conf
systemd_dounit "${FILESDIR}"/tcsd.service systemd_dounit "${FILESDIR}"/tcsd.service
# Flatcar:
systemd_enable_service multi-user.target tcsd.service
udev_dorules "${FILESDIR}"/61-trousers.rules udev_dorules "${FILESDIR}"/61-trousers.rules
fowners tss:tss /var/lib/tpm fowners tss:tss /var/lib/tpm
readme.gentoo_create_doc readme.gentoo_create_doc
# Flatcar:
insinto /usr/share/trousers/
doins "${FILESDIR}"/system.data
# stash a copy of the config so we can restore it from tmpfiles
doins "${D}"/etc/tcsd.conf
fowners tss:tss /usr/share/trousers/system.data
fowners tss:tss /usr/share/trousers/tcsd.conf
systemd_dotmpfilesd "${FILESDIR}"/tmpfiles.d/trousers.conf
} }