From 6291227eddd1890125219d2751bd09a21cb08dd4 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 10 Jun 2018 10:48:48 +0200 Subject: Update pkgbuild - add sha512sum check to prepare() --- linux/makepkg/PKGBUILD | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'linux') diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD index 5aad62a..d631cf7 100644 --- a/linux/makepkg/PKGBUILD +++ b/linux/makepkg/PKGBUILD @@ -17,13 +17,27 @@ makedepends=('mercurial' 'cmake' 'pkg-config' 'ninja' 'qt5-webengine>=5.10.1' 'b # this is the central repository source=("smolbote-hg::hg+https://neueland.iserlohn-fortress.net/smolbote.hg") -# if you're test building, you want to hg serve your own repo +# if you're test building, you might want to hg serve your own repo #source=("smolbote-hg::hg+http://localhost:8000") + sha512sums=('SKIP') +validgpgkeys=(# Aqua-sama + BB1C090188E3E32B375C13FD095DE26BC16D2E98) + +prepare() { + # go into src/smolbote-hg + cd smolbote-hg -# any patches go here -#prepare() { -#} + msg "Verifying integrity" + # get commit id + _node="$(hg log -r tip --template='{node}')" + # download checksums and signature + curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$_node \ + -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$_node.sig + # verify signature and files + gpg --verify $_node.sig + sha512sum --check --quiet $_node +} pkgver() { cd smolbote-hg @@ -31,6 +45,7 @@ pkgver() { } build() { + # src/smolbote-hg-r000.123456789012 rm -rf "$pkgname-$pkgver" mkdir "$pkgname-$pkgver" cd "$pkgname-$pkgver" -- cgit v1.2.1