summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-30 21:07:35 +0100
committerDan McGee <dan@archlinux.org>2011-11-30 21:07:35 +0100
commit4590196d79273c49172e2da74e7a7b31e59d7a27 (patch)
tree5f022bea21d6a44682ad74a1375bdea8171a839c /devel
parent6b8ef446bcd6a1cbc794d0846968e806034d3aad (diff)
downloadarchweb-4590196d79273c49172e2da74e7a7b31e59d7a27.tar.gz
archweb-4590196d79273c49172e2da74e7a7b31e59d7a27.tar.xz
Integrate master key into rest of site
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/generate_keyring.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/devel/management/commands/generate_keyring.py b/devel/management/commands/generate_keyring.py
index 35ab887..a3a764b 100644
--- a/devel/management/commands/generate_keyring.py
+++ b/devel/management/commands/generate_keyring.py
@@ -13,6 +13,7 @@ import logging
import subprocess
import sys
+from devel.models import MasterKey
from main.models import UserProfile
logging.basicConfig(
@@ -48,11 +49,14 @@ def generate_keyring(keyserver, keyring):
pgp_key__isnull=False).extra(where=["pgp_key != ''"]).values_list(
"pgp_key", flat=True)
logger.info("%d keys fetched from user profiles", len(key_ids))
+ master_key_ids = MasterKey.objects.values_list("pgp_key", flat=True)
+ logger.info("%d keys fetched from master keys", len(master_key_ids))
gpg_cmd = ["gpg", "--no-default-keyring", "--keyring", keyring,
"--keyserver", keyserver, "--recv-keys"]
logger.info("running command: %r", gpg_cmd)
gpg_cmd.extend(key_ids)
+ gpg_cmd.extend(master_key_ids)
subprocess.check_call(gpg_cmd)
logger.info("keyring at %s successfully updated", keyring)