summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-03-26 09:39:14 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-23 14:29:45 +0000
commit8493dba23c73617d9529b7ca13b400d50ac6f455 (patch)
treec0de0c67334b9fa7166e01cae95dc560c1e2455a /Makefile
parentcf1d884ffa45b342f38a78189bbd86186ce6cbfe (diff)
downloadpodman-8493dba23c73617d9529b7ca13b400d50ac6f455.tar.gz
podman-8493dba23c73617d9529b7ca13b400d50ac6f455.tar.bz2
podman-8493dba23c73617d9529b7ca13b400d50ac6f455.zip
Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com> Closes: #627 Approved by: mheon
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 21 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 42b7c50f9..bee8d7c00 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,9 @@ MANDIR ?= ${PREFIX}/share/man
SHAREDIR_CONTAINERS ?= ${PREFIX}/share/containers
ETCDIR ?= ${DESTDIR}/etc
ETCDIR_LIBPOD ?= ${ETCDIR}/crio
+SYSTEMDDIR ?= ${PREFIX}/lib/systemd/system
BUILDTAGS ?= seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh) $(shell hack/btrfs_installed_tag.sh) $(shell hack/ostree_tag.sh) $(shell hack/selinux_tag.sh)
+PYTHON ?= /usr/bin/python3
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
OCIUMOUNTINSTALLDIR=$(PREFIX)/share/oci-umount/oci-umount.d
@@ -65,7 +67,7 @@ ifeq ("$(wildcard $(GOPKGDIR))","")
endif
touch "$(GOPATH)/.gopathok"
-lint: .gopathok
+lint: .gopathok varlink_generate
@echo "checking lint"
@./.tool/lint
@@ -101,6 +103,7 @@ endif
rm -f test/copyimg/copyimg
rm -f test/checkseccomp/checkseccomp
rm -fr build/
+ rm -f cmd/podman/ioprojectatomicpodman/ioprojectatomicpodman.go
libpodimage:
docker build -t ${LIBPOD_IMAGE} .
@@ -126,19 +129,20 @@ shell: libpodimage
testunit: libpodimage
docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make localunit
-localunit:
+localunit: varlink_generate
$(GO) test -tags "$(BUILDTAGS)" -cover $(PACKAGES)
ginkgo:
ginkgo -v test/e2e/
-localintegration: test-binaries
+localintegration: varlink_generate test-binaries
ginkgo -v -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.
+ sh test/varlink/run_varlink_tests.sh
vagrant-check:
BOX=$(BOX) sh ./vagrant.sh
-binaries: podman
+binaries: varlink_generate podman
test-binaries: test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp
@@ -163,7 +167,7 @@ changelog:
$(shell cat $(TMPFILE) >> changelog.txt)
$(shell rm $(TMPFILE))
-install: .gopathok install.bin install.man install.cni
+install: .gopathok install.bin install.man install.cni install.systemd
install.bin:
install ${SELINUXOPT} -D -m 755 bin/podman $(BINDIR)/podman
@@ -189,6 +193,10 @@ install.docker: docker-docs
install ${SELINUXOPT} -d -m 755 $(MANDIR)/man1
install ${SELINUXOPT} -m 644 docs/docker*.1 -t $(MANDIR)/man1
+install.systemd:
+ install ${SELINUXOPT} -m 644 contrib/varlink/io.projectatomic.podman.socket ${SYSTEMDDIR}/io.projectatomic.podman.socket
+ install ${SELINUXOPT} -m 644 contrib/varlink/io.projectatomic.podman.service ${SYSTEMDDIR}/io.projectatomic.podman.service
+
uninstall:
for i in $(filter %.1,$(MANPAGES)); do \
rm -f $(MANDIR)/man1/$$(basename $${i}); \
@@ -229,6 +237,14 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man
make all install; \
fi
+.install.varlink: .gopathok
+ $(GO) get -u github.com/varlink/go/varlink
+ $(GO) get -u github.com/varlink/go/cmd/varlink-go-interface-generator
+
+varlink_generate: .gopathok .install.varlink
+ rm -f cmd/podman/ioprojectatomicpodman/ioprojectatomicpodman.go
+ $(GO) generate ./cmd/podman/ioprojectatomicpodman/...
+
validate: gofmt .gitvalidation
.PHONY: \