Skip to content

Deal with distfile requests being blocked by crates.io#4052

Merged
chewi merged 2 commits into
mainfrom
chewi/crates-io
May 29, 2026
Merged

Deal with distfile requests being blocked by crates.io#4052
chewi merged 2 commits into
mainfrom
chewi/crates-io

Conversation

@chewi
Copy link
Copy Markdown
Contributor

@chewi chewi commented May 29, 2026

crates.io (on Amazon CloudFront) is now rejecting our requests with 403. This can be avoided by setting a custom user-agent for wget. I have made a similar change to upstream Portage, but let's use our own string for Flatcar.

While the user-agent change deals with the blocked requests, it turns out we should be using a different faster and less restricted endpoint anyway, so let's also take the (about to be merged upstream) cargo.eclass change as well.

How to use

Try building a Rust-based package with GENTOO_MIRRORS="".

Testing done

Jenkins got as far as the image job, which failed for an unrelated reason.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

chewi added 2 commits May 29, 2026 10:38
crates.io (on Amazon CloudFront) is now rejecting our requests with 403.
I have made a similar change to upstream Portage, but let's use our own
string for Flatcar.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This hasn't actually been merged upstream yet, but it's about to be. The
user-agent change deals with the blocked requests, but it turns out we
should be using this faster and less restricted endpoint anyway.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi self-assigned this May 29, 2026
@chewi chewi requested a review from a team as a code owner May 29, 2026 10:26
@John15321
Copy link
Copy Markdown
Member

lgtm, i guess we should just make sure that the build goes thru and all good then

@chewi
Copy link
Copy Markdown
Contributor Author

chewi commented May 29, 2026

lgtm, i guess we should just make sure that the build goes thru and all good then

The relevant bit has passed. All the packages are built as binaries, so there are no more distfiles to download. If any of them had mismatched, it would have failed the hash checks.

Copy link
Copy Markdown
Member

@John15321 John15321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

@John15321
Copy link
Copy Markdown
Member

lgtm, i guess we should just make sure that the build goes thru and all good then

The relevant bit has passed. All the packages are built as binaries, so there are no more distfiles to download. If any of them had mismatched, it would have failed the hash checks.

Perfect then!

@chewi chewi merged commit 9fcba12 into main May 29, 2026
4 of 5 checks passed
@chewi chewi deleted the chewi/crates-io branch May 29, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants