diff --git a/.github/workflows/build_push_criu.yml b/.github/workflows/build_push_criu.yml index 0b9d358..a0e54f8 100644 --- a/.github/workflows/build_push_criu.yml +++ b/.github/workflows/build_push_criu.yml @@ -2,6 +2,8 @@ name: Build and Publish CRIU image on: push: + branches: + - main paths: - criu/** diff --git a/Makefile b/Makefile index c01a9cd..d46427f 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ SHIM_EXTLDFLAGS="-static" -s -w SHIM_TAGS="no_grpc" SHIM_LDFLAGS=-X $(CONTAINERD_PKG)/version.Version=$(VERSION) -X $(CONTAINERD_PKG)/version.Revision=$(REVISION) -X $(CONTAINERD_PKG)/version.Package=$(PKG) -extldflags ${SHIM_EXTLDFLAGS} GOARCH ?= $(shell go env GOARCH) +PLATFORMS := linux/arm64,linux/amd64 # build-kind can be used for fast local development. It just builds and # switches out the shim binary. Running pods have to be recreated to make use @@ -41,7 +42,7 @@ logs: docker exec kind-worker journalctl -fu containerd & docker exec kind-worker2 journalctl -fu containerd build-criu: - docker buildx build --push --platform linux/arm64,linux/amd64 --build-arg CRIU_VERSION=$(CRIU_VERSION) -t $(CRIU_IMAGE) -f criu/Dockerfile . + docker buildx build --push --platform $(PLATFORMS) --build-arg CRIU_VERSION=$(CRIU_VERSION) -t $(CRIU_IMAGE) -f criu/Dockerfile . build-installer: docker build --load -t $(INSTALLER_IMAGE) -f cmd/installer/Dockerfile . diff --git a/criu/rpc-ps-address.patch b/criu/rpc-ps-address.patch index 3dade30..aac494e 100644 --- a/criu/rpc-ps-address.patch +++ b/criu/rpc-ps-address.patch @@ -1,12 +1,24 @@ diff --git a/criu/cr-service.c b/criu/cr-service.c -index deb16e553..f86f0e334 100644 +index dccf4ef38c..b3ba7f03f0 100644 --- a/criu/cr-service.c +++ b/criu/cr-service.c -@@ -598,6 +598,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req) - +@@ -554,12 +554,15 @@ static int setup_opts_from_req(int sk, CriuOpts *req) if (req->ps) { opts.port = (short)req->ps->port; -+ opts.addr = req->ps->address; ++ if (req->ps->address) { ++ SET_CHAR_OPTS(addr, req->ps->address); ++ } else { ++ xfree(opts.addr); ++ opts.addr = NULL; ++ } ++ if (!opts.lazy_pages) { opts.use_page_server = true; +- if (req->ps->address) +- SET_CHAR_OPTS(addr, req->ps->address); +- else +- opts.addr = NULL; + + if (req->ps->has_fd) { + if (!opts.swrk_restore)