The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/222
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) === Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From ddbad8a6b656e3c7860ba2c9d126e78b41295da3 Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Mon, 19 Aug 2019 11:58:16 +0200 Subject: [PATCH] sources: Fix copying libs in Ubuntu Core Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- sources/ubuntu-http.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sources/ubuntu-http.go b/sources/ubuntu-http.go index a4e172b..2b6ff6d 100644 --- a/sources/ubuntu-http.go +++ b/sources/ubuntu-http.go @@ -285,14 +285,24 @@ func (s *UbuntuHTTP) runCoreVariant(definition shared.Definition, rootfsDir stri continue } - target := filepath.Join(rootfsDir, "lib", filepath.Base(matches[0])) + dest := filepath.Join(rootfsDir, "lib", filepath.Base(matches[0])) - err = lxd.FileCopy(matches[0], target) + source, err := os.Readlink(matches[0]) if err != nil { return err } - err = os.Chmod(target, 0755) + // Build absolute path + if !strings.HasPrefix(source, "/") { + source = filepath.Join(filepath.Dir(matches[0]), source) + } + + err = lxd.FileCopy(source, dest) + if err != nil { + return err + } + + err = os.Chmod(dest, 0755) if err != nil { return err }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel