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.
This commit is contained in:
Jan Dittberner 2022-09-24 14:16:52 +02:00
parent a7ae04203d
commit fe0a8c7851
12 changed files with 41 additions and 40 deletions

View File

@ -1,6 +1,7 @@
unreleased Jan Dittberner <jan@dittberner.info> unreleased Jan Dittberner <jan@dittberner.info>
* add updated translations from Weblate * add updated translations from Weblate
* update dependencies * update dependencies
* replace gpg and pgp with OpenPGP (thanks Guillem Jover)
2021-10-24 Jan Dittberner <jan@dittberner.info> 2021-10-24 Jan Dittberner <jan@dittberner.info>
* add updated translations from Weblate * add updated translations from Weblate

View File

@ -3,7 +3,7 @@
# #
# Debian Member Portfolio Service views # Debian Member Portfolio Service views
# #
# Copyright © 2015-2020 Jan Dittberner <jan@dittberner.info> # Copyright © 2015-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # This file is part of the Debian Member Portfolio Service.
# #
@ -51,7 +51,7 @@ def gpg_fingerprint(data):
class DeveloperData(FlaskForm): class DeveloperData(FlaskForm):
email = StringField('email', validators=[DataRequired(), Email()]) email = StringField('email', validators=[DataRequired(), Email()])
name = StringField('name', validators=[Optional(), DataRequired()]) 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) Optional(), FingerPrint(), Length(min=32, max=40)
]) ])
username = StringField('username', validators=[Optional(), PlainText()]) username = StringField('username', validators=[Optional(), PlainText()])

View File

@ -3,7 +3,7 @@
# #
# Debian Member Portfolio Service data builder # Debian Member Portfolio Service data builder
# #
# Copyright © 2009-2015 Jan Dittberner <jan@dittberner.info> # Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # 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.""" """Build a DD data structure from a given email address."""
fields = dict([(field, func(str(email_address))) fields = dict([(field, func(str(email_address)))
for (field, func) in for (field, func) in
[('gpgfp', keyfinder.getFingerprintByEmail), [('openpgpfp', keyfinder.getFingerprintByEmail),
('name', keyfinder.getRealnameByEmail), ('name', keyfinder.getRealnameByEmail),
('username', keyfinder.getLoginByEmail)]]) ('username', keyfinder.getLoginByEmail)]])
fields['email'] = email_address 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 fields['type'] = TYPE_DD
elif fields['name'] and fields['gpgfp']: elif fields['name'] and fields['openpgpfp']:
fields['type'] = TYPE_DM fields['type'] = TYPE_DM
else: else:
fields['type'] = TYPE_NO fields['type'] = TYPE_NO

View File

@ -3,7 +3,7 @@
# #
# Debian Member Portfolio Service key finder module # Debian Member Portfolio Service key finder module
# #
# Copyright © 2009-2015 Jan Dittberner <jan@dittberner.info> # Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # This file is part of the Debian Member Portfolio Service.
# #
@ -21,7 +21,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# #
""" """
This module provides tools for finding PGP key information from a This module provides tools for finding OpenPGP key information from a
given keyring. given keyring.
""" """

View File

@ -1,7 +1,7 @@
# #
# Configuration for Debian Member Portfolio Service # Configuration for Debian Member Portfolio Service
# #
# Copyright © 2009-2020 Jan Dittberner <jan@dittberner.info> # Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # 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.pattern=finger %(username)s/key@db.debian.org
gpgfinger.type=finger gpgfinger.type=finger
gpgfinger.optional=true 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 gpgweb.optional=true
nm.pattern=https://nm.debian.org/public/person/%(username)s nm.pattern=https://nm.debian.org/public/person/%(username)s
contrib.pattern=https://contributors.debian.org/contributor/%(email)s contrib.pattern=https://contributors.debian.org/contributor/%(email)s

View File

