Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package buildah for openSUSE:Factory checked 
in at 2021-01-19 16:01:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/buildah (Old)
 and      /work/SRC/openSUSE:Factory/.buildah.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "buildah"

Tue Jan 19 16:01:28 2021 rev:37 rq:861693 version:1.17.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/buildah/buildah.changes  2020-12-03 
18:43:32.158221669 +0100
+++ /work/SRC/openSUSE:Factory/.buildah.new.28504/buildah.changes       
2021-01-19 16:01:43.627337590 +0100
@@ -1,0 +2,11 @@
+Fri Jan 08 11:52:40 UTC 2021 - [email protected]
+
+- Update to version 1.17.1:
+  * tag v1.17.1
+  * copier.Get(): ignore ENOTSUP/ENOSYS when listing xattrs
+  * copier: try to force loading of nsswitch modules before chroot()
+  * ADD: handle --chown on URLs
+  * imagebuildah: cache should take image format into account
+  * Update CI configuration for the release-1.17 branch
+
+-------------------------------------------------------------------

Old:
----
  buildah-1.17.0.tar.xz

New:
----
  buildah-1.17.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ buildah.spec ++++++
--- /var/tmp/diff_new_pack.kbVxh3/_old  2021-01-19 16:01:44.727339253 +0100
+++ /var/tmp/diff_new_pack.kbVxh3/_new  2021-01-19 16:01:44.731339259 +0100
@@ -22,7 +22,7 @@
 %define with_libostree 1
 %endif
 Name:           buildah
-Version:        1.17.0
+Version:        1.17.1
 Release:        0
 Summary:        Tool for building OCI containers
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.kbVxh3/_old  2021-01-19 16:01:44.779339332 +0100
+++ /var/tmp/diff_new_pack.kbVxh3/_new  2021-01-19 16:01:44.779339332 +0100
@@ -3,9 +3,10 @@
 <service name="tar_scm" mode="disabled">
 <param name="url">https://github.com/containers/buildah.git</param>
 <param name="scm">git</param>
+<param name="changesgenerate">enable</param>
 <param name="filename">buildah</param>
-<param name="versionformat">1.17.0</param>
-<param name="revision">v1.17.0</param>
+<param name="versionformat">1.17.1</param>
+<param name="revision">v1.17.1</param>
 </service>
 
 <service name="recompress" mode="disabled">

++++++ buildah-1.17.0.tar.xz -> buildah-1.17.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/.cirrus.yml 
new/buildah-1.17.1/.cirrus.yml
--- old/buildah-1.17.0/.cirrus.yml      2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/.cirrus.yml      2020-11-17 12:18:05.000000000 +0100
@@ -6,7 +6,7 @@
     #### Global variables used for all tasks
     ####
     # Name of the ultimate destination branch for this CI run, PR or 
post-merge.
-    DEST_BRANCH: "master"
+    DEST_BRANCH: "release-1.17"
     GOPATH: "/var/tmp/go"
     GOSRC: "${GOPATH}/src/github.com/containers/buildah"
     # Overrides default location (/tmp/cirrus) for repo clone
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/CHANGELOG.md 
new/buildah-1.17.1/CHANGELOG.md
--- old/buildah-1.17.0/CHANGELOG.md     2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/CHANGELOG.md     2020-11-17 12:18:05.000000000 +0100
@@ -2,6 +2,12 @@
 
 # Changelog
 
+## v1.17.1 (2020-11-16)
+    copier.Get(): ignore ENOTSUP/ENOSYS when listing xattrs
+    copier: try to force loading of nsswitch modules before chroot()
+    ADD: handle --chown on URLs
+    imagebuildah: cache should take image format into account
+
 ## v1.17.0 (2020-10-29)
     Handle cases where other tools mount/unmount containers
     overlay.MountReadOnly: support RO overlay mounts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/add.go new/buildah-1.17.1/add.go
