[pacman-dev] [PATCH] GPGSIG in repo-add

geoffroy.carrier at koon.fr geoffroy.carrier at koon.fr
Mon Jun 2 04:27:01 EDT 2008


From: Geoffroy Carrier <geoffroy.carrier at koon.fr>

---
Here comes the repo-add work. Pretty simple, as you see.
It is pretty straight-forward. The main idea is to use base64, as it can't interfere with
the 'desc' fileformat and won't produce too big lines (as signatures are less than 100 bytes,
it produces less than 150 characters...). Plus it's in coreutils. I don't know much about
*BSD and Mac OS X.

 scripts/repo-add.sh.in |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index e90f0e8..f35d9b9 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -204,6 +204,9 @@ db_write_entry()
 	msg2 "$(gettext "Computing md5 checksums...")"
 	echo -e "%MD5SUM%\n$(md5sum "$pkgfile" | cut -d ' ' -f 1)\n" >>desc
 
+	# add base64'd gpg signature
+	[ -f "$pkgfile.sig" ] && echo -e "%GPGSIG%\n$(base64 -w 0 "$pkgfile.sig")\n" >>desc
+
 	[ -n "$url" ] && echo -e "%URL%\n$url\n" >>desc
 	write_list_entry "LICENSE" "$_licenses" "desc"
 	[ -n "$arch" ] && echo -e "%ARCH%\n$arch\n" >>desc
-- 
1.5.5.3





More information about the pacman-dev mailing list