@ -3,7 +3,7 @@
# #
# Debian Member Portfolio Service url builder # Debian Member Portfolio Service url builder
# #
# Copyright © 2009-2020 Jan Dittberner <jan@dittberner.info> # Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # This file is part of the Debian Member Portfolio Service.
# #
@ -42,7 +42,7 @@ my_config.read_file(UTF8StreamReader(
_FIELDNAMES_MAP = { _FIELDNAMES_MAP = {
'email': N_('Email address'), 'email': N_('Email address'),
'name': N_('Name'), 'name': N_('Name'),
'gpgfp': N_('GPG fingerprint'), 'openpgpfp': N_('OpenPGP fingerprint'),
'username': N_('Debian user name'), 'username': N_('Debian user name'),
'nonddemail': N_('Non Debian email address'), 'nonddemail': N_('Non Debian email address'),
'salsausername': N_('Salsa user name'), 'salsausername': N_('Salsa user name'),
@ -75,10 +75,10 @@ def _build_quoted_fields(fields):
qfields[key] = value qfields[key] = value
qfields[key] = str(qfields[key]).replace('%', '%%') qfields[key] = str(qfields[key]).replace('%', '%%')
if 'gpgfp' not in qfields: if 'openpgpfp' not in qfields:
fpr = keyfinder.getFingerprintByEmail(fields['email'].encode('utf8')) fpr = keyfinder.getFingerprintByEmail(fields['email'].encode('utf8'))
if fpr: if fpr:
qfields['gpgfp'] = fpr[0] qfields['openpgpfp'] = fpr[0]
qfields['firstchar'] = fields['email'][0].encode('utf8') qfields['firstchar'] = fields['email'][0].encode('utf8')
qfields['emailnoq'] = fields['email'].encode('utf8') qfields['emailnoq'] = fields['email'].encode('utf8')
return qfields return qfields

View File

@ -2,7 +2,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
{# vim: ft=jinja {# vim: ft=jinja
Base template for XHTML templates. Base template for XHTML templates.
Copyright © 2009-2021 Jan Dittberner <jan@dittberner.info> Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
This file is part of the Debian Member Portfolio service. This file is part of the Debian Member Portfolio service.
@ -38,7 +38,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>.
<div id="footer"> <div id="footer">
<img alt="{{ _('AGPL - Free Software') }}" id="agpllogo" src="{{ url_for('static', filename='images/agplv3-88x31.png') }}" width="88" height="31" /> <img alt="{{ _('AGPL - Free Software') }}" id="agpllogo" src="{{ url_for('static', filename='images/agplv3-88x31.png') }}" width="88" height="31" />
<p>{% trans browseurl='https://git.dittberner.info/jan/debianmemberportfolio', cloneurl='https://git.dittberner.info/jan/debianmemberportfolio.git', weblateurl='https://hosted.weblate.org/projects/debian-member-portfolio-service/' %}The service is available under the terms of the <a href="https://www.gnu.org/licenses/agpl.html">GNU Affero General Public License</a> as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. You can <a href="{{ browseurl }}" title="Gitweb repository browser URL">browse the source code</a> or clone it from <a href="{{ cloneurl }}" title="git clone URL">{{ cloneurl }}</a> using <a href="https://git-scm.com/">git</a>. If you want to translate this service to your language you can contribute at <a href="{{ weblateurl }}" title="Debian Member Portfolio Service at Weblate">Weblate</a>.{% endtrans %}</p> <p>{% trans browseurl='https://git.dittberner.info/jan/debianmemberportfolio', cloneurl='https://git.dittberner.info/jan/debianmemberportfolio.git', weblateurl='https://hosted.weblate.org/projects/debian-member-portfolio-service/' %}The service is available under the terms of the <a href="https://www.gnu.org/licenses/agpl.html">GNU Affero General Public License</a> as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. You can <a href="{{ browseurl }}" title="Gitweb repository browser URL">browse the source code</a> or clone it from <a href="{{ cloneurl }}" title="git clone URL">{{ cloneurl }}</a> using <a href="https://git-scm.com/">git</a>. If you want to translate this service to your language you can contribute at <a href="{{ weblateurl }}" title="Debian Member Portfolio Service at Weblate">Weblate</a>.{% endtrans %}</p>
<p>{{ _('Copyright © 2009-2021 Jan Dittberner') }}</p> <p>{{ _('Copyright © 2009-2022 Jan Dittberner') }}</p>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var flattr_url = '{{ request.scheme }}://portfolio.debian.net/'; var flattr_url = '{{ request.scheme }}://portfolio.debian.net/';

View File

@ -2,7 +2,7 @@
{# {#
Template for the data input form. Template for the data input form.
Copyright © 2009-2020 Jan Dittberner <jan@dittberner.info> Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
This file is part of the Debian Member Portfolio service. This file is part of the Debian Member Portfolio service.
@ -46,12 +46,12 @@ with this program. If not, see <https://www.gnu.org/licenses/>.
</label><br /> </label><br />
{{ form.name }} {{ form.name }}
</div> </div>
<div id="gpgfpfield"{% if form.gpgfp.errors %} class="witherrors"{% endif %}> <div id="openpgpfpfield"{% if form.openpgpfp.errors %} class="witherrors"{% endif %}>
<label for="gpgfp">{{ _('GPG fingerprint:') }}{% if form.gpgfp.errors %}<br /> <label for="openpgpfp">{{ _('OpenPGP fingerprint:') }}{% if form.openpgpfp.errors %}<br />
<span class="errormsg">{{ form.gpgfp.errors|join(', ') }}</span> <span class="errormsg">{{ form.openpgpfp.errors|join(', ') }}</span>
{% endif %} {% endif %}
</label><br /> </label><br />
{{ form.gpgfp }} {{ form.openpgpfp }}
</div> </div>
<div id="usernamefield"{% if form.username.errors %} class="witherrors"{% endif %}> <div id="usernamefield"{% if form.username.errors %} class="witherrors"{% endif %}>
<label for="username">{{ _('Debian user name:') }}{% if form.username.errors %}<br /> <label for="username">{{ _('Debian user name:') }}{% if form.username.errors %}<br />

View File

@ -1,6 +1,6 @@
{# vim: ft=jinja {# vim: ft=jinja
Helper JavaScript for the data input form. Helper JavaScript for the data input form.
Copyright © 2009-2020, Jan Dittberner <jan@dittberner.info> Copyright © 2009-2022, Jan Dittberner <jan@dittberner.info>
This file is part of the Debian Member Portfolio service. This file is part of the Debian Member Portfolio service.
@ -18,19 +18,19 @@ You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <https://www.gnu.org/licenses/>. with this program. If not, see <https://www.gnu.org/licenses/>.
#} #}
var defaulthiddendivs = new Array( var defaulthiddendivs = new Array(
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield', '#namefield', '#openpgpfpfield', '#usernamefield', '#nonddemailfield',
'#salsausernamefield', '#wikihomepagefield', '#forumsidfield'); '#salsausernamefield', '#wikihomepagefield', '#forumsidfield');
var maskedfielddivs = new Array( var maskedfielddivs = new Array(
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield', '#namefield', '#openpgpfpfield', '#usernamefield', '#nonddemailfield',
'#salsausernamefield', '#wikihomepagefield', '#forumsidfield'); '#salsausernamefield', '#wikihomepagefield', '#forumsidfield');
var allfielddivs = new Array( var allfielddivs = new Array(
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield', '#namefield', '#openpgpfpfield', '#usernamefield', '#nonddemailfield',
'#salsausernamefield', '#wikihomepagefield', '#forumsidfield'); '#salsausernamefield', '#wikihomepagefield', '#forumsidfield');
function updateFields(data, textStatus) { function updateFields(data, textStatus) {
if (data.type == 2) { // DD if (data.type == 2) { // DD
$('#name').prop('value', data.name).prop('readonly', 'readonly'); $('#name').prop('value', data.name).prop('readonly', 'readonly');
$('#gpgfp').prop('value', data.gpgfp); $('#openpgpfp').prop('value', data.openpgpfp);
$('#username').prop('value', data.username).prop( $('#username').prop('value', data.username).prop(
'readonly', 'readonly'); 'readonly', 'readonly');
$('#nonddemail').prop('value', data.email).focus(); $('#nonddemail').prop('value', data.email).focus();
@ -38,7 +38,7 @@ function updateFields(data, textStatus) {
$('#wikihomepage').prop('value', data.wikihomepage); $('#wikihomepage').prop('value', data.wikihomepage);
$('#namefield').show(); $('#namefield').show();
$('#gpgfpfield').show(); $('#openpgpfpfield').show();
$('#usernamefield').show(); $('#usernamefield').show();
$('#nonddemailfield').show(); $('#nonddemailfield').show();
$('#salsausernamefield').show(); $('#salsausernamefield').show();
@ -48,13 +48,13 @@ function updateFields(data, textStatus) {
$('#nonddemail').focus().select(); $('#nonddemail').focus().select();
} else if (data.type == 1) { // DM } else if (data.type == 1) { // DM
$('#name').prop('value', data.name).prop('readonly', 'readonly'); $('#name').prop('value', data.name).prop('readonly', 'readonly');
$('#gpgfp').prop('value', data.gpgfp); $('#openpgpfp').prop('value', data.openpgpfp);
$('#username').prop('value', ''); $('#username').prop('value', '');
$('#nonddemail').prop('value', data.email).focus(); $('#nonddemail').prop('value', data.email).focus();
$('#wikihomepage').prop('value', data.wikihomepage); $('#wikihomepage').prop('value', data.wikihomepage);
$('#namefield').show(); $('#namefield').show();
$('#gpgfpfield').show(); $('#openpgpfpfield').show();
$('#usernamefield').hide(); $('#usernamefield').hide();
$('#nonddemailfield').hide(); $('#nonddemailfield').hide();
$('#salsausernamefield').show(); $('#salsausernamefield').show();
@ -66,10 +66,10 @@ function updateFields(data, textStatus) {
$('#nonddemail').prop('value', data.email); $('#nonddemail').prop('value', data.email);
$('#name').removeAttr('readonly'); $('#name').removeAttr('readonly');
$('#username').removeAttr('readonly').prop('value', ''); $('#username').removeAttr('readonly').prop('value', '');
$('#gpgfp').prop('value', ''); $('#openpgpfp').prop('value', '');
$('#usernamefield').hide(); $('#usernamefield').hide();
$('#gpgfpfield').hide(); $('#openpgpfpfield').hide();
$('#nonddemailfield').hide(); $('#nonddemailfield').hide();
$('#namefield').show(); $('#namefield').show();
$('#salsausernamefield').show(); $('#salsausernamefield').show();

View File

@ -3,7 +3,7 @@
# #
# Debian Member Portfolio Service views # Debian Member Portfolio Service views
# #
# Copyright © 2015-2020 Jan Dittberner <jan@dittberner.info> # Copyright © 2015-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # This file is part of the Debian Member Portfolio Service.
# #
@ -95,8 +95,8 @@ bug=430986">#430986</a>)'''),
'links': N_('links'), 'links': N_('links'),
'website': N_('Debian website'), 'website': N_('Debian website'),
'search': N_('Debian search'), 'search': N_('Debian search'),
'gpgfinger': N_('GPG public key via finger'), 'gpgfinger': N_('OpenPGP public key via finger'),
'gpgweb': N_('GPG public key via HTTP'), 'gpgweb': N_('OpenPGP public key via HTTP'),
'nm': N_('NM, AM participation'), 'nm': N_('NM, AM participation'),
'contrib': N_('Contribution information'), 'contrib': N_('Contribution information'),
'repology': N_('Repology information'), 'repology': N_('Repology information'),
@ -112,7 +112,7 @@ bug=430986">#430986</a>)'''),
#: list of field name tuples for Debian Maintainers #: list of field name tuples for Debian Maintainers
DM_TUPLES = (('name', 'name'), DM_TUPLES = (('name', 'name'),
('gpgfp', 'gpgfp'), ('openpgpfp', 'openpgpfp'),
('nonddemail', 'email')) ('nonddemail', 'email'))
#: list of field name tuples for Debian Developers #: list of field name tuples for Debian Developers

View File

@ -68,7 +68,7 @@ Prepare for first startup
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
The Debian Member Portfolio Service uses data from the Debian keyring to get The Debian Member Portfolio Service uses data from the Debian keyring to get
information regarding PGP keys and names related to email addresses. Before you information regarding OpenPGP keys and names related to email addresses. Before you
can run the service you need to fetch a copy of the keyring and prepare it for can run the service you need to fetch a copy of the keyring and prepare it for
use by the code. use by the code.
@ -82,7 +82,7 @@ When you have both installed you can run::
. ~/.virtualenvs/dmportfolio/bin/activate . ~/.virtualenvs/dmportfolio/bin/activate
./synckeyrings.sh ./synckeyrings.sh
python debianmemberportfolio/model/keyringanalyzer.py python3 debianmemberportfolio/model/keyringanalyzer.py
The first synchronizes the keyrings in :file:`$HOME/debian/keyring.debian.org` The first synchronizes the keyrings in :file:`$HOME/debian/keyring.debian.org`
with files on the `keyring.debian.org <http://keyring.debian.org>`_ host. And with files on the `keyring.debian.org <http://keyring.debian.org>`_ host. And
@ -137,7 +137,7 @@ Placeholder Replacement
%(emailnoq)s email address %(emailnoq)s email address
%(firstchar)s first character of the email address %(firstchar)s first character of the email address
%(forumsid)s forum user id %(forumsid)s forum user id
%(gpgfp)s GNUPG/PGP key fingerprint %(openpgpfp)s OpenPGP key fingerprint
%(name)s full name (i.e. John Smith) %(name)s full name (i.e. John Smith)
%(username)s Debian user name %(username)s Debian user name
%(wikihomepage)s full name in camel case (i.e. JohnSmith) %(wikihomepage)s full name in camel case (i.e. JohnSmith)

View File

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Debian Member Portfolio Service setup # Debian Member Portfolio Service setup
# Copyright © 2009-2020 Jan Dittberner <jan@dittberner.info> # Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
# #
# This file is part of the Debian Member Portfolio Service. # This file is part of the Debian Member Portfolio Service.
# #
@ -29,7 +29,7 @@ except ImportError:
setup( setup(
name='debianmemberportfolio', name='debianmemberportfolio',
version='0.7.2', version='0.7.3',
description='service to create Debian Member Portfolio URLs', description='service to create Debian Member Portfolio URLs',
long_description="""This is a service implementation that returns a set of long_description="""This is a service implementation that returns a set of
personalized URLs as outlined in https://wiki.debian.org/DDPortfolio. It personalized URLs as outlined in https://wiki.debian.org/DDPortfolio. It