Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chocolatey installer #912

Open
ctaggart opened this issue Jan 7, 2017 · 43 comments
Open

chocolatey installer #912

ctaggart opened this issue Jan 7, 2017 · 43 comments
Labels
O-windows Windows related

Comments

@ctaggart
Copy link

ctaggart commented Jan 7, 2017

There is already another general issue titled Consider packaging rustup & this request is specific to chocolatey. It would be great to be able to do:

choco install rustup

It is currently possible to install the rust gnu package with the rust package, but that is not what I want. I want to manage rust with rustup.

I should be able to create the package pretty easily. I just need the URL to download a specific version of rust-init.exe so that the script can validate the checksum.

@ctaggart
Copy link
Author

ctaggart commented Jan 7, 2017

So just like in appveyor.yml, where it has:

curl -sSf -o rustup-init.exe https://win.rustup.rs/

It should be great if there was an optional version parameter, so that something like this would work?

curl -sSf -o rustup-init.exe https://win.rustup.rs/?version=1.0.0

Not as important, but is there a way to get or download the sha256 that I see?

@ctaggart
Copy link
Author

ctaggart commented Jan 8, 2017

I took a crack at it and published a prerelease. Code is here https://github.com/ctaggart/rustup.rs. We'll need to test on a fresh Windows, but this should install Visual C++ & then Rust targeting VC.

choco install vcbuildtools
choco install rustup -version 1.0.0-beta1 -pre

https://chocolatey.org/packages/rustup/

@ctaggart
Copy link
Author

ctaggart commented Jan 8, 2017

Chocolatey's automated testing failed, which is pretty cool. Here is the output.
https://gist.github.com/choco-bot/c87cef0bfe95885db32a3cf614667d46#file-install-txt-L281-L289

Looks like it times out, waiting for the prompt. I'll pass the -y flag in to allow the silent install.

PS C:\Users\c> C:\Users\c\Downloads\rustup-init.exe --help
rustup-init 1.0.0 (17b6d21 2016-12-15)
The installer for rustup

USAGE:
    rustup-init.exe [FLAGS] [OPTIONS]

FLAGS:
    -v, --verbose           Enable verbose output
    -y                      Disable confirmation prompt.
        --no-modify-path    Don't configure the PATH environment variable
    -h, --help              Prints help information
    -V, --version           Prints version information

OPTIONS:
        --default-host <default-host>              Choose a default host triple
        --default-toolchain <default-toolchain>    Choose a default toolchain to install
PS C:\Users\c>

@ctaggart
Copy link
Author

ctaggart commented Jan 8, 2017

beta2 failed the Chocolatey automated tests. It timed out after the default of 45 minutes. It is working fine on both of my laptops:

C:\WINDOWS\system32>choco install rustup --version 1.0.0-beta2
Chocolatey v0.10.3
Installing the following packages:
rustup
By installing you accept licenses for the packages.

rustup v1.0.0-beta2 - Possibly broken
rustup package files install completed. Performing other installation steps.
Downloading rustup-init
  from 'https://win.rustup.rs/?version=1.0.0'
Progress: 100% - Completed download of C:\Users\c\AppData\Local\Temp\chocolatey\rustup\1.0.0-beta2\rustup-init.exe (7.21 MB).
Download of rustup-init.exe (7.21 MB) completed.
Hashes match.
Installing rustup-init...
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: default toolchain set to 'stable'
rustup-init has been installed.
Only an exit code of non-zero will fail the package by default. Set
 `--failonstderr` if you want error messages to also fail a script. See
 `choco -h` for details.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The install of rustup was successful.
  Software installed as 'EXE', install location is likely default.

Chocolatey installed 1/1 packages. 0 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

You use Chocolatey? You are amazing! Are you ready to take the next
 step and look even smarter with more awesome features?
 https://chocolatey.org/compare

@ctaggart
Copy link
Author

ctaggart commented Jan 9, 2017

I uninstalled Visual C++ Build Tools and tried again. It looks to be prompting, even though I told it not to with a -y.

