[lxc-devel] [distrobuilder/master] Fix armel

stgraber on Github lxc-bot at linuxcontainers.org
Mon Jun 17 19:03:16 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 310 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190617/16c4310c/attachment.bin>
-------------- next part --------------
From 3bf873f136b363e273b91972d536457fd9b991b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 17 Jun 2019 15:02:40 -0400
Subject: [PATCH 1/2] debootstrap: gofmt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 sources/debootstrap.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sources/debootstrap.go b/sources/debootstrap.go
index 51a2a1f..133236c 100644
--- a/sources/debootstrap.go
+++ b/sources/debootstrap.go
@@ -1,11 +1,11 @@
 package sources
 
 import (
+	"fmt"
 	"os"
 	"path"
 	"path/filepath"
 	"strings"
-	"fmt"
 
 	lxd "github.com/lxc/lxd/shared"
 

From 8b9c50ff3611b4a0e4a7795fd80697aa4676a69e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 17 Jun 2019 15:02:51 -0400
Subject: [PATCH 2/2] osarch: Workaround for armel
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 shared/osarch.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/shared/osarch.go b/shared/osarch.go
index f0f67ef..88da923 100644
--- a/shared/osarch.go
+++ b/shared/osarch.go
@@ -64,6 +64,12 @@ var distroArchitecture = map[string]map[int]string{
 // GetArch returns the correct architecture name used by the specified
 // distribution.
 func GetArch(distro, arch string) (string, error) {
+	// Special case armel as it is effectively a different userspace variant
+	// of armv7 without hard-float and so doesn't have its own kernel architecture name
+	if arch == "armel" {
+		return "armel", nil
+	}
+
 	archMap, ok := distroArchitecture[distro]
 	if !ok {
 		return "unknown", fmt.Errorf("Architecture map isn't supported: %s", distro)


More information about the lxc-devel mailing list