summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Witschel2020-11-18 21:21:14 +0100
committerJonas Witschel2020-11-18 21:21:14 +0100
commita6125a42b3f5edec32c70455d4e8d079510ff9f4 (patch)
tree5ebf82322a09e1ebc9a3c949029d3464931362da
parent32cefe3c8b297f836373af94719c771ef0146a00 (diff)
downloadaur-a6125a42b3f5edec32c70455d4e8d079510ff9f4.tar.gz
Initial upload: swtpm-git 0.5.0.r18.f495d8f-1
-rw-r--r--.SRCINFO41
-rw-r--r--PKGBUILD70
2 files changed, 67 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 85993a94015..e15033054e3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,34 +1,31 @@
-# Generated by mksrcinfo v8
-# Thu Jan 7 15:49:32 UTC 2016
pkgbase = swtpm-git
- pkgdesc = Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface.
- pkgver = c9de5f0
+ pkgdesc = Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface
+ pkgver = 0.5.0.r18.f495d8f
pkgrel = 1
url = https://github.com/stefanberger/swtpm
- arch = i686
arch = x86_64
license = BSD
- makedepends = automake
- makedepends = autoconf
- makedepends = bash
- makedepends = coreutils
+ checkdepends = softhsm
+ makedepends = git
makedepends = expect
- makedepends = sed
- depends = openssl
- depends = zlib
- depends = libtpms
- depends = tpm-tools
- depends = pcre
- depends = libtasn1
- depends = gnutls
- depends = p11-kit
- depends = nettle
- depends = libffi
- depends = fuse
+ makedepends = gnutls
+ makedepends = iproute2
+ makedepends = libtasn1
+ makedepends = python
+ makedepends = python-cryptography
+ makedepends = python-setuptools
+ makedepends = socat
+ depends = fuse2
depends = glib2
+ depends = libseccomp
+ depends = libtpms
+ depends = libseccomp.so
+ optdepends = gnutls: swtpm_cert support
+ optdepends = python-cryptography: swtpm_setup support
provides = swtpm
+ conflicts = swtpm
source = git+https://github.com/stefanberger/swtpm.git
- sha1sums = SKIP
+ sha512sums = SKIP
pkgname = swtpm-git
diff --git a/PKGBUILD b/PKGBUILD
index bdcf89f4049..3ab931a57fc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,60 @@
-# Maintainer: Robin Nehls <aur@manol.is>
-
+# Maintainer: Jonas Witschel <diabonas@archlinux.org>
pkgname=swtpm-git
-pkgver=c9de5f0
+pkgver=0.5.0.r18.f495d8f
pkgrel=1
-pkgdesc="Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface."
-arch=('i686' 'x86_64')
-url="https://github.com/stefanberger/swtpm"
+pkgdesc='Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface'
+arch=('x86_64')
+url='https://github.com/stefanberger/swtpm'
license=('BSD')
-depends=('openssl' 'zlib' 'libtpms' 'tpm-tools' 'pcre' 'libtasn1' 'gnutls' 'p11-kit' 'nettle' 'libffi' 'fuse' 'glib2')
-makedepends=('automake' 'autoconf' 'bash' 'coreutils' 'expect' 'sed')
-provides=('swtpm')
-source=('git+https://github.com/stefanberger/swtpm.git')
-sha1sums=('SKIP')
-_gitname=swtpm
+depends=('fuse2' 'glib2' 'libseccomp' 'libtpms' 'libseccomp.so')
+makedepends=('git' 'expect' 'gnutls' 'iproute2' 'libtasn1' 'python' 'python-cryptography' 'python-setuptools' 'socat')
+checkdepends=('softhsm')
+optdepends=('gnutls: swtpm_cert support'
+ 'python-cryptography: swtpm_setup support')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("git+$url.git")
+sha512sums=('SKIP')
pkgver() {
- cd $_gitname
- echo $(git describe --always | sed 's/-/./g')
+ cd "${pkgname%-git}"
+ git describe | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${pkgname%-git}"
+
+ # Remove usage of /usr/bin/env to avoid PATH manipulation attacks
+ sed --in-place 's/env //' samples/swtpm-create-tpmca samples/swtpm-create-user-config-files.in \
+ samples/swtpm-localca.in src/swtpm_setup/py_swtpm_setup/swtpm_setup.py \
+ src/swtpm_setup/swtpm_setup.in
+
+ autoreconf --install --force
}
build() {
- cd $_gitname
- ./bootstrap.sh
- ./configure --prefix=/usr --with-openssl
- make
+ cd "${pkgname%-git}"
+ ./configure --prefix=/usr --with-cuse --with-gnutls --with-seccomp --disable-python-installation
+ make
+
+ for _dir in samples src/swtpm_setup; do (cd "$_dir"; python setup.py build); done
}
-package() {
- cd $_gitname
- make DESTDIR="${pkgdir}" install
+check() {
+ cd "${pkgname%-git}"
+ make check
}
-# vim:set ts=2 sw=2 et:
+package() {
+ cd "${pkgname%-git}"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+
+ for _dir in samples src/swtpm_setup
+ do
+ (cd "$_dir"; python setup.py install --root="$pkgdir" --optimize=1 --skip-build)
+ done
+
+ echo 'u tss - "tss user for tpm2"' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+ echo 'z /var/lib/swtpm-localca 0750 tss root' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+}