diff options
author | mutantmonkey | 2017-06-10 15:14:15 -0700 |
---|---|---|
committer | mutantmonkey | 2017-06-10 15:14:15 -0700 |
commit | 6b66f61478d192f1b46005aeb331a5d271e281f0 (patch) | |
tree | b8f80d3194f144e9dfe113d99c756fcccb2421ed | |
parent | af317ed5d0fdfdf18b741e574eb55662e8f84498 (diff) | |
download | aur-6b66f61478d192f1b46005aeb331a5d271e281f0.tar.gz |
upgpkg: trousers 0.3.14-3
Apply patch from Gerardo Exequiel Pozzi <djgera@archlinux.org>
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | 01-tss-user.patch | 36 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | sysusers.conf | 1 | ||||
-rw-r--r-- | tmpfiles.conf | 2 | ||||
-rw-r--r-- | trousers.install | 21 |
6 files changed, 71 insertions, 36 deletions
@@ -1,24 +1,28 @@ # Generated by mksrcinfo v8 -# Sun Dec 4 01:02:16 UTC 2016 +# Sat Jun 10 22:14:15 UTC 2017 pkgbase = trousers pkgdesc = Open-source TCG Software Stack implementation for use with a TPM pkgver = 0.3.14 - pkgrel = 2 + pkgrel = 3 url = http://sourceforge.net/projects/trousers - install = trousers.install arch = i686 arch = x86_64 license = CPL depends = openssl + noextract = trousers-0.3.14.tar.gz options = libtool source = http://downloads.sourceforge.net/project/trousers/trousers/0.3.14/trousers-0.3.14.tar.gz - source = trousers.install + source = sysusers.conf + source = tmpfiles.conf source = tcsd.service source = 70-tpmd.rules + source = 01-tss-user.patch sha256sums = ce50713a261d14b735ec9ccd97609f0ad5ce69540af560e8c3ce9eb5f2d28f47 - sha256sums = 18a96f4067968d947d5c4d4572b360de19cc940e082e221768add82a24539b9e + sha256sums = 4c2684501e7a67132d4f53466b32fc06bd2a0275d4cf1fbd5479d0cdb2349bc7 + sha256sums = 1afd455b6c17e730b2cc4ec71d5625f0b63fde54f9409ae4762dc6f084c194de sha256sums = 653c3a94ec628e7a7fb150d0d289b0866c6b3bb9aa57af2c59724517d205d7bd sha256sums = c50ea41a4809699dd50f2e621acc6baafb2dffa43cd5a0df8a0679f1d1b1b884 + sha256sums = 169cc2cbc3a8bce7fd76e0c96e5b04b5249a0db9e857b274a0c5da461bb604f7 pkgname = trousers diff --git a/01-tss-user.patch b/01-tss-user.patch new file mode 100644 index 000000000000..37f74617aa3a --- /dev/null +++ b/01-tss-user.patch @@ -0,0 +1,36 @@ +Author: Daniel Baumann <daniel@debian.org> +Author: Pierre Chifflier <pollux@debian.org> +Description: Avoiding chown/chmod for tss user at build-time. + Note that we do not use NOUSERCHECK or --enable-usercheck=no, + since these are also used in the sources and will change the + binary. + +Index: trousers/dist/Makefile.am +=================================================================== +--- trousers.orig/dist/Makefile.am ++++ trousers/dist/Makefile.am +@@ -3,24 +3,10 @@ EXTRA_DIST = system.data.auth system.dat + + install: install-exec-hook + if test ! -e ${DESTDIR}/@sysconfdir@/tcsd.conf; then mkdir -p ${DESTDIR}/@sysconfdir@ && cp tcsd.conf ${DESTDIR}/@sysconfdir@; fi +-if !NOUSERCHECK +- /bin/chown tss:tss ${DESTDIR}/@sysconfdir@/tcsd.conf || true +- /bin/chmod 0600 ${DESTDIR}/@sysconfdir@/tcsd.conf +-endif + + install-exec-hook: + /bin/sh -c 'if [ ! -e ${DESTDIR}/@localstatedir@/lib/tpm ];then mkdir -p ${DESTDIR}/@localstatedir@/lib/tpm; fi' +-if !NOUSERCHECK +- /usr/sbin/groupadd tss || true +- /usr/sbin/useradd -r tss -g tss || true +- /bin/chown tss:tss ${DESTDIR}/@localstatedir@/lib/tpm || true +- /bin/chmod 0700 ${DESTDIR}/@localstatedir@/lib/tpm +-endif + + uninstall-hook: + rm ${DESTDIR}/@sysconfdir@/tcsd.conf + rmdir ${DESTDIR}/@localstatedir@/lib/tpm +-if !NOUSERCHECK +- /usr/sbin/userdel tss || true +- /usr/sbin/groupdel tss || true +-endif @@ -1,4 +1,5 @@ # Maintainer: mutantmonkey <aur@mutantmonkey.in> +# Contributor: Gerardo Exequiel Pozzi <djgera@archlinux.org> # Contributor: Robert Buhren <robert@robertbuhren.de> # Contributor: Gavin Lloyd <gavinhungry@gmail.com> # Contributor: xav <xav at ethertricks dot net> @@ -7,26 +8,37 @@ pkgname=trousers pkgver=0.3.14 -pkgrel=2 +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') options=('libtool') -install=${pkgname}.install source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz - ${pkgname}.install + sysusers.conf + tmpfiles.conf tcsd.service - 70-tpmd.rules) + 70-tpmd.rules + 01-tss-user.patch) +noextract=(${pkgname}-${pkgver}.tar.gz) sha256sums=('ce50713a261d14b735ec9ccd97609f0ad5ce69540af560e8c3ce9eb5f2d28f47' - '18a96f4067968d947d5c4d4572b360de19cc940e082e221768add82a24539b9e' + '4c2684501e7a67132d4f53466b32fc06bd2a0275d4cf1fbd5479d0cdb2349bc7' + '1afd455b6c17e730b2cc4ec71d5625f0b63fde54f9409ae4762dc6f084c194de' '653c3a94ec628e7a7fb150d0d289b0866c6b3bb9aa57af2c59724517d205d7bd' - 'c50ea41a4809699dd50f2e621acc6baafb2dffa43cd5a0df8a0679f1d1b1b884') + 'c50ea41a4809699dd50f2e621acc6baafb2dffa43cd5a0df8a0679f1d1b1b884' + '169cc2cbc3a8bce7fd76e0c96e5b04b5249a0db9e857b274a0c5da461bb604f7') + +prepare() { + mkdir -p ${pkgname}-${pkgver} + bsdtar -x -f ${pkgname}-${pkgver}.tar.gz -C ${pkgname}-${pkgver} + cd ${pkgname}-${pkgver} + patch -p1 -i ${srcdir}/01-tss-user.patch +} build() { - # the tarball for 0.3.14 doesn't have a parent directory - cd ${srcdir}/ + cd ${pkgname}-${pkgver} + ./bootstrap.sh ./configure --prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib \ @@ -37,11 +49,12 @@ build() { } package() { - # the tarball for 0.3.14 doesn't have a parent directory - cd ${srcdir}/ + cd ${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 + install -Dm644 ${srcdir}/sysusers.conf ${pkgdir}/usr/lib/sysusers.d/trousers.conf + install -Dm644 ${srcdir}/tmpfiles.conf ${pkgdir}/usr/lib/tmpfiles.d/trousers.conf } # vim:set ts=2 sw=2 et: diff --git a/sysusers.conf b/sysusers.conf new file mode 100644 index 000000000000..9b5ef17b18c2 --- /dev/null +++ b/sysusers.conf @@ -0,0 +1 @@ +u tss - "TCG Software Stack" /var/lib/tpm diff --git a/tmpfiles.conf b/tmpfiles.conf new file mode 100644 index 000000000000..32d03dd8ee7d --- /dev/null +++ b/tmpfiles.conf @@ -0,0 +1,2 @@ +d /var/lib/tpm 0700 tss tss +z /etc/tcsd.conf 0600 tss tss diff --git a/trousers.install b/trousers.install deleted file mode 100644 index 3725e078b5a9..000000000000 --- a/trousers.install +++ /dev/null @@ -1,21 +0,0 @@ -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 -} |