When including a dash in the group name of a GH_TUPLE a wrong download link is generated. Using: GH_TUPLE= dgrijalva:jwt-go:61124b62ad244d655f87d944aefaa2ae5a0d2f16:jwt-go Running "make fetch" fails with the following message: => dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch godgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz fetch: godgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz: No such file or directory => Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz fetch: http://distcache.FreeBSD.org/ports-distfiles/dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz: Not Found => Couldn't fetch it - please try to retrieve this => port manually into /usr/ports/distfiles/ and try again. It seems to be adding everything specified after the dash to the url used by fetch. When changing the group name to jwtgo, the download succeeds: GH_TUPLE= dgrijalva:jwt-go:61124b62ad244d655f87d944aefaa2ae5a0d2f16:jwtgo => dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch https://codeload.github.com/dgrijalva/jwt-go/tar.gz/61124b62ad244d655f87d944aefaa2ae5a0d2f16?dummy=/dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz fetch: https://codeload.github.com/dgrijalva/jwt-go/tar.gz/61124b62ad244d655f87d944aefaa2ae5a0d2f16?dummy=/dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz: size unknown fetch: https://codeload.github.com/dgrijalva/jwt-go/tar.gz/61124b62ad244d655f87d944aefaa2ae5a0d2f16?dummy=/dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa2ae5a0d2f16_GH0.tar.gz: size of remote file is not known dgrijalva-jwt-go-61124b62ad244d655f87d944aefaa 13 kB 65 MBps 00m00s
Group names can't include dashes.
(In reply to Mathieu Arnold from comment #1) Is there a reason they can't include dashes?
Yes, while make(1) is ok with variable names having quite a lot of strange characters, this is a limitation of sh, where a variable name can't include a dash. It would be possible to fix this with silently replacing dashes with, say, underscores, but it would complicate the code a bit, and have the level of WTF while debugging go quite higher. I'll try to see if I can error out when *_SITES groups contains characters other than [a-zA-Z0-9_]
(In reply to Mathieu Arnold from comment #3) I see! An error message would be really helpful! Also, the documentation should maybe mention this? I can't any documentation on this in the Porter's Handbook?
Mmm, I thought the porter's handbook had a note about what was allowed, it currently says [0-9] which is wrong anyway. I'll fix it too.
A commit references this bug: Author: mat Date: Tue Jun 14 14:17:44 UTC 2016 New revision: 48925 URL: https://svnweb.freebsd.org/changeset/doc/48925 Log: Document the fact that group names should be restricted to a certain character class. PR: 210251 Sponsored by: Absolight Changes: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
Part of #210198 that will fix this problem (well, it'll error out if the group contains an invalid character), so closing this here.
A commit references this bug: Author: mat Date: Sun Jun 19 11:25:44 UTC 2016 New revision: 417113 URL: https://svnweb.freebsd.org/changeset/ports/417113 Log: Add a few checks for (MASTER|PATCH)_SITES groups. While make(1) is ok with variable names having quite a lot of strange characters in them, the fetch code mostly uses sh(1), where variable names can't include a dash (or pluses, or many other things). PR: 210251 210198 Submitted by: mat Exp-run by: antoine Sponsored by: The FreeBSD Foundation, Absolight Differential Revision: https://reviews.freebsd.org/D6779 Changes: head/Mk/bsd.port.mk head/Mk/bsd.sites.mk