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

Support additional linux distributions #1500

Closed
hamiltont opened this issue Apr 7, 2015 · 2 comments
Closed

Support additional linux distributions #1500

hamiltont opened this issue Apr 7, 2015 · 2 comments

Comments

@hamiltont
Copy link
Contributor

As discussed on IRC (and briefly in #401) there is a desire to see additional distributions beyond Ubuntu 14.04 (and our very minimal support for 12.04 such as database.sh).
Currently we are focusing on adding Windows support, but this issue should help us clarify and plan for expanding to multiple linux distros.

A key point is that we do not want to allow sudo in any of the setup scripts. This is critical for ensuring that tests do not interfere with each other.

Another key point is that travis-CI only runs Ubuntu 12.04 and cannot help us test scripts for other platforms.

The current linux setup system uses individual installer scripts, such as this one, and generally each script does one of these:

  • OK - Download and unzip appropriate binaries
  • BAD - Use sudo apt-get to install system wide
  • OK - Download source code and compile. Install in local prefix
  • OK - Use apt-get download and dpkg -x to download/unzip

Currently a number of these scripts are fairly rigid (e.g. see #1499).

The question is how to best update the existing system to support multiple operating systems.

Personally, my preference is to use distro-specific scripts (e.g. java.debian.sh, java.ubuntu12.sh), with each script using the distro-specific package manager (yum,apt-get, etc) as much as possible to automate finding the correct binary and downloading it, and then manually extract the binary into a prefix folder. This is what I propose in #1479 and what is currently implemented for mono.sh using this function in bash_functions.sh:

# Download *.deb file and install into IROOT without using sudo
# Does not download dependant packages
#
# Example: fw_apt_to_iroot <package> [<directory>]
fw_apt_to_iroot() {
  DIR=${2:-$1}
  echo "Downloading $1 to $IROOT"
  apt-get download $1
  echo "Extracting $1 to $DIR"
  dpkg-deb -x $1*.deb "$IROOT/$DIR" && rm $1*.deb
}

This replaced a download+compile based script that took 20+ minutes with a download+extract approach that takes <5 minutes.

I'm not sure if something like puppet or chef can help us manage scripts for different platforms.

@hamiltont
Copy link
Contributor Author

Another concern is that the install.sh files and setup.sh files may have already become distro specific to some degree. For example, a few of them use the seq command which has different behavior on some systems. THis is likely a more minor issue than the ones above, but it's one more thing to consider

@NateBrady23
Copy link
Member

Probably right about most of the setup files becoming distro specific but I'll add this to the future/ideas column in the roadmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants