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
Michka Popoff edited this page Jul 20, 2018
·
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.12 and newer. We use CentOS 6 with glibc
2.12 to build portable bottles.
First, create a new clean docker image and run it:
docker build -t linuxbrew-centos6 https://raw.githubusercontent.com/Linuxbrew/docker/master/centos6/Dockerfile
docker run -it --name=linuxbrew-centos6 linuxbrew-centos6
Install build dependencies of binutils
.
sudo yum install -y bison flex makeinfo
Build a portable bottle for binutils
.
export HOMEBREW_NO_AUTO_UPDATE=1
brew install --build-bottle binutils
brew bottle --json binutils
brew test binutils
Upload the bottle to Bintray using curl
.
export BINTRAY_USER=linuxbrewtestbot BINTRAY_KEY=...
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.out
Add the sha256
of the bottle to the binutils
formula manually.
brew edit binutils
git commit binutils.rb -m"binutils: update $version bottle for Linuxbrew.
This portable bottle was built using glibc 2.5 on CentOS 5."
Add the sha256
of the bottle to the binutils
formula.
brew install git
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