From b187e9b61e2de97368580be7a2a0e9ab2a2688bf Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Wed, 30 Oct 2024 12:04:46 -0700 Subject: [PATCH] BOOTC Fix When extending an image intended for use with BOOTC, the image fails to install because the hardlinks have a '/' prefix. Remove it like we remove it for other files. Signed-off-by: Kevin Fox --- pkg/util/tar_util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/util/tar_util.go b/pkg/util/tar_util.go index 467e215149..d67b706e50 100644 --- a/pkg/util/tar_util.go +++ b/pkg/util/tar_util.go @@ -122,7 +122,8 @@ func (t *Tar) AddFileToTar(p string) error { hardlink, linkDst := t.checkHardlink(p, i) if hardlink { - hdr.Linkname = linkDst + // Docker uses no leading / in the tarball + hdr.Linkname = strings.TrimLeft(linkDst, "/") hdr.Typeflag = tar.TypeLink hdr.Size = 0 }