summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-10-03 03:57:58 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-10-03 03:57:58 -0300
commit304b04f31a2113937601f7fafe08de600d5545f8 (patch)
tree48fee6dcaa8ec2cb05422b5826ed1f66a7d53724 /pcr
parentbbe6d0a7210bcd0c7b393b19c6b791bcbbd3a52e (diff)
downloadabslibre-304b04f31a2113937601f7fafe08de600d5545f8.tar.gz
abslibre-304b04f31a2113937601f7fafe08de600d5545f8.tar.bz2
abslibre-304b04f31a2113937601f7fafe08de600d5545f8.zip
trousers: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/trousers/70-tpmd.rules1
-rw-r--r--pcr/trousers/PKGBUILD44
-rw-r--r--pcr/trousers/tcsd.service10
-rw-r--r--pcr/trousers/trousers.install21
4 files changed, 76 insertions, 0 deletions
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 <aur@mutantmonkey.in>
+# Contributor: Robert Buhren <robert@robertbuhren.de>
+# Contributor: Gavin Lloyd <gavinhungry@gmail.com>
+# Contributor: xav <xav at ethertricks dot net>
+# Contributor: julian <pidanc_j at epita dot fr>
+# Contributor: Silvio Knizek <killermoehre@gmx.net>
+
+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
+}