Bump to Buildah v1.41.0

Bump Buildah to v1.41.0 in preparation for
Podman v5.6

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
tomsweeneyredhat
2025-07-21 12:05:56 -04:00
parent 4833d31dfa
commit 048729a560
32 changed files with 1207 additions and 401 deletions

View File

@@ -92,7 +92,7 @@ func ReadWorkloadConfigFromImage(path string) (WorkloadConfig, error) {
}
err = json.Unmarshal(configBytes, &wc)
if err != nil {
err = fmt.Errorf("unmarshaling configuration %q: %w", string(configBytes), err)
err = fmt.Errorf("unmarshalling configuration %q: %w", string(configBytes), err)
}
return wc, err
}

View File

@@ -6,8 +6,10 @@ const (
// external items which are downloaded for a build, typically a tarball
// being used as an additional build context.
BuildahExternalArtifactsDir = "buildah-external-artifacts"
// SourceDateEpochName is the name of the SOURCE_DATE_EPOCH environment
// variable when it's read from the environment by our main().
// SourceDateEpochName is both the name of the SOURCE_DATE_EPOCH
// environment variable and the built-in ARG that carries its value,
// whether it's read from the environment by our main(), or passed in
// via CLI or API flags.
SourceDateEpochName = "SOURCE_DATE_EPOCH"
)

View File

@@ -54,8 +54,7 @@ func NormalizePlatform(platform v1.Platform) v1.Platform {
func ExportFromReader(input io.Reader, opts define.BuildOutputOption) error {
var err error
if !filepath.IsAbs(opts.Path) {
opts.Path, err = filepath.Abs(opts.Path)
if err != nil {
if opts.Path, err = filepath.Abs(opts.Path); err != nil {
return err
}
}
@@ -72,26 +71,22 @@ func ExportFromReader(input io.Reader, opts define.BuildOutputOption) error {
noLChown = true
}
err = os.MkdirAll(opts.Path, 0o700)
if err != nil {
if err = os.MkdirAll(opts.Path, 0o700); err != nil {
return fmt.Errorf("failed while creating the destination path %q: %w", opts.Path, err)
}
err = chrootarchive.Untar(input, opts.Path, &archive.TarOptions{NoLchown: noLChown})
if err != nil {
if err = chrootarchive.Untar(input, opts.Path, &archive.TarOptions{NoLchown: noLChown}); err != nil {
return fmt.Errorf("failed while performing untar at %q: %w", opts.Path, err)
}
} else {
outFile := os.Stdout
if !opts.IsStdout {
outFile, err = os.Create(opts.Path)
if err != nil {
if outFile, err = os.Create(opts.Path); err != nil {
return fmt.Errorf("failed while creating destination tar at %q: %w", opts.Path, err)
}
defer outFile.Close()
}
_, err = io.Copy(outFile, input)
if err != nil {
if _, err = io.Copy(outFile, input); err != nil {
return fmt.Errorf("failed while performing copy to %q: %w", opts.Path, err)
}
}