From 304b04f31a2113937601f7fafe08de600d5545f8 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 3 Oct 2014 03:57:58 -0300 Subject: trousers: add new package to [pcr] --- pcr/trousers/70-tpmd.rules | 1 + pcr/trousers/PKGBUILD | 44 +++++++++++++++++++++++++++++++++++++++++++ pcr/trousers/tcsd.service | 10 ++++++++++ pcr/trousers/trousers.install | 21 +++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 pcr/trousers/70-tpmd.rules create mode 100644 pcr/trousers/PKGBUILD create mode 100644 pcr/trousers/tcsd.service create mode 100644 pcr/trousers/trousers.install diff --git a/pcr/trousers/70-tpmd.rules b/pcr/trousers/70-tpmd.rules new file mode 100644 index 000000000..448ec09dd --- /dev/null +++ b/pcr/trousers/70-tpmd.rules @@ -0,0 +1 @@ +KERNEL=="tpm[0-9]*", MODE="0600", OWNER="tss", GROUP="tss" diff --git a/pcr/trousers/PKGBUILD b/pcr/trousers/PKGBUILD new file mode 100644 index 000000000..560cb211c --- /dev/null +++ b/pcr/trousers/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: mutantmonkey +# Contributor: Robert Buhren +# Contributor: Gavin Lloyd +# Contributor: xav +# Contributor: julian +# Contributor: Silvio Knizek + +pkgname=trousers +pkgver=0.3.13 +pkgrel=2 +pkgdesc="Free TCG Software Stack implementation for use with a TPM" +arch=('i686' 'x86_64') +url="http://sourceforge.net/projects/trousers" +license=('CPL') +depends=('openssl') +install=${pkgname}.install +source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/0.3.13/${pkgname}-${pkgver}.tar.gz + ${pkgname}.install + tcsd.service + 70-tpmd.rules) +sha256sums=('bb908e4a3c88a17b247a4fc8e0fff3419d8a13170fe7bdfbe0e2c5c082a276d3' + '18a96f4067968d947d5c4d4572b360de19cc940e082e221768add82a24539b9e' + '653c3a94ec628e7a7fb150d0d289b0866c6b3bb9aa57af2c59724517d205d7bd' + 'c50ea41a4809699dd50f2e621acc6baafb2dffa43cd5a0df8a0679f1d1b1b884') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --sbindir=/usr/bin \ + --with-openssl=/usr \ + --with-gui=openssl + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + install -Dm644 ${srcdir}/tcsd.service ${pkgdir}/usr/lib/systemd/system/tcsd.service + install -Dm644 ${srcdir}/70-tpmd.rules ${pkgdir}/usr/lib/udev/rules.d/70-tpmd.rules +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/trousers/tcsd.service b/pcr/trousers/tcsd.service new file mode 100644 index 000000000..33f4de65e --- /dev/null +++ b/pcr/trousers/tcsd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Manager for Trusted Computing resources +After=sysinit.target + +[Service] +User=tss +ExecStart=/usr/bin/tcsd -f -c /etc/tcsd.conf + +[Install] +WantedBy=default.target diff --git a/pcr/trousers/trousers.install b/pcr/trousers/trousers.install new file mode 100644 index 000000000..3725e078b --- /dev/null +++ b/pcr/trousers/trousers.install @@ -0,0 +1,21 @@ +post_install() { + groupadd -r tss + + useradd -r -g tss -d /var/lib/tpm -s /bin/false tss + chown -R tss:tss /var/lib/tpm + chown tss:tss /usr/bin/tcsd + + chown tss:tss /etc/tcsd.conf + chmod 0600 /etc/tcsd.conf + + udevadm trigger --sysname-match="tpm[0-9]*" +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + systemctl stop tcsd + userdel tss +} -- cgit v1.2.3