Description of problem: The `opm` binary get from the tar fails to output the version info. mac:opm jianzhang$ ./darwin-amd64-opm version Version: version.Version{OpmVersion:"unknown", GitCommit:"", BuildDate:"", GoOs:"darwin", GoArch:"amd64"} Version-Release number of selected component (if applicable): 4.6, 4.7 How reproducible: always Steps to Reproduce: 1. Get the opm tar from https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/ 2. unzip it. mac:opm jianzhang$ tar -zxvf opm-mac.tar.gz x darwin-amd64-opm 3. check the version info. mac:opm jianzhang$ ./darwin-amd64-opm version Version: version.Version{OpmVersion:"unknown", GitCommit:"", BuildDate:"", GoOs:"darwin", GoArch:"amd64"} Actual results: No version info. mac:opm jianzhang$ ./darwin-amd64-opm version Version: version.Version{OpmVersion:"unknown", GitCommit:"", BuildDate:"", GoOs:"darwin", GoArch:"amd64"} Expected results: It should be like: [root@preserve-olm-env data]# opm version Version: version.Version{OpmVersion:"v1.14.3-94-g6183dbb", GitCommit:"6183dbb", BuildDate:"2021-02-04T09:33:47Z", GoOs:"linux", GoArch:"amd64"} Additional info:
The 4.6.19 and 4.7.0 x86_84/linux opm binaries look OK. The cross-compilation Makefile recipes pass --ldflags twice (and the second one does not contain the link-time variables to set), so I suspect the last --ldflags wins. https://github.com/operator-framework/operator-registry/blob/master/Makefile#L31-L37
The windows binaries are probably affected too.
I couldn't get the latest opm from the https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/, only 4.8.5 version there, so I get it from the image and have a try. It looks good, as follows, but this opm is not for the Mac. [cloud-user@preserve-olm-env jian]$ podman pull registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.9 Trying to pull registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.9... Getting image source signatures Copying blob 356f18f3a935 skipped: already exists Copying blob 296e14ee2414 skipped: already exists Copying blob 0205529b95f0 done Copying blob 077ef25c1a9d done Copying blob 1e7e9b5e7bd9 done Copying config 5018ef3875 done Writing manifest to image destination Storing signatures 5018ef387543f3688a16b535236ce958fad5e30ddfea92e73d9c7a5f84775836 [cloud-user@preserve-olm-env jian]$ podman create --name opm registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.9 afc65eddc03135c4f59d13923fc8a8990e5bef85533b7455a5491f960b4ec893 [cloud-user@preserve-olm-env jian]$ podman cp opm:/bin/opm . [cloud-user@preserve-olm-env jian]$ ./opm version Version: version.Version{OpmVersion:"6ee2f331d", GitCommit:"6ee2f331d69674714ed23e3264f7d5db784fb83e", BuildDate:"2021-08-24T17:48:38Z", GoOs:"linux", GoArch:"amd64"} @Ben Do you happen to know where can I get the latest opm for the Mac? Thanks!
Thanks Tim! I get it from the https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.9.0-0.nightly-2021-08-25-093627/, details: [cloud-user@preserve-olm-env jian]$ wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.9.0-0.nightly-2021-08-25-093627/opm-mac.tar.gz mac:opm jianzhang$ tar -zxvf opm-mac.tar.gz x darwin-amd64-opm mac:opm jianzhang$ ./darwin-amd64-opm version Version: version.Version{OpmVersion:"0178564d0", GitCommit:"0178564d0b6aa035e4daedcb0da94be75c20b90a", BuildDate:"2021-08-25T01:40:56Z", GoOs:"darwin", GoArch:"amd64"} commit: "0178564d0b6aa035e4daedcb0da94be75c20b90a" in https://github.com/openshift/operator-framework-olm/commits/master The version info looks good, verify it.
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: OpenShift Container Platform 4.9.0 bug fix and security 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-2021:3759