168 Commits

Author SHA1 Message Date
rami3l
b31a00009b dist(rustup-init/sh): update commit shasum in help string 2026-03-04 22:01:17 +00:00
rami3l
55e46a33f8 dist(rustup-init/sh): update commit shasum in help string 2025-12-11 16:15:26 +00:00
akrm al-hakimi
52753d58f8 fix: default to GNU host in Cygwin/MSYS/MinGW environments (#4221) 2025-11-28 21:08:18 +00:00
rami3l
3cf4b4ba8a fix(rustup-init/sh): avoid hw.optional.*: 1 stdout in macOS arch check 2025-07-25 10:50:23 +00:00
konstin
19375f570f Block broken snap curl
When curl is installed with snap, it lacks permissions to write to the directories installers need (https://github.com/boukendesho/curl-snap/issues/1), which breaks rustup-init.sh (https://github.com/rust-lang/rustup/issues/2948).

To fix this, we error when the only available downloader is snap curl.

We hit this problem in uv (https://github.com/astral-sh/uv/issues/11849) and deployed a fix in our cargo-dist fork (https://github.com/astral-sh/cargo-dist/pull/28). I've ported this fix to rustup.

I've tested the change manually on my machine:
* apt url works
* snap curl and wget works
* snap curl and no wget fails

Unfortunately, snap doesn't run in docker so I can't provide a test script.

Fixes https://github.com/rust-lang/rustup/issues/2948
Solves:
 * https://github.com/rust-lang/rustup/issues/924#issuecomment-921375292, though it's unclear if solves the original report too
 * https://github.com/rust-lang/rustup/issues/2775#issuecomment-1512845583
2025-06-19 14:06:06 +00:00
Petr Sumbera
51bde93337 Fix rustup-init.sh cputype check for sparcv9 2025-06-11 10:43:08 +00:00
Petr Sumbera
452c8e5c79 add Solaris support 2025-06-10 00:03:50 +00:00
rami3l
f7935a8ad2 dist: update commit shasum in rustup-init.sh 2025-04-28 15:56:34 +00:00
rami3l
77863418e4 dist: update commit shasum in rustup-init.sh 2025-04-13 01:56:15 +00:00
rami3l
4d52aee953 feat(rustup-init/sh): allow setting RUSTUP_VERSION during installation 2025-03-19 15:28:40 +00:00
Chris Denton
f9edccde03 dist(rustup-init/sh): update commit shasum 2025-03-05 11:33:15 +00:00
Chris Denton
0eefe20052 dist(rustup-init/sh): update commit shasum 2025-03-04 19:59:14 +00:00
rami3l
e2d9e7edde dist(rustup-init/sh): update commit shasum 2025-03-02 13:13:35 +00:00
rami3l
e9fef8f7d5 feat(rustup-init/sh): add env var to print arch detection result
Co-authored-by: onur-ozkan <work@onurozkan.dev>
2025-02-16 16:01:56 +00:00
rami3l
8827270748 fix(rustup-init/sh): don't emit "unknown macOS major version" for macOS v11+ 2024-12-21 09:10:43 +00:00
rami3l
cdf9ef0cc9 refactor(rustup-init/sh): extract $_os_major 2024-12-21 09:10:43 +00:00
rami3l
74610a40fc refactor(rustup-init/sh): extract $_os_version 2024-12-21 09:10:43 +00:00
Dirkjan Ochtman
68a212382f Bump version, commit and date in rustup-init.sh 2024-12-02 02:52:33 +00:00
Dirkjan Ochtman
861fd0f8e3 Clean up trailing whitespace in rustup-init.sh 2024-12-02 02:52:33 +00:00
rami3l
c8eddcb4c1 fix(cli/rustup-mode): remove .num_args() when .value_delimiter(',') is present 2024-11-13 13:29:46 +00:00
rami3l
3db381b0be style(rustup-init/sh): ignore shellcheck SC2086 false positives
Since we're really using `$_retry` for command building,
this is clearly an exception to the SC2086 rule,
as listed in https://www.shellcheck.net/wiki/SC2086.
2024-10-14 07:54:16 +00:00
rami3l
a9c4362a1b fix(rustup-init/sh): fix incorrect TLS warning with curl v8.10 2024-10-11 09:02:07 +00:00
rami3l
94640c435e fix(cli/setup-mode): simplify description for --quiet 2024-09-04 09:50:12 +00:00
rami3l
ca19164807 feat(cli/setup-mode)!: set log level to DEBUG on --verbose if RUSTUP_LOG is unset 2024-09-04 09:50:12 +00:00
rami3l
01f6c43a85 feat(rustup-init): set log level to WARN on -q if RUSTUP_LOG is unset 2024-07-04 01:04:32 +00:00
vic1707
efa576d8fb implements quiet flag in rustup-init.sh 2024-06-30 02:03:55 +00:00
rami3l
02b148f240 fix(dist/arm): don't assume armv7 if /proc/cpuinfo is unavailable 2024-06-18 04:14:59 +00:00
rami3l
826433b463 fix(dist): add fallbacks to /proc/self/exe in rustup-init.sh 2024-06-18 04:14:59 +00:00
rami3l
6ad9ed53e6 refactor(log): replace [Ww]arning: log line prefix with warn: 2024-06-17 14:59:10 +00:00
rami3l
8244acc8bb fix(rustup-init): fix typo in rustup-init[.sh] args 2024-05-10 16:09:02 +00:00
rami3l
075bf45a62 refactor(cli): rewrite rustup-init with clap_derive 2024-05-08 06:15:15 +00:00
rami3l
54dd3d00fd chore(dist): update commit shasum in rustup-init.sh, take 2 2024-04-24 08:31:27 +00:00
rami3l
4cf9e1f90b chore(dist): update commit shasum in rustup-init.sh 2024-04-23 13:34:08 +00:00
rami3l
bbb9276d24 chore(dist): update commit shasum in rustup-init.sh 2024-03-08 15:21:21 +00:00
rami3l
2a078c6528 dist: bump rustup-init.sh version to 1.27.0 2024-02-10 10:36:59 +00:00
rami3l
737ad82333 Restrict zsh shwordsplit to downloader() 2023-10-13 00:34:05 +08:00
Alex Hudspith
3d6f8ea170 Fix zsh word splitting for curl "--retry 3" 2023-10-10 18:57:18 +08:00
Alex Hudspith
900d3d63ea Add ksh compatibility for latest illumos and others 2023-10-10 18:57:18 +08:00
Alex Gaynor
303c6f990b Do not fallback to "arm" in rustup-init.sh on aarch64 with 32-bit userland
On aarch64, neon will not be present in /proc/cpuinfo, instead asimd is there. Previously, we'd fall back to arm when running with a 32-bit userland, even though armv7 is perfectly appropriate in this case.

This would then run into the issue described in https://github.com/rust-lang/rust/issues/58414 with "CP15 barrier emulation".

This PR fixes that.
2023-10-05 19:52:10 +08:00
Dirkjan Ochtman
618530addb Upgrade to clap 4 2023-08-29 22:42:33 +02:00
Robert Collins
bd08d35ac6 Merge pull request #3438 from rami3l/fix/macos-uname-lies
macOS `uname -m` can lie due to Rosetta shenanigans
2023-08-15 20:55:04 +02:00
rami3l
e2c2cf8de6 Avoid sysctl: unknown oid stderr output and/or non-zero exit code 2023-08-15 16:43:41 +08:00
rami3l
4dfe254edc macOS uname -m can lie due to Rosetta shenanigans
Fix originally provided in https://github.com/JuliaLang/juliaup/pull/701
2023-08-14 11:56:47 +08:00
WANG Xuerui
db4b177e20 rustup-init.sh: Check for kernel UAPI compatibility on LoongArch
And provide friendly diagnostics if a certain widely-deployed but
incompatible UAPI flavor (a.k.a. the "old-world" UAPI that's used by
several early and/or commercial LoongArch Linux distributions) is
detected.

The minimalistic probe was crafted by myself, checking for one of the
most prominent incompatibilities between the two UAPI flavors:
`sizeof(sigset_t)`. The probe binary is small enough to fit in 3 lines
of Base64, which is decoded into a temp file and executed for result.
The `base64(1)` command is ubiquitous (being provided by coreutils,
busybox and probably many others), and only necessary on LoongArch, so
we effectively don't lose portability.

Other irrelevant errors (e.g. /tmp being noexec) are made non-fatal,
because without the check the installer binary will instantly die
anyway on an incompatible system. A warning message is printed in case
such an error occurs.

(The installer binary, being dynamically linked, will die on a system
using the other incompatible UAPI, with a confusing error saying the
program being executed itself is not found: the actual non-existent
path is the ELF interpreter i.e. `ld.so`. Having some error messages in
case of this would hopefully reduce the technical support burden for
many.)
2023-07-24 10:24:49 +08:00
hi-rustin
5af9b9484c Update commit sha in rustup-init.sh again
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-04-05 21:05:46 +08:00
hi-rustin
f666be69e2 Update commit sha in rustup-init.sh again
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-03-22 10:34:24 +08:00
hi-rustin
cd9e2886a2 Update commit sha in rustup-init.sh again 2023-03-12 22:46:36 +08:00
hi-rustin
3c37600bfa Update commit sha in rustup-init.sh 2023-03-12 18:11:05 +08:00
hi-rustin
dae8b6a9e9 Remove extra new line after help 2023-03-04 11:14:50 +08:00
hi-rustin
55c6fdb70b Update setup mode tests 2023-03-03 17:27:12 +08:00