All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] runc: Backport fix for building against musl
@ 2016-06-16 19:06 Paul Barker
  2016-06-16 19:06 ` [PATCH 2/2] runc: Use go-osarchmap to set GOARCH Paul Barker
  2016-06-17 12:36 ` [PATCH 1/2] runc: Backport fix for building against musl Bruce Ashfield
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Barker @ 2016-06-16 19:06 UTC (permalink / raw)
  To: meta-virtualization

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 .../0001-nsexec-fix-build-against-musl-libc.patch  | 48 ++++++++++++++++++++++
 recipes-containers/runc/runc_git.bb                |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch

diff --git a/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch b/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch
new file mode 100644
index 0000000..aa57636
--- /dev/null
+++ b/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch
@@ -0,0 +1,48 @@
+From ac6bd953192fa6752a07be7501f69f7cffe33e8e Mon Sep 17 00:00:00 2001
+From: Natanael Copa <natanael.copa@docker.com>
+Date: Tue, 19 Apr 2016 10:43:00 +0200
+Subject: [PATCH] nsexec: fix build against musl libc
+
+Remove a wrongly added include which was added in commit 3c2e77ee (Add a
+compatibility header for CentOS/RHEL 6, 2016-01-29) apparently to
+fix this compile error on centos 6:
+
+> In file included from
+> Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:20:
+> /usr/include/linux/netlink.h:35: error: expected specifier-qualifier-list before 'sa_family_t'
+
+The glibc bits/sockaddr.h says that this header should never be included
+directly[1]. Instead, sys/socket.h should be used.
+
+The problem was correctly fixed later, in commit 394fb55 (Fix build
+error on centos6, 2016-03-02) so the incorrect bits/sockaddr.h can
+safely be removed.
+
+This is needed to build musl libc.
+
+Fixes #761
+
+[1]: https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/bits/sockaddr.h#L20
+
+Signed-off-by: Natanael Copa <natanael.copa@docker.com>
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+Upstream-status: Backport
+---
+ libcontainer/nsenter/nsexec.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libcontainer/nsenter/nsexec.c b/libcontainer/nsenter/nsexec.c
+index 8f37d6c..40a8f89 100644
+--- a/libcontainer/nsenter/nsexec.c
++++ b/libcontainer/nsenter/nsexec.c
+@@ -18,7 +18,6 @@
+ #include <unistd.h>
+ #include <grp.h>
+ 
+-#include <bits/sockaddr.h>
+ #include <linux/types.h>
+ 
+ // All arguments should be above the stack because it grows down
+-- 
+2.1.4
+
diff --git a/recipes-containers/runc/runc_git.bb b/recipes-containers/runc/runc_git.bb
index 30a4640..b47914e 100644
--- a/recipes-containers/runc/runc_git.bb
+++ b/recipes-containers/runc/runc_git.bb
@@ -7,6 +7,7 @@ DESCRIPTION = "runc is a CLI tool for spawning and running containers according
 SRCREV = "baf6536d6259209c3edfa2b22237af82942d3dfa"
 SRC_URI = "\
 	git://github.com/opencontainers/runc;branch=master \
+	file://0001-nsexec-fix-build-against-musl-libc.patch \
 	"
 
 # Apache-2.0 for containerd
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] runc: Use go-osarchmap to set GOARCH
  2016-06-16 19:06 [PATCH 1/2] runc: Backport fix for building against musl Paul Barker
@ 2016-06-16 19:06 ` Paul Barker
  2016-06-17 12:36 ` [PATCH 1/2] runc: Backport fix for building against musl Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Barker @ 2016-06-16 19:06 UTC (permalink / raw)
  To: meta-virtualization

When building for qemux86 the following error was encountered due to GOARCH
being set incorrectly:

    compile: unknown architecture "i586"

This can be fixed by using the go-osarchmap class.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 recipes-containers/runc/runc_git.bb | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/recipes-containers/runc/runc_git.bb b/recipes-containers/runc/runc_git.bb
index b47914e..955ea93 100644
--- a/recipes-containers/runc/runc_git.bb
+++ b/recipes-containers/runc/runc_git.bb
@@ -28,15 +28,10 @@ LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
 do_configure[noexec] = "1"
 EXTRA_OEMAKE="BUILDTAGS=''"
 