--- old/buildah-1.17.0/add.go   2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/add.go   2020-11-17 12:18:05.000000000 +0100
@@ -71,7 +71,7 @@
 }
 
 // getURL writes a tar archive containing the named content
-func getURL(src, mountpoint, renameTarget string, writer io.Writer) error {
+func getURL(src string, chown *idtools.IDPair, mountpoint, renameTarget 
string, writer io.Writer) error {
        url, err := url.Parse(src)
        if err != nil {
                return err
@@ -122,10 +122,18 @@
        // Write the output archive.  Set permissions for compatibility.
        tw := tar.NewWriter(writer)
        defer tw.Close()
+       uid := 0
+       gid := 0
+       if chown != nil {
+               uid = chown.UID
+               gid = chown.GID
+       }
        hdr := tar.Header{
                Typeflag: tar.TypeReg,
                Name:     name,
                Size:     size,
+               Uid:      uid,
+               Gid:      gid,
                Mode:     0600,
                ModTime:  date,
        }
@@ -323,7 +331,7 @@
                        pipeReader, pipeWriter := io.Pipe()
                        wg.Add(1)
                        go func() {
-                               getErr = getURL(src, mountPoint, renameTarget, 
pipeWriter)
+                               getErr = getURL(src, chownFiles, mountPoint, 
renameTarget, pipeWriter)
                                pipeWriter.Close()
                                wg.Done()
                        }()
@@ -341,9 +349,9 @@
                                        putOptions := copier.PutOptions{
                                                UIDMap:     destUIDMap,
                                                GIDMap:     destGIDMap,
-                                               ChownDirs:  chownDirs,
+                                               ChownDirs:  nil,
                                                ChmodDirs:  nil,
-                                               ChownFiles: chownFiles,
+                                               ChownFiles: nil,
                                                ChmodFiles: nil,
                                        }
                                        putErr = copier.Put(mountPoint, 
extractDirectory, putOptions, io.TeeReader(pipeReader, hasher))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/buildah.go 
new/buildah-1.17.1/buildah.go
--- old/buildah-1.17.0/buildah.go       2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/buildah.go       2020-11-17 12:18:05.000000000 +0100
@@ -28,7 +28,7 @@
        Package = "buildah"
        // Version for the Package.  Bump version in contrib/rpm/buildah.spec
        // too.
-       Version = "1.17.0"
+       Version = "1.17.1"
        // 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/changelog.txt 
new/buildah-1.17.1/changelog.txt
--- old/buildah-1.17.0/changelog.txt    2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/changelog.txt    2020-11-17 12:18:05.000000000 +0100
@@ -1,3 +1,9 @@
+- Changelog for v1.17.1 (2020-11-16)
+  * copier.Get(): ignore ENOTSUP/ENOSYS when listing xattrs
+  * copier: try to force loading of nsswitch modules before chroot()
+  * ADD: handle --chown on URLs
+  * imagebuildah: cache should take image format into account
+
 - Changelog for v1.17.0 (2020-10-29)
   * Handle cases where other tools mount/unmount containers
   * overlay.MountReadOnly: support RO overlay mounts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/contrib/rpm/buildah.spec 
new/buildah-1.17.1/contrib/rpm/buildah.spec
--- old/buildah-1.17.0/contrib/rpm/buildah.spec 2020-10-29 23:33:13.000000000 
+0100
+++ new/buildah-1.17.1/contrib/rpm/buildah.spec 2020-11-17 12:18:05.000000000 
+0100
@@ -26,7 +26,7 @@
 
 Name:           buildah
 # Bump version in buildah.go too
-Version:        1.17.0
+Version:        1.17.1
 Release:        1.git%{shortcommit}%{?dist}
 Summary:        A command line tool used to creating OCI Images
 License:        ASL 2.0
@@ -99,6 +99,12 @@
 %{_datadir}/bash-completion/completions/*
 
 %changelog
+* Mon Nov 16 2020 Nalin Dahyabhai <[email protected]> 1.17.1-1
+- copier.Get(): ignore ENOTSUP/ENOSYS when listing xattrs
+- copier: try to force loading of nsswitch modules before chroot()
+- ADD: handle --chown on URLs
+- imagebuildah: cache should take image format into account
+
 * Thu Oct 29, 2020 Tom Sweeney <[email protected]> 1.17.0-1
 - Handle cases where other tools mount/unmount containers
 - overlay.MountReadOnly: support RO overlay mounts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/copier/copier.go 
new/buildah-1.17.1/copier/copier.go
--- old/buildah-1.17.0/copier/copier.go 2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/copier/copier.go 2020-11-17 12:18:05.000000000 +0100
@@ -7,7 +7,9 @@
        "fmt"
        "io"
        "io/ioutil"
+       "net"
        "os"
+       "os/user"
        "path/filepath"
        "strconv"
        "strings"
@@ -35,6 +37,14 @@
 
 func init() {
        reexec.Register(copierCommand, copierMain)
+       // Attempt a user and host lookup to force libc (glibc, and possibly 
others that use dynamic
+       // modules to handle looking up user and host information) to load 
modules that match the libc
+       // our binary is currently using.  Hopefully they're loaded on first 
use, so that they won't
+       // need to be loaded after we've chrooted into the rootfs, which could 
include modules that
+       // don't match our libc and which can't be loaded, or modules which we 
don't want to execute
+       // because we don't trust their code.
+       _, _ = user.Lookup("buildah")
+       _, _ = net.LookupHost("localhost")
 }
 
 // isArchivePath returns true if the specified path can be read like a 
(possibly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/copier/xattrs.go 
new/buildah-1.17.1/copier/xattrs.go
--- old/buildah-1.17.0/copier/xattrs.go 2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/copier/xattrs.go 2020-11-17 12:18:05.000000000 +0100
@@ -45,6 +45,11 @@
                                listSize *= 2
                                continue
                        }
+                       if (unwrapError(err) == syscall.ENOTSUP) || 
(unwrapError(err) == syscall.ENOSYS) {
+                               // treat these errors listing xattrs as 
equivalent to "no xattrs"
+                               list = list[:0]
+                               break
+                       }
                        return nil, errors.Wrapf(err, "error listing extended 
attributes of %q", path)
                }
                list = list[:size]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/imagebuildah/executor.go 
new/buildah-1.17.1/imagebuildah/executor.go
--- old/buildah-1.17.0/imagebuildah/executor.go 2020-10-29 23:33:13.000000000 
+0100
+++ new/buildah-1.17.1/imagebuildah/executor.go 2020-11-17 12:18:05.000000000 
+0100
@@ -17,6 +17,7 @@
        "github.com/containers/buildah/util"
        "github.com/containers/common/pkg/config"
        "github.com/containers/image/v5/docker/reference"
+       "github.com/containers/image/v5/manifest"
        is "github.com/containers/image/v5/storage"
        "github.com/containers/image/v5/transports"
        "github.com/containers/image/v5/transports/alltransports"
@@ -335,22 +336,29 @@
        }
 }
 
-// getImageHistoryAndDiffIDs returns the history and diff IDs list of imageID.
-func (b *Executor) getImageHistoryAndDiffIDs(ctx context.Context, imageID 
string) ([]v1.History, []digest.Digest, error) {
+// getImageTypeAndHistoryAndDiffIDs returns the manifest type, history, and 
diff IDs list of imageID.
+func (b *Executor) getImageTypeAndHistoryAndDiffIDs(ctx context.Context, 
imageID string) (string, []v1.History, []digest.Digest, error) {
        imageRef, err := is.Transport.ParseStoreReference(b.store, "@"+imageID)
        if err != nil {
-               return nil, nil, errors.Wrapf(err, "error getting image 
reference %q", imageID)
+               return "", nil, nil, errors.Wrapf(err, "error getting image 
reference %q", imageID)
        }
        ref, err := imageRef.NewImage(ctx, nil)
        if err != nil {
-               return nil, nil, errors.Wrapf(err, "error creating new image 
from reference to image %q", imageID)
+               return "", nil, nil, errors.Wrapf(err, "error creating new 
image from reference to image %q", imageID)
        }
        defer ref.Close()
        oci, err := ref.OCIConfig(ctx)
        if err != nil {
-               return nil, nil, errors.Wrapf(err, "error getting 
possibly-converted OCI config of image %q", imageID)
+               return "", nil, nil, errors.Wrapf(err, "error getting 
possibly-converted OCI config of image %q", imageID)
        }
-       return oci.History, oci.RootFS.DiffIDs, nil
+       manifestBytes, manifestFormat, err := ref.Manifest(ctx)
+       if err != nil {
+               return "", nil, nil, errors.Wrapf(err, "error getting manifest 
of image %q", imageID)
+       }
+       if manifestFormat == "" && len(manifestBytes) > 0 {
+               manifestFormat = manifest.GuessMIMEType(manifestBytes)
+       }
+       return manifestFormat, oci.History, oci.RootFS.DiffIDs, nil
 }
 
 func (b *Executor) buildStage(ctx context.Context, cleanupStages 
map[int]*StageExecutor, stages imagebuilder.Stages, stageIndex int) (imageID 
string, ref reference.Canonical, err error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/imagebuildah/stage_executor.go 
new/buildah-1.17.1/imagebuildah/stage_executor.go
--- old/buildah-1.17.0/imagebuildah/stage_executor.go   2020-10-29 
23:33:13.000000000 +0100
+++ new/buildah-1.17.1/imagebuildah/stage_executor.go   2020-11-17 
12:18:05.000000000 +0100
@@ -1110,7 +1110,7 @@
        var baseHistory []v1.History
        var baseDiffIDs []digest.Digest
        if s.builder.FromImageID != "" {
-               baseHistory, baseDiffIDs, err = 
s.executor.getImageHistoryAndDiffIDs(ctx, s.builder.FromImageID)
+               _, baseHistory, baseDiffIDs, err = 
s.executor.getImageTypeAndHistoryAndDiffIDs(ctx, s.builder.FromImageID)
                if err != nil {
                        return "", errors.Wrapf(err, "error getting history of 
base image %q", s.builder.FromImageID)
                }
@@ -1142,10 +1142,15 @@
                }
                // Next we double check that the history of this image is 
equivalent to the previous
                // lines in the Dockerfile up till the point we are at in the 
build.
-               history, diffIDs, err := 
s.executor.getImageHistoryAndDiffIDs(ctx, image.ID)
+               manifestType, history, diffIDs, err := 
s.executor.getImageTypeAndHistoryAndDiffIDs(ctx, image.ID)
                if err != nil {
                        return "", errors.Wrapf(err, "error getting history of 
%q", image.ID)
                }
+               // If this candidate isn't of the type that we're building, 
then it may have lost
+               // some format-specific information that a 
building-without-cache run wouldn't lose.
+               if manifestType != s.executor.outputFormat {
+                       continue
+               }
                // children + currNode is the point of the Dockerfile we are 
currently at.
                if s.historyAndDiffIDsMatch(baseHistory, baseDiffIDs, currNode, 
history, diffIDs, addedContentDigest, buildAddsLayer) {
                        return image.ID, nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.add1 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.add1
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.add1    1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.add1    2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,2 @@
+FROM scratch
+ADD --chown=1:1 testfile /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.add2 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.add2
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.add2    1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.add2    2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,2 @@
+FROM scratch
+ADD --chown=2:2 testfile /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.copy1 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.copy1
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.copy1   1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.copy1   2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,2 @@
+FROM scratch
+COPY --chown=1:1 testfile /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.copy2 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.copy2
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.copy2   1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.copy2   2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,2 @@
+FROM scratch
+COPY --chown=2:2 testfile /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.prev1 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.prev1
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.prev1   1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.prev1   2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,4 @@
+FROM scratch
+COPY testfile renamedfile
+FROM scratch
+COPY --chown=1:1 --from=0 renamedfile /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.prev2 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.prev2
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.prev2   1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.prev2   2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,4 @@
+FROM scratch
+COPY testfile renamedfile
+FROM scratch
+COPY --chown=2:2 --from=0 renamedfile /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.tar1 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.tar1
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.tar1    1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.tar1    2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,3 @@
+FROM scratch
+# Surprise! The --chown flag is ignored when we're extracting archives.
+ADD --chown=1:1 testfile.tar.gz /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.tar2 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.tar2
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.tar2    1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.tar2    2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,3 @@
+FROM scratch
+# Surprise! The --chown flag is ignored when we're extracting archives.
+ADD --chown=2:2 testfile.tar.gz /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.url1 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.url1
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.url1    1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.url1    2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,2 @@
+FROM scratch
+ADD --chown=1:1 
https://raw.githubusercontent.com/containers/buildah/master/LICENSE /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.url2 
new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.url2
--- old/buildah-1.17.0/tests/bud/cache-chown/Dockerfile.url2    1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/Dockerfile.url2    2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,2 @@
+FROM scratch
+ADD --chown=2:2 
https://raw.githubusercontent.com/containers/buildah/master/LICENSE /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-chown/testfile 
new/buildah-1.17.1/tests/bud/cache-chown/testfile
--- old/buildah-1.17.0/tests/bud/cache-chown/testfile   1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-chown/testfile   2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1 @@
+Hi, I'm a test file.  Enjoy the test.
Binary files old/buildah-1.17.0/tests/bud/cache-chown/testfile.tar.gz and 
new/buildah-1.17.1/tests/bud/cache-chown/testfile.tar.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud/cache-format/Dockerfile 
new/buildah-1.17.1/tests/bud/cache-format/Dockerfile
--- old/buildah-1.17.0/tests/bud/cache-format/Dockerfile        1970-01-01 
01:00:00.000000000 +0100
+++ new/buildah-1.17.1/tests/bud/cache-format/Dockerfile        2020-11-17 
12:18:05.000000000 +0100
@@ -0,0 +1,3 @@
+FROM alpine
+COPY . .
+RUN pwd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/bud.bats 
new/buildah-1.17.1/tests/bud.bats
--- old/buildah-1.17.0/tests/bud.bats   2020-10-29 23:33:13.000000000 +0100
+++ new/buildah-1.17.1/tests/bud.bats   2020-11-17 12:18:05.000000000 +0100
@@ -2295,3 +2295,86 @@
 
   expect_output --from="$passthru" "$random_msg" "stdin was passed through"
 }
+
+@test "bud cache by format" {
+  # Build first in Docker format.  Whether we do OCI or Docker first shouldn't 
matter, so we picked one.
+  run_buildah bud --iidfile first-docker  --format docker --layers --quiet 
--signature-policy ${TESTSDIR}/policy.json ${TESTSDIR}/bud/cache-format
+  # Build in OCI format.  Cache should not re-use the same images, so we 
should get a different image ID.
+  run_buildah bud --iidfile first-oci     --format oci    --layers --quiet 
--signature-policy ${TESTSDIR}/policy.json ${TESTSDIR}/bud/cache-format
+  # Build in Docker format again.  Cache traversal should 100% hit the Docker 
image, so we should get its image ID.
+  run_buildah bud --iidfile second-docker --format docker --layers --quiet 
--signature-policy ${TESTSDIR}/policy.json ${TESTSDIR}/bud/cache-format
+  # Build in OCI format again.  Cache traversal should 100% hit the OCI image, 
so we should get its image ID.
+  run_buildah bud --iidfile second-oci    --format oci    --layers --quiet 
--signature-policy ${TESTSDIR}/policy.json ${TESTSDIR}/bud/cache-format
+  # Compare them.  The two images we built in Docker format should be the 
same, the two we built in OCI format
+  # should be the same, but the OCI and Docker format images should be 
different.
+  cmp first-docker second-docker
+  cmp first-oci    second-oci
+  run cmp first-docker first-oci
+  [[ "$status" -ne 0 ]]
+}
+
+@test "bud cache add-copy-chown" {
+  # Build each variation of COPY (from context, from previous stage) and ADD 
(from context, not overriding an archive, URL) twice.
+  # Each second build should produce an image with the same ID as the first 
build, because the cache matches, but they should
+  # otherwise all be different.
+  run_buildah bud --iidfile copy1 --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.copy1 ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile prev1 --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.prev1 ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile add1  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.add1  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile tar1  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.tar1  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile url1  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.url1  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile copy2 --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.copy2 ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile prev2 --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.prev2 ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile add2  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.add2  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile tar2  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.tar2  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile url2  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.url2  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile copy3 --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.copy1 ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile prev3 --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.prev1 ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile add3  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.add1  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile tar3  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.tar1  ${TESTSDIR}/bud/cache-chown
+  run_buildah bud --iidfile url3  --layers --quiet --signature-policy 
${TESTSDIR}/policy.json -f Dockerfile.url1  ${TESTSDIR}/bud/cache-chown
+
+  # The third round of builds should match all of the first rounds by way of 
caching.
+  cmp copy1 copy3
+  cmp prev1 prev3
+  cmp add1  add3
+  cmp tar1  tar3
+  cmp url1  url3
+
+  # The second round of builds should not match the first rounds, since the 
different ownership
+  # makes the changes look different to the cache, except for cases where we 
extract an archive,
+  # where --chown is ignored.
+  run cmp copy1 copy2
+  [[ "$status" -ne 0 ]]
+  run cmp prev1 prev2
+  [[ "$status" -ne 0 ]]
+  run cmp add1  add2
+  [[ "$status" -ne 0 ]]
+  cmp tar1 tar2
+  run cmp url1  url2
+  [[ "$status" -ne 0 ]]
+
+  # The first rounds of builds should all be different from each other, as a 
sanith thing.
+  run cmp copy1 prev1
+  [[ "$status" -ne 0 ]]
+  run cmp copy1 add1
+  [[ "$status" -ne 0 ]]
+  run cmp copy1 tar1
+  [[ "$status" -ne 0 ]]
+  run cmp copy1 url1
+  [[ "$status" -ne 0 ]]
+
+  run cmp prev1 add1
+  [[ "$status" -ne 0 ]]
+  run cmp prev1 tar1
+  [[ "$status" -ne 0 ]]
+  run cmp prev1 url1
+  [[ "$status" -ne 0 ]]
+
+  run cmp add1 tar1
+  [[ "$status" -ne 0 ]]
+  run cmp add1 url1
+  [[ "$status" -ne 0 ]]
+
+  run cmp tar1 url1
+  [[ "$status" -ne 0 ]]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/buildah-1.17.0/tests/validate/git-validation.sh 
new/buildah-1.17.1/tests/validate/git-validation.sh
--- old/buildah-1.17.0/tests/validate/git-validation.sh 2020-10-29 
23:33:13.000000000 +0100
+++ new/buildah-1.17.1/tests/validate/git-validation.sh 2020-11-17 
12:18:05.000000000 +0100
@@ -11,7 +11,7 @@
        exit 1
 fi
 
-GITVALIDATE_EPOCH="${GITVALIDATE_EPOCH:-1f8bf4dba27d9a157f966dad3a1e0f58091091d8}"
+GITVALIDATE_EPOCH="${GITVALIDATE_EPOCH:-8891d05dbaffc0b6013a48a68177b4ccec281f8c}"
 
 OUTPUT_OPTIONS="-q"
 if [[ "$CI" == 'true' ]]; then

Reply via email to