Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

docker: fix --with-experimental (libtool dependency and optional hardware signing) #50401

Closed
wants to merge 1 commit into from
Closed

docker: fix --with-experimental (libtool dependency and optional hardware signing) #50401

wants to merge 1 commit into from

Conversation

cyli
Copy link
Contributor

@cyli cyli commented Mar 25, 2016

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Docker experimental supports hardware signing yubikey PKCS11 libraries. Currently the formula is breaking if libtool is not installed:

$ brew install docker --with-experimental
==> Cloning https://github.com/docker/docker.git
Updating /Library/Caches/Homebrew/docker--git
==> Checking out tag v1.10.3
==> hack/make.sh dynbinary
Last 15 lines from /Users/yingli/Library/Logs/Homebrew/docker/01.make.sh:
# Try this instead: make all
#

date: illegal option -- -
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
# WARNING! DOCKER_EXPERIMENTAL is set: building experimental features

---> Making bundle: dynbinary (in bundles/1.10.3/dynbinary)
Building: bundles/1.10.3/dynbinary/docker-1.10.3
# github.com/miekg/pkcs11
vendor/src/github.com/miekg/pkcs11/pkcs11.go:26:10: fatal error: 'ltdl.h' file not found
#include <ltdl.h>
         ^
1 error generated.

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
Fix docker-machine-driver-xhyve HEAD https://github.com/Homebrew/homebrew/pull/49467

This adds the libtool dependency if experimental is enabled or yubikey is enabled (since, if it ever moves out of experimental, it will be needed if yubikey support is desired).

This also adds a recommended dependency on the yubico-piv-tool formula, which installs the necessary yubikey libraries.

$ brew install docker --with-experimental
==> Installing dependencies for docker: libtool, yubico-piv-tool
==> Installing docker dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/libtool-2.4.6.el_capitan.bottle.tar.gz
==> Pouring libtool-2.4.6.el_capitan.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺  /usr/local/Cellar/libtool/2.4.6: 69 files, 3.6M
==> Installing docker dependency: yubico-piv-tool
==> Downloading https://homebrew.bintray.com/bottles/yubico-piv-tool-1.2.2.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/yubico-piv-tool-1.2.2.el_capitan.bottle.tar.gz
==> Pouring yubico-piv-tool-1.2.2.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/yubico-piv-tool/1.2.2: 16 files, 368.7K
==> Installing docker
==> Cloning https://github.com/docker/docker.git
Updating /Library/Caches/Homebrew/docker--git
==> Checking out tag v1.10.3
==> hack/make.sh dynbinary
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/docker/1.10.3: 10 files, 11.7M, built in 15 seconds
brew install docker --with-experimental --without-yubico-piv-tool
==> Installing dependencies for docker: libtool
==> Installing docker dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/libtool-2.4.6.el_capitan.bottle.tar.gz
==> Pouring libtool-2.4.6.el_capitan.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺  /usr/local/Cellar/libtool/2.4.6: 69 files, 3.6M
==> Installing docker
==> Cloning https://github.com/docker/docker.git
Updating /Library/Caches/Homebrew/docker--git
==> Checking out tag v1.10.3
==> hack/make.sh dynbinary
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/docker/1.10.3: 10 files, 11.7M, built in 15 seconds

@cyli cyli changed the title Fix docker --with-experimental (libtool dependency and optional hardware signing) docker: fix --with-experimental (libtool dependency and optional hardware signing) Mar 25, 2016
@dunn
Copy link
Contributor

dunn commented Mar 26, 2016

What will happen if a user does brew install --with-experimental --without-yubico-piv-tool?

@cyli
Copy link
Contributor Author

cyli commented Mar 30, 2016

@dunn It installs libtool and docker only - I guess I should just simplify it to not have the yubikey option.

…o-piv-tool, since experimental supports hardware signing

Signed-off-by: cyli <cyli@twistedmatrix.com>
@dunn
Copy link
Contributor

dunn commented Mar 30, 2016

I was wondering more why it's :recommended when built as experimental, and not simply required.

NB: options that only exist when other options are enabled, like -without-yubico-piv-tool, don't show up in brew info.

@cyli
Copy link
Contributor Author

cyli commented Mar 30, 2016

@dunn: It's needed to do hardware signing with docker, but it's not required to run Docker. wrt -without-yubico-piv-tool, would you suggest I add the manual option with a description?

@dunn
Copy link
Contributor

dunn commented Apr 1, 2016

Sorry for the delay.

would you suggest I add the manual option with a description?

Adding options manually with the option "with-foo" DSL makes them unconditional which won't work here. It's OK as-is, just be aware that most people won't realize it's possible to build without yubico-piv-tool.

@cyli
Copy link
Contributor Author

cyli commented Apr 1, 2016

@dunn That's probably fine, thanks!

@dunn
Copy link
Contributor

dunn commented Apr 1, 2016

OK, merged as a8713e1. Thanks!

@dunn dunn closed this in a8713e1 Apr 1, 2016
@cyli cyli deleted the docker-yubikey-support branch April 1, 2016 18:25
@cyli
Copy link
Contributor Author

cyli commented Apr 1, 2016

@dunn Thanks lots!

xu-cheng pushed a commit to Homebrew/homebrew-core that referenced this pull request Apr 2, 2016
And optionally on yubico-piv-tool, since experimental supports hardware signing.

Closes Homebrew/legacy-homebrew#50401.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
dhilipsiva pushed a commit to ds-forks/homebrew that referenced this pull request Apr 2, 2016
And optionally on yubico-piv-tool, since experimental supports hardware signing.

Closes Homebrew#50401.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants