diff options
author | Corey Hinshaw | 2018-10-01 22:35:40 -0400 |
---|---|---|
committer | Corey Hinshaw | 2018-10-01 22:35:40 -0400 |
commit | b0141dc7e52deeaa053aa4c014a17fb6a3b26b57 (patch) | |
tree | 9f9217051c3e0c043ed1243315b511aea4c31329 | |
download | aur-b0141dc7e52deeaa053aa4c014a17fb6a3b26b57.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | luks-tpm2.hook | 14 | ||||
-rw-r--r-- | luks-tpm2.install | 9 |
5 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2c8ade0f38d4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = luks-tpm2 + pkgdesc = Utility to manage LUKS keys sealed by a TPM 2.0 + pkgver = 0.2.0 + pkgrel = 1 + url = https://github.com/electrickite/luks-tpm2 + install = luks-tpm2.install + arch = any + license = GPL3 + depends = tpm2-tools + depends = cryptsetup + depends = bash + depends = coreutils + depends = util-linux + depends = grep + backup = etc/default/luks-tpm2 + source = https://github.com/electrickite/luks-tpm2/archive/0.2.0.tar.gz + source = luks-tpm2.hook + sha1sums = 532a01773275c03000f3b5575fd89c2cd4de0128 + sha1sums = 3b45f32a95d31bd7e0937ba6ba14b67a144809e9 + +pkgname = luks-tpm2 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0cced017d91a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.tar.xz +*.tar.gz +/pkg +/src diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..79753da14a97 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Corey Hinshaw <coreyhinshaw(at)gmail(dot)com> + +pkgname=luks-tpm2 +pkgver=0.2.0 +pkgrel=1 +pkgdesc="Utility to manage LUKS keys sealed by a TPM 2.0" +arch=('any') +url="https://github.com/electrickite/luks-tpm2" +license=('GPL3') +install="${pkgname}.install" +backup=('etc/default/luks-tpm2') +depends=('tpm2-tools' + 'cryptsetup' + 'bash' + 'coreutils' + 'util-linux' + 'grep') +source=("https://github.com/electrickite/${pkgname}/archive/${pkgver}.tar.gz" + 'luks-tpm2.hook') +sha1sums=('532a01773275c03000f3b5575fd89c2cd4de0128' + '3b45f32a95d31bd7e0937ba6ba14b67a144809e9') + + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Install files + install -Dm755 luks-tpm2 ${pkgdir}/usr/bin/luks-tpm2 + install -Dm644 default ${pkgdir}/etc/default/luks-tpm2 + install -Dm644 ${srcdir}/luks-tpm2.hook ${pkgdir}/usr/share/libalpm/hooks/luks-tpm2.hook +} diff --git a/luks-tpm2.hook b/luks-tpm2.hook new file mode 100644 index 000000000000..261a56781ca3 --- /dev/null +++ b/luks-tpm2.hook @@ -0,0 +1,14 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = File +Target = boot/vmlinuz-linux* +Target = boot/intel-ucode.img +Target = usr/lib/initcpio/* +Target = usr/lib/systemd/boot/efi/linux*.efi.stub + +[Action] +Description = Adding temporary LUKS TPM key... +When = PostTransaction +Exec = /usr/bin/luks-tpm temp diff --git a/luks-tpm2.install b/luks-tpm2.install new file mode 100644 index 000000000000..2fcb719df3e0 --- /dev/null +++ b/luks-tpm2.install @@ -0,0 +1,9 @@ +post_install() { +cat << EOF + + Configure luks-tpm2 by editing /etc/default/luks-tpm2 + A pacman hook has been installed at /usr/share/libalpm/hooks/luks-tpm2.hook + Consider overriding this hook by creating /etc/pacman.d/hooks/luks-tpm2.hook + +EOF +} |