Bug 1822207

Summary: buildah is not expanding env vars in file paths
Product: OpenShift Container Platform Reporter: Neelesh Agrawal <nagrawal>
Component: ContainersAssignee: Jindrich Novy <jindrich.novy>
Status: CLOSED ERRATA QA Contact: weiwei jiang <wjiang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4CC: adam.kaplan, aos-bugs, bparees, dwalsh, jcantril, jindrich.novy, jnovy, jokerman, mpatel, nagrawal, nalin, tsweeney, wjiang
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: buildah-1.11.6-5.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1810069 Environment:
Last Closed: 2020-05-04 11:48:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1810069, 1817175, 1822031, 1822032, 1822033, 1822034, 1822035, 1822036, 1822037, 1822038    
Bug Blocks:    

Comment 3 weiwei jiang 2020-04-10 07:12:03 UTC

Checked with buildah-1.11.6-6.rhaos4.4.el8.x86_64, and it's fixed.

@jnovy so can I move to verified or have to check the minimum verison?

# cat Dockerfile 
FROM centos
ENV foo=oo
ADD ./f${foo} /tmp/foo
# date > foo      
# cat foo        
Fri Apr 10 03:05:02 EDT 2020               
# buildah bud -t expand_env:latest
STEP 1: FROM centos                                                                                      
Getting image source signatures                                                                          
Copying blob e6a50b627bcb done                                                                           
Copying config 0d53c857b2 done                                                                           
Writing manifest to image destination                                                                    
Storing signatures                                                                                       
STEP 2: ENV foo=oo
STEP 3: ADD ./f${foo} /tmp/foo
STEP 4: COMMIT expand_env:latest                                                                         
Getting image source signatures                                                                                                                                                                                    
Copying blob b05580fca2f9 skipped: already exists                                                        
Copying blob 9bd54db6a6af done                                                                           
Copying config 961366e2ec done                                                                           
Writing manifest to image destination                                                                    
Storing signatures                                                                                       
961366e2ec4555104d33080d31c2c6bc32640e950c97f8ec55aa8daf624d5288  
961366e2ec4555104d33080d31c2c6bc32640e950c97f8ec55aa8daf624d5288 

# podman run localhost/expand_env:latest /bin/cat /tmp/foo
Fri Apr 10 03:05:02 EDT 2020

Comment 4 Jindrich Novy 2020-04-10 07:47:02 UTC
Weiwei, I don't work for MorganStanley for a while now ;-)

Please put this to VERIFIED, the minimal version which contains the fix is 1.11.6-5. Thanks.

Comment 6 errata-xmlrpc 2020-05-04 11:48:39 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, 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/RHBA-2020:0581