summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormutantmonkey2013-03-02 17:53:31 -0500
committermutantmonkey2013-03-02 17:53:31 -0500
commit3c7549dea4eaf87cee0331db6292fcd50e1c61ed (patch)
tree66f2891190468688b65705a35768446f81d951d0
downloadaur-3c7549dea4eaf87cee0331db6292fcd50e1c61ed.tar.gz
import my AUR packages into git
-rw-r--r--.SRCINFO21
-rw-r--r--70-tpmd.rules1
-rw-r--r--PKGBUILD47
-rw-r--r--no-werror.patch11
-rw-r--r--tcsd45
-rw-r--r--tcsd.service10
-rw-r--r--trousers.install26
-rw-r--r--tss-user.patch46
8 files changed, 207 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b5a9498b756e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = trousers
+ pkgdesc = Open-source TCG Software Stack implementation for use with a TPM
+ pkgver = 0.3.13
+ pkgrel = 2
+ url = http://sourceforge.net/projects/trousers
+ install = trousers.install
+ arch = i686
+ arch = x86_64
+ license = CPL
+ depends = openssl
+ source = http://downloads.sourceforge.net/project/trousers/trousers/0.3.13/trousers-0.3.13.tar.gz
+ source = trousers.install
+ source = tcsd.service
+ source = 70-tpmd.rules
+ sha256sums = bb908e4a3c88a17b247a4fc8e0fff3419d8a13170fe7bdfbe0e2c5c082a276d3
+ sha256sums = 18a96f4067968d947d5c4d4572b360de19cc940e082e221768add82a24539b9e
+ sha256sums = 653c3a94ec628e7a7fb150d0d289b0866c6b3bb9aa57af2c59724517d205d7bd
+ sha256sums = c50ea41a4809699dd50f2e621acc6baafb2dffa43cd5a0df8a0679f1d1b1b884
+
+pkgname = trousers
+
diff --git a/70-tpmd.rules b/70-tpmd.rules
new file mode 100644
index 000000000000..448ec09dda2d
--- /dev/null
+++ b/70-tpmd.rules
@@ -0,0 +1 @@
+KERNEL=="tpm[0-9]*", MODE="0600", OWNER="tss", GROUP="tss"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ff7d03b537e1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# 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.10
+pkgrel=3
+pkgdesc="Open-source TCG Software Stack implementation for use with a TPM"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/trousers"
+license=('CPL')
+depends=('openssl')
+makedepends=('gtk2')
+install=${pkgname}.install
+source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz
+ ${pkgname}.install
+ tcsd
+ tcsd.service
+ 70-tpmd.rules)
+sha256sums=('eb9569de5c66d9698f6c3303de03777b95ec72827f68b7744454bfa9227bc530'
+ '70ffb97a47b931a73c8a0141af74d8068eff1c173a813cecd50918be2e5b2844'
+ '22e30fbf8c6634cb86402d804fda1b97a17ae08ddb67461396fe38998cb0e631'
+ 'd3fe859f70a09097c4e697c7f95d3c907cf60f717fd7994e21c81042f2a47b21'
+ 'c50ea41a4809699dd50f2e621acc6baafb2dffa43cd5a0df8a0679f1d1b1b884')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --with-openssl=/usr \
+ --with-gui=gtk
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+ install -Dm755 ${srcdir}/tcsd ${pkgdir}/etc/rc.d/tcsd
+ 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/no-werror.patch b/no-werror.patch
new file mode 100644
index 000000000000..c7c93f498f62
--- /dev/null
+++ b/no-werror.patch
@@ -0,0 +1,11 @@
+--- trousers-0.3.8_ORG/configure 2012-01-06 12:32:25.862498967 +0100
++++ trousers-0.3.8/configure 2012-01-06 13:00:00.224342034 +0100
+@@ -12708,7 +12708,7 @@
+
+
+ if test "x${GCC}" = "xyes"; then
+- CFLAGS="$CFLAGS -W -Wall -Werror -Wno-unused-parameter -Wsign-compare"
++ CFLAGS="$CFLAGS -W -Wall -Wno-unused-parameter -Wsign-compare"
+ fi
+
+ CFLAGS="$CFLAGS -I../include \
diff --git a/tcsd b/tcsd
new file mode 100644
index 000000000000..bf04c98705a6
--- /dev/null
+++ b/tcsd
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+DAEMON='tcsd'
+TCSD=/usr/sbin/tcsd
+PID=`pidof -o %PPID ${TCSD}`
+
+case "$1" in
+
+ start)
+ stat_busy "Starting ${DAEMON}"
+ if [ -z "$PID" ]; then
+ $TCSD
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ${DAEMON}
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping ${DAEMON}"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ${DAEMON}
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+
+esac
+exit 0
diff --git a/tcsd.service b/tcsd.service
new file mode 100644
index 000000000000..064d52ad0d36
--- /dev/null
+++ b/tcsd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Manager for Trusted Computing resources
+After=sysinit.target
+
+[Service]
+User=tss
+ExecStart=/usr/sbin/tcsd -f -c /etc/tcsd.conf
+
+[Install]
+WantedBy=default.target
diff --git a/trousers.install b/trousers.install
new file mode 100644
index 000000000000..9bc65689d529
--- /dev/null
+++ b/trousers.install
@@ -0,0 +1,26 @@
+post_install() {
+ groupadd -r tss
+
+ useradd -r -g tss -d /var/lib/tpm -s /bin/false tss
+ chown tss:tss /usr/sbin/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() {
+ /etc/rc.d/tcsd stop &> /dev/null
+ systemctl stop tcsd
+# rm -rf /usr/var/lib/tpm
+ userdel tss
+}
+
+op=$1
+shift
+$op $*
diff --git a/tss-user.patch b/tss-user.patch
new file mode 100644
index 000000000000..5cfdee6ae9bb
--- /dev/null
+++ b/tss-user.patch
@@ -0,0 +1,46 @@
+--- trousers-0.3.8_ORG/dist/Makefile.am 2012-01-06 12:32:25.855832307 +0100
++++ trousers-0.3.8/dist/Makefile.am 2012-01-06 12:46:18.958344853 +0100
+@@ -2,16 +2,9 @@
+ fedora/fedora.initrd.tcsd
+ install: install-exec-hook
+ if test ! -e ${DESTDIR}/@sysconfdir@/tcsd.conf; then mkdir -p ${DESTDIR}/@sysconfdir@ && cp tcsd.conf ${DESTDIR}/@sysconfdir@; fi
+- /bin/chown tss:tss ${DESTDIR}/@sysconfdir@/tcsd.conf || true
+- /bin/chmod 0600 ${DESTDIR}/@sysconfdir@/tcsd.conf
+
+ install-exec-hook:
+- /usr/sbin/groupadd tss || true
+- /usr/sbin/useradd -r tss -g tss || true
+- /bin/sh -c 'if [ ! -e ${DESTDIR}/@localstatedir@/lib/tpm ];then mkdir -p ${DESTDIR}/@localstatedir@/lib/tpm; fi'
+- /bin/chown tss:tss ${DESTDIR}/@localstatedir@/lib/tpm || true
+- /bin/chmod 0700 ${DESTDIR}/@localstatedir@/lib/tpm
++ @echo "rule install-exec-hook skipped"
+
+ uninstall-hook:
+- /usr/sbin/userdel tss || true
+- /usr/sbin/groupdel tss || true
++ @echo "rule uninstall-hook skipped"
+--- trousers-0.3.8_ORG/dist/Makefile.in 2012-01-06 12:32:25.855832307 +0100
++++ trousers-0.3.8/dist/Makefile.in 2012-01-06 12:42:47.328535153 +0100
+@@ -367,20 +367,11 @@
+
+ install: install-exec-hook
+ if test ! -e ${DESTDIR}/@sysconfdir@/tcsd.conf; then mkdir -p ${DESTDIR}/@sysconfdir@ && cp tcsd.conf ${DESTDIR}/@sysconfdir@; fi
+- /bin/chown tss:tss ${DESTDIR}/@sysconfdir@/tcsd.conf || true
+- /bin/chmod 0600 ${DESTDIR}/@sysconfdir@/tcsd.conf
+
+ install-exec-hook:
+- /usr/sbin/groupadd tss || true
+- /usr/sbin/useradd -r tss -g tss || true
+- /bin/sh -c 'if [ ! -e ${DESTDIR}/@localstatedir@/lib/tpm ];then mkdir -p ${DESTDIR}/@localstatedir@/lib/tpm; fi'
+- /bin/chown tss:tss ${DESTDIR}/@localstatedir@/lib/tpm || true
+- /bin/chmod 0700 ${DESTDIR}/@localstatedir@/lib/tpm
+-
++ @echo "rule install-exec-hook skipped"
+ uninstall-hook:
+- /usr/sbin/userdel tss || true
+- /usr/sbin/groupdel tss || true
+-
++ @echo "rule uninstall-hook skipped"
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT: