dotcloud/docker — pull request #4516 by tianon (2014-03-07 03:00:13+00:00)
Title: Fix dynbinary so that dockerinit can still be properly static even if it has to link against libapparmor for Ubuntu

Without apparmor, on my host:
```console
$ AUTO_GOPATH=1 ./hack/make.sh dynbinary
# WARNING! I don't seem to be running in the Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#

---> Making bundle: dynbinary (in bundles/0.8.1-dev/dynbinary)
Created binary: /home/tianon/downloads/docker/bundles/0.8.1-dev/dynbinary/dockerinit-0.8.1-dev
Created binary: /home/tianon/downloads/docker/bundles/0.8.1-dev/dynbinary/docker-0.8.1-dev
```

And then inside `make shell`:
```console
root@614124614fe4:/go/src/github.com/dotcloud/docker# ./hack/make.sh dynbinary binary cross binary

bundles/0.8.1-dev already exists. Removing.

---> Making bundle: dynbinary (in bundles/0.8.1-dev/dynbinary)
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/dynbinary/dockerinit-0.8.1-dev
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/dynbinary/docker-0.8.1-dev

---> Making bundle: binary (in bundles/0.8.1-dev/binary)
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/binary/docker-0.8.1-dev

---> Making bundle: cross (in bundles/0.8.1-dev/cross)
Created symlinks: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/cross/linux/amd64/docker-0.8.1-dev
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/cross/linux/386/docker-0.8.1-dev
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/cross/linux/arm/docker-0.8.1-dev
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/cross/darwin/amd64/docker-0.8.1-dev
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/cross/darwin/386/docker-0.8.1-dev

---> Making bundle: binary (in bundles/0.8.1-dev/binary)
Created binary: /go/src/github.com/dotcloud/docker/bundles/0.8.1-dev/binary/docker-0.8.1-dev
```
(with intentional duplicity of the binary bundlescript to make sure we don't clobber any of those important build env vars permanently in any of the bundlescripts)

I'd appreciate if the `test*` bundles could be tested more - I haven't vetted those nearly as thoroughly to make sure they're good, but they should be fine since I made all the same changes to them and did test them briefly (`dyntest*` appears to be working fine in my tests).