summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeoffroy Carrier <geoffroy.carrier@koon.fr>2008-06-02 10:27:01 +0200
committerDan McGee <dan@archlinux.org>2011-03-23 00:26:54 -0500
commit8fde399fe62c3a08310e1830bb15b6e93ed360f9 (patch)
treeedb9ecc306752c7f262264084baa301b3b1bcc45 /scripts
parent2f2f53ddc9f05d00244a41a66eef9ed34bc87463 (diff)
downloadpacman-8fde399fe62c3a08310e1830bb15b6e93ed360f9.tar.xz
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 <geoffroy.carrier@koon.fr> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/repo-add.sh.in6
1 files changed, 6 insertions, 0 deletions
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