diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-23 11:11:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 11:11:53 +0000 |
commit | c1a0b7d9d6a9a8e6afdae2392dc86a77f5e71676 (patch) | |
tree | 523ba4b958571dfc7e72cb94d259cec247bc6f4b | |
parent | d8868746fd3f45b9bfd79e37bf2aa0c7103245fd (diff) | |
parent | 1cc9cd704d949db557dbdb4aa32f373361d80af2 (diff) | |
download | podman-c1a0b7d9d6a9a8e6afdae2392dc86a77f5e71676.tar.gz podman-c1a0b7d9d6a9a8e6afdae2392dc86a77f5e71676.tar.bz2 podman-c1a0b7d9d6a9a8e6afdae2392dc86a77f5e71676.zip |
Merge pull request #7737 from lsm5/v2.1
[v2.1] fix build with varlink
-rw-r--r-- | .cirrus.yml | 1 | ||||
-rw-r--r-- | pkg/varlinkapi/system.go | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index a11bbbe61..6f32bf182 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -123,6 +123,7 @@ gating_task: # N/B: need 'clean' so some committed files are re-generated. - '/usr/local/bin/entrypoint.sh clean podman-remote |& ${TIMESTAMP}' - '/usr/local/bin/entrypoint.sh clean podman xref_helpmsgs_manpages BUILDTAGS="exclude_graphdriver_devicemapper selinux seccomp" |& ${TIMESTAMP}' + - '/usr/local/bin/entrypoint.sh clean BUILDTAGS="varlink" binaries |& ${TIMESTAMP}' - '/usr/local/bin/entrypoint.sh local-cross |& ${TIMESTAMP}' # Verify some aspects of ci/related scripts diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go index 9e4db2611..e5c766a6d 100644 --- a/pkg/varlinkapi/system.go +++ b/pkg/varlinkapi/system.go @@ -7,6 +7,7 @@ import ( "fmt" "os" goruntime "runtime" + "strconv" "time" "github.com/containers/image/v5/pkg/sysregistriesv2" @@ -22,13 +23,18 @@ func (i *VarlinkAPI) GetVersion(call iopodman.VarlinkCall) error { return err } + int64APIVersion, err := strconv.ParseInt(versionInfo.APIVersion, 10, 64) + if err != nil { + return err + } + return call.ReplyGetVersion( versionInfo.Version, versionInfo.GoVersion, versionInfo.GitCommit, time.Unix(versionInfo.Built, 0).Format(time.RFC3339), versionInfo.OsArch, - versionInfo.APIVersion, + int64APIVersion, ) } |