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:
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user