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

Make binary installers for mac and linux #9876

Closed
brson opened this issue Oct 15, 2013 · 7 comments
Closed

Make binary installers for mac and linux #9876

brson opened this issue Oct 15, 2013 · 7 comments
Assignees
Labels
P-medium Medium priority
Milestone

Comments

@brson
Copy link
Contributor

brson commented Oct 15, 2013

We need the installation experience to be very easy everywhere. Currently we require unixes to build from source, but that shouldn't be strictly necessary - we already distribute snapshot binaries that work.

Add a new build target that creates a binary installer similarly to the snapshots.

@brson
Copy link
Contributor Author

brson commented Oct 15, 2013

Nominating.

@catamorphism
Copy link
Contributor

1.0, high

@lucab
Copy link
Contributor

lucab commented Oct 18, 2013

Debian is tracking rust status to try to provide a proper package when it's time (ie. not now), some notes are at https://wiki.debian.org/Teams/RustPackaging
Some additional packaging notes are at https://github.com/mozilla/rust/wiki/Note-packaging

@g5pw
Copy link
Contributor

g5pw commented Jan 27, 2014

rust port is already part of MacPorts.

bors added a commit that referenced this issue Feb 17, 2014
Work toward #9876.

This adds `prepare.mk`, which is simply a more heavily-parameterized `install.mk`, then uses `prepare` to implement both `install` and the windows installer (`dist`). Smoke tested on both Linux and Windows.
@flaper87
Copy link
Contributor

What's the final decision here based on the latest discussion that happened on mailing list?

It'd be nice to have a list of things that should happen to consider this bug completed:

  • tarballs generation (?)
  • Windows binaries (?)
  • OSx pkg files (?)

As mentioned in #12546 (and on the mailing list thread) I'd prefer not having any distro specific packaging support as part of Rust's build system. I think the community will take care good care of that.

@brson
Copy link
Contributor Author

brson commented Mar 9, 2014

@flaper87 I listed what I think is remaining here in #12793

@brson brson self-assigned this Mar 9, 2014
bors added a commit that referenced this issue Mar 11, 2014
Work towards #9876.

Several minor things here:
  * Fix the `need_ok` function in `configure`
  * Install man pages with non-executable permissions
  * Use the correct directory for man pages when installing (this was a recent regression)
  * Put all distributables in a new `dist/` directory in the build directory (there are soon to be significantly more of these)

Finally, this also creates a new, more precise way to install and uninstall Rust's files, the `install.sh` script, and creates a build target (currently `dist-tar-bins`) that creates a binary tarball containing all the installable files, boilerplate and license docs, and `install.sh`.

This binary tarball is the lowest-common denominator way to install Rust on Unix. We'll use it as the default installer on Linux (OS X will use .pkg).

## How `install.sh` works

* First, the makefiles (`prepare.mk` and `dist.mk`) put all the stuff that needs to be installed in a new directory in `dist/`.
* Then it puts `install.sh` in that same directory and a list of all the files to install at `rustlib/manifest`.
* Then the directory can be packaged and distributed.
* When `install.sh` runs it does some sanity checking then copies everything in the manifest to the install prefix, then copies the manifest as well.
* When `install.sh` runs again in the future it first looks for the existing manifest at the install prefix, and if it exists deletes everything in it. This is how the core distribution is upgraded - cargo is responsible for the rest.
* `install.sh --uninstall` will uninstall Rust

## Future work:

  * Modify `install.sh` to accept `--man-dir` etc
  * Rewrite `install.mk` to delegate to `install.sh`
  * Investigate how `install.sh` does or doesn't work with .pkg on Mac
  * Modify `dist.mk` to create `.pkg` files for all hosts
  * Possibly use [makeself](http://www.megastep.org/makeself/) to create self-extracting installers
  * Modify dist-snap bots run on mac as well, uploading binary tarballs and .pkg files for the four combos of linux, mac, x86, and x86_64.
  * Adjust build system to be able to augment versions with '-nightly'
  * Adjust build system to name dist artifacts without version numbers e.g. `rust-nightly-...pkg`. This is so we don't leave a huge trail of old nightly binaries on S3 - they just get overwritten.
  * Create new dist-nightly builder
  * Give the build master a new cron job to push to dist-nightly every night
  * Add docs to distributables
  * Update README.md to reflect the new reality
  * Modernize the website to promote new installers
@alexcrichton
Copy link
Member

Closing, @brson has done some awesome work recently, and we have binary installers forth both these platforms. They're even in nightly form!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

6 participants