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>
* add updated translations from Weblate
* update dependencies
* replace gpg and pgp with OpenPGP (thanks Guillem Jover)
2021-10-24 Jan Dittberner <jan@dittberner.info>
* add updated translations from Weblate

View file

@ -3,7 +3,7 @@
#
# 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.
#
@ -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()])

View file

@ -3,7 +3,7 @@
#
# 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.
#
@ -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

View file

@ -3,7 +3,7 @@
#
# 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.
#
@ -21,7 +21,7 @@
# 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.
"""

View file

@ -1,7 +1,7 @@
#
# 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.
#
@ -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

View file

@ -3,7 +3,7 @@
#
# 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.
#
@ -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

View file

@ -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 <jan@dittberner.info>
Copyright © 2009-2022 Jan Dittberner <jan@dittberner.info>
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">
<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>{{ _('Copyright © 2009-2021 Jan Dittberner') }}</p>
<p>{{ _('Copyright © 2009-2022 Jan Dittberner') }}</p>
</div>
<script type="text/javascript">
var flattr_url = '{{ request.scheme }}://portfolio.debian.net/';

View file

@ -2,7 +2,7 @@
{#
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.
@ -46,12 +46,12 @@ with this program. If not, see <https://www.gnu.org/licenses/>.
</label><br />
{{ form.name }}
</div>
<div id="gpgfpfield"{% if form.gpgfp.errors %} class="witherrors"{% endif %}>
<label for="gpgfp">{{ _('GPG fingerprint:') }}{% if form.gpgfp.errors %}<br />
<span class="errormsg">{{ form.gpgfp.errors|join(', ') }}</span>
<div id="openpgpfpfield"{% if form.openpgpfp.errors %} class="witherrors"{% endif %}>
<label for="openpgpfp">{{ _('OpenPGP fingerprint:') }}{% if form.openpgpfp.errors %}<br />
<span class="errormsg">{{ form.openpgpfp.errors|join(', ') }}</span>
{% endif %}
</label><br />
{{ form.gpgfp }}
{{ form.openpgpfp }}
</div>
<div id="usernamefield"{% if form.username.errors %} class="witherrors"{% endif %}>
<label for="username">{{ _('Debian user name:') }}{% if form.username.errors %}<br />

View file

@ -1,6 +1,6 @@
{# vim: ft=jinja
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.
@ -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/>.
#}
var defaulthiddendivs = new Array(
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield',
'#namefield', '#openpgpfpfield', '#usernamefield', '#nonddemailfield',
'#salsausernamefield', '#wikihomepagefield', '#forumsidfield');
var maskedfielddivs = new Array(
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield',
'#namefield', '#openpgpfpfield', '#usernamefield', '#nonddemailfield',
'#salsausernamefield', '#wikihomepagefield', '#forumsidfield');
var allfielddivs = new Array(
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield',
'#namefield', '#openpgpfpfield', '#usernamefield', '#nonddemailfield',
'#salsausernamefield', '#wikihomepagefield', '#forumsidfield');
function updateFields(data, textStatus) {
if (data.type == 2) { // DD
$('#name').prop('value', data.name).prop('readonly', 'readonly');
$('#gpgfp').prop('value', data.gpgfp);
$('#openpgpfp').prop('value', data.openpgpfp);
$('#username').prop('value', data.username).prop(
'readonly', 'readonly');
$('#nonddemail').prop('value', data.email).focus();
@ -38,7 +38,7 @@ function updateFields(data, textStatus) {
$('#wikihomepage').prop('value', data.wikihomepage);
$('#namefield').show();
$('#gpgfpfield').show();
$('#openpgpfpfield').show();
$('#usernamefield').show();
$('#nonddemailfield').show();
$('#salsausernamefield').show();
@ -48,13 +48,13 @@ function updateFields(data, textStatus) {
$('#nonddemail').focus().select();
} else if (data.type == 1) { // DM
$('#name').prop('value', data.name).prop('readonly', 'readonly');
$('#gpgfp').prop('value', data.gpgfp);
$('#openpgpfp').prop('value', data.openpgpfp);
$('#username').prop('value', '');
$('#nonddemail').prop('value', data.email).focus();
$('#wikihomepage').prop('value', data.wikihomepage);
$('#namefield').show();
$('#gpgfpfield').show();
$('#openpgpfpfield').show();
$('#usernamefield').hide();
$('#nonddemailfield').hide();
$('#salsausernamefield').show();
@ -66,10 +66,10 @@ function updateFields(data, textStatus) {
$('#nonddemail').prop('value', data.email);
$('#name').removeAttr('readonly');
$('#username').removeAttr('readonly').prop('value', '');
$('#gpgfp').prop('value', '');
$('#openpgpfp').prop('value', '');
$('#usernamefield').hide();
$('#gpgfpfield').hide();
$('#openpgpfpfield').hide();
$('#nonddemailfield').hide();
$('#namefield').show();
$('#salsausernamefield').show();

View file

@ -3,7 +3,7 @@
#
# 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.
#
@ -95,8 +95,8 @@ bug=430986">#430986</a>)'''),
'links': N_('links'),
'website': N_('Debian website'),
'search': N_('Debian search'),
'gpgfinger': N_('GPG public key via finger'),
'gpgweb': N_('GPG public key via HTTP'),
'gpgfinger': N_('OpenPGP public key via finger'),
'gpgweb': N_('OpenPGP public key via HTTP'),
'nm': N_('NM, AM participation'),
'contrib': N_('Contribution information'),
'repology': N_('Repology information'),
@ -112,7 +112,7 @@ bug=430986">#430986</a>)'''),
#: list of field name tuples for Debian Maintainers
DM_TUPLES = (('name', 'name'),
('gpgfp', 'gpgfp'),
('openpgpfp', 'openpgpfp'),
('nonddemail', 'email'))
#: 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
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
use by the code.
@ -82,7 +82,7 @@ When you have both installed you can run::
. ~/.virtualenvs/dmportfolio/bin/activate
./synckeyrings.sh
python debianmemberportfolio/model/keyringanalyzer.py
python3 debianmemberportfolio/model/keyringanalyzer.py
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
@ -137,7 +137,7 @@ Placeholder Replacement
%(emailnoq)s email address
%(firstchar)s first character of the email address
%(forumsid)s forum user id
%(gpgfp)s GNUPG/PGP key fingerprint
%(openpgpfp)s OpenPGP key fingerprint
%(name)s full name (i.e. John Smith)
%(username)s Debian user name
%(wikihomepage)s full name in camel case (i.e. JohnSmith)

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
#
# 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.
#
@ -29,7 +29,7 @@ except ImportError:
setup(
name='debianmemberportfolio',
version='0.7.2',
version='0.7.3',
description='service to create Debian Member Portfolio URLs',
long_description="""This is a service implementation that returns a set of
personalized URLs as outlined in https://wiki.debian.org/DDPortfolio. It