Bump Buildah to v1.36.0

Bump Buildah to v1.36.0.  This is the final dance step before
Podman v5.1

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
tomsweeneyredhat
2024-05-23 20:27:50 -04:00
parent e53b96cb25
commit f8cc1b4807
16 changed files with 195 additions and 39 deletions

View File

@ -2,6 +2,65 @@
# Changelog
## v1.36.0 (2024-05-23)
build: be more selective about specifying the default OS
Bump to c/common v0.59.0
Fix buildah prune --help showing the same example twice
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.18.0
fix(deps): update module github.com/containers/image/v5 to v5.31.0
bud tests: fix breakage when vendoring into podman
Integration tests: fake up a replacement for nixery.dev/shell
copierWithSubprocess(): try to capture stderr on io.ErrClosedPipe
Don't expand RUN heredocs ourselves, let the shell do it
Don't leak temp files on failures
Add release note template to split dependency chores
fix CentOS/RHEL build - no BATS there
fix(deps): update module github.com/containers/luksy to v0.0.0-20240506205542-84b50f50f3ee
Address CVE-2024-3727
chore(deps): update module github.com/opencontainers/runtime-spec to v1.2.0
Builder.cdiSetupDevicesInSpecdefConfig(): use configured CDI dirs
Setting --arch should set the TARGETARCH build arg
fix(deps): update module golang.org/x/exp to v0.0.0-20240416160154-fe59bbe5cc7f
[CI:DOCS] Add link to Buildah image page to README.md
Don't set GOTOOLCHAIN=local
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.2.5
Makefile: set GOTOOLCHAIN=local
Integration tests: switch some base images
containerImageRef.NewImageSource: merge the tar filters
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.2
fix(deps): update module github.com/containers/luksy to v0.0.0-20240408185936-afd8e7619947
Disable packit builds for centos-stream+epel-next-8
Makefile: add missing files to $(SOURCES)
CI VMs: bump to new versions with tmpfs /tmp
chore(deps): update module golang.org/x/net to v0.23.0 [security]
integration test: handle new labels in "bud and test --unsetlabel"
Switch packit configuration to use epel-9-$arch ...
Give unit tests a bit more time
Integration tests: remove a couple of duplicated tests
Integration tests: whitespace tweaks
Integration tests: don't remove images at start or end of test
Integration tests: use cached images more
Integration tests _prefetch: use registry configs
internal: use fileutils.(Le|E)xists
pkg/parse: use fileutils.(Le|E)xists
buildah: use fileutils.(Le|E)xists
chroot: use fileutils.(Le|E)xists
vendor: update containers/(common|storage)
Fix issue/pr lock workflow
[CI:DOCS] Add golang 1.21 update warning
heredoc: honor inline COPY irrespective of ignorefiles
Update install.md
source-push: add support for --digestfile
Fix caching when mounting a cached stage with COPY/ADD
fix(deps): update github.com/containers/luksy digest to 3d2cf0e
Makefile: softcode `strip`, use it from env var
Man page updates
Add support for passing CDI specs to --device
Update comments on some API objects
pkg/parse.DeviceFromPath(): dereference src symlinks
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.1
## v1.35.0 (2024-03-06)
fix(deps): update module github.com/stretchr/testify to v1.9.0

View File

