Bug 2112217

Summary: Can not Add url with podman build
Product: Red Hat Enterprise Linux 7 Reporter: Joy Pu <ypu>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Joy Pu <ypu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.9CC: bbaude, dornelas, dwalsh, jligon, jnovy, lsm5, mheon, tsweeney, umohnani
Target Milestone: rcKeywords: Extras, Regression
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-1.6.4-36.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-22 09:17:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joy Pu 2022-07-29 05:59:54 UTC
Description of problem:

In the last build of podman for 7.9 the url is not allowed to used with ADD any more. It will report error:
 STEP 2: ADD https://github.com/containers/podman/blob/master/README.md /tmp/
 Error: error building at STEP "ADD https://github.com/containers/podman/blob/master/README.md /tmp/": source can't be a URL for COPY



Version-Release number of selected component (if applicable):
podman-1.6.4-35.el7_9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Build a image and use ADD in the Dockerfile:
# cat Dockerfile
FROM quay.io/libpod/testimage:20200929
ADD https://github.com/containers/podman/blob/master/README.md /tmp/
# podman build -t add_url .
STEP 1: FROM quay.io/libpod/testimage:20200929
STEP 2: ADD https://github.com/containers/podman/blob/master/README.md /tmp/
Error: error building at STEP "ADD https://github.com/containers/podman/blob/master/README.md /tmp/": source can't be a URL for COPY


Actual results:
command report error can not ADD file from url

Expected results:
Command finished as expected.


Additional info:

This is a known issue in upstream and already fixed: https://github.com/containers/podman/issues/4686

Comment 7 Tom Sweeney 2022-08-10 20:37:59 UTC
PR merged.  We, however, have a couple of CVEs that need to be tended to and will be adding those in before spinning a new Buildah.  The PR is here:  https://github.com/containers/buildah/pull/4173

Comment 14 Joy Pu 2022-08-17 08:41:42 UTC
Test with podman-1.6.4-36.el7_9.x86_64 it is fixed:
# podman build -t add_url .
STEP 1: FROM quay.io/libpod/testimage:20200929
STEP 2: ADD https://github.com/containers/podman/blob/master/README.md /tmp/
STEP 3: COMMIT add_url
caf0a6a66339875bf98f434d156388276d4426bbb4c8eac27cfdd782de46941f
caf0a6a66339875bf98f434d156388276d4426bbb4c8eac27cfdd782de46941f


So move this to verified.

Comment 16 errata-xmlrpc 2022-08-22 09:17:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: podman security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:6119