Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.19] copier: add GetOptions.IgnoreUnreadable #3063

Closed
wants to merge 64 commits into from

Conversation

vrothberg
Copy link
Member

  • backport commit 34ae47a
  • bump to v1.19.8
  • bump to v1.19.9-dev

@nalind @rhatdan PTAL

I want that in containers/podman#9630. Vendoring master barks as the F33 images need an updated libcap.

TomSweeneyRedHat and others added 30 commits January 14, 2021 15:12
…9 branch

Cherry pick @vrothberg's "use local image name for pull policy checks" containers#2908
and update the cirrus and git validations so the test will run on this new(ish)
branch.  From @vrothberg:

Some pull policies require to first look up a local image and compare
that to the remote counter part. When looking up the remote image, we
need to make sure to use the name of the local image, if it exists.

This fixes a bug where a short name resolved to an image with the
"localhost/" prefix. This prefix is only used for local image look ups
via shortnames.ResolveLocally. Hence, when looking up the remote
counter part, we must preserve this prefix.

Fixes: containers#2904

Signed-off-by: TomSweeneyRedHat <[email protected]>
…/picknew

Cherry pick localhost fix and update CI configuration for release-1.1…
As per title

Signed-off-by: Ashley Cui <[email protected]>
When using volume mounts, the destination directory will get
created if it does not exists. The current code blows up when
the destination directory did not exists.

Signed-off-by: Daniel J Walsh <[email protected]>
Signed-off-by: Daniel J Walsh <[email protected]>
Currently we have a weird situation where the user sets the default
runtime in his containers.conf for podman but Buildah is still falling
back to use runc because it was hard coded as the default for Buildah.

I would like to remove this default, but that would theoretically break
the API promise of Buildah.

This should fix containers/podman#8893

Signed-off-by: Daniel J Walsh <[email protected]>
If a user sets the ENV to be used with the build-arg flag in
the local environment by exporting it, look it up and use the
value set there for that ENV.
Add tests to cover this use case as well.

Signed-off-by: Urvashi Mohnani <[email protected]>
[release-1.19] Use build-arg ENV val from local environment if set
Pick default OCI Runtime from containers.conf
Detect local-image lookups by digest.  Those clearly refer to local
images only, so we must not proceed to remote lookups.

Note that the specifed digest refers to an image ID and not to the
digest of an image's manifest.

Fixes: containers#2836
Signed-off-by: Valentin Rothberg <[email protected]>
Bump golang.org/x/crypto to latest rel-1.19
Check whether the ARG in the containerfile is changed by
either the --build-arg flag or local environment and use
the cached layer or rebuild the layer accordingly.
Add tests for this use case as well.

Signed-off-by: Urvashi Mohnani <[email protected]>
[release-1.19] Rebuild layer if a change in ARG is detected
[ci:docs] Fix man page for buildah push
Signed-off-by: TomSweeneyRedHat <[email protected]>
Fix the check on build args to be the length of the map
and not whether the map is nil. The nil check was causing
the cache layer to not be used as it would give a false
result.

Signed-off-by: Urvashi Mohnani <[email protected]>
Currently if you attempt to build create a manifest
and add a local image, the command blows up.

The current code always looks for a remote image.
This PR fixes the code to use the local image if it
exists.

Signed-off-by: Daniel J Walsh <[email protected]>
Buildah bud --manifest XYZ was not working.

The manifest was never created. This PR Finishes
the plumbing and allows users to create a manifest
while building an image in one single command.

Signed-off-by: Daniel J Walsh <[email protected]>
[1.19] buildah manifest add localimage should work
bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
check the pidns is shared with the host only when the pidns mode is
specified.

Signed-off-by: Giuseppe Scrivano <[email protected]>
edsantiago and others added 20 commits February 15, 2021 16:19
One of the auth tests is failing on RHEL8.4:

   # buildah push --tls-verify=true ...
   Get "https://localhost:5000/v2/": x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

(Expected output: ' x509: certificate signed by unknown authority')

Cause: who knows? Some internal Go change.

Solution: set magic GODEBUG envariable in the buildah invocation.
This makes that message go away, and gives us the expected one.

Indicate that this may be a temporary workaround. I vaguely
recall reading that a future version of Go would remove it.
We'll deal with that then.

Signed-off-by: Ed Santiago <[email protected]>
Cherrypick containers#2978 to fix and issue when
copying files to an empty directory on a container.

Signed-off-by: TomSweeneyRedHat <[email protected]>
…dir_1.19

Don't fail copy to emptydir - v1.19
Signed-off-by: TomSweeneyRedHat <[email protected]>
…2_v1.24.6

Bump containers/storage v1.24.6
Signed-off-by: TomSweeneyRedHat <[email protected]>
If the subprocess exits with an error, but we can't decode its stdout as
a proper status result, check if it produced error output.  If it did,
then return its error output as the error.

Signed-off-by: Nalin Dahyabhai <[email protected]>
When attempting to handle renames, we'd fail to correctly handle renames
of prefixes of a given item's path because of a string handling error,
and add a unit test for the rename logic (finally).

Signed-off-by: Nalin Dahyabhai <[email protected]>
Add copier.Eval(), for expanding paths using symbolic links in a
chrooted scope, without failing if a path component doesn't exist.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Add a NoDerefSymlinks flag to force items that are matched to the Globs
we're given to be treated as symlinks, rather than dereferencing them as
we would need to do for sources for ADD or COPY.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Always create the destination directory first when ADDing or COPYing
content into a container, then extract contents into it using the
destination directory as the chroot instead of the container's root
directory.

Signed-off-by: Nalin Dahyabhai <[email protected]>
[release-1.19] ADD/COPY: create the destination directory first, chroot to it
We are setting the permissions based on the dest dir rather
then the source dir.  Since we want this to work identical to a bind
mount, we need to have the permissions align.

There is also an issue where overlays on existing mounts is blowing up.

Signed-off-by: Daniel J Walsh <[email protected]>
Signed-off-by: Daniel J Walsh <[email protected]>
Cherry-pick:     Set upperdir permissions based on source
Add an IgnoreUnreadable flag to copier.GetOptions to suppress errors
from copier.Get() that would pass the os.IsPermission() test, if they're
encountered while attempting to read files or descend into directories.

Signed-off-by: Nalin Dahyabhai <[email protected]>
 * copier: add GetOptions.IgnoreUnreadable

Signed-off-by: Valentin Rothberg <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link
Collaborator

@vrothberg: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 5, 2021
@vrothberg vrothberg closed this Mar 5, 2021
@vrothberg vrothberg deleted the backport-34ae47a22629 branch March 5, 2021 15:10
@vrothberg
Copy link
Member Author

Wrong target branch.

@vrothberg
Copy link
Member Author

#3064

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved locked - please file new issue/PR needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.