Remove os.Umask from overlay.BuildOverlayIndir

Adds tests to ensure that the overlay image contains the correct permissions.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-12-23 09:47:28 -07:00
parent 1affdc1883
commit 53e5805fbe
7 changed files with 70 additions and 64 deletions

View File

@@ -1,31 +0,0 @@
package util
import (
"io"
"os"
"github.com/sassoftware/go-rpmutils/cpio"
)
/*
Opens cpio archive and returns the file list
*/
func CpioFiles(name string) (files []string, err error) {
f, err := os.Open(name)
if err != nil {
return files, err
}
defer f.Close()
reader := cpio.NewReader(f)
for {
header, err := reader.Next()
if err == io.EOF {
return files, nil
}
if err != nil {
return files, err
}
files = append(files, header.Filename())
}
}