The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7390
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Hi guys, This PR fixes the remaining issues preventing LXD building on mips - build and run tested on amd64 also. Relevant: https://github.com/docker/docker-ce/commit/25d244c1db47dec23879b0928c366e34d5756a89 Although it builds, there are still some issues when remapping containers, so as-is this does not quite work
From 041174437c3cfbee3855da10633f142ae0f0b2ae Mon Sep 17 00:00:00 2001 From: Joe Holden <j...@zorins.us> Date: Tue, 19 May 2020 18:11:38 +0000 Subject: [PATCH 1/4] shared/util_linux.go: cast Rdev uint64 for mips Signed-off-by: Joe Holden <j...@zorins.us> --- shared/util_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/util_linux.go b/shared/util_linux.go index 47d35a0e30..b37792f7e9 100644 --- a/shared/util_linux.go +++ b/shared/util_linux.go @@ -30,8 +30,8 @@ func GetFileStat(p string) (uid int, gid int, major uint32, minor uint32, inode inode = uint64(stat.Ino) nlink = int(stat.Nlink) if stat.Mode&unix.S_IFBLK != 0 || stat.Mode&unix.S_IFCHR != 0 { - major = unix.Major(stat.Rdev) - minor = unix.Minor(stat.Rdev) + major = unix.Major(uint64(stat.Rdev)) + minor = unix.Minor(uint64(stat.Rdev)) } return From e17b282282d9a4e411efb2648c6fbce961e0d892 Mon Sep 17 00:00:00 2001 From: Joe Holden <j...@zorins.us> Date: Tue, 19 May 2020 18:17:40 +0000 Subject: [PATCH 2/4] lxd/storage/quota/projectquota.go: cast Rdev uint64 for mips Signed-off-by: Joe Holden <j...@zorins.us> --- lxd/storage/quota/projectquota.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxd/storage/quota/projectquota.go b/lxd/storage/quota/projectquota.go index c1b6b1ad1b..8db4b988c6 100644 --- a/lxd/storage/quota/projectquota.go +++ b/lxd/storage/quota/projectquota.go @@ -164,8 +164,8 @@ func devForPath(path string) (string, error) { return "", err } - devMajor := unix.Major(stat.Dev) - devMinor := unix.Minor(stat.Dev) + devMajor := unix.Major(uint64(stat.Dev)) + devMinor := unix.Minor(uint64(stat.Dev)) // Parse mountinfo for it mountinfo, err := os.Open("/proc/self/mountinfo") From 43b913776738a7f8d5e8033718259d079f086dea Mon Sep 17 00:00:00 2001 From: Joe Holden <j...@zorins.us> Date: Tue, 19 May 2020 18:26:49 +0000 Subject: [PATCH 3/4] lxd/device/device_utils_unix.go: cast Rdev uint64 for mips Signed-off-by: Joe Holden <j...@zorins.us> --- lxd/device/device_utils_unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxd/device/device_utils_unix.go b/lxd/device/device_utils_unix.go index 810e77dc99..dcde09495c 100644 --- a/lxd/device/device_utils_unix.go +++ b/lxd/device/device_utils_unix.go @@ -41,8 +41,8 @@ func unixDeviceAttributes(path string) (string, uint32, uint32, error) { } // Return the device information - major := unix.Major(stat.Rdev) - minor := unix.Minor(stat.Rdev) + major := unix.Major(uint64(stat.Rdev)) + minor := unix.Minor(uint64(stat.Rdev)) return dType, major, minor, nil } From 95d213e414aa945070072df2c6836fa99849e37c Mon Sep 17 00:00:00 2001 From: Joe Holden <j...@zorins.us> Date: Tue, 19 May 2020 18:27:53 +0000 Subject: [PATCH 4/4] lxd/device/gpu.go: cast Rdev uint64 for mips Signed-off-by: Joe Holden <j...@zorins.us> --- lxd/device/gpu.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxd/device/gpu.go b/lxd/device/gpu.go index 9bb4c39c71..3c111b9cac 100644 --- a/lxd/device/gpu.go +++ b/lxd/device/gpu.go @@ -263,8 +263,8 @@ func (d *gpu) getNvidiaNonCardDevices() ([]nvidiaNonCardDevice, error) { tmpNividiaGpu := nvidiaNonCardDevice{ path: nvidiaPath, - major: unix.Major(stat.Rdev), - minor: unix.Minor(stat.Rdev), + major: unix.Major(uint64(stat.Rdev)), + minor: unix.Minor(uint64(stat.Rdev)), } nvidiaDevices = append(nvidiaDevices, tmpNividiaGpu)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel