...
 
Commits (3)
......@@ -106,7 +106,7 @@ BASE_LDFLAGS = ${SHRINKFLAGS} \
-X ${PROJECT}/internal/version.gitCommit=${COMMIT_NO} \
-X ${PROJECT}/internal/version.gitTreeState=${GIT_TREE_STATE}
LDFLAGS = -ldflags '${BASE_LDFLAGS} ${EXTRA_LDFLAGS}'
GO_LDFLAGS = -ldflags '${BASE_LDFLAGS} ${EXTRA_LDFLAGS}'
TESTIMAGE_VERSION := master-1.3.6
TESTIMAGE_REGISTRY := quay.io/crio
......@@ -163,16 +163,16 @@ bin/pinns:
$(MAKE) -C pinns
test/copyimg/copyimg: $(GO_FILES) .gopathok
$(GO_BUILD) $(GCFLAGS) $(LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/test/copyimg
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/test/copyimg
test/checkseccomp/checkseccomp: $(GO_FILES) .gopathok
$(GO_BUILD) $(GCFLAGS) $(LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/test/checkseccomp
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/test/checkseccomp
bin/crio: $(GO_FILES) .gopathok
$(GO_BUILD) $(GCFLAGS) $(LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/cmd/crio
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/cmd/crio
bin/crio-status: $(GO_FILES) .gopathok
$(GO_BUILD) $(GCFLAGS) $(LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/cmd/crio-status
$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o [email protected] $(PROJECT)/cmd/crio-status
build-static:
$(CONTAINER_RUNTIME) run --rm -it -v $(shell pwd):/cri-o $(TESTIMAGE_NIX) sh -c \
......@@ -219,7 +219,7 @@ bin/crio.cross.%: .gopathok .explicit_phony
TARGET="$*"; \
GOOS="$${TARGET%%.*}" \
GOARCH="$${TARGET##*.}" \
$(GO_BUILD) $(LDFLAGS) -tags "containers_image_openpgp btrfs_noversion" -o "[email protected]" $(PROJECT)/cmd/crio
$(GO_BUILD) $(GO_LDFLAGS) -tags "containers_image_openpgp btrfs_noversion" -o "[email protected]" $(PROJECT)/cmd/crio
local-image:
$(TESTIMAGE_SCRIPT)
......
......@@ -124,7 +124,7 @@ func main() {
app.Authors = []*cli.Author{{Name: "The CRI-O Maintainers"}}
app.UsageText = usage
app.Description = app.Usage
app.Version = "\n" + version.Get().String()
app.Version = version.Version + "\n" + version.Get().String()
var err error
app.Flags, app.Metadata, err = criocli.GetFlagsAndMetadata()
......
......@@ -6,6 +6,7 @@ import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"reflect"
"runtime"
......@@ -171,6 +172,9 @@ func getLinkmode() string {
return ""
}
if _, err = exec.LookPath("ldd"); err != nil {
return ""
}
if _, err = utils.ExecCmd("ldd", abspath); err != nil {
if strings.Contains(err.Error(), "not a dynamic executable") {
return "static"
......