osbuild-worker-executor: expect osbuild-store as store directory

This commit is contained in:
Sanne Raymaekers 2024-06-05 12:35:21 +02:00
parent 7d7bce76c0
commit 840f46b07f
2 changed files with 12 additions and 12 deletions

View file

@ -58,7 +58,7 @@ func runOsbuild(logger *logrus.Logger, buildDir string, control *controlJSON, ou
// use multi writer to get same output for stream and log
mw := io.MultiWriter(&wf, logf)
outputDir := filepath.Join(buildDir, "output")
storeDir := filepath.Join(buildDir, "store")
storeDir := filepath.Join(buildDir, "osbuild-store")
cmd := exec.Command(osbuildBinary)
cmd.Stdout = mw
cmd.Stderr = mw
@ -189,8 +189,8 @@ func handleIncludedSources(atar *tar.Reader, buildDir string) error {
if filepath.Clean(name) != strings.TrimSuffix(name, "/") {
return fmt.Errorf("name not clean: %v != %v", filepath.Clean(name), name)
}
if !strings.HasPrefix(name, "store/") {
return fmt.Errorf("expected store/ prefix, got %v", hdr.Name)
if !strings.HasPrefix(name, "osbuild-store/") {
return fmt.Errorf("expected osbuild-store/ prefix, got %v", name)
}
// note that the extra filepath.Clean() is just there to
// appease gosec G305