From a2a6986c2719849d4e794261f29c8689701445e3 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 21 Jun 2011 23:59:42 +0100 Subject: Make keyfile dependency in makefile explicit, update TODO --- Makefile | 17 +++++++++-------- TODO | 8 ++++++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 0ef8372..46a0b83 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,9 @@ all: xpi crx web: web/index.html web/gecko-updates.rdf web/chromium-updates.xml +$(KEYFILE): + openssl genrsa 1024 > $@ + sign: if test -f $(NAME)-$(VERSION).tar.bz2; then \ gpg -b < $(NAME)-$(VERSION).tar.bz2 > $(NAME)-$(VERSION).tar.bz2.sig; \ @@ -25,7 +28,7 @@ sign: echo $(NAME)-$(VERSION).tar.crx.sig; fi # TODO: test makefile dependency is portable (and correct) -web/gecko-updates.rdf: $(NAME)-$(VERSION).xpi +web/gecko-updates.rdf: $(NAME)-$(VERSION).xpi $(KEYFILE) uhura -o $@ -k $(KEYFILE) $(NAME)-$(VERSION).xpi $(WEBSITE)/$(NAME)-$(VERSION).xpi # gensig not working yet @@ -55,11 +58,11 @@ web/index.html: web/doap.ttl README echo "a {text-decoration:none; border-bottom-width:thin; border-bottom-style:dotted;}" >> $@ echo "" >> $@ smu < README >> $@ - echo "[$(NAME) $(VERSION) source]($(NAME)-$(VERSION).tar.bz2) ([sig]($(NAME)-$(VERSION).tar.bz2.sig))" | smu >> $@ + echo "[SimplyRead $(VERSION) source]($(NAME)-$(VERSION).tar.bz2) ([sig]($(NAME)-$(VERSION).tar.bz2.sig))" | smu >> $@ - echo "[$(NAME) $(VERSION) for Firefox]($(NAME)-$(VERSION).xpi) ([sig]($(NAME)-$(VERSION).xpi.sig))" | smu >> $@ + echo "[SimplyRead $(VERSION) for Firefox]($(NAME)-$(VERSION).xpi) ([sig]($(NAME)-$(VERSION).xpi.sig))" | smu >> $@ - echo "[$(NAME) $(VERSION) for Chromium]($(NAME)-$(VERSION).crx) ([sig]($(NAME)-$(VERSION).crx.sig))" | smu >> $@ + echo "[SimplyRead $(VERSION) for Chromium]($(NAME)-$(VERSION).crx) ([sig]($(NAME)-$(VERSION).crx.sig))" | smu >> $@ echo '
' >> $@ sh web/websummary.sh web/doap.ttl | smu >> $@ @@ -73,9 +76,8 @@ dist: rm -rf $(NAME)-$(VERSION) echo $(NAME)-$(VERSION).tar.bz2 -xpi: +xpi: $(KEYFILE) rm -rf $(NAME)-$(VERSION).xpi gecko-build - test -f $(KEYFILE) || openssl genrsa 1024 > $(KEYFILE) mkdir -p gecko-build/chrome/content sed 2q < COPYING > gecko-build/COPYING cp gecko/chrome.manifest gecko-build/ @@ -89,9 +91,8 @@ xpi: rm -rf gecko-build echo $(NAME)-$(VERSION).xpi -crx: +crx: $(KEYFILE) rm -rf chromium-build - test -f $(KEYFILE) || openssl genrsa 1024 > $(KEYFILE) mkdir chromium-build sed 2q < COPYING > chromium-build/COPYING cp simplyread.js keybind.js chromium/viable.js chromium/background.html chromium-build/ diff --git a/TODO b/TODO index 7faeee9..9795f23 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,10 @@ +chromium: + generate appid for use in update xml + see GenerateId in extension.cc of chrome for how it works + currently should be dbggpgfcgemloeeldimghohejgnkahdi + gecko: - finish update support. this means use tool http://www.softlights.net/projects/mxtools/uhura.html to sign mozilla thing - once it's working look into using rapper and bourne shell script to sign + use rapper and bourne shell script to sign this is difficult as mozilla wants the signature of a very particular serialisation of the update rdf https://developer.mozilla.org/en/Extension_Versioning,_Update_and_Compatibility#Update_RDF_Format openssl dgst -sha512 -binary -sign private.pem web/gecko-updates.rdf i'm pretty sure generates the correct signature. however it then has to be encoded, using asn1/der & base64. also, according to the docs only the hash is signed/hashed, whereas it looks like the whole (particularly serialised) rdf is used by uhura -- cgit v1.2.3