This repository has been archived by the owner on Mar 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 236
Build a portable bottle
Shaun Jackman edited this page Mar 6, 2017
·
23 revisions
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
.
Build a portable bottle for binutils
.
export HOMEBREW_NO_AUTO_UPDATE=1
brew install --build-bottle binutils
brew install file-formula
brew bottle --json binutils
Add the sha256
of the bottle to the binutils
formula.
git config --global user.name LinuxbrewTestBot
git config --global user.email [email protected]
brew bottle --merge --write --keep-old binutils-*.x86_64_linux.bottle.json
Test 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 binutils
Upload 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-old
Or upload the bottle to Bintray using curl
.
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"
Commit 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