Bug 256314 - Fix 'make extract' when GH_TUPLE contains multiple special characters in the version field
Summary: Fix 'make extract' when GH_TUPLE contains multiple special characters in the ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Package Infrastructure (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-31 23:33 UTC by Yuri Victorovich
Modified: 2021-06-01 07:30 UTC (History)
0 users

See Also:


Attachments
fix-special-chars-in-GH_TUPLE.patch (770 bytes, patch)
2021-05-31 23:33 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2021-05-31 23:33:58 UTC
Created attachment 225433 [details]
fix-special-chars-in-GH_TUPLE.patch

Testcase:
When this GH_TUPLE:
> GH_TUPLE= Azure:go-autorest:autorest/adal/v0.9.13:azure_go_autorest_adal/vendor/github.com/Azure/go-autorest/autorest/adal
is added to any project with USE_GITHUB=yes, 'make extract' fails:


> => SHA256 Checksum OK for ArashPartow-exprtk-g20210303-ca5c577917646ddba3f71ce6d5dd7d01f351ee80_GH0.tar.gz.
> => SHA256 Checksum OK for Azure-go-autorest-autorest-adal/v0.9.13_GH0.tar.gz.
> mv: rename /disk-samsung/freebsd-ports/math/exprtk/work/go-autorest-autorest-adal/v0.9.13 to /disk-samsung/freebsd-ports/math/exprtk/work/exprtk-ca5c577917646ddba3f71ce6d5dd7d01f351ee80/vendor/github.com/Azure/go-autorest/autorest/adal: No such file or directory
> *** Error code 1

This is because the version tag autorest/adal/v0.9.13 has 2 special characters "/" in it while the regular expression only replaces at most one special character.

The attached patch fixes this problem.
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2021-06-01 07:20:15 UTC
Will fix with a more complete patch.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-06-01 07:30:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b0ea84fccb6dcaa61190fc9052aaad6e5e4f7806

commit b0ea84fccb6dcaa61190fc9052aaad6e5e4f7806
Author:     Mathieu Arnold <mat@FreeBSD.org>
AuthorDate: 2021-06-01 07:21:25 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2021-06-01 07:29:26 +0000

    Mk/bsd.sites.mk: Fixup USE_GITHUB code.

    This mainly synchronize the subgroups GH_TAGNAME_${_group}_* variables
    with their default GH_TAGNAME_* equivalent.

    In order to try and avoid this in the future, add a couple of comments
    where those two sets of variables are defined.

    PR:             256314
    Reported by:    yuri

 Mk/bsd.sites.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)