[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#893572: tracker.debian.org: Debian Maintainer display: [dm] links empty, should be uppercase and use parentheses



On 6/13/19 6:14 PM, Raphael Hertzog wrote:
> Hi,
> 
> On Thu, 13 Jun 2019, Herbert Fortes wrote:
>> I found where to make the change. But the information about
>> who gave the permission I do not know where it is at *debian.org.
>>
>> In distro_tracker/vendor/debian/rules.py file:
>>
>> _add_dm_entry function - extra.append({'display': 'dm'})
>>
>> 'link': "https://ftp-master.debian.org/dm.txt";
>> 'description': "Debian Maintainer upload allowed by Andreas Henriksson"
> 
> In https://ftp-master.debian.org/dm.txt behind each package, there's a
> fingerprint between parenthesis. This fingerprint is the fingerprint
> of the key who signed the addition of the DM right. So if you can map
> that back to a name, then you're good.
> 
> There's some code doing that already with the help of the GPG keyring
> that we have configured, see verify_signature() in
> distro_tracker/core/utils/__init__.py (in particular
> ctx.get_key(...)).
> 

Ok.

What I did seems to work. I added two tests for a function that I
created - allowed_by(pkg).

Initial lines are copy&paste from verify_signature (it does not work
when passing a fingerprint to it).

The function reads dm.txt file to get the fingerprint and gives it to
gpg.Context().get_key(). One test added to return 'None'. One test 
added to return 'PTS Tests'.

I edited these files:

 - distro_tracker/core/tests/tests-data/cache/dm.txt - one DM
 - distro_tracker/core/tests/tests_utils.py
 - distro_tracker/core/utils/__init__.py
 - distro_tracker/vendor/debian/rules.py
 - distro_tracker/vendor/debian/tests.py

It is a first step.

Should dm.txt file be downloaded and read once a day?
(to update/save new info)

'class DebianContributor(models.Model)' has 'allowed_packages' and
'is_debian_maintainer'

Or a dictionary.

I set 'DISTRO_TRACKER_DATA_PATH' + 'cache/dm.txt' for now. But no 
downloads yet.

Here is the forked repository:
https://salsa.debian.org/hpfn/distro-tracker/commit/56b2a5d95f9ce4aa3eaee9e21668a45d54a79094



Regards,
Herbert


Reply to: