summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-11 15:15:18 +0200
committerGitHub <noreply@github.com>2020-05-11 15:15:18 +0200
commitd473e6e35120ad254a62301a89be26e5ad589752 (patch)
tree99f35e8d868502febe889de3713f37fad58e3fcb /libpod
parent01f747fdc3b601492d496536ced1386172c4e3d8 (diff)
parentc21258b70ed91ab5ff8b1d345123fed1011a49c9 (diff)
downloadpodman-d473e6e35120ad254a62301a89be26e5ad589752.tar.gz
podman-d473e6e35120ad254a62301a89be26e5ad589752.tar.bz2
podman-d473e6e35120ad254a62301a89be26e5ad589752.zip
Merge pull request #5566 from openSUSE/static-binary
Add podman static build
Diffstat (limited to 'libpod')
-rw-r--r--libpod/define/info.go1
-rw-r--r--libpod/info.go2
-rw-r--r--libpod/linkmode/linkmode_dynamic.go8
-rw-r--r--libpod/linkmode/linkmode_static.go8
4 files changed, 19 insertions, 0 deletions
diff --git a/libpod/define/info.go b/libpod/define/info.go
index 2516cad77..906aa523f 100644
--- a/libpod/define/info.go
+++ b/libpod/define/info.go
@@ -33,6 +33,7 @@ type HostInfo struct {
SwapFree int64 `json:"swapFree"`
SwapTotal int64 `json:"swapTotal"`
Uptime string `json:"uptime"`
+ Linkmode string `json:"linkmode"`
}
// SlirpInfo describes the slirp exectuable that
diff --git a/libpod/info.go b/libpod/info.go
index 4007e0ce7..51208a2b1 100644
--- a/libpod/info.go
+++ b/libpod/info.go
@@ -14,6 +14,7 @@ import (
"github.com/containers/buildah"
"github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/libpod/linkmode"
"github.com/containers/libpod/pkg/cgroups"
registries2 "github.com/containers/libpod/pkg/registries"
"github.com/containers/libpod/pkg/rootless"
@@ -86,6 +87,7 @@ func (r *Runtime) hostInfo() (*define.HostInfo, error) {
info := define.HostInfo{
Arch: runtime.GOARCH,
BuildahVersion: buildah.Version,
+ Linkmode: linkmode.Linkmode(),
CPUs: runtime.NumCPU(),
Distribution: hostDistributionInfo,
EventLogger: r.eventer.String(),
diff --git a/libpod/linkmode/linkmode_dynamic.go b/libpod/linkmode/linkmode_dynamic.go
new file mode 100644
index 000000000..6d51d60e0
--- /dev/null
+++ b/libpod/linkmode/linkmode_dynamic.go
@@ -0,0 +1,8 @@
+// +build !static
+
+package linkmode
+
+// Linkmode returns the linking mode (static/dynamic) for the build.
+func Linkmode() string {
+ return "dynamic"
+}
diff --git a/libpod/linkmode/linkmode_static.go b/libpod/linkmode/linkmode_static.go
new file mode 100644
index 000000000..2db083f4a
--- /dev/null
+++ b/libpod/linkmode/linkmode_static.go
@@ -0,0 +1,8 @@
+// +build static
+
+package linkmode
+
+// Linkmode returns the linking mode (static/dynamic) for the build.
+func Linkmode() string {
+ return "static"
+}