From 718987175a2e407e5d2c695f2dc28e9519de232e Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Thu, 12 Mar 2015 21:45:03 -0400 Subject: docker: avoid fetching dependencies Docker's build process will clone missing dependencies which circumvents the bitbake fetcher. This is a bad thing in many ways, for example this will not respect BB_NO_NETWORK and DL_DIR settings. To work around this we are able to provide recipes for each of the missing dependencies. The dependencies are all in GO and are required to be added to the sysroot such that the docker build can find them via GOPATH at build time. The docker recipe was updated to add these new packages as dependencies and the explicit clone of go-cli was removed. After these change we are able to complete the build with networking disabled after completing a fetchall. Docker functionality was tested on an image built with these changes and it functions as it did before. Signed-off-by: Mark Asselstine Signed-off-by: Amy Fong --- recipes-devtools/go/go-pty_git.bb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 recipes-devtools/go/go-pty_git.bb (limited to 'recipes-devtools/go/go-pty_git.bb') diff --git a/recipes-devtools/go/go-pty_git.bb b/recipes-devtools/go/go-pty_git.bb new file mode 100644 index 00000000..82385408 --- /dev/null +++ b/recipes-devtools/go/go-pty_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "PTY interface for Go" +HOMEPAGE = "https://github.com/kr/pty" +SECTION = "devel/go" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://License;md5=93958070863d769117fa33b129020050" + +PR = "r0" +SRCNAME = "pty" + +PKG_NAME = "github.com/kr/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "05017fcccf23c823bfdea560dcc958a136e54fb7" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_pty_sysroot_preprocess" + +go_pty_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" -- cgit v1.2.3-54-g00ecf