+inherit go-osarchmap
+
 do_compile() {
-	export GOARCH="${TARGET_ARCH}"
-	# supported amd64, 386, arm arm64
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
-		export GOARCH="amd64"
-	fi
-	if [ "${TARGET_ARCH}" = "aarch64" ]; then
-		export GOARCH="arm64"
-	fi
+	export GOARCH="${TARGET_GOARCH}"
 
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
 	# docker to download its dependencies but rather
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] runc: Backport fix for building against musl
  2016-06-16 19:06 [PATCH 1/2] runc: Backport fix for building against musl Paul Barker
  2016-06-16 19:06 ` [PATCH 2/2] runc: Use go-osarchmap to set GOARCH Paul Barker
@ 2016-06-17 12:36 ` Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2016-06-17 12:36 UTC (permalink / raw)
  To: Paul Barker; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 3588 bytes --]

merged.

I have a runc update queued, but I can drop this when I push that update.

Cheers,

Bruce

On Thu, Jun 16, 2016 at 3:06 PM, Paul Barker <paul@paulbarker.me.uk> wrote:

> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
> ---
>  .../0001-nsexec-fix-build-against-musl-libc.patch  | 48
> ++++++++++++++++++++++
>  recipes-containers/runc/runc_git.bb                |  1 +
>  2 files changed, 49 insertions(+)
>  create mode 100644
> recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch
>
> diff --git
> a/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch
> b/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch
> new file mode 100644
> index 0000000..aa57636
> --- /dev/null
> +++
> b/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch
> @@ -0,0 +1,48 @@
> +From ac6bd953192fa6752a07be7501f69f7cffe33e8e Mon Sep 17 00:00:00 2001
> +From: Natanael Copa <natanael.copa@docker.com>
> +Date: Tue, 19 Apr 2016 10:43:00 +0200
> +Subject: [PATCH] nsexec: fix build against musl libc
> +
> +Remove a wrongly added include which was added in commit 3c2e77ee (Add a
> +compatibility header for CentOS/RHEL 6, 2016-01-29) apparently to
> +fix this compile error on centos 6:
> +
> +> In file included from
> +> Godeps/_workspace/src/
> github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:20:
> +> /usr/include/linux/netlink.h:35: error: expected
> specifier-qualifier-list before 'sa_family_t'
> +
> +The glibc bits/sockaddr.h says that this header should never be included
> +directly[1]. Instead, sys/socket.h should be used.
> +
> +The problem was correctly fixed later, in commit 394fb55 (Fix build
> +error on centos6, 2016-03-02) so the incorrect bits/sockaddr.h can
> +safely be removed.
> +
> +This is needed to build musl libc.
> +
> +Fixes #761
> +
> +[1]:
> https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/bits/sockaddr.h#L20
> +
> +Signed-off-by: Natanael Copa <natanael.copa@docker.com>
> +Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
> +Upstream-status: Backport
> +---
> + libcontainer/nsenter/nsexec.c | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/libcontainer/nsenter/nsexec.c b/libcontainer/nsenter/nsexec.c
> +index 8f37d6c..40a8f89 100644
> +--- a/libcontainer/nsenter/nsexec.c
> ++++ b/libcontainer/nsenter/nsexec.c
> +@@ -18,7 +18,6 @@
> + #include <unistd.h>
> + #include <grp.h>
> +
> +-#include <bits/sockaddr.h>
> + #include <linux/types.h>
> +
> + // All arguments should be above the stack because it grows down
> +--
> +2.1.4
> +
> diff --git a/recipes-containers/runc/runc_git.bb
> b/recipes-containers/runc/runc_git.bb
> index 30a4640..b47914e 100644
> --- a/recipes-containers/runc/runc_git.bb
> +++ b/recipes-containers/runc/runc_git.bb
> @@ -7,6 +7,7 @@ DESCRIPTION = "runc is a CLI tool for spawning and running
> containers according
>  SRCREV = "baf6536d6259209c3edfa2b22237af82942d3dfa"
>  SRC_URI = "\
>         git://github.com/opencontainers/runc;branch=master \
> +       file://0001-nsexec-fix-build-against-musl-libc.patch \
>         "
>
>  # Apache-2.0 for containerd
> --
> 2.1.4
>
> --
> _______________________________________________
> 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"

[-- Attachment #2: Type: text/html, Size: 5406 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-17 12:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 19:06 [PATCH 1/2] runc: Backport fix for building against musl Paul Barker
2016-06-16 19:06 ` [PATCH 2/2] runc: Use go-osarchmap to set GOARCH Paul Barker
2016-06-17 12:36 ` [PATCH 1/2] runc: Backport fix for building against musl Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.