Skip to content

Mirror NetBSD 10.1 files - #52

Merged
marcoieni merged 3 commits into
rust-lang:mainfrom
Kobzol:netbsd
Jul 28, 2026
Merged

Mirror NetBSD 10.1 files#52
marcoieni merged 3 commits into
rust-lang:mainfrom
Kobzol:netbsd

Conversation

@Kobzol

@Kobzol Kobzol commented Jul 28, 2026

Copy link
Copy Markdown
Member

For rust-lang/rust#158734.

Used this Python script to mirror them:

import datetime
import subprocess

# base_url = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.1/source/sets"
# files = ["src.tgz", "gnusrc.tgz", "sharesrc.tgz", "syssrc.tgz"]
# file_prefix = f"{datetime.datetime.now().strftime('%Y-%m-%d')}-netbsd-10.1-src"

base_url = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.1/amd64/binary/sets"
files = ["base.tar.xz", "comp.tar.xz"]
file_prefix = f"{datetime.datetime.now().strftime('%Y-%m-%d')}-netbsd-10.1-amd64-binary"

toml_path = "files/rustc/netbsd.toml"
path_prefix = "rustc/netbsd"
license = "BSD 2-Clause NetBSD License"

for file in files:
    url = f"{base_url}/{file}"
    print(f"Downloading {url}")

    path = f"{path_prefix}/{file_prefix}-{file}"
    subprocess.run(
        ["cargo", "run", "add-file", "--path", path, "--toml-file", toml_path,
         "--license",
         license, url], check=True)

Oof, this PR exposed a pre-existing bug that required me to add a bunch of validation skips all over the place.

@Kobzol
Kobzol requested a review from jieyouxu July 28, 2026 08:29
@Kobzol Kobzol mentioned this pull request Jul 28, 2026
9 tasks
@marcoieni

Copy link
Copy Markdown
Member

I didn't see jieyou self assigned this and I reviewed it. Anyway, I'm merging this and if there are issues we can raise more PRs I guess 👍

@marcoieni
marcoieni added this pull request to the merge queue Jul 28, 2026
@jieyouxu jieyouxu removed their assignment Jul 28, 2026
@jieyouxu

Copy link
Copy Markdown
Member

I didn't see jieyou self assigned this and I reviewed it.

Self-assigned just so I can find these PRs due to notifications 🙈

Merged via the queue into rust-lang:main with commit 2638c5c Jul 28, 2026
3 checks passed
@Kobzol
Kobzol deleted the netbsd branch July 28, 2026 09:59
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.

3 participants