Bug 244989

Summary: devel/cargo-c: doesn't fetch curl-sys-0.4.30+curl-7.69.1.tar.gz
Product: Ports & Packages Reporter: Vladimir Druzenko <vvd>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (jbeich)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Vladimir Druzenko freebsd_committer freebsd_triage 2020-03-22 21:39:31 UTC
=> Attempting to fetch https://crates.io/api/v1/crates/curl-sys-0.4.30+curl/7.69.1/download?dummy=/rust/crates/curl-sys-0.4.30+curl-7.69.1.tar.gz
fetch: https://crates.io/api/v1/crates/curl-sys-0.4.30+curl/7.69.1/download?dummy=/rust/crates/curl-sys-0.4.30+curl-7.69.1.tar.gz: Not Found
=> Couldn't fetch it - please try to retrieve this

But correct name of the file is:
https://crates.io/api/v1/crates/curl-sys/0.4.30+curl-7.69.1/download?dummy=/rust/crates/curl-sys/0.4.30+curl-7.69.1.tar.gz

This line of Makefile "curl-sys-0.4.30+curl-7.69.1" converted to "curl-sys-0.4.30+curl/7.69.1" for downloading, but must be "curl-sys/0.4.30+curl-7.69.1".

Probably bug is in Mk/Uses/cargo.mk:
.for _crate in ${CARGO_CRATES}
  MASTER_SITES+=  CRATESIO/${_crate:C/^(.*)-[0-9].*/\1/}/${_crate:C/^.*-([0-9].*)/\1/}:cargo_${_crate:C/[^a-zA-Z0-9_]//g}
  DISTFILES+=     ${CARGO_DIST_SUBDIR}/${_crate}.tar.gz:cargo_${_crate:C/[^a-zA-Z0-9_]//g}
.endfor

If download file manually in distfiles/rust/crates/curl-sys-0.4.30+curl-7.69.1.tar.gz then devel/cargo-c build fine.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2020-03-22 22:47:40 UTC
Looks like I've landed the update without the workaround and before the fix.

*** This bug has been marked as a duplicate of bug 244977 ***
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2020-03-22 23:52:20 UTC
Looked in the list of issues, but the name of that issue is not very obvious (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244977)…