Bug#852848: dh-make-perl: fix Repository in d/upstream/metadata for github projects

gregor herrmann gregoa at debian.org
Fri Jan 27 20:26:06 UTC 2017


On Fri, 27 Jan 2017 20:04:47 +0000, Carnë Draug wrote:

> The Respository URL in d/upstream/metadata should use https and not
> git but dh-make-perl does not identify this issue.  The attached
> patch identifies this and fixes it for github (I am unsure if the fix
> can be generalized for any host but I guess it is possible for a host
> to support git:// and not http://).  It also automatically fill a
> missing Repository-Browse for github.

Thank you for working on this issue!

An idea we had earlier was that dh-make-perl and dpt-debian-upstream
should share code (instead of duplicating and maintaining the same
parts in both). That would probably mean splitting out parts of
dpt-debian-upstream into a module when can then be used by both. Or
something similar.

IIRC alexm was interested in modularizing dpt-*/pkg-perl tool (and
has in fact already started for dpt-forward), so maybe you two could
work together and try and prepare those changes during the freeze?
 
> +        my $url_parser = qr|(?:([^:/?\#]+):)? # protocol
> +                            (?://([^/?\#]*))? # domain name
> +                            ([^?\#]*)         # path
> +                            (?:\?([^\#]*))?   # query
> +                            (?:\#(.*))?       # fragment
> +                           |x;
> +

> +        if ($host eq "github") {
> +            if ($protocol eq "git") {
> +                $upstream{"Repository"} = "https://$domain$path";
> +            }

Examples we've found in the wild and which are fixed up in
dpt-debian-upstream:

        git://github.com/
        git at github.com:
        http://github.com/
        ssh://git@github.com/


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Beatles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20170127/4bcaaf4d/attachment.sig>


More information about the pkg-perl-maintainers mailing list