C:\WINDOWS\system32>"C:\Users\c\AppData\Local\Temp\chocolatey\rustup\1.0.0-beta2\rustup-init.exe" -y

Rust Visual C++ prerequisites

Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later,
but they don't seem to be installed.

The easiest way to acquire the build tools is by installing Microsoft Visual
C++ Build Tools 2015 which provides just the Visual C++ build tools:

  http://landinghub.visualstudio.com/visual-cpp-build-tools

Alternately, you can install Visual Studio 2015 or Visual Studio 2013 and
during install select the "C++ tools":

  https://www.visualstudio.com/downloads/

Install the C++ build tools before proceeding.

If you will be targetting the GNU ABI or otherwise know what you are doing then
it is fine to continue installation without the build tools, but otherwise,
install the C++ build tools before proceeding.

Continue? (Y/n)

@ferventcoder
Copy link

Highly likely you have an unknown dependency you don't see until you try to run your install against a system like the test environment which doesn't have anything more than the stock ISO install of Windows 2012 R2 on it.

@ctaggart
Copy link
Author

ctaggart commented Jan 9, 2017

@ferventcoder, that is correct. It is prompting when Visual C++ Build Tools is not installed. It shouldn't be doing that when -y is passed, so I logged bug #916.

@ferventcoder
Copy link

Ah, didn't see the timing of that :)

@Diggsey
Copy link
Contributor

Diggsey commented May 3, 2017

@ctaggart Great work on this, sorry I didn't reply sooner.

I'm not sure what the plan is here for rustup, whether we want to bring more different packaging scenarios into the release process, or whether it will stay separate. @brson ?

@chriskrycho
Copy link

What work needs to be done on this and how can I help? Came looking after I saw someone ask on Twitter for a one-liner to install rustup.

@shaleh
Copy link

shaleh commented Nov 23, 2017

Yes please. I have some chocolatey scripts so I can go from fresh VM to writing code with minimal hassle. rustup support would be welcomed.

@mcandre
Copy link

mcandre commented Feb 23, 2018

Error, the checksum for rustup-init.exe has changed, causing the Chocolatey recipe to fail. On my machine, the new sha256 checksum is b33a82c54199a427172fec8957760ae7c9a7b7a13b0814bdddb4438e7f88e801.

@vors
Copy link

vors commented Jun 2, 2018

To avoid the checksum problem, I think it makes sense to bundle the rustup-init.exe inside the choco package instead of downloading it from the web. Or getting the sha from the web as well (less secure). In case it lags behind, you will possibly get the older version, which could be then self-updated with rustup update.

@ferventcoder
Copy link

ferventcoder commented Jun 2, 2018

I think it makes sense to bundle the rustup-init.exe inside the choco package instead of downloading it from the web. Or getting the sha from the web as well (less secure).

Bundling would be the only option available between these two. Getting checksum at runtime circumvents the security measure - thus it won't pass moderation.

@ctaggart
Copy link
Author

ctaggart commented Jun 4, 2018

Bundling sounds like a great option. Is this something someone else can pick up? This is not something I have time for right now.

@vors
Copy link

vors commented Jun 5, 2018

@ctaggart I can try. Do you mind giving me package management permissions on choco https://chocolatey.org/profiles/vors ?

@ctaggart
Copy link
Author

ctaggart commented Jun 5, 2018

@vors Done

@SRGOM
Copy link

SRGOM commented Jun 5, 2018

Please include multi rust in place of rust up. I'd I remember correctly 6 months back that was the tool recommended officially

@ctaggart
Copy link
Author

ctaggart commented Jun 5, 2018

@vors
Copy link

vors commented Jun 5, 2018

Great!

Repo: https://github.com/vors/choco-rustup
@ctaggart I reused your paket template, but converted it to nuspec to avoid additional dependency on paket.

I published the rustup.1.11.0-beta1.nupkg
Please try it out with

choco install rustup -pre

If everything works, I will publish the package without -beta1 prefix.

@tcr
Copy link

