From 7321bc1849acdaa5d836cd0b9b3f6e3117c2ee2d Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 06 Jun 2019 23:19:18 -0400 Subject: source.mk: Update and use xz And B-D on gpg and dirmngr. --- diff --git a/control b/control index 91b02da..60871b4 100644 --- a/control +++ b/control @@ -1,3 +1,3 @@ Maintainer: Patrick McDermott -Build-Depends: opkhelper-3.0, libz.1-dev +Build-Depends: gpg, dirmngr, opkbuild (>= 4.0.0), opkhelper-3.0, libz.1-dev Homepage: https://mj.ucw.cz/sw/pciutils/ diff --git a/source.mk b/source.mk index ab88767..c2d06d0 100644 --- a/source.mk +++ b/source.mk @@ -1,19 +1,25 @@ -upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz -upstream_url = ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/$(upstream_archive) -source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz -keys = '5558 F939 9CD7 8368 5055 3C6E C28E 7847 ED70 F82D' +upstream_archive_base = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar +upstream_mirror = http://mirrors.edge.kernel.org/pub/software/utils/pciutils +upstream_url = $(upstream_mirror)/$(upstream_archive_base) +source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz + +gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg +keys = \ + '5558 F939 9CD7 8368 5055 3C6E C28E 7847 ED70 F82D' $(source_archive): - wget -c '$(upstream_url)' - set -e; if gpg --version >/dev/null 2>&1; then \ - wget -c '$(upstream_url).sign'; \ - [ -e ../keyring.gpg ] || \ - gpg --keyring ../keyring.gpg --no-default-keyring \ - --recv-keys $(keys) || true; \ - rm -f ../keyring.gpg~; \ - gpg --verify --keyring ../keyring.gpg \ - '$(upstream_archive).sign'; \ + wget -c '$(upstream_url).xz' '$(upstream_url).sign' + install -m 0700 -d gnupghome/ + [ -e ../keyring.gpg ] || \ + $(gpg) --keyserver hkp://pool.sks-keyservers.net \ + --recv-keys $(keys); \ + rm -f ../keyring.gpg~; \ + if ! unxz -c '$(upstream_archive_base).xz' | \ + $(gpg) --verify '$(upstream_archive_base).sign' -; then\ + rm -Rf gnupghome/; \ + exit 1; \ fi - mv '$(upstream_archive)' '$@' + rm -Rf gnupghome/ + mv '$(upstream_archive_base).xz' '$@' source: $(source_archive) -- cgit v0.9.1