Commit 7cfc0b5a authored by Enrico Zini's avatar Enrico Zini
Browse files

Use system keyrings by default

parent a3ddaeb2
......@@ -5,5 +5,5 @@ tests:
stage: test
script:
- apt-get update
- apt-get -y install python3 python3-markdown python3-ldap3 python3-psycopg2 python3-xapian python3-django python3-django-housekeeping python3-debian python3-debiancontributors python3-djangorestframework gnupg
- apt-get -y install python3 python3-markdown python3-ldap3 python3-psycopg2 python3-xapian python3-django python3-django-housekeeping python3-debian python3-debiancontributors python3-djangorestframework gnupg debian-keyring
- python3 manage.py test -v2 --failfast
......@@ -6,10 +6,9 @@ WARNING: project moved to https://salsa.debian.org/nm-team/nm.debian.org
## Running this code on your own machine
### Dependencies
apt-get install python3-markdown python3-ldap3 python3-psycopg2 python3-xapian \
python3-django python3-django-housekeeping \
python3-debian python3-debiancontributors \
python3-djangorestframework
apt-get install python3 python3-markdown python3-ldap3 python3-psycopg2
python3-xapian python3-django python3-django-housekeeping python3-debian \
python3-debiancontributors python3-djangorestframework gnupg debian-keyring
### Configuration
......@@ -35,9 +34,6 @@ email databases to anyone.
If you are a Front Desk member or a DAM, you can use
https://nm.debian.org/am/db-export?full for a full database export.
### Sync keyrings
rsync -az --progress keyring.debian.org::keyrings/keyrings/ ./data/keyrings/
### Run database maintenance
./manage.py housekeeping
......
......@@ -26,7 +26,6 @@ import logging
log = logging.getLogger(__name__)
KEYRINGS = getattr(settings, "KEYRINGS", "/srv/keyring.debian.org/keyrings")
KEYRINGS_TMPDIR = getattr(settings, "KEYRINGS_TMPDIR", "/srv/keyring.debian.org/data/tmp_keyrings")
#KEYSERVER = getattr(settings, "KEYSERVER", "keys.gnupg.net")
KEYSERVER = getattr(settings, "KEYSERVER", "pool.sks-keyservers.net")
......@@ -307,6 +306,7 @@ class GPG(object):
Build a gpg invocation command using the given keyring, or sequence of
keyring names
"""
KEYRINGS = getattr(settings, "KEYRINGS", "/usr/share/keyrings")
# If we only got one string, make it into a sequence
if isinstance(keyrings, str):
keyrings = (keyrings, )
......
......@@ -29,8 +29,6 @@ def cursor():
CACHE_FILE="make-dm-list.cache"
KEYRINGS = getattr(settings, "KEYRINGS", "/srv/keyring.debian.org/keyrings")
# Reused from dak, to exactly follow what they do
#
# <Culus> 'The standard sucks, but my tool is supposed to interoperate
......@@ -65,6 +63,7 @@ def fix_maintainer(maintainer):
def read_gpg():
"Read DM info from the DB keyring"
KEYRINGS = getattr(settings, "KEYRINGS", "/usr/share/keyrings")
keyring = os.path.join(KEYRINGS, "debian-maintainers.gpg")
re_email = re.compile(r"<(.+?)>")
re_unmangle = re.compile(r"\\x([0-9A-Fa-f][0-9A-Fa-f])")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment