Bug 1763728

Summary: oc adm release extract --tools, --command broken if using extracted oc
Product: OpenShift Container Platform Reporter: Sally <somalley>
Component: ocAssignee: Sally <somalley>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, dsanzmor, jokerman, maszulik, mfojtik
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-23 11:08:26 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 Sally 2019-10-21 12:57:05 UTC
This change https://github.com/openshift/oc/pull/88 introduced a bug in oc where an extracted oc cannot inject the correct version into binaries via binaryReplacement.

To reproduce:

1. extract oc via 'oc adm release extract --command oc <release>'  
2. use extracted oc to 'oc adm release extract --tools|--command <release>'

Comment 2 zhou ying 2019-10-25 07:17:04 UTC
Confirmed with latest version ,the issue has fixed:
[root@192 ~]# ./oc version -o yaml 
clientVersion:
  buildDate: "2019-10-24T14:51:27Z"
  compiler: gc
  gitCommit: 118066a57f6280d685153dc0253ca2eb1fdc2333
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910240917
  goVersion: go1.12.8
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.3.0-0.nightly-2019-10-25-015726

[root@192 ~]# ./oc adm release extract --command oc --to='/home/' registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-10-24-203507


[root@192 ~]# cd /home/

[root@192 home]# ./oc version -o yaml
clientVersion:
  buildDate: "2019-10-24T14:51:27Z"
  compiler: gc
  gitCommit: 118066a57f6280d685153dc0253ca2eb1fdc2333
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910240917
  goVersion: go1.12.8
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.3.0-0.nightly-2019-10-25-015726
releaseClientVersion: 4.3.0-0.nightly-2019-10-24-203507

Comment 4 errata-xmlrpc 2020-01-23 11:08:26 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:0062