Skip to content

Commit

Permalink
Merge pull request #15695 from Luap99/update-buildah
Browse files Browse the repository at this point in the history
Update buildah and c/common to latest
  • Loading branch information
openshift-merge-robot authored Sep 9, 2022
2 parents 8a2ab7c + 8e1aa7a commit 04270a0
Show file tree
Hide file tree
Showing 379 changed files with 4,635 additions and 42,236 deletions.
10 changes: 10 additions & 0 deletions docs/source/markdown/podman-build.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,16 @@ Suppress output messages which indicate which instruction is being processed,
and of progress when pulling images from a registry, and when writing the
output image.

#### **--retry**=*attempts*

Number of times to retry in case of failure when performing pull of
images from registry. Default is **3**.

#### **--retry-delay**=*duration*

Duration of delay between retry attempts in case of failure when performing
pull of images from registry. Default is **2s**.

#### **--rm**

Remove intermediate containers after a successful build (default true).
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ require (
github.com/container-orchestrated-devices/container-device-interface v0.5.1
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.1.1
github.com/containers/buildah v1.27.0
github.com/containers/common v0.49.2-0.20220826180622-c2dcb4e70340
github.com/containers/buildah v1.27.1-0.20220907121344-97a52b13bb27
github.com/containers/common v0.49.2-0.20220908074553-1a09baf471c4
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.22.0
github.com/containers/image/v5 v5.22.1-0.20220907162003-651744379993
github.com/containers/ocicrypt v1.1.5
github.com/containers/psgo v1.7.3
github.com/containers/storage v1.42.0
github.com/containers/storage v1.42.1-0.20220909095216-b32188140319
github.com/coreos/go-systemd/v22 v22.3.2
github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3
github.com/cyphar/filepath-securejoin v0.2.3
Expand All @@ -42,10 +42,10 @@ require (
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
github.com/nxadm/tail v1.4.8
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.20.0
github.com/onsi/gomega v1.20.2
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198
github.com/opencontainers/runc v1.1.3
github.com/opencontainers/runc v1.1.4
github.com/opencontainers/runtime-spec v1.0.3-0.20211214071223-8958f93039ab
github.com/opencontainers/runtime-tools v0.9.1-0.20220714195903-17b3287fafb7
github.com/opencontainers/selinux v1.10.1
Expand All @@ -61,7 +61,7 @@ require (
github.com/vbauerster/mpb/v7 v7.5.2
github.com/vishvananda/netlink v1.1.1-0.20220115184804-dd687eb2f2d4
go.etcd.io/bbolt v1.3.6
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
golang.org/x/text v0.3.7
Expand Down
235 changes: 195 additions & 40 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions test/buildah-bud/apply-podman-deltas
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ skip_if_remote "envariables do not automatically work with -remote." \
skip_if_remote "FIXME FIXME FIXME: does this test make sense in remote?" \
"build-test with OCI prestart hook"

# 2022-08-17 buildah PR 4190
skip_if_remote "Explicit request in buildah PR 4190 to skip this on remote" \
"build: test race in updating image name while performing parallel commits"

###############################################################################
# BEGIN tests which are skipped due to actual podman or podman-remote bugs.

Expand Down
18 changes: 9 additions & 9 deletions test/buildah-bud/buildah-tests.diff
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6508e3df2a129554fdf8336d8a6f0cdcc6fd4832 Mon Sep 17 00:00:00 2001
From d22e44c8fb1c87afb90391188733f7ce8fea005d Mon Sep 17 00:00:00 2001
From: Ed Santiago <[email protected]>
Date: Tue, 9 Feb 2021 17:28:05 -0700
Subject: [PATCH] tweaks for running buildah tests under podman
Expand All @@ -9,10 +9,10 @@ Signed-off-by: Ed Santiago <[email protected]>
1 file changed, 67 insertions(+), 3 deletions(-)

diff --git a/tests/helpers.bash b/tests/helpers.bash
index e3087063..178a486e 100644
index 8cb93c3a..72c1c797 100644
--- a/tests/helpers.bash
+++ b/tests/helpers.bash
@@ -51,6 +51,23 @@ EOF
@@ -52,6 +52,23 @@ EOF
ROOTDIR_OPTS="--root ${TEST_SCRATCH_DIR}/root --runroot ${TEST_SCRATCH_DIR}/runroot --storage-driver ${STORAGE_DRIVER}"
BUILDAH_REGISTRY_OPTS="--registries-conf ${TEST_SOURCES}/registries.conf --registries-conf-dir ${TEST_SCRATCH_DIR}/registries.d --short-name-alias-conf ${TEST_SCRATCH_DIR}/cache/shortnames.conf"
PODMAN_REGISTRY_OPTS="--registries-conf ${TEST_SOURCES}/registries.conf"
Expand All @@ -36,7 +36,7 @@ index e3087063..178a486e 100644
}

function starthttpd() {
@@ -94,6 +111,12 @@ function teardown_tests() {
@@ -95,6 +112,12 @@ function teardown_tests() {
stop_git_daemon
stop_registry

Expand All @@ -49,7 +49,7 @@ index e3087063..178a486e 100644
# Workaround for #1991 - buildah + overlayfs leaks mount points.
# Many tests leave behind /var/tmp/.../root/overlay and sub-mounts;
# let's find those and clean them up, otherwise 'rm -rf' fails.
@@ -186,6 +209,10 @@ function podman() {
@@ -187,6 +210,10 @@ function podman() {
command ${PODMAN_BINARY:-podman} ${PODMAN_REGISTRY_OPTS} ${ROOTDIR_OPTS} "$@"
}

Expand All @@ -60,7 +60,7 @@ index e3087063..178a486e 100644
# There are various scenarios where we would like to execute `tests` as rootless user, however certain commands like `buildah mount`
# do not work in rootless session since a normal user cannot mount a filesystem unless they're in a user namespace along with its
# own mount namespace. In order to run such specific commands from a rootless session we must perform `buildah unshare`.
@@ -247,8 +274,36 @@ function run_buildah() {
@@ -248,8 +275,36 @@ function run_buildah() {
--retry) retry=3; shift;; # retry network flakes
esac

Expand Down Expand Up @@ -98,7 +98,7 @@ index e3087063..178a486e 100644

# If session is rootless and `buildah mount` is invoked, perform unshare,
# since normal user cannot mount a filesystem unless they're in a user namespace along with its own mount namespace.
@@ -262,8 +317,8 @@ function run_buildah() {
@@ -263,8 +318,8 @@ function run_buildah() {
retry=$(( retry - 1 ))

# stdout is only emitted upon error; this echo is to help a debugger
Expand All @@ -109,7 +109,7 @@ index e3087063..178a486e 100644
# without "quotes", multiple lines are glommed together into one
if [ -n "$output" ]; then
echo "$output"
@@ -595,6 +650,15 @@ function skip_if_no_docker() {
@@ -596,6 +651,15 @@ function skip_if_no_docker() {
fi
}

Expand All @@ -126,5 +126,5 @@ index e3087063..178a486e 100644
daemondir=${TEST_SCRATCH_DIR}/git-daemon
mkdir -p ${daemondir}/repo
--
2.35.3
2.36.1

16 changes: 11 additions & 5 deletions test/e2e/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,27 +200,33 @@ var _ = Describe("Podman secret", func() {
list := podmanTest.Podman([]string{"secret", "ls", "--filter", fmt.Sprintf("name=%s", secret1)})
list.WaitWithDefaultTimeout()
Expect(list).Should(Exit(0))
Expect(list.OutputToStringArray()).To(HaveLen(2), ContainSubstring(secret1))
Expect(list.OutputToStringArray()).To(HaveLen(2))
Expect(list.OutputToStringArray()[1]).To(ContainSubstring(secret1))

list = podmanTest.Podman([]string{"secret", "ls", "--filter", fmt.Sprintf("name=%s", secret2)})
list.WaitWithDefaultTimeout()
Expect(list).Should(Exit(0))
Expect(list.OutputToStringArray()).To(HaveLen(2), ContainSubstring(secret2))
Expect(list.OutputToStringArray()).To(HaveLen(2))
Expect(list.OutputToStringArray()[1]).To(ContainSubstring(secret2))

list = podmanTest.Podman([]string{"secret", "ls", "--filter", fmt.Sprintf("id=%s", secrID1)})
list.WaitWithDefaultTimeout()
Expect(list).Should(Exit(0))
Expect(list.OutputToStringArray()).To(HaveLen(2), ContainSubstring(secrID1))
Expect(list.OutputToStringArray()).To(HaveLen(2))
Expect(list.OutputToStringArray()[1]).To(ContainSubstring(secrID1))

list = podmanTest.Podman([]string{"secret", "ls", "--filter", fmt.Sprintf("id=%s", secrID2)})
list.WaitWithDefaultTimeout()
Expect(list).Should(Exit(0))
Expect(list.OutputToStringArray()).To(HaveLen(2), ContainSubstring(secrID2))
Expect(list.OutputToStringArray()).To(HaveLen(2))
Expect(list.OutputToStringArray()[1]).To(ContainSubstring(secrID2))

list = podmanTest.Podman([]string{"secret", "ls", "--filter", fmt.Sprintf("name=%s,name=%s", secret1, secret2)})
list.WaitWithDefaultTimeout()
Expect(list).Should(Exit(0))
Expect(list.OutputToStringArray()).To(HaveLen(3), ContainSubstring(secret1), ContainSubstring(secret2))
Expect(list.OutputToStringArray()).To(HaveLen(3))
Expect(list.OutputToString()).To(ContainSubstring(secret1))
Expect(list.OutputToString()).To(ContainSubstring(secret2))
})

It("podman secret ls with Go template", func() {
Expand Down
2 changes: 1 addition & 1 deletion test/system/150-login.bats
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function setup() {
--password-stdin \
$registry <<< "x${PODMAN_LOGIN_PASS}"
is "$output" \
"Error: error logging into \"$registry\": invalid username/password" \
"Error: logging into \"$registry\": invalid username/password" \
'output from podman login'
}

Expand Down
20 changes: 0 additions & 20 deletions vendor/github.com/beorn7/perks/LICENSE

This file was deleted.

Loading

0 comments on commit 04270a0

Please sign in to comment.