tcr commented Jun 28, 2018

@vors I tried this out and it worked perfectly on my Windows 10 machine.

It didn't seem to affect anything, but I ran choco install visualstudio2017-workload-vctools instead of choco install vcbuildtools as mentioned above.

@CGMossa
Copy link

CGMossa commented Jun 14, 2019

I also tried it, and it works fine.

Although I did not use either visualstudio2017-workload-vctools nor vcbuildtools, but installed those without chocolatey.

But rustup was installed just fine, and contained the newest version of itself, etc..

@vors
Copy link

vors commented Jun 14, 2019

Oh sorry, totally dropped the ball on it. Looks like we should publish

@rbtcollins
Copy link
Contributor

@vors please do

@vors
Copy link

vors commented Jul 6, 2019

Published, awaiting choco automated test / review

@vors
Copy link

vors commented Jul 12, 2019

@ferventcoder I fixed the package so it passes the tests, can you stamp it?

@ferventcoder
Copy link

@vors The community moderators will take a look and move that if they haven't already.

@majkinetor
Copy link

They haven't already as reviewed - package is not good enough to be published and requires maintainer to fix it.

@vors
Copy link

vors commented Aug 14, 2019

I don't have a windows machine and energy to take another iteration on it at the moment. Please, continue to use choco install rustup -pre for the time being.

@exarkun
Copy link

exarkun commented Jan 7, 2020

Apparently the checksum has changed again, breaking the choco package.

Error - hashes do not match. Actual value was '9F9E33FA4759075EC60E4DA13798D1D66A4C2F43C5500E08714399313409DCF5'.
ERROR: Checksum for 'C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\rustup.install\1.19.0\rustup-init.exe' did not meet 'E325B428A0FF9132B59EC586E85B1DB4EAA66ACC13B3DAF8090520D2E7694388' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary.

@kinnison
Copy link
Contributor

kinnison commented Jan 7, 2020

That's a pretty old rustup too.

@majkinetor
Copy link

majkinetor commented Jan 7, 2020 via email

@exarkun
Copy link

exarkun commented Jan 7, 2020

Sorry I just noticed this is the "rustup" issue tracker and my error comes from trying to install "rustup.install" which I guess is something different

@majkinetor
Copy link

No, thats the same thing. Install means it uses windows installer, there are also portable packages.

@rbtcollins
Copy link
Contributor

@vors how can we help? Can we scale this in the community somehow?

@lokinmodar
Copy link

Having problems with rustup.install in chocolatey (installing or upgrading)
"rustup-init.exe' did not meet '9F9E33FA4759075EC60E4DA13798D1D66A4C2F43C5500E08714399313409DCF5' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary."

@kinnison
Copy link
Contributor

Sounds like whoever is looking after the chocolatey package isn't keeping it up to date.

@vors
Copy link

vors commented Jul 22, 2020

Hey, I don’t have any windows machines at the moment and it’s unlikely that I would have access to any in the near future. Sorry my effort didn’t result in the good choco package.

@mcandre
Copy link

mcandre commented Jan 13, 2021 via email

@workingjubilee
Copy link
Member

@rustbot label: +O-windows

@rustbot rustbot added the O-windows Windows related label Apr 29, 2021
@rami3l
Copy link
Member

rami3l commented Jun 9, 2024

We do have a page for Rustup on choco now, but looks like it's extremely outdated: https://community.chocolatey.org/packages/rustup.install

@SeanFarrow
Copy link

I'd really like to help out with this.

What needs to be done to make this package pass testing?

@rami3l
Copy link
Member

rami3l commented Aug 15, 2024

I'd really like to help out with this.

What needs to be done to make this package pass testing?

@SeanFarrow Thanks for your interest in this! However the maintainance of that package on choco (by @camilohe) is a community effort and is not affiliated with the Rustup team in any way, so I suggest getting in touch with them to see whether we can have a new maintainer/collaborator on https://github.com/camilohe/rustup.install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Windows related
Projects
None yet
Development

No branches or pull requests