Skip to content

Commit

Permalink
Check APK integrity. Fixes #2
Browse files Browse the repository at this point in the history
F-Droid repo keys: https://f-droid.org/en/docs/Release_Channels_and_Signing_Keys/
microG repo keys: manual search at https://pgp.mit.edu/pks/lookup?search=microG+project&op=index since there's no clue at their webpage
  • Loading branch information
Roboe committed Jun 19, 2018
1 parent 25a7d78 commit 6e07cb3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
16 changes: 16 additions & 0 deletions src/apps/common.defs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export GPG_KEYSERVER := pgp.mit.edu

.PHONY: all

all: $(PACKAGE_NAME).apk
$(PACKAGE_NAME).apk: $(PACKAGE_ID)_$(VERSION_CODE).apk $(PACKAGE_ID)_$(VERSION_CODE).apk.asc
@gpg --quiet --list-key "$(REPO_GPG)" \
|| gpg --quiet --keyserver $(GPG_KEYSERVER) --recv-keys "$(REPO_GPG)"
@gpg --verify $(word 2,$^) $<
@cp $< $@

$(PACKAGE_ID)_$(VERSION_CODE).apk:
@curl $(DOWNLOAD_URL) -o $@

$(PACKAGE_ID)_$(VERSION_CODE).apk.asc:
@curl $(DOWNLOAD_SIG) -o $@
11 changes: 3 additions & 8 deletions src/apps/fdroid.defs.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
export REPO_URL := https://f-droid.org/repo/
export REPO_GPG := 37D2 C987 89D8 3119 4839 4E3E 41E7 044E 1DBA 2E89
export DOWNLOAD_URL := $(REPO_URL)/$(PACKAGE_ID)_$(VERSION_CODE).apk
export DOWNLOAD_SIG := $(DOWNLOAD_URL).asc


.PHONY: build

all: $(PACKAGE_NAME).apk
$(PACKAGE_NAME).apk: $(PACKAGE_ID)_$(VERSION_CODE).apk
@cp $< $@

$(PACKAGE_ID)_$(VERSION_CODE).apk:
@curl $(DOWNLOAD_URL) -o $@
include ../common.defs.mk
12 changes: 3 additions & 9 deletions src/apps/microg.defs.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
export REPO_URL := https://microg.org/fdroid/repo
export REPO_GPG := 0x7F979A66F3E08422
export DOWNLOAD_URL := $(REPO_URL)/$(PACKAGE_ID)-$(VERSION_CODE).apk
export DOWNLOAD_SIG := $(DOWNLOAD_URL).asc


.PHONY: build

build: $(PACKAGE_NAME).apk
$(PACKAGE_NAME).apk: $(PACKAGE_ID)_$(VERSION_CODE).apk
@cp $< $@

$(PACKAGE_ID)_$(VERSION_CODE).apk:
@curl $(DOWNLOAD_URL) -o $@
include ../common.defs.mk

0 comments on commit 6e07cb3

Please sign in to comment.