-
Notifications
You must be signed in to change notification settings - Fork 236
Build a portable bottle
The bottles for binutils, patchelf and zlib are special. Because they are installed before glibc, they must be able to run on host systems using an older version of glibc. Linuxbrew supports host systems with glibc 2.5 and newer. We use CentOS 5 with glibc 2.5 to build portable bottles.
Follow these instructions to install CentOS 5 on Docker up until "Install dependencies of Linuxbrew". Stop before brew install gcc git ruby.
Install a recent version of file that supports --print0.
HOMEBREW_BUILD_FROM_SOURCE=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install file-formulaInstall build dependencies of binutils.
sudo yum install -y bison flex makeinfoBuild a portable bottle for binutils.
export HOMEBREW_NO_AUTO_UPDATE=1
brew install --build-bottle binutils
brew bottle --json binutilsAdd the sha256 of the bottle to the binutils formula.
brew install git
git config --global user.name LinuxbrewTestBot
git config --global user.email testbot@linuxbrew.sh
brew bottle --merge --write --keep-old binutils-*.x86_64_linux.bottle.jsonTest the bottle.
brew remove --ignore-dependencies binutils
brew install ./binutils-*.x86_64_linux.bottle.tar.gz
brew install ruby # Fix Error: cannot load such file -- test/unit/assertions
brew test binutilsUpload the bottle to Bintray using brew test-bot.
export BINTRAY_USER=linuxbrewtestbot
export BINTRAY_KEY=...
export CIRCLE_PR_NUMBER=...
brew test-bot --ci-upload --keep-oldOr upload the bottle to Bintray using curl.
version=$(brew list --versions binutils | sed 's/.* //')
curl -u$BINTRAY_USER:$BINTRAY_KEY -T binutils-$version.x86_64_linux.bottle.tar.gz "https://api.bintray.com/content/linuxbrew/bottles/binutils/$version/binutils-$version.x86_64_linux.bottle.tar.gz?publish=1" >curl.outCommit and push the formula to GitHub.
git commit --amend binutils.rb -m"binutils: update $version bottle for Linuxbrew.
This portable bottle was built using glibc 2.5 on CentOS 5."
git push