Re: [PATCH 2/2] cargo.eclass: use direct CDN urls for crates.io

Eli Schwartz <[email protected]> Fri, 29 May 2026 11:18:37 -0400
Newsgroups gmane.linux.gentoo.devel
Message-ID <[email protected]>
On 5/29/26 2:41 AM, Sam James wrote:
> Eli Schwartz <[email protected]> writes:
> 
>> There are four reasons for doing this:
>>
>> - it is the destination of a redirect at the urls we previously used, so
>>   less work
>>
>> - per https://blog.rust-lang.org/2024/03/11/crates-io-download-changes/
>>   the API is "slow and expensive" and cargo now uses the CDN directly,
>>   too; all third-party "build systems" are recommended to do so as well
>>
>> - crates.io/api has started banning download agents that don't suitably
>>   identify themselves, and curl/wget without --user-agent fail. This
>>   will also be fixed by https://github.com/gentoo/portage/pull/1585
>>   however that depends on users not manually setting FETCHCOMMAND
>>   with naive (no user-agent) values, nor using pk pkg env and
>>   copy/pasting.
> 
> Bug: https://bugs.gentoo.org/682610
> Bug: https://bugs.gentoo.org/976165


Done (latter is reopened for tracking the eclass inefficiency, so
Closes: instead).

>>
>> - shorter urls *plus* lack of need for arrow renaming will nontrivially
>>   reduce the size of SRC_URI
>>
>> Signed-off-by: Eli Schwartz <[email protected]>
> 
> 
> Reviewed-by: Sam James <[email protected]>



remote:  * Info: Using [Gentoo] (https://bugs.gentoo.org/xmlrpc.cgi)
remote:  * Info: Modified the following fields in bug 976165
remote:  * Info: resolution  : removed
remote:  * Info: resolution  : added FIXED
remote:  * Info: status      : removed CONFIRMED
remote:  * Info: status      : added RESOLVED
remote:  * Info: Using [Gentoo] (https://bugs.gentoo.org/xmlrpc.cgi)
remote:  * Info: Added comment to bug 682610
To git+ssh://git.gentoo.org/repo/gentoo.git
   c4974e59d40a..3929f73cfa2e  HEAD -> master


-- 
Eli Schwartz
OpenPGP_signature.asc (application/pgp-signature, 236 B)
-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCahmuTQUDAAAAAAAKCRCEp9ErcA0vV5H+
AQCgSCdSo4uArL7XaoA/CRg7JIWlPlwdqqOuw1P7Gg3NfwD/U+En2eMYO6FVV6H/UG1YEmcoJfd8
w4TuzUawcBNN2QY=
=clDU
-----END PGP SIGNATURE-----