codio / boxparts

Simple package manager
https://codio.com
Other
29 stars 26 forks source link

BoxPart for Codio for installing Rust and Cargo by means of the rustup.sh script #242

Closed sazzer closed 9 years ago

sazzer commented 9 years ago

Rust is such a new language with so many changes happening all the time that it is often useful to have the absolute latest bleeding edge version installed. Rust-lang.org provide a shell script that will do this, and this Box Part makes use of that shell script to install the absolute latest version. (As such, the version I've put in is just "latest" and there's no SHA1 because this will possibly change very regularly)

ksimuk commented 9 years ago

Do not think this will work right in boxparts. the package will freeze rust version on moment I will do an archive. I still prefer update rust packages, or/and have the rustup script as a package, and allow user to install rust with that script manually.

sazzer commented 9 years ago

There's nothing in the (current) rustup.sh script that relates to the version that will be installed. It simply downloads https://static.rust-lang.org/dist/rust-nightly-${HOST_TRIPLE}.tar.gz and https://static.rust-lang.org/cargo-dist/cargo-nightly-${HOST_TRIPLE}.tar.gz and installs those. As such, because the BoxPart refers to a shell script that itself doesn't contain versions then it should work.

It does mean that if you want to move to the current nightly build you need to uninstall and reinstall this BoxPart though, which is less than ideal...

However, if it's considered that BoxParts aren't the best way of installing something that is so fast moving - and that makes a lot of sense really - then I can perfectly understand that :)

ksimuk commented 9 years ago

Boxparts is a software repository, if you put a script into it, it will be a script. it stores not sources, but compiled version of software.

You used install method, boxparts will download the latest version of rustup and install rust to the package folder, in the way how boxparts works, that folder will be archived and uploaded to the binary repo at a moment of merge to the master branch, next time a user installing the package, not the rustup script will be downloaded, instead rustup the binary package will be used with the old version of rust. In this case you gets not the latest version of rust, but a version on moment the binary package was compiled.

if you ok with installing/reinstalling to update rust, the package should contains rustup script itself, and rust installation should happen in post_install method

sazzer commented 9 years ago

Ah - so the built version of BoxParts will actually include the output of having run this script? I assumed that the Codio system would execute this script, which means that it would then download and run the rustup.sh script at the time the Codio VM is created, and would thus install the latest Rust and Cargo at the time the Part was installed on the Codio VM - since that's what the test system does when I wrote it. My apologies for misunderstanding it.

ksimuk commented 9 years ago

give me 15 min, will prepare a solution, may be it will work for you

ksimuk commented 9 years ago

check this https://github.com/codio/boxparts/pull/243, the Rust installation will happen on every parts install rustup call, is this you want?

sazzer commented 9 years ago

Awesome. I've just tested it and that works perfectly. Thank you for this :)

ksimuk commented 9 years ago

the package was merged. thank you

sazzer commented 9 years ago

No - Thank you for your support on this :)

On 4 December 2014 at 11:31, Maxim Kraev notifications@github.com wrote:

the package was merged. thank you

— Reply to this email directly or view it on GitHub https://github.com/codio/boxparts/pull/242#issuecomment-65619281.