@ -1,3 +1,61 @@
- Changelog for v1.36.0 (2024-05-23)
* build: be more selective about specifying the default OS
* Bump to c/common v0.59.0
* Fix buildah prune --help showing the same example twice
* fix(deps): update module github.com/onsi/ginkgo/v2 to v2.18.0
* fix(deps): update module github.com/containers/image/v5 to v5.31.0
* bud tests: fix breakage when vendoring into podman
* Integration tests: fake up a replacement for nixery.dev/shell
* copierWithSubprocess(): try to capture stderr on io.ErrClosedPipe
* Don't expand RUN heredocs ourselves, let the shell do it
* Don't leak temp files on failures
* Add release note template to split dependency chores
* fix CentOS/RHEL build - no BATS there
* fix(deps): update module github.com/containers/luksy to v0.0.0-20240506205542-84b50f50f3ee
* Address CVE-2024-3727
* chore(deps): update module github.com/opencontainers/runtime-spec to v1.2.0
* Builder.cdiSetupDevicesInSpecdefConfig(): use configured CDI dirs
* Setting --arch should set the TARGETARCH build arg
* fix(deps): update module golang.org/x/exp to v0.0.0-20240416160154-fe59bbe5cc7f
* [CI:DOCS] Add link to Buildah image page to README.md
* Don't set GOTOOLCHAIN=local
* fix(deps): update module github.com/cyphar/filepath-securejoin to v0.2.5
* Makefile: set GOTOOLCHAIN=local
* Integration tests: switch some base images
* containerImageRef.NewImageSource: merge the tar filters
* fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.2
* fix(deps): update module github.com/containers/luksy to v0.0.0-20240408185936-afd8e7619947
* Disable packit builds for centos-stream+epel-next-8
* Makefile: add missing files to $(SOURCES)
* CI VMs: bump to new versions with tmpfs /tmp
* chore(deps): update module golang.org/x/net to v0.23.0 [security]
* integration test: handle new labels in "bud and test --unsetlabel"
* Switch packit configuration to use epel-9-$arch ...
* Give unit tests a bit more time
* Integration tests: remove a couple of duplicated tests
* Integration tests: whitespace tweaks
* Integration tests: don't remove images at start or end of test
* Integration tests: use cached images more
* Integration tests _prefetch: use registry configs
* internal: use fileutils.(Le|E)xists
* pkg/parse: use fileutils.(Le|E)xists
* buildah: use fileutils.(Le|E)xists
* chroot: use fileutils.(Le|E)xists
* vendor: update containers/(common|storage)
* Fix issue/pr lock workflow
* [CI:DOCS] Add golang 1.21 update warning
* heredoc: honor inline COPY irrespective of ignorefiles
* Update install.md
* source-push: add support for --digestfile
* Fix caching when mounting a cached stage with COPY/ADD
* fix(deps): update github.com/containers/luksy digest to 3d2cf0e
* Makefile: softcode `strip`, use it from env var
* Man page updates
* Add support for passing CDI specs to --device
* Update comments on some API objects
* pkg/parse.DeviceFromPath(): dereference src symlinks
* fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.1
- Changelog for v1.35.0 (2024-03-06)
* fix(deps): update module github.com/stretchr/testify to v1.9.0
* cgroups: reuse version check from c/common

View File

