From fe0a8c785162fa46013ebc9e44610e7dbf257423 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 24 Sep 2022 14:16:52 +0200 Subject: [PATCH] Replace gnupg and PGP with OpenPGP This commit replaces the tool names gnupg and PGP with the standard RFC term OpenPGP. Thanks to Guillem Jover for the inspiration. --- ChangeLog | 1 + debianmemberportfolio/forms.py | 4 ++-- debianmemberportfolio/model/dddatabuilder.py | 8 ++++---- debianmemberportfolio/model/keyfinder.py | 4 ++-- debianmemberportfolio/model/portfolio.ini | 4 ++-- debianmemberportfolio/model/urlbuilder.py | 8 ++++---- debianmemberportfolio/templates/base.html | 4 ++-- debianmemberportfolio/templates/showform.html | 10 +++++----- .../templates/showformscript.js | 20 +++++++++---------- debianmemberportfolio/views.py | 8 ++++---- docs/source/devdocs.rst | 6 +++--- setup.py | 4 ++-- 12 files changed, 41 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9254807..274d149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ unreleased Jan Dittberner * add updated translations from Weblate * update dependencies + * replace gpg and pgp with OpenPGP (thanks Guillem Jover) 2021-10-24 Jan Dittberner * add updated translations from Weblate diff --git a/debianmemberportfolio/forms.py b/debianmemberportfolio/forms.py index 24872ee..fc3d132 100644 --- a/debianmemberportfolio/forms.py +++ b/debianmemberportfolio/forms.py @@ -3,7 +3,7 @@ # # Debian Member Portfolio Service views # -# Copyright © 2015-2020 Jan Dittberner +# Copyright © 2015-2022 Jan Dittberner # # This file is part of the Debian Member Portfolio Service. # @@ -51,7 +51,7 @@ def gpg_fingerprint(data): class DeveloperData(FlaskForm): email = StringField('email', validators=[DataRequired(), Email()]) name = StringField('name', validators=[Optional(), DataRequired()]) - gpgfp = StringField('gpgfp', filters=[gpg_fingerprint], validators=[ + openpgpfp = StringField('openpgpfp', filters=[gpg_fingerprint], validators=[ Optional(), FingerPrint(), Length(min=32, max=40) ]) username = StringField('username', validators=[Optional(), PlainText()]) diff --git a/debianmemberportfolio/model/dddatabuilder.py b/debianmemberportfolio/model/dddatabuilder.py index c168489..1fa5be1 100644 --- a/debianmemberportfolio/model/dddatabuilder.py +++ b/debianmemberportfolio/model/dddatabuilder.py @@ -3,7 +3,7 @@ # # Debian Member Portfolio Service data builder # -# Copyright © 2009-2015 Jan Dittberner +# Copyright © 2009-2022 Jan Dittberner # # This file is part of the Debian Member Portfolio Service. # @@ -39,13 +39,13 @@ def build_data(email_address): """Build a DD data structure from a given email address.""" fields = dict([(field, func(str(email_address))) for (field, func) in - [('gpgfp', keyfinder.getFingerprintByEmail), + [('openpgpfp', keyfinder.getFingerprintByEmail), ('name', keyfinder.getRealnameByEmail), ('username', keyfinder.getLoginByEmail)]]) fields['email'] = email_address - if fields['username'] and fields['gpgfp'] and fields['name']: + if fields['username'] and fields['openpgpfp'] and fields['name']: fields['type'] = TYPE_DD - elif fields['name'] and fields['gpgfp']: + elif fields['name'] and fields['openpgpfp']: fields['type'] = TYPE_DM else: fields['type'] = TYPE_NO diff --git a/debianmemberportfolio/model/keyfinder.py b/debianmemberportfolio/model/keyfinder.py index 5129e54..c4b8a54 100644 --- a/debianmemberportfolio/model/keyfinder.py +++ b/debianmemberportfolio/model/keyfinder.py @@ -3,7 +3,7 @@ # # Debian Member Portfolio Service key finder module # -# Copyright © 2009-2015 Jan Dittberner +# Copyright © 2009-2022 Jan Dittberner # # This file is part of the Debian Member Portfolio Service. # @@ -21,7 +21,7 @@ # along with this program. If not, see . # """ -This module provides tools for finding PGP key information from a +This module provides tools for finding OpenPGP key information from a given keyring. """ diff --git a/debianmemberportfolio/model/portfolio.ini b/debianmemberportfolio/model/portfolio.ini index 4d31b06..6baedad 100644 --- a/debianmemberportfolio/model/portfolio.ini +++ b/debianmemberportfolio/model/portfolio.ini @@ -1,7 +1,7 @@ # # Configuration for Debian Member Portfolio Service # -# Copyright © 2009-2020 Jan Dittberner +# Copyright © 2009-2022 Jan Dittberner # # This file is part of the Debian Member Portfolio Service. # @@ -96,7 +96,7 @@ search.pattern=https://search.debian.org/cgi-bin/omega?P=%%22%(name)s%%22 gpgfinger.pattern=finger %(username)s/key@db.debian.org gpgfinger.type=finger gpgfinger.optional=true -gpgweb.pattern=https://db.debian.org/fetchkey.cgi?fingerprint=%(gpgfp)s +gpgweb.pattern=https://db.debian.org/fetchkey.cgi?fingerprint=%(openpgpfp)s gpgweb.optional=true nm.pattern=https://nm.debian.org/public/person/%(username)s contrib.pattern=https://contributors.debian.org/contributor/%(email)s diff --git a/debianmemberportfolio/model/urlbuilder.py b/debianmemberportfolio/model/urlbuilder.py index cb2f33f..d350021 100644 --- a/debianmemberportfolio/model/urlbuilder.py +++ b/debianmemberportfolio/model/urlbuilder.py @@ -3,7 +3,7 @@ # # Debian Member Portfolio Service url builder # -# Copyright © 2009-2020 Jan Dittberner +# Copyright © 2009-2022 Jan Dittberner # # This file is part of the Debian Member Portfolio Service. # @@ -42,7 +42,7 @@ my_config.read_file(UTF8StreamReader( _FIELDNAMES_MAP = { 'email': N_('Email address'), 'name': N_('Name'), - 'gpgfp': N_('GPG fingerprint'), + 'openpgpfp': N_('OpenPGP fingerprint'), 'username': N_('Debian user name'), 'nonddemail': N_('Non Debian email address'), 'salsausername': N_('Salsa user name'), @@ -75,10 +75,10 @@ def _build_quoted_fields(fields): qfields[key] = value qfields[key] = str(qfields[key]).replace('%', '%%') - if 'gpgfp' not in qfields: + if 'openpgpfp' not in qfields: fpr = keyfinder.getFingerprintByEmail(fields['email'].encode('utf8')) if fpr: - qfields['gpgfp'] = fpr[0] + qfields['openpgpfp'] = fpr[0] qfields['firstchar'] = fields['email'][0].encode('utf8') qfields['emailnoq'] = fields['email'].encode('utf8') return qfields diff --git a/debianmemberportfolio/templates/base.html b/debianmemberportfolio/templates/base.html index 113e61f..84f1a34 100644 --- a/debianmemberportfolio/templates/base.html +++ b/debianmemberportfolio/templates/base.html @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> {# vim: ft=jinja Base template for XHTML templates. -Copyright © 2009-2021 Jan Dittberner +Copyright © 2009-2022 Jan Dittberner This file is part of the Debian Member Portfolio service. @@ -38,7 +38,7 @@ with this program. If not, see .