Support multiple keys per username

This commit is contained in:
Pierre Schmitz 2013-09-26 22:55:57 +02:00
parent 41a6cdafc7
commit 09a1d89a38

View File

@ -32,7 +32,7 @@ while read -ra data; do
printf 'minimize\nquit\ny\n' | \ printf 'minimize\nquit\ny\n' | \
${GPG} --command-fd 0 --edit-key ${keyid} ${GPG} --command-fd 0 --edit-key ${keyid}
${GPG} --yes --lsign-key ${keyid} &>/dev/null ${GPG} --yes --lsign-key ${keyid} &>/dev/null
${GPG} --armor --no-emit-version --output master/${username}.asc --export ${keyid} ${GPG} --armor --no-emit-version --export ${keyid} >> master/${username}.asc
echo "${keyid}:4:" >> archlinux-trusted echo "${keyid}:4:" >> archlinux-trusted
done < master-keyids done < master-keyids
${GPG} --import-ownertrust < archlinux-trusted 2>/dev/null ${GPG} --import-ownertrust < archlinux-trusted 2>/dev/null
@ -49,7 +49,7 @@ while read -ra data; do
if ! ${GPG} --list-keys --with-colons ${keyid} 2>/dev/null | grep -q '^pub:f:'; then if ! ${GPG} --list-keys --with-colons ${keyid} 2>/dev/null | grep -q '^pub:f:'; then
echo "key is not fully trusted: ${keyid} ${username}" echo "key is not fully trusted: ${keyid} ${username}"
else else
${GPG} --armor --no-emit-version --output packager/${username}.asc --export ${keyid} ${GPG} --armor --no-emit-version --export ${keyid} >> packager/${username}.asc
fi fi
done < packager-keyids done < packager-keyids
@ -60,7 +60,7 @@ while read -ra data; do
printf 'clean\nquit\ny\n' | \ printf 'clean\nquit\ny\n' | \
${GPG} --command-fd 0 --edit-key ${keyid} ${GPG} --command-fd 0 --edit-key ${keyid}
if ! ${GPG} --list-keys --with-colons ${keyid} 2>/dev/null | grep -q '^pub:f:'; then if ! ${GPG} --list-keys --with-colons ${keyid} 2>/dev/null | grep -q '^pub:f:'; then
${GPG} --armor --no-emit-version --output packager-revoked/${username}.asc --export ${keyid} ${GPG} --armor --no-emit-version --export ${keyid} >> packager-revoked/${username}.asc
echo "${keyid}" >> archlinux-revoked echo "${keyid}" >> archlinux-revoked
else else
echo "key is still fully trusted: ${keyid} ${username}" echo "key is still fully trusted: ${keyid} ${username}"