* [PATCH 1/7] docker: needs go 1.3
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-06 18:34 ` [PATCH 2/7] Backport go-cross: fix the bug of cross building error Amy Fong
` (6 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
The current version of docker (1.6.2) requires go 1.3
See go 1.4 sqlite issue:
https://github.com/docker/docker/issues/9649
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
.../go-cross/files/bsd_svid_source.patch | 37 ++++++
recipes-devtools/go-cross/files/ccache.patch | 147 +++++++++++++++++++++
recipes-devtools/go-cross/go-cross_1.3.bb | 65 +++++++++
3 files changed, 249 insertions(+)
create mode 100644 recipes-devtools/go-cross/files/bsd_svid_source.patch
create mode 100644 recipes-devtools/go-cross/files/ccache.patch
create mode 100644 recipes-devtools/go-cross/go-cross_1.3.bb
diff --git a/recipes-devtools/go-cross/files/bsd_svid_source.patch b/recipes-devtools/go-cross/files/bsd_svid_source.patch
new file mode 100644
index 0000000..21e1d4c
--- /dev/null
+++ b/recipes-devtools/go-cross/files/bsd_svid_source.patch
@@ -0,0 +1,37 @@
+golang-cross: do_compile fails cc1: all warnings being treated as errors
+
+glibc 2.20 deprecates _BSD_SOURCE and _SVID_SOURCE and emits an error
+message. From patch 16632:
+ libc [PATCH] BZ #16632: Disable _SVID_SOURCE/_BSD_SOURCE warning
+ if _DEFAULT_SOURCE is defined
+
+Since we also need to support glibc before 2.20, from the release notes
+for glibc 2.20, the recommended fix is to define _DEFAULT_SOURCE
+
+(fixed upstream)
+https://groups.google.com/forum/#!topic/golang-codereviews/S4TARFCxu2k
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+---
+ include/u.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/include/u.h
++++ b/include/u.h
+@@ -38,6 +38,16 @@
+ # define __MAKECONTEXT_V2_SOURCE 1
+ # endif
+ #endif
++/**
++ * in glibc >= 2.20, _BSD_SOURCE and _SVID_SOURCE causes warning
++ * messages if _DEFAULT_SOURCE is not defined.
++ *
++ * From glibc 2.20 release notes, since this application needs _BSD_SOURCE
++ * and/or _SVID_SOURCE and we must support glibc < 2.19 and
++ * glibc >= 2.20, then define all 3 (_DEFAULT_SOURCE, _BSD_SOURCE,
++ * and _SVID_SOURCE) unconditionally
++ */
++#define _DEFAULT_SOURCE 1
+ #define _BSD_SOURCE 1
+ #define _NETBSD_SOURCE 1 /* NetBSD */
+ #define _SVID_SOURCE 1
diff --git a/recipes-devtools/go-cross/files/ccache.patch b/recipes-devtools/go-cross/files/ccache.patch
new file mode 100644
index 0000000..b7a64bf
--- /dev/null
+++ b/recipes-devtools/go-cross/files/ccache.patch
@@ -0,0 +1,147 @@
+golang doesn't work with ccache. In the current state, a lot of parsing
+happens where it'll grab the first string in CC or LD and uses that for
+its builds. When ccache is enabled, it results in trying to do builds
+with just ccache.
+
+The brokeness is seen when building with apps that uses cgo, like docker.
+To enable ccache to work, some string comparisons and changes to parsing
+had to be made.
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+
+Index: go/src/cmd/cgo/gcc.go
+===================================================================
+--- go.orig/src/cmd/cgo/gcc.go 2014-06-18 17:26:26.000000000 -0700
++++ go/src/cmd/cgo/gcc.go 2015-06-18 13:19:08.908877160 -0700
+@@ -712,6 +712,12 @@
+ func (p *Package) gccBaseCmd() []string {
+ // Use $CC if set, since that's what the build uses.
+ if ret := strings.Fields(os.Getenv("CC")); len(ret) > 0 {
++ if strings.Contains(ret[0], "ccache") {
++ base_cc := ret[0] + " " + ret[1]
++ os.Setenv("CCACHE_CC", ret[1])
++ ret[1] = base_cc
++ return ret[1:]
++ }
+ return ret
+ }
+ // Try $GCC if set, since that's what we used to use.
+Index: go/src/pkg/os/exec/lp_unix.go
+===================================================================
+--- go.orig/src/pkg/os/exec/lp_unix.go 2014-06-18 17:26:25.000000000 -0700
++++ go/src/pkg/os/exec/lp_unix.go 2015-06-18 13:19:29.464876331 -0700
+@@ -35,8 +35,14 @@
+ // (only bypass the path if file begins with / or ./ or ../)
+ // but that would not match all the Unix shells.
+
+- if strings.Contains(file, "/") {
+- err := findExecutable(file)
++ tmp := file
++ if strings.Contains(file, " ") {
++ exec_part := strings.Split(file, " ")[0]
++ tmp = exec_part
++ }
++
++ if strings.Contains(tmp, "/") {
++ err := findExecutable(tmp)
+ if err == nil {
+ return file, nil
+ }
+@@ -51,7 +57,7 @@
+ // Unix shell semantics: path element "" means "."
+ dir = "."
+ }
+- path := dir + "/" + file
++ path := dir + "/" + tmp
+ if err := findExecutable(path); err == nil {
+ return path, nil
+ }
+Index: go/src/cmd/go/build.go
+===================================================================
+--- go.orig/src/cmd/go/build.go 2014-06-18 17:26:26.000000000 -0700
++++ go/src/cmd/go/build.go 2015-06-18 13:20:08.724874749 -0700
+@@ -2005,8 +2005,15 @@
+ // strings returned are "gcc", "-I", objdir (and cuts them off).
+
+ compiler := envList(envvar, defcmd)
+- a := []string{compiler[0], "-I", objdir}
+- a = append(a, compiler[1:]...)
++
++ a := []string{compiler[0]}
++ if strings.Contains(compiler[0], "ccache") {
++ a = append(a, compiler[1], "-I", objdir)
++ a = append(a, compiler[2:]...)
++ } else {
++ a = append(a, "-I", objdir)
++ a = append(a, compiler[1:]...)
++ }
+
+ // Definitely want -fPIC but on Windows gcc complains
+ // "-fPIC ignored for target (all code is position independent)"
+Index: go/src/cmd/ld/lib.c
+===================================================================
+--- go.orig/src/cmd/ld/lib.c 2014-06-18 17:26:27.000000000 -0700
++++ go/src/cmd/ld/lib.c 2015-06-18 13:18:39.564878343 -0700
+@@ -552,7 +552,7 @@
+ void
+ hostlink(void)
+ {
+- char *p, **argv;
++ char *p, *q, **argv;
+ int c, i, w, n, argc, len;
+ Hostobj *h;
+ Biobuf *f;
+@@ -577,6 +577,19 @@
+ if(extld == nil)
+ extld = "gcc";
+ argv[argc++] = extld;
++
++ p = extldflags;
++ if (strstr(argv[0], "ccache") != NULL) {
++ while(p != nil) {
++ while(*p == ' ')
++ *p++ = '\0';
++ if(*p == '\0')
++ break;
++ argv[argc++] = p;
++ p = strchr(p + 1, ' ');
++ break;
++ }
++ }
+ switch(thechar){
+ case '8':
+ argv[argc++] = "-m32";
+@@ -629,12 +642,12 @@
+ errorexit();
+ }
+ Bseek(f, h->off, 0);
+- p = smprint("%s/%06d.o", tmpdir, i);
+- argv[argc++] = p;
+- w = create(p, 1, 0775);
++ q = smprint("%s/%06d.o", tmpdir, i);
++ argv[argc++] = q;
++ w = create(q, 1, 0775);
+ if(w < 0) {
+ ctxt->cursym = S;
+- diag("cannot create %s: %r", p);
++ diag("cannot create %s: %r", q);
+ errorexit();
+ }
+ len = h->len;
+@@ -646,7 +659,7 @@
+ }
+ if(close(w) < 0) {
+ ctxt->cursym = S;
+- diag("cannot write %s: %r", p);
++ diag("cannot write %s: %r", q);
+ errorexit();
+ }
+ Bterm(f);
+@@ -656,7 +669,6 @@
+ for(i=0; i<nldflag; i++)
+ argv[argc++] = ldflag[i];
+
+- p = extldflags;
+ while(p != nil) {
+ while(*p == ' ')
+ *p++ = '\0';
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross_1.3.bb
new file mode 100644
index 0000000..8723142
--- /dev/null
+++ b/recipes-devtools/go-cross/go-cross_1.3.bb
@@ -0,0 +1,65 @@
+DESCRIPTION = "\
+ Go is an open source programming language that makes it easy to build simple, \
+ reliable, and efficient software. \
+ "
+HOMEPAGE = "https://golang.org/"
+LICENSE = "BSD-3-Clause"
+
+SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz"
+
+S = "${WORKDIR}/go/"
+
+inherit cross
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
+SRC_URI[md5sum] = "4b66d7249554181c314f139ea78920b1"
+SRC_URI[sha256sum] = "eb983e6c5b2b9838f482c5442b1ac1856f610f2b21f3c123b3fedb48ffc35382"
+
+SRC_URI += "\
+ file://bsd_svid_source.patch \
+ file://ccache.patch \
+ "
+
+do_compile() {
+ ## Setting `$GOBIN` doesn't do any good, looks like it ends up copying binaries there.
+ export GOROOT_FINAL="${SYSROOT}${libdir}/go"
+
+ export GOHOSTOS="linux"
+ export GOOS="linux"
+
+ export GOARCH="${TARGET_ARCH}"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ export GOARCH="amd64"
+ fi
+ if [ "${TARGET_ARCH}" = "arm" ]
+ then
+ if [ `echo ${TUNE_PKGARCH} | cut -c 1-7` = "cortexa" ]
+ then
+ echo GOARM 7
+ export GOARM="7"
+ fi
+ fi
+
+ export CGO_ENABLED="1"
+ ## TODO: consider setting GO_EXTLINK_ENABLED
+
+ export CC="${BUILD_CC}"
+ export CC_FOR_TARGET="${CC}"
+ export CXX_FOR_TARGET="${CXX}"
+ export GO_CCFLAGS="${HOST_CFLAGS}"
+ export GO_LDFLAGS="${HOST_LDFLAGS}"
+
+ cd src && ./make.bash
+}
+
+do_install() {
+ ## It should be okay to ignore `${WORKDIR}/go/bin/linux_arm`...
+ ## Also `gofmt` is not needed right now.
+ install -d "${D}${bindir}"
+ install -m 0755 "${WORKDIR}/go/bin/go" "${D}${bindir}"
+ install -d "${D}${libdir}/go"
+ ## TODO: use `install` instead of `cp`
+ for dir in include lib pkg src test
+ do cp -a "${WORKDIR}/go/${dir}" "${D}${libdir}/go/"
+ done
+}
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 2/7] Backport go-cross: fix the bug of cross building error
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
2015-10-06 18:34 ` [PATCH 1/7] docker: needs go 1.3 Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-06 18:34 ` [PATCH 3/7] Backport go-cross: fix the building failed for quark bsp Amy Fong
` (5 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
submitted to upstream https://github.com/errordeveloper/oe-meta-go
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
recipes-devtools/go-cross/go-cross_1.3.bb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross_1.3.bb
index 8723142..9ecc295 100644
--- a/recipes-devtools/go-cross/go-cross_1.3.bb
+++ b/recipes-devtools/go-cross/go-cross_1.3.bb
@@ -5,6 +5,8 @@ DESCRIPTION = "\
HOMEPAGE = "https://golang.org/"
LICENSE = "BSD-3-Clause"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc"
+
SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz"
S = "${WORKDIR}/go/"
@@ -44,8 +46,8 @@ do_compile() {
## TODO: consider setting GO_EXTLINK_ENABLED
export CC="${BUILD_CC}"
- export CC_FOR_TARGET="${CC}"
- export CXX_FOR_TARGET="${CXX}"
+ export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
export GO_CCFLAGS="${HOST_CFLAGS}"
export GO_LDFLAGS="${HOST_LDFLAGS}"
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 3/7] Backport go-cross: fix the building failed for quark bsp
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
2015-10-06 18:34 ` [PATCH 1/7] docker: needs go 1.3 Amy Fong
2015-10-06 18:34 ` [PATCH 2/7] Backport go-cross: fix the bug of cross building error Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-06 18:34 ` [PATCH 4/7] Backport go-cross: set alignment for the .rel.plt section on 32-bit architectures Amy Fong
` (4 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
submitted to upstream https://github.com/errordeveloper/oe-meta-go
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
recipes-devtools/go-cross/go-cross_1.3.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross_1.3.bb
index 9ecc295..d689e61 100644
--- a/recipes-devtools/go-cross/go-cross_1.3.bb
+++ b/recipes-devtools/go-cross/go-cross_1.3.bb
@@ -30,8 +30,11 @@ do_compile() {
export GOOS="linux"
export GOARCH="${TARGET_ARCH}"
+ # golang only support 386, amd64 and arm architecture.
if [ "${TARGET_ARCH}" = "x86_64" ]; then
export GOARCH="amd64"
+ elif [ "${TARGET_ARCH}" = "i586" ]; then
+ export GOARCH="386"
fi
if [ "${TARGET_ARCH}" = "arm" ]
then
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 4/7] Backport go-cross: set alignment for the .rel.plt section on 32-bit architectures
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
` (2 preceding siblings ...)
2015-10-06 18:34 ` [PATCH 3/7] Backport go-cross: fix the building failed for quark bsp Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-06 18:34 ` [PATCH 5/7] Enable go-cross 1.3 to coexist with later versions Amy Fong
` (3 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
submitted to upstream https://github.com/errordeveloper/oe-meta-go
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
...alignment-for-the-.rel.plt-section-on-32-.patch | 30 ++++++++++++++++++++++
recipes-devtools/go-cross/go-cross_1.3.bb | 1 +
2 files changed, 31 insertions(+)
create mode 100644 recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch
diff --git a/recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch b/recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch
new file mode 100644
index 0000000..4cfa9d1
--- /dev/null
+++ b/recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch
@@ -0,0 +1,30 @@
+From 855145d5c03c4b4faf60736c38d7a299c682af4a Mon Sep 17 00:00:00 2001
+From: Shenghou Ma <minux@golang.org>
+Date: Sat, 7 Feb 2015 14:06:02 -0500
+Subject: [PATCH] cmd/ld: set alignment for the .rel.plt section on 32-bit
+ architectures
+
+Fixes #9802.
+
+Change-Id: I22c52a37bdb23a14cc4615c9519431bb14ca81ca
+Reviewed-on: https://go-review.googlesource.com/4170
+Reviewed-by: Ian Lance Taylor <iant@golang.org>
+---
+ src/cmd/ld/elf.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/cmd/ld/elf.c b/src/cmd/ld/elf.c
+index 12ced98..97ed4bd 100644
+--- a/src/cmd/ld/elf.c
++++ b/src/cmd/ld/elf.c
+@@ -1363,6 +1363,7 @@ asmbelf(vlong symo)
+ sh->type = SHT_REL;
+ sh->flags = SHF_ALLOC;
+ sh->entsize = ELF32RELSIZE;
++ sh->addralign = 4;
+ sh->link = elfshname(".dynsym")->shnum;
+ shsym(sh, linklookup(ctxt, ".rel.plt", 0));
+
+--
+1.9.1
+
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross_1.3.bb
index d689e61..1fb4870 100644
--- a/recipes-devtools/go-cross/go-cross_1.3.bb
+++ b/recipes-devtools/go-cross/go-cross_1.3.bb
@@ -20,6 +20,7 @@ SRC_URI[sha256sum] = "eb983e6c5b2b9838f482c5442b1ac1856f610f2b21f3c123b3fedb48ff
SRC_URI += "\
file://bsd_svid_source.patch \
file://ccache.patch \
+ file://0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch \
"
do_compile() {
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 5/7] Enable go-cross 1.3 to coexist with later versions
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
` (3 preceding siblings ...)
2015-10-06 18:34 ` [PATCH 4/7] Backport go-cross: set alignment for the .rel.plt section on 32-bit architectures Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-06 18:34 ` [PATCH 6/7] docker: fix paths for cross compile Amy Fong
` (2 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
Since we need go 1.3 to co-exist with later versions (ie 1.4),
package go-cross_1.3 as go-cross-1.3_1.3.
go 1.3 will be installed to a different path than go-cross, this requires
go packages needing go 1.3 to set its PATH to:
export PATH=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/go-1.3:$PATH
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
recipes-containers/docker/docker_git.bb | 4 +++-
.../go-cross/{go-cross_1.3.bb => go-cross-1.3_1.3.bb} | 11 ++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
rename recipes-devtools/go-cross/{go-cross_1.3.bb => go-cross-1.3_1.3.bb} (88%)
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index aa125a3..165b319 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -36,7 +36,7 @@ S = "${WORKDIR}/git"
DOCKER_VERSION = "1.6.2"
PV = "${DOCKER_VERSION}+git${SRCREV}"
-DEPENDS = "go-cross \
+DEPENDS = "go-cross-1.3 \
go-cli \
go-pty \
go-context \
@@ -65,6 +65,8 @@ do_configure() {
}
do_compile() {
+ export PATH=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/go-1.3:$PATH
+
export GOARCH="${TARGET_ARCH}"
# supported amd64, 386, arm
if [ "${TARGET_ARCH}" = "x86_64" ]; then
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross-1.3_1.3.bb
similarity index 88%
rename from recipes-devtools/go-cross/go-cross_1.3.bb
rename to recipes-devtools/go-cross/go-cross-1.3_1.3.bb
index 1fb4870..775e28f 100644
--- a/recipes-devtools/go-cross/go-cross_1.3.bb
+++ b/recipes-devtools/go-cross/go-cross-1.3_1.3.bb
@@ -25,7 +25,7 @@ SRC_URI += "\
do_compile() {
## Setting `$GOBIN` doesn't do any good, looks like it ends up copying binaries there.
- export GOROOT_FINAL="${SYSROOT}${libdir}/go"
+ export GOROOT_FINAL="${SYSROOT}${libdir}/go-1.3"
export GOHOSTOS="linux"
export GOOS="linux"
@@ -61,11 +61,12 @@ do_compile() {
do_install() {
## It should be okay to ignore `${WORKDIR}/go/bin/linux_arm`...
## Also `gofmt` is not needed right now.
- install -d "${D}${bindir}"
- install -m 0755 "${WORKDIR}/go/bin/go" "${D}${bindir}"
- install -d "${D}${libdir}/go"
+ install -d "${D}${bindir}/go-1.3"
+ install -m 0755 "${WORKDIR}/go/bin/go" "${D}${bindir}/go-1.3/"
+ install -d "${D}${libdir}/go-1.3"
+
## TODO: use `install` instead of `cp`
for dir in include lib pkg src test
- do cp -a "${WORKDIR}/go/${dir}" "${D}${libdir}/go/"
+ do cp -a "${WORKDIR}/go/${dir}" "${D}${libdir}/go-1.3/"
done
}
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 6/7] docker: fix paths for cross compile
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
` (4 preceding siblings ...)
2015-10-06 18:34 ` [PATCH 5/7] Enable go-cross 1.3 to coexist with later versions Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-06 18:34 ` [PATCH 7/7] python-greenlet: uprev to 0.4.9 Amy Fong
2015-10-06 18:40 ` [PATCHES] docker/docker-registry issues Amy Fong
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
Some of the cgo variables were pointing to host paths and not target
Fix install rules - binaries can be installed to a subdirectory.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
recipes-containers/docker/docker_git.bb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 165b319..0127baf 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -83,10 +83,12 @@ do_compile() {
export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
cd -
+ export CGO_ENABLED="1"
+
# Pass the needed cflags/ldflags so that cgo
# can find the needed headers files and libraries
- export CGO_CFLAGS="${BUILD_CFLAGS}"
- export CGO_LDFLAGS="${BUILD_LDFLAGS}"
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS}"
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS}"
# this is the unsupported built structure
# that doesn't rely on an existing docker
@@ -124,7 +126,11 @@ do_install() {
install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
fi
- cp ${S}/vendor/bin/nsinit ${D}/${bindir}
+ if [ -d ${S}/vendor/bin/linux_* ]; then
+ cp ${S}/vendor/bin/linux_*/* ${D}/${bindir}
+ else
+ cp ${S}/vendor/bin/* ${D}/${bindir}
+ fi
mkdir -p ${D}/usr/share/docker/
cp ${WORKDIR}/hi.Dockerfile ${D}/usr/share/docker/
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 7/7] python-greenlet: uprev to 0.4.9
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
` (5 preceding siblings ...)
2015-10-06 18:34 ` [PATCH 6/7] docker: fix paths for cross compile Amy Fong
@ 2015-10-06 18:34 ` Amy Fong
2015-10-13 15:31 ` Bruce Ashfield
2015-10-06 18:40 ` [PATCHES] docker/docker-registry issues Amy Fong
7 siblings, 1 reply; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:34 UTC (permalink / raw)
To: meta-virtualization
python-greenlet bugfixes from 0.3.4 - unstable issues. This resulted in
the docker-registry (in some build scenarios) crashing repeatedly.
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
worker.init_process()
File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/lib64/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
self.run()
File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 117, in run
gevent.sleep(1.0)
File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 75, in sleep
hub.wait(loop.timer(seconds, ref=ref))
File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 341, in wait
result = waiter.get()
File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 568, in get
return self.hub.switch()
File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 331, in switch
return greenlet.switch(self)
SystemError: NULL result without error in PyObject_Call
<repeat>
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
recipes-devtools/python/python-greenlet_0.4.9.bb | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 recipes-devtools/python/python-greenlet_0.4.9.bb
diff --git a/recipes-devtools/python/python-greenlet_0.4.9.bb b/recipes-devtools/python/python-greenlet_0.4.9.bb
new file mode 100644
index 0000000..fa35fa8
--- /dev/null
+++ b/recipes-devtools/python/python-greenlet_0.4.9.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Python lightweight in-process concurrent programming"
+HOMEPAGE = "http://pypi.python.org/pypi/greenlet"
+SECTION = "devel/python"
+LICENSE = "MIT & PSF"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=03143d7a1a9f5d8a0fee825f24ca9c36 \
+ file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a"
+SRC_URI = "http://pypi.python.org/packages/source/g/greenlet/greenlet-${PV}.tar.gz"
+SRC_URI[md5sum] = "00bb1822d8511cc85f052e89d1fd919b"
+SRC_URI[sha256sum] = "79f9b8bbbb1c599c66aed5e643e8b53bae697cae46e0acfc4ee461df48a90012"
+
+S = "${WORKDIR}/greenlet-${PV}"
+
+inherit distutils
+
--
2.5.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH 7/7] python-greenlet: uprev to 0.4.9
2015-10-06 18:34 ` [PATCH 7/7] python-greenlet: uprev to 0.4.9 Amy Fong
@ 2015-10-13 15:31 ` Bruce Ashfield
2015-10-13 17:08 ` Amy Fong
0 siblings, 1 reply; 14+ messages in thread
From: Bruce Ashfield @ 2015-10-13 15:31 UTC (permalink / raw)
To: Amy Fong; +Cc: meta-virtualization@yoctoproject.org
meta-python already has 0.4.7. Is there any reason why that version shouldn't
work here ? .. versus carrying a meta-virt specific version.
Bruce
On Tue, Oct 6, 2015 at 2:34 PM, Amy Fong <amy.fong@windriver.com> wrote:
> python-greenlet bugfixes from 0.3.4 - unstable issues. This resulted in
> the docker-registry (in some build scenarios) crashing repeatedly.
>
> Traceback (most recent call last):
> File "/usr/lib64/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
> worker.init_process()
> File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 193, in init_process
> super(GeventWorker, self).init_process()
> File "/usr/lib64/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
> self.run()
> File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 117, in run
> gevent.sleep(1.0)
> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 75, in sleep
> hub.wait(loop.timer(seconds, ref=ref))
> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 341, in wait
> result = waiter.get()
> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 568, in get
> return self.hub.switch()
> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 331, in switch
> return greenlet.switch(self)
> SystemError: NULL result without error in PyObject_Call
>
> <repeat>
>
> Signed-off-by: Amy Fong <amy.fong@windriver.com>
> ---
> recipes-devtools/python/python-greenlet_0.4.9.bb | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> create mode 100644 recipes-devtools/python/python-greenlet_0.4.9.bb
>
> diff --git a/recipes-devtools/python/python-greenlet_0.4.9.bb b/recipes-devtools/python/python-greenlet_0.4.9.bb
> new file mode 100644
> index 0000000..fa35fa8
> --- /dev/null
> +++ b/recipes-devtools/python/python-greenlet_0.4.9.bb
> @@ -0,0 +1,14 @@
> +SUMMARY = "Python lightweight in-process concurrent programming"
> +HOMEPAGE = "http://pypi.python.org/pypi/greenlet"
> +SECTION = "devel/python"
> +LICENSE = "MIT & PSF"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=03143d7a1a9f5d8a0fee825f24ca9c36 \
> + file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a"
> +SRC_URI = "http://pypi.python.org/packages/source/g/greenlet/greenlet-${PV}.tar.gz"
> +SRC_URI[md5sum] = "00bb1822d8511cc85f052e89d1fd919b"
> +SRC_URI[sha256sum] = "79f9b8bbbb1c599c66aed5e643e8b53bae697cae46e0acfc4ee461df48a90012"
> +
> +S = "${WORKDIR}/greenlet-${PV}"
> +
> +inherit distutils
> +
> --
> 2.5.3
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH 7/7] python-greenlet: uprev to 0.4.9
2015-10-13 15:31 ` Bruce Ashfield
@ 2015-10-13 17:08 ` Amy Fong
2015-10-13 19:00 ` Amy Fong
0 siblings, 1 reply; 14+ messages in thread
From: Amy Fong @ 2015-10-13 17:08 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org
I'll have to test to verify this one (no changelog in the src)....
Amy
On Tue, Oct 13, 2015 at 11:31:12AM -0400, Bruce Ashfield wrote:
> meta-python already has 0.4.7. Is there any reason why that version shouldn't
> work here ? .. versus carrying a meta-virt specific version.
>
> Bruce
>
> On Tue, Oct 6, 2015 at 2:34 PM, Amy Fong <amy.fong@windriver.com> wrote:
> > python-greenlet bugfixes from 0.3.4 - unstable issues. This resulted in
> > the docker-registry (in some build scenarios) crashing repeatedly.
> >
> > Traceback (most recent call last):
> > File "/usr/lib64/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
> > worker.init_process()
> > File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 193, in init_process
> > super(GeventWorker, self).init_process()
> > File "/usr/lib64/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
> > self.run()
> > File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 117, in run
> > gevent.sleep(1.0)
> > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 75, in sleep
> > hub.wait(loop.timer(seconds, ref=ref))
> > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 341, in wait
> > result = waiter.get()
> > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 568, in get
> > return self.hub.switch()
> > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 331, in switch
> > return greenlet.switch(self)
> > SystemError: NULL result without error in PyObject_Call
> >
> > <repeat>
> >
> > Signed-off-by: Amy Fong <amy.fong@windriver.com>
> > ---
> > recipes-devtools/python/python-greenlet_0.4.9.bb | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> > create mode 100644 recipes-devtools/python/python-greenlet_0.4.9.bb
> >
> > diff --git a/recipes-devtools/python/python-greenlet_0.4.9.bb b/recipes-devtools/python/python-greenlet_0.4.9.bb
> > new file mode 100644
> > index 0000000..fa35fa8
> > --- /dev/null
> > +++ b/recipes-devtools/python/python-greenlet_0.4.9.bb
> > @@ -0,0 +1,14 @@
> > +SUMMARY = "Python lightweight in-process concurrent programming"
> > +HOMEPAGE = "http://pypi.python.org/pypi/greenlet"
> > +SECTION = "devel/python"
> > +LICENSE = "MIT & PSF"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=03143d7a1a9f5d8a0fee825f24ca9c36 \
> > + file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a"
> > +SRC_URI = "http://pypi.python.org/packages/source/g/greenlet/greenlet-${PV}.tar.gz"
> > +SRC_URI[md5sum] = "00bb1822d8511cc85f052e89d1fd919b"
> > +SRC_URI[sha256sum] = "79f9b8bbbb1c599c66aed5e643e8b53bae697cae46e0acfc4ee461df48a90012"
> > +
> > +S = "${WORKDIR}/greenlet-${PV}"
> > +
> > +inherit distutils
> > +
> > --
> > 2.5.3
> >
> > --
> > _______________________________________________
> > meta-virtualization mailing list
> > meta-virtualization@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH 7/7] python-greenlet: uprev to 0.4.9
2015-10-13 17:08 ` Amy Fong
@ 2015-10-13 19:00 ` Amy Fong
2015-10-13 20:02 ` Bruce Ashfield
0 siblings, 1 reply; 14+ messages in thread
From: Amy Fong @ 2015-10-13 19:00 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org
It appears that 0.4.7 works.
Amy
On Tue, Oct 13, 2015 at 01:08:20PM -0400, Amy Fong wrote:
> I'll have to test to verify this one (no changelog in the src)....
>
> Amy
>
> On Tue, Oct 13, 2015 at 11:31:12AM -0400, Bruce Ashfield wrote:
> > meta-python already has 0.4.7. Is there any reason why that version shouldn't
> > work here ? .. versus carrying a meta-virt specific version.
> >
> > Bruce
> >
> > On Tue, Oct 6, 2015 at 2:34 PM, Amy Fong <amy.fong@windriver.com> wrote:
> > > python-greenlet bugfixes from 0.3.4 - unstable issues. This resulted in
> > > the docker-registry (in some build scenarios) crashing repeatedly.
> > >
> > > Traceback (most recent call last):
> > > File "/usr/lib64/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
> > > worker.init_process()
> > > File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 193, in init_process
> > > super(GeventWorker, self).init_process()
> > > File "/usr/lib64/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
> > > self.run()
> > > File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 117, in run
> > > gevent.sleep(1.0)
> > > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 75, in sleep
> > > hub.wait(loop.timer(seconds, ref=ref))
> > > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 341, in wait
> > > result = waiter.get()
> > > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 568, in get
> > > return self.hub.switch()
> > > File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 331, in switch
> > > return greenlet.switch(self)
> > > SystemError: NULL result without error in PyObject_Call
> > >
> > > <repeat>
> > >
> > > Signed-off-by: Amy Fong <amy.fong@windriver.com>
> > > ---
> > > recipes-devtools/python/python-greenlet_0.4.9.bb | 14 ++++++++++++++
> > > 1 file changed, 14 insertions(+)
> > > create mode 100644 recipes-devtools/python/python-greenlet_0.4.9.bb
> > >
> > > diff --git a/recipes-devtools/python/python-greenlet_0.4.9.bb b/recipes-devtools/python/python-greenlet_0.4.9.bb
> > > new file mode 100644
> > > index 0000000..fa35fa8
> > > --- /dev/null
> > > +++ b/recipes-devtools/python/python-greenlet_0.4.9.bb
> > > @@ -0,0 +1,14 @@
> > > +SUMMARY = "Python lightweight in-process concurrent programming"
> > > +HOMEPAGE = "http://pypi.python.org/pypi/greenlet"
> > > +SECTION = "devel/python"
> > > +LICENSE = "MIT & PSF"
> > > +LIC_FILES_CHKSUM = "file://LICENSE;md5=03143d7a1a9f5d8a0fee825f24ca9c36 \
> > > + file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a"
> > > +SRC_URI = "http://pypi.python.org/packages/source/g/greenlet/greenlet-${PV}.tar.gz"
> > > +SRC_URI[md5sum] = "00bb1822d8511cc85f052e89d1fd919b"
> > > +SRC_URI[sha256sum] = "79f9b8bbbb1c599c66aed5e643e8b53bae697cae46e0acfc4ee461df48a90012"
> > > +
> > > +S = "${WORKDIR}/greenlet-${PV}"
> > > +
> > > +inherit distutils
> > > +
> > > --
> > > 2.5.3
> > >
> > > --
> > > _______________________________________________
> > > meta-virtualization mailing list
> > > meta-virtualization@yoctoproject.org
> > > https://lists.yoctoproject.org/listinfo/meta-virtualization
> >
> >
> >
> > --
> > "Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end"
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH 7/7] python-greenlet: uprev to 0.4.9
2015-10-13 19:00 ` Amy Fong
@ 2015-10-13 20:02 ` Bruce Ashfield
0 siblings, 0 replies; 14+ messages in thread
From: Bruce Ashfield @ 2015-10-13 20:02 UTC (permalink / raw)
To: Amy Fong; +Cc: meta-virtualization@yoctoproject.org
On 15-10-13 03:00 PM, Amy Fong wrote:
> It appears that 0.4.7 works.
>
ok good. I'll merge the series, minus the greenlet patch!
Bruce
> Amy
>
> On Tue, Oct 13, 2015 at 01:08:20PM -0400, Amy Fong wrote:
>> I'll have to test to verify this one (no changelog in the src)....
>>
>> Amy
>>
>> On Tue, Oct 13, 2015 at 11:31:12AM -0400, Bruce Ashfield wrote:
>>> meta-python already has 0.4.7. Is there any reason why that version shouldn't
>>> work here ? .. versus carrying a meta-virt specific version.
>>>
>>> Bruce
>>>
>>> On Tue, Oct 6, 2015 at 2:34 PM, Amy Fong <amy.fong@windriver.com> wrote:
>>>> python-greenlet bugfixes from 0.3.4 - unstable issues. This resulted in
>>>> the docker-registry (in some build scenarios) crashing repeatedly.
>>>>
>>>> Traceback (most recent call last):
>>>> File "/usr/lib64/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
>>>> worker.init_process()
>>>> File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 193, in init_process
>>>> super(GeventWorker, self).init_process()
>>>> File "/usr/lib64/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
>>>> self.run()
>>>> File "/usr/lib64/python2.7/site-packages/gunicorn/workers/ggevent.py", line 117, in run
>>>> gevent.sleep(1.0)
>>>> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 75, in sleep
>>>> hub.wait(loop.timer(seconds, ref=ref))
>>>> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 341, in wait
>>>> result = waiter.get()
>>>> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 568, in get
>>>> return self.hub.switch()
>>>> File "/usr/lib64/python2.7/site-packages/gevent/hub.py", line 331, in switch
>>>> return greenlet.switch(self)
>>>> SystemError: NULL result without error in PyObject_Call
>>>>
>>>> <repeat>
>>>>
>>>> Signed-off-by: Amy Fong <amy.fong@windriver.com>
>>>> ---
>>>> recipes-devtools/python/python-greenlet_0.4.9.bb | 14 ++++++++++++++
>>>> 1 file changed, 14 insertions(+)
>>>> create mode 100644 recipes-devtools/python/python-greenlet_0.4.9.bb
>>>>
>>>> diff --git a/recipes-devtools/python/python-greenlet_0.4.9.bb b/recipes-devtools/python/python-greenlet_0.4.9.bb
>>>> new file mode 100644
>>>> index 0000000..fa35fa8
>>>> --- /dev/null
>>>> +++ b/recipes-devtools/python/python-greenlet_0.4.9.bb
>>>> @@ -0,0 +1,14 @@
>>>> +SUMMARY = "Python lightweight in-process concurrent programming"
>>>> +HOMEPAGE = "http://pypi.python.org/pypi/greenlet"
>>>> +SECTION = "devel/python"
>>>> +LICENSE = "MIT & PSF"
>>>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=03143d7a1a9f5d8a0fee825f24ca9c36 \
>>>> + file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a"
>>>> +SRC_URI = "http://pypi.python.org/packages/source/g/greenlet/greenlet-${PV}.tar.gz"
>>>> +SRC_URI[md5sum] = "00bb1822d8511cc85f052e89d1fd919b"
>>>> +SRC_URI[sha256sum] = "79f9b8bbbb1c599c66aed5e643e8b53bae697cae46e0acfc4ee461df48a90012"
>>>> +
>>>> +S = "${WORKDIR}/greenlet-${PV}"
>>>> +
>>>> +inherit distutils
>>>> +
>>>> --
>>>> 2.5.3
>>>>
>>>> --
>>>> _______________________________________________
>>>> meta-virtualization mailing list
>>>> meta-virtualization@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>>
>>>
>>>
>>> --
>>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>>> thee at its end"
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCHES] docker/docker-registry issues
2015-10-06 18:34 [PATCHES] docker/docker-registry issues Amy Fong
` (6 preceding siblings ...)
2015-10-06 18:34 ` [PATCH 7/7] python-greenlet: uprev to 0.4.9 Amy Fong
@ 2015-10-06 18:40 ` Amy Fong
7 siblings, 0 replies; 14+ messages in thread
From: Amy Fong @ 2015-10-06 18:40 UTC (permalink / raw)
To: meta-virtualization
On Tue, Oct 06, 2015 at 02:34:02PM -0400, Amy Fong wrote:
>
> - go 1.4 has bugs in sqlite, forcing build with go 1.3
> - upreving python-greenlet - instability issues
Uhhh ignore, wrong set of patches.
^ permalink raw reply [flat|nested] 14+ messages in thread