docker: update to 20.10.12

This commit is contained in:
Henrik Grimler 2021-12-05 15:42:54 +01:00 committed by Yaksh Bariya
parent d890099b50
commit 340195e21b
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
4 changed files with 50 additions and 35 deletions

View File

@ -2,18 +2,16 @@ TERMUX_PKG_HOMEPAGE=https://docker.com
TERMUX_PKG_DESCRIPTION="Set of products that use OS-level virtualization to deliver software in packages called containers."
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
# remember to update DOCKER_GITCOMMIT inside termux_step_make()
# bellow when upgrading to a new version
TERMUX_PKG_VERSION=20.10.2
TERMUX_PKG_REVISION=1
LIBNETWORK_COMMIT=448016ef11309bd67541dcf4d72f1f5b7de94862
TERMUX_PKG_VERSION=20.10.12
LIBNETWORK_COMMIT=64b7a4574d1426139437d20e81c0b6d391130ec8
DOCKER_GITCOMMIT=459d0dfbbb
TERMUX_PKG_SRCURL=(https://github.com/moby/moby/archive/v${TERMUX_PKG_VERSION}.tar.gz
https://github.com/docker/cli/archive/v${TERMUX_PKG_VERSION}.tar.gz
https://github.com/moby/libnetwork/archive/${LIBNETWORK_COMMIT}.tar.gz)
TERMUX_PKG_SHA256=(dc4818f0cba2ded2f6f7420a1fda027ddbf6c6c9fe319f84d1311bfe610447ca
a663f54a158c6b2b23b253b14bf0de56ff035750098e760319de1edb7f4ae76d
6609469024e9244cc1b9e2f023b29de04d0ab281a483ac83cfdf45d1cf9ce71e)
TERMUX_PKG_DEPENDS="containerd"
TERMUX_PKG_SHA256=(a8ee80d31c7b74f687a837cd2a8570578f118179fba0844c5ee88f90fe180155
d86e3e6e10669634ee02b5e071e5ee504457a9d03941bbc5b7f2bd3683ebdb19
ede21e645ff6552b3a508f6186d3f34d267015ec0f96eefecf6d08c03cbd2987)
TERMUX_PKG_DEPENDS="containerd, libdevmapper"
TERMUX_PKG_CONFFILES="etc/docker/daemon.json"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_SKIP_SRC_EXTRACT=true
@ -22,7 +20,7 @@ termux_step_get_source() {
local PKG_SRCURL=(${TERMUX_PKG_SRCURL[@]})
local PKG_SHA256=(${TERMUX_PKG_SHA256[@]})
if [ ! ${#PKG_SRCURL[@]} == ${#PKG_SHA256[@]} ]; then
if [ ${#PKG_SRCURL[@]} != ${#PKG_SHA256[@]} ]; then
termux_error_exit "Error: length of TERMUX_PKG_SRCURL isn't equal to length of TERMUX_PKG_SHA256."
fi
@ -63,10 +61,15 @@ termux_step_make() {
xargs sed -i 's/[a-zA-Z0-9]*\.GOOS/"linux"/g' < <(grep -R '[a-zA-Z0-9]*\.GOOS' | cut -d':' -f1 | sort | uniq)
# issue the build command
export DOCKER_GITCOMMIT=8891c58a43
export DOCKER_GITCOMMIT
export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_quota selinux exclude_graphdriver_aufs'
# horrible, but effective way to apply patches on the fly while compiling
while ! IFS='' files=$(AUTO_GOPATH=1 PREFIX='' hack/make.sh dynbinary 2>&1 1>/dev/null); do if ! xargs sed -i 's/\("runtime"\)/_ \1/' < <(echo $files | grep runtime | cut -d':' -f1 | cut -c38-); then echo $files; exit 1; fi; done
while ! IFS='' files=$(AUTO_GOPATH=1 PREFIX='' hack/make.sh dynbinary 2>&1 1>/dev/null); do
if ! xargs sed -i 's/\("runtime"\)/_ \1/' < <(echo $files | grep runtime | cut -d':' -f1 | cut -c38-); then
echo $files;
exit 1
fi
done
)
echo " Done!"

View File

@ -1,8 +1,6 @@
diff --git a/data/data/com.termux/files/home/test/cli-20.10.1/cli/config/config.go b/cli/cli/config/config.go
index 703fa30..893ff58 100644
--- a/data/data/com.termux/files/home/test/cli-20.10.1/cli/config/config.go
+++ b/cli/cli/config/config.go
@@ -11,7 +11,6 @@ import (
--- ./cli/cli/config/config.go.orig 2021-11-18 00:49:46.000000000 +0100
+++ ./cli/cli/config/config.go 2021-12-05 15:25:14.622966748 +0100
@@ -11,7 +11,6 @@
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/cli/config/credentials"
"github.com/docker/cli/cli/config/types"
@ -10,15 +8,33 @@ index 703fa30..893ff58 100644
"github.com/pkg/errors"
)
@@ -32,10 +31,7 @@ func setConfigDir() {
@@ -36,7 +36,7 @@
func getHomeDir() string {
if homeDir == "" {
- homeDir = homedir.Get()
+ homeDir = "@TERMUX_HOME@/.docker"
}
return homeDir
}
@@ -53,10 +52,7 @@
if configDir != "" {
return
}
- configDir = os.Getenv("DOCKER_CONFIG")
- if configDir == "" {
- configDir = filepath.Join(homedir.Get(), configFileDir)
- configDir = filepath.Join(getHomeDir(), configFileDir)
- }
+ configDir = "/data/data/com.termux/files/home/.docker"
+ configDir = "@TERMUX_HOME@/.docker"
}
// Dir returns the directory the configuration file is stored in
@@ -131,7 +131,7 @@
}
// Can't find latest config file so check for the old one
- filename = filepath.Join(getHomeDir(), oldConfigfile)
+ filename = filepath.Join("@TERMUX_HOME@/.docker", oldConfigfile)
if file, err := os.Open(filename); err == nil {
printLegacyFileWarning = true
defer file.Close()

View File

@ -1,13 +1,11 @@
diff --git a/cli-20.10.1/scripts/docs/generate-man.sh b/cli/scripts/docs/generate-man.sh
index 136ed1e..339ee3b 100755
--- a/cli-20.10.1/scripts/docs/generate-man.sh
+++ b/cli/scripts/docs/generate-man.sh
@@ -6,12 +6,12 @@ mkdir -p ./man/man1
--- ./cli/scripts/docs/generate-man.sh.orig 2021-12-05 15:26:07.599604265 +0100
+++ ./cli/scripts/docs/generate-man.sh 2021-12-05 15:28:20.809486509 +0100
@@ -6,12 +6,12 @@
if ! command -v md2man &> /dev/null; then
if ! command -v go-md2man &> /dev/null; then
# yay, go install creates a binary named "v2" ¯\_(ツ)_/¯
- go build -o "/go/bin/md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
+ go build -o "build/md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
- go build -o "/go/bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
+ go build -o "build/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
fi
# Generate man pages from cobra commands

View File

@ -1,11 +1,9 @@
diff --git a/cli-20.10.1/man/md2man-all.sh b/cli/man/md2man-all.sh
index eb0bc63..f8b9a5e 100755
--- a/cli-20.10.1/man/md2man-all.sh
+++ b/cli/man/md2man-all.sh
@@ -18,5 +18,5 @@ for FILE in *.md; do
--- ./cli/man/md2man-all.sh.orig 2021-12-05 15:29:36.176056012 +0100
+++ ./cli/man/md2man-all.sh 2021-12-05 15:33:54.339101972 +0100
@@ -18,5 +18,5 @@
continue
fi
mkdir -p "./man${num}"
- md2man -in "$FILE" -out "./man${num}/${name}"
+ ../build/md2man -in "$FILE" -out "./man${num}/${name}"
- go-md2man -in "$FILE" -out "./man${num}/${name}"
+ ../build/go-md2man -in "$FILE" -out "./man${num}/${name}"
done