summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLokesh Mandvekar <lsm5@fedoraproject.org>2020-09-22 16:24:23 -0400
committerLokesh Mandvekar <lsm5@fedoraproject.org>2020-09-22 16:46:15 -0400
commit16763c3df0eaf3b6e5b7883c60b59f051f811cda (patch)
treea4e0512f945b5b8703d42cb9bcba98ca0021a21e
parent961a3d03c81f2c4083f0260ad688644371544a00 (diff)
downloadpodman-16763c3df0eaf3b6e5b7883c60b59f051f811cda.tar.gz
podman-16763c3df0eaf3b6e5b7883c60b59f051f811cda.tar.bz2
podman-16763c3df0eaf3b6e5b7883c60b59f051f811cda.zip
fix build with varlink
also add a cirrus task for building binaries with varlink. From: Chris Evich <cevich@redhat.com> Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
-rw-r--r--.cirrus.yml1
-rw-r--r--pkg/varlinkapi/system.go8
2 files changed, 8 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 8b1036d7c..d2a8cb660 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,
)
}