containerd: Bump to 1.6.9

This commit is contained in:
Tee KOBAYASHI 2022-11-14 05:11:52 +09:00 committed by xtkoba
parent 0478ca52ae
commit e28bcd404e
4 changed files with 58 additions and 36 deletions

View File

@ -2,20 +2,15 @@ diff --git a/data/data/com.termux/files/usr/tmp/docker-build/containerd-1.4.3/Ma
index c0fecb9..e724e52 100644
--- a/data/data/com.termux/files/usr/tmp/docker-build/containerd-1.4.3/Makefile
+++ b/Makefile
@@ -20,10 +20,10 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
DESTDIR ?= /usr/local
# Used to populate variables in version package.
-VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
-REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
+VERSION=v1.4.3.m
+REVISION=269548fa27e0089a8b8278fc4fc781d7f65a939b.m
@@ -33,7 +33,7 @@
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
PACKAGE=github.com/containerd/containerd
-SHIM_CGO_ENABLED ?= 0
+SHIM_CGO_ENABLED ?= 1
ifneq "$(strip $(shell command -v go 2>/dev/null))" ""
GOOS ?= $(shell go env GOOS)
ifneq "$(strip $(shell command -v $(GO) 2>/dev/null))" ""
GOOS ?= $(shell $(GO) env GOOS)
@@ -69,7 +69,7 @@ RELEASE=containerd-$(VERSION:v%=%).${GOOS}-${GOARCH}
PKG=github.com/containerd/containerd
@ -25,22 +20,34 @@ index c0fecb9..e724e52 100644
MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5
ifdef BUILDTAGS
@@ -80,7 +80,7 @@ GO_BUILDTAGS ?= apparmor selinux
GO_BUILDTAGS += ${DEBUG_TAGS}
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",)
GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)'
@@ -100,7 +100,7 @@
endif
GO_LDFLAGS+='
-SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)'
+SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags $(EXTRA_LDFLAGS)'
# Project packages.
PACKAGES=$(shell go list ${GO_TAGS} ./... | grep -v /vendor/)
@@ -226,7 +226,8 @@ man/ctr.8: FORCE
PACKAGES=$(shell $(GO) list ${GO_TAGS} ./... | grep -v /vendor/ | grep -v /integration)
@@ -274,15 +274,18 @@ genman: man/containerd.8 man/ctr.8
man/containerd.8: FORCE
@echo "$(WHALE) $@"
- $(GO) run -mod=readonly ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
+ -CC=gcc CFLAGS= LDFLAGS= GOOS= GOARCH= $(GO) run -mod=readonly ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
+ touch $@
man/ctr.8: FORCE
@echo "$(WHALE) $@"
- $(GO) run -mod=readonly ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
+ -CC=gcc CFLAGS= LDFLAGS= GOOS= GOARCH= $(GO) run -mod=readonly ${GO_TAGS} cmd/gen-manpages/main.go $(@F) $(@D)
+ touch $@
man/%: docs/man/%.md FORCE
@echo "$(WHALE) $@"
- go-md2man -in "$<" -out "$@"
+ go build -o "bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
+ CC=gcc CFLAGS= LDFLAGS= GOOS= GOARCH= $(GO) build -o "bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
+ bin/go-md2man -in "$<" -out "$@"
define installmanpage
mkdir -p $(DESTDIR)/man/man$(2);
$(INSTALL) -d $(DESTDIR)$(MANDIR)/man$(2);

View File

@ -2,12 +2,15 @@ TERMUX_PKG_HOMEPAGE=https://containerd.io/
TERMUX_PKG_DESCRIPTION="An open and reliable container runtime"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.4.13
TERMUX_PKG_SRCURL=https://github.com/containerd/containerd/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7c554e71b34209da5a8a851e16e4edeb375a47f39b099f3bd207bd0500002175
TERMUX_PKG_VERSION=1.6.9
TERMUX_PKG_SRCURL=https://github.com/containerd/containerd.git
TERMUX_PKG_DEPENDS="runc"
TERMUX_PKG_CONFFILES="etc/containerd/config.toml"
termux_step_post_get_source() {
echo "github.com/cpuguy83/go-md2man/v2" >> vendor/modules.txt
}
termux_step_make() {
# setup go build environment
termux_setup_golang
@ -30,7 +33,7 @@ termux_step_make() {
termux_step_make_install() {
cd "${GOPATH}/src/github.com/containerd/containerd"
DESTDIR=${TERMUX_PREFIX} make install
DESTDIR=${TERMUX_PREFIX}/share make install-man
DESTDIR= make install
DESTDIR= make install-man
install -Dm 600 ${TERMUX_PKG_BUILDER_DIR}/config.toml ${TERMUX_PREFIX}/etc/containerd/config.toml
}

View File

@ -0,0 +1,25 @@
--- a/defaults/defaults_unix.go
+++ b/defaults/defaults_unix.go
@@ -22,17 +22,17 @@
const (
// DefaultRootDir is the default location used by containerd to store
// persistent data
- DefaultRootDir = "/var/lib/containerd"
+ DefaultRootDir = "/data/docker/var/lib/containerd"
// DefaultStateDir is the default location used by containerd to store
// transient data
- DefaultStateDir = "/run/containerd"
+ DefaultStateDir = "/data/docker/run/containerd"
// DefaultAddress is the default unix socket address
- DefaultAddress = "/run/containerd/containerd.sock"
+ DefaultAddress = "/data/docker/run/containerd/containerd.sock"
// DefaultDebugAddress is the default unix socket address for pprof data
- DefaultDebugAddress = "/run/containerd/debug.sock"
+ DefaultDebugAddress = "/data/docker/run/containerd/debug.sock"
// DefaultFIFODir is the default location used by client-side cio library
// to store FIFOs.
- DefaultFIFODir = "/run/containerd/fifo"
+ DefaultFIFODir = "/data/docker/run/containerd/fifo"
// DefaultRuntime is the default linux runtime
DefaultRuntime = "io.containerd.runc.v2"
// DefaultConfigDir is the default location for config files.

View File

@ -1,13 +0,0 @@
diff --git a/data/data/com.termux/files/home/test/containerd-1.4.3/runtime/v2/shim/util_unix.go b/runtime/v2/shim/util_unix.go
index 2b0d0ad..9adb593 100644
--- a/data/data/com.termux/files/home/test/containerd-1.4.3/runtime/v2/shim/util_unix.go
+++ b/runtime/v2/shim/util_unix.go
@@ -66,7 +66,7 @@ func AdjustOOMScore(pid int) error {
return nil
}
-const socketRoot = "/run/containerd"
+const socketRoot = "/data/docker/run/containerd"
// SocketAddress returns a socket address
func SocketAddress(ctx context.Context, socketPath, id string) (string, error) {