mirror of
https://github.com/containers/podman.git
synced 2025-12-12 01:38:04 +08:00
Bump containers/buildah to v1.19.4
Fix handling of --iidfile to happen on the client side. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
8
vendor/github.com/containers/buildah/CHANGELOG.md
generated
vendored
8
vendor/github.com/containers/buildah/CHANGELOG.md
generated
vendored
@@ -2,6 +2,14 @@
|
||||
|
||||
# Changelog
|
||||
|
||||
## v1.19.4 (2021-02-06)
|
||||
run: fix check for host pid namespace
|
||||
bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
|
||||
Finish plumbing for buildah bud --manifest
|
||||
buildah manifest add localimage should work
|
||||
Fix build arg check
|
||||
--iidfile: print hash prefix
|
||||
|
||||
## v1.19.3 (2021-01-28)
|
||||
[ci:docs] Fix man page for buildah push
|
||||
Vendor in containers/image v5.10.1
|
||||
|
||||
2
vendor/github.com/containers/buildah/buildah.go
generated
vendored
2
vendor/github.com/containers/buildah/buildah.go
generated
vendored
@@ -28,7 +28,7 @@ const (
|
||||
Package = "buildah"
|
||||
// Version for the Package. Bump version in contrib/rpm/buildah.spec
|
||||
// too.
|
||||
Version = "1.19.3"
|
||||
Version = "1.19.4"
|
||||
// The value we use to identify what type of information, currently a
|
||||
// serialized Builder structure, we are using as per-container state.
|
||||
// This should only be changed when we make incompatible changes to
|
||||
|
||||
8
vendor/github.com/containers/buildah/changelog.txt
generated
vendored
8
vendor/github.com/containers/buildah/changelog.txt
generated
vendored
@@ -1,3 +1,11 @@
|
||||
- Changelog for v1.19.4 (2021-02-06)
|
||||
* run: fix check for host pid namespace
|
||||
* bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
|
||||
* Finish plumbing for buildah bud --manifest
|
||||
* buildah manifest add localimage should work
|
||||
* Fix build arg check
|
||||
* --iidfile: print hash prefix
|
||||
|
||||
- Changelog for v1.19.3 (2021-01-28)
|
||||
* [ci:docs] Fix man page for buildah push
|
||||
* Vendor in containers/image v5.10.1
|
||||
|
||||
22
vendor/github.com/containers/buildah/commit.go
generated
vendored
22
vendor/github.com/containers/buildah/commit.go
generated
vendored
@@ -224,7 +224,7 @@ func checkRegistrySourcesAllows(forWhat string, dest types.ImageReference) (inse
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (b *Builder) addManifest(ctx context.Context, manifestName string, imageSpec string) error {
|
||||
func (b *Builder) addManifest(ctx context.Context, manifestName string, imageSpec string) (string, error) {
|
||||
var create bool
|
||||
systemContext := &types.SystemContext{}
|
||||
var list manifests.List
|
||||
@@ -235,13 +235,13 @@ func (b *Builder) addManifest(ctx context.Context, manifestName string, imageSpe
|
||||
} else {
|
||||
_, list, err = manifests.LoadFromImage(b.store, listImage.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
names, err := util.ExpandNames([]string{manifestName}, "", systemContext, b.store)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error encountered while expanding image name %q", manifestName)
|
||||
return "", errors.Wrapf(err, "error encountered while expanding image name %q", manifestName)
|
||||
}
|
||||
|
||||
ref, err := alltransports.ParseImageName(imageSpec)
|
||||
@@ -249,13 +249,13 @@ func (b *Builder) addManifest(ctx context.Context, manifestName string, imageSpe
|
||||
if ref, err = alltransports.ParseImageName(util.DefaultTransport + imageSpec); err != nil {
|
||||
// check if the local image exists
|
||||
if ref, _, err = util.FindImage(b.store, "", systemContext, imageSpec); err != nil {
|
||||
return err
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if _, err = list.Add(ctx, systemContext, ref, true); err != nil {
|
||||
return err
|
||||
return "", err
|
||||
}
|
||||
var imageID string
|
||||
if create {
|
||||
@@ -263,10 +263,7 @@ func (b *Builder) addManifest(ctx context.Context, manifestName string, imageSpe
|
||||
} else {
|
||||
imageID, err = list.SaveToImage(b.store, listImage.ID, nil, "")
|
||||
}
|
||||
if err == nil {
|
||||
fmt.Printf("%s\n", imageID)
|
||||
}
|
||||
return err
|
||||
return imageID, err
|
||||
}
|
||||
|
||||
// Commit writes the contents of the container, along with its updated
|
||||
@@ -469,7 +466,7 @@ func (b *Builder) Commit(ctx context.Context, dest types.ImageReference, options
|
||||
dest = dest2
|
||||
}
|
||||
if options.IIDFile != "" {
|
||||
if err = ioutil.WriteFile(options.IIDFile, []byte(img.ID), 0644); err != nil {
|
||||
if err = ioutil.WriteFile(options.IIDFile, []byte("sha256:"+img.ID), 0644); err != nil {
|
||||
return imgID, nil, "", err
|
||||
}
|
||||
}
|
||||
@@ -489,9 +486,12 @@ func (b *Builder) Commit(ctx context.Context, dest types.ImageReference, options
|
||||
}
|
||||
|
||||
if options.Manifest != "" {
|
||||
if err := b.addManifest(ctx, options.Manifest, imgID); err != nil {
|
||||
manifestID, err := b.addManifest(ctx, options.Manifest, imgID)
|
||||
if err != nil {
|
||||
return imgID, nil, "", err
|
||||
}
|
||||
logrus.Debugf("added imgID %s to manifestID %s", imgID, manifestID)
|
||||
|
||||
}
|
||||
return imgID, ref, manifestDigest, nil
|
||||
}
|
||||
|
||||
2
vendor/github.com/containers/buildah/go.mod
generated
vendored
2
vendor/github.com/containers/buildah/go.mod
generated
vendored
@@ -4,7 +4,7 @@ go 1.12
|
||||
|
||||
require (
|
||||
github.com/containerd/containerd v1.4.1 // indirect
|
||||
github.com/containernetworking/cni v0.7.2-0.20190904153231-83439463f784
|
||||
github.com/containernetworking/cni v0.8.1
|
||||
github.com/containers/common v0.33.1
|
||||
github.com/containers/image/v5 v5.10.1
|
||||
github.com/containers/ocicrypt v1.0.3
|
||||
|
||||
4
vendor/github.com/containers/buildah/go.sum
generated
vendored
4
vendor/github.com/containers/buildah/go.sum
generated
vendored
@@ -76,8 +76,8 @@ github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv
|
||||
github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
|
||||
github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
|
||||
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
|
||||
github.com/containernetworking/cni v0.7.2-0.20190904153231-83439463f784 h1:rqUVLD8I859xRgUx/WMC3v7QAFqbLKZbs+0kqYboRJc=
|
||||
github.com/containernetworking/cni v0.7.2-0.20190904153231-83439463f784/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||
github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI=
|
||||
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||
github.com/containers/common v0.33.1 h1:XpDiq8Cta8+u1s4kpYSEWdB140ZmqgyIXfWkLqKx3z0=
|
||||
github.com/containers/common v0.33.1/go.mod h1:mjDo/NKeweL/onaspLhZ38WnHXaYmrELHclIdvSnYpY=
|
||||
github.com/containers/image/v5 v5.9.0 h1:dRmUtcluQcmasNo3DpnRoZjfU0rOu1qZeL6wlDJr10Q=
|
||||
|
||||
4
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
4
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
@@ -115,6 +115,7 @@ type Executor struct {
|
||||
imageInfoLock sync.Mutex
|
||||
imageInfoCache map[string]imageTypeAndHistoryAndDiffIDs
|
||||
fromOverride string
|
||||
manifest string
|
||||
}
|
||||
|
||||
type imageTypeAndHistoryAndDiffIDs struct {
|
||||
@@ -231,6 +232,7 @@ func NewExecutor(store storage.Store, options BuildOptions, mainNode *parser.Nod
|
||||
logRusage: options.LogRusage,
|
||||
imageInfoCache: make(map[string]imageTypeAndHistoryAndDiffIDs),
|
||||
fromOverride: options.From,
|
||||
manifest: options.Manifest,
|
||||
}
|
||||
if exec.err == nil {
|
||||
exec.err = os.Stderr
|
||||
@@ -679,7 +681,7 @@ func (b *Executor) Build(ctx context.Context, stages imagebuilder.Stages) (image
|
||||
}
|
||||
logrus.Debugf("printing final image id %q", imageID)
|
||||
if b.iidfile != "" {
|
||||
if err = ioutil.WriteFile(b.iidfile, []byte(imageID), 0644); err != nil {
|
||||
if err = ioutil.WriteFile(b.iidfile, []byte("sha256:"+imageID), 0644); err != nil {
|
||||
return imageID, ref, errors.Wrapf(err, "failed to write image ID to file %q", b.iidfile)
|
||||
}
|
||||
} else {
|
||||
|
||||
3
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
3
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
@@ -838,7 +838,7 @@ func (s *StageExecutor) Execute(ctx context.Context, base string) (imgID string,
|
||||
// we need to call ib.Run() to correctly put the args together before
|
||||
// determining if a cached layer with the same build args already exists
|
||||
// and that is done in the if block below.
|
||||
if checkForLayers && s.builder.Args == nil {
|
||||
if checkForLayers && len(s.builder.Args) == 0 {
|
||||
cacheID, err = s.intermediateImageExists(ctx, node, addedContentSummary, s.stepRequiresLayer(step))
|
||||
if err != nil {
|
||||
return "", nil, errors.Wrap(err, "error checking if cached image exists from a previous build")
|
||||
@@ -1276,6 +1276,7 @@ func (s *StageExecutor) commit(ctx context.Context, createdBy string, emptyLayer
|
||||
MaxRetries: s.executor.maxPullPushRetries,
|
||||
RetryDelay: s.executor.retryPullPushDelay,
|
||||
HistoryTimestamp: s.executor.timestamp,
|
||||
Manifest: s.executor.manifest,
|
||||
}
|
||||
imgID, _, manifestDigest, err := s.builder.Commit(ctx, imageRef, options)
|
||||
if err != nil {
|
||||
|
||||
2
vendor/github.com/containers/buildah/run_linux.go
generated
vendored
2
vendor/github.com/containers/buildah/run_linux.go
generated
vendored
@@ -2210,7 +2210,7 @@ func checkAndOverrideIsolationOptions(isolation Isolation, options *RunOptions)
|
||||
case IsolationOCI:
|
||||
pidns := options.NamespaceOptions.Find(string(specs.PIDNamespace))
|
||||
userns := options.NamespaceOptions.Find(string(specs.UserNamespace))
|
||||
if (pidns == nil || pidns.Host) && (userns != nil && !userns.Host) {
|
||||
if (pidns != nil && pidns.Host) && (userns != nil && !userns.Host) {
|
||||
return errors.Errorf("not allowed to mix host PID namespace with container user namespace")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user