From 8fde399fe62c3a08310e1830bb15b6e93ed360f9 Mon Sep 17 00:00:00 2001 From: Geoffroy Carrier Date: Mon, 2 Jun 2008 10:27:01 +0200 Subject: Add PGPSIG field in repo-add Use base64 encoding to store the value in the database if a .sig file exists for the package being added. Signed-off-by: Geoffroy Carrier Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index dfc93974..70cfd63c 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -268,6 +268,12 @@ db_write_entry() msg2 "$(gettext "Computing md5 checksums...")" echo -e "%MD5SUM%\n$md5sum\n" >>desc + # add base64'd PGP signature + if [[ -f $startdir/$pkgfile.sig ]]; then + pgpsig=$(openssl base64 -in "$startdir/$pkgfile.sig" | tr -d '\n') + echo -e "%PGPSIG%\n$pgpsig\n" >>desc + fi + [[ -n $url ]] && echo -e "%URL%\n$url\n" >>desc write_list_entry "LICENSE" "$_licenses" "desc" [[ -n $arch ]] && echo -e "%ARCH%\n$arch\n" >>desc -- cgit v1.2.3-70-g09d2