@ -18,6 +18,7 @@ import (
"sync"
"syscall"
"time"
"unicode"
"github.com/containers/image/v5/pkg/compression"
"github.com/containers/storage/pkg/archive"
@ -633,6 +634,15 @@ func copierWithSubprocess(bulkReader io.Reader, bulkWriter io.Writer, req reques
if err2 := cmd.Process.Kill(); err2 != nil {
return nil, fmt.Errorf("killing subprocess: %v; %s: %w", err2, step, err)
}
if errors.Is(err, io.ErrClosedPipe) || errors.Is(err, syscall.EPIPE) {
err2 := cmd.Wait()
if errorText := strings.TrimFunc(errorBuffer.String(), unicode.IsSpace); errorText != "" {
err = fmt.Errorf("%s: %w", errorText, err)
}
if err2 != nil {
return nil, fmt.Errorf("waiting on subprocess: %v; %s: %w", err2, step, err)
}
}
return nil, fmt.Errorf("%v: %w", step, err)
}
if err = encoder.Encode(req); err != nil {

View File

@ -29,7 +29,7 @@ const (
// identify working containers.
Package = "buildah"
// Version for the Package. Also used by .packit.sh for Packit builds.
Version = "1.36.0-dev"
Version = "1.36.0"
// DefaultRuntime if containers.conf fails.
DefaultRuntime = "runc"

View File

@ -60,9 +60,10 @@ type HealthConfig struct {
Test []string `json:",omitempty"`
// Zero means to inherit. Durations are expressed as integer nanoseconds.
Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks.
Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung.
StartPeriod time.Duration `json:",omitempty"` // Time to wait after the container starts before running the first check.
Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks.
Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung.
StartPeriod time.Duration `json:",omitempty"` // Time to wait after the container starts before running the first check.
StartInterval time.Duration `json:",omitempty"` // Time to wait between checks during the StartPeriod.
// Retries is the number of consecutive failures needed to consider a container as unhealthy.
// Zero means inherit.

View File

@ -952,7 +952,7 @@ func (i *containerImageSource) GetBlob(ctx context.Context, blob types.BlobInfo,
// makeExtraImageContentDiff creates an archive file containing the contents of
// files named in i.extraImageContent. The footer that marks the end of the
// archive may be omitted.
func (i *containerImageRef) makeExtraImageContentDiff(includeFooter bool) (string, digest.Digest, int64, error) {
func (i *containerImageRef) makeExtraImageContentDiff(includeFooter bool) (_ string, _ digest.Digest, _ int64, retErr error) {
cdir, err := i.store.ContainerDirectory(i.containerID)
if err != nil {
return "", "", -1, err
@ -962,6 +962,11 @@ func (i *containerImageRef) makeExtraImageContentDiff(includeFooter bool) (strin
return "", "", -1, err
}
defer diff.Close()
defer func() {
if retErr != nil {
os.Remove(diff.Name())
}
}()
digester := digest.Canonical.Digester()
counter := ioutils.NewWriteCounter(digester.Hash())
tw := tar.NewWriter(io.MultiWriter(diff, counter))
@ -1001,10 +1006,10 @@ func (i *containerImageRef) makeExtraImageContentDiff(includeFooter bool) (strin
}
}
if !includeFooter {
return diff.Name(), "", -1, err
return diff.Name(), "", -1, nil
}
tw.Close()
return diff.Name(), digester.Digest(), counter.Count, err
return diff.Name(), digester.Digest(), counter.Count, nil
}
// makeContainerImageRef creates a containers/image/v5/types.ImageReference

View File

@ -11,6 +11,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"sync"
@ -221,6 +222,9 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options define.B
systemContext := options.SystemContext
for _, platform := range options.Platforms {
platformContext := *systemContext
if platform.OS == "" && platform.Arch != "" {
platform.OS = runtime.GOOS
}
platformSpec := internalUtil.NormalizePlatform(v1.Platform{
OS: platform.OS,
Architecture: platform.Arch,

View File

@ -1659,7 +1659,7 @@ func (b *Builder) getTmpfsMount(tokens []string, idMaps IDMaps) (*specs.Mount, e
return &volumes[0], nil
}
func (b *Builder) getSecretMount(tokens []string, secrets map[string]define.Secret, idMaps IDMaps, workdir string) (*specs.Mount, string, error) {
func (b *Builder) getSecretMount(tokens []string, secrets map[string]define.Secret, idMaps IDMaps, workdir string) (_ *specs.Mount, _ string, retErr error) {
errInvalidSyntax := errors.New("secret should have syntax id=id[,target=path,required=bool,mode=uint,uid=uint,gid=uint")
if len(tokens) == 0 {
return nil, "", errInvalidSyntax
@ -1739,6 +1739,11 @@ func (b *Builder) getSecretMount(tokens []string, secrets map[string]define.Secr
if err != nil {
return nil, "", err
}
defer func() {
if retErr != nil {
os.Remove(tmpFile.Name())
}
}()
envFile = tmpFile.Name()
ctrFileOnHost = tmpFile.Name()
case "file":

View File

@ -1,4 +1,4 @@
package version
// Version is the version of the build.
const Version = "0.60.0-dev"
const Version = "0.59.0"