copy.DirCopy is internal and needs Init

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2024-06-07 14:55:14 +02:00
committed by Jonathon Anderson
parent 75224bc9ba
commit 9a28b2d7fb
2 changed files with 5 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Correctly extract smbios asset key during Grub boot. #1291
- Refactor of `wwinit/init` to more properly address rootfs options. #1098
- Fix autodetected kernel sorting issue. #1332
- Avoid panic on container import #1244
## v4.5.7, 2024-09-11

View File

@@ -7,6 +7,7 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/storage/drivers/copy"
"github.com/containers/storage/pkg/reexec"
"github.com/pkg/errors"
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
@@ -67,7 +68,9 @@ func ImportDirectory(uri string, name string) error {
if !util.IsFile(path.Join(uri, "/bin/sh")) {
return errors.New("Source directory has no /bin/sh: " + uri)
}
if reexec.Init() {
return errors.New("couldn't init reexec")
}
err = copy.DirCopy(uri, fullPath, copy.Content, true)
if err != nil {
return err