From 714dbbda9e1f3ec98d75a07ed4c5442ea6540680 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 22 Aug 2018 09:12:40 -0400 Subject: Swap from FFJSON to easyjson FFJSON has serialization differences versus stock Go - namely, it does not respect the MarshalText() and UnmarshalText() methods, particularly on []byte, which causes incompatability with pre-FFJSON containers which contained DNS servers. EasyJSON does not have these issues, and might even be slightly faster. Signed-off-by: Matthew Heon Closes: #1322 Approved by: mheon --- Makefile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 25a4f40ea..e69e9e26b 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,8 @@ clean: cmd/podman/varlink/iopodman.go \ libpod/container_ffjson.go \ libpod/pod_ffjson.go \ + libpod/container_easyjson.go \ + libpod/pod_easyjson.go \ $(MANPAGES) ||: ifdef HAS_PYTHON3 $(MAKE) -C contrib/python/podman clean @@ -183,7 +185,7 @@ clientintegration: vagrant-check: BOX=$(BOX) sh ./vagrant.sh -binaries: varlink_generate ffjson_generate podman python +binaries: varlink_generate easyjson_generate podman python test-binaries: test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp @@ -262,7 +264,7 @@ uninstall: .PHONY: install.tools -install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ffjson +install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.easyjson .install.gitvalidation: .gopathok if [ ! -x "$(GOBIN)/git-validation" ]; then \ @@ -283,9 +285,9 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins $(GO) get -u github.com/cpuguy83/go-md2man; \ fi -.install.ffjson: .gopathok +.install.easyjson: .gopathok if [ ! -x "$(GOBIN)/ffjson" ]; then\ - $(GO) get -u github.com/pquerna/ffjson; \ + $(GO) get -u github.com/mailru/easyjson/...; \ fi .install.ostree: .gopathok @@ -299,15 +301,15 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins varlink_generate: .gopathok cmd/podman/varlink/iopodman.go varlink_api_generate: .gopathok API.md -ffjson_generate: .gopathok libpod/container_ffjson.go libpod/pod_ffjson.go +easyjson_generate: .gopathok libpod/container_easyjson.go libpod/pod_easyjson.go -libpod/container_ffjson.go: libpod/container.go - rm -f libpod/container_ffjson.go - ffjson $(GOPKGDIR)/libpod/container.go +libpod/container_easyjson.go: libpod/container.go + rm -f libpod/container_easyjson.go + cd "$(GOPKGDIR)" && easyjson ./libpod/container.go -libpod/pod_ffjson.go: libpod/pod.go - rm -f libpod/pod_ffjson.go - ffjson $(GOPKGDIR)/libpod/pod.go +libpod/pod_easyjson.go: libpod/pod.go + rm -f libpod/pod_easyjson.go + cd "$(GOPKGDIR)" && easyjson ./libpod/pod.go .PHONY: install.libseccomp.sudo install.libseccomp.sudo: -- cgit v1.2.3-54-g00ecf