diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-21 10:04:00 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-21 10:04:00 +0100 |
commit | 7c334a9594ae315e537bf98259b95bafc60d479c (patch) | |
tree | fc41ac024e70df2bad3160b2d02fd5a01adde46b /app-containers/docker-cli | |
parent | d1849ceeb9c09150c11cc0d112883cfba503af27 (diff) |
gentoo auto-resync : 21:07:2023 - 10:04:00
Diffstat (limited to 'app-containers/docker-cli')
-rw-r--r-- | app-containers/docker-cli/Manifest | 2 | ||||
-rw-r--r-- | app-containers/docker-cli/docker-cli-24.0.4-r1.ebuild | 74 | ||||
-rw-r--r-- | app-containers/docker-cli/files/docker-cli-24.0.4-vendor.patch | 78 |
3 files changed, 154 insertions, 0 deletions
diff --git a/app-containers/docker-cli/Manifest b/app-containers/docker-cli/Manifest index bd644a267999..64539cbdb16b 100644 --- a/app-containers/docker-cli/Manifest +++ b/app-containers/docker-cli/Manifest @@ -1,7 +1,9 @@ +AUX docker-cli-24.0.4-vendor.patch 3505 BLAKE2B c94237a3dcea1001ab160bcbec83fdc1a504bd0762217538327538d619413e9df40acfdda2d675690b3d53c01373fbcea34ec41bfd780be88d41d4fea8b47f15 SHA512 648d5ca9f3a36c1a25bafb9bdc452e92fe7c4c6e73bf70cb6afdda56e1478e464019fa06652e1bf5b8d0fd40a9e946ffc9672e07a56ec6544b0034a5a74924d6 DIST docker-cli-23.0.3-man.tar.xz 81976 BLAKE2B e7390b429d0db2445035da506bb796364f97e6560e766a28d1245e6a76c84314c38af1f3a946d2eb1785132d26805e0d3a76c374559e70989b64e8ce917f8423 SHA512 842d7187ad8a3933d815057ec535c13466c56bd051c7133e6e0a9c85f5140e4ef61b66771ee6788c8fb50d10652a86b663f29fe4ec3190773f70fd45f36fbcd4 DIST docker-cli-23.0.3.tar.gz 6215298 BLAKE2B 817ca474d61839c8b5929db9bfa964b936285622859ab30f45be2f382238a5e49987fdbcdc896eaa7109f114166cf0e1dbc4f001cefe293a6c286b50e2737258 SHA512 873783a0fe9ecab3b8f251c842ba69070e0dffbb4a758c16165441b2f483d55d15b98fd7da0707e483995ac2d1fbb9a0f13f570b78486382b26d6ca6c5e612a9 DIST docker-cli-24.0.4-man.tar.xz 82500 BLAKE2B 67b113ea0a0b8377a2ab8c887849e2d8e6a57cf914bf1c6a1cdcc44978e154ee5b18abdc1b509d3c7367760204bcb1b896f2335a6ff18470433b08f3ce82d346 SHA512 fe7320bb0bacbddba0b00c1351591eceb96386e0e5141b7c399d483f6e549b687b8b3db4b33c127ded118f723d6eb5cbb995733be13c362a0e680f96b221b351 DIST docker-cli-24.0.4.tar.gz 6242506 BLAKE2B 2cc66a43dce613f0940a0aa2ffac075562ff58a483e68511f47a05bb27dc997547522ebd546d314c932d79eb366699b319d9ed561d481ef072bcd40d6993a6d1 SHA512 6b59e01ad975961f64a7c04c719b83dcd95875c223fc11dc3cb4fc6792b6a478fd014559a775ab59b8156e4476a1424cb997c7ae97a692be317b9e7d24ed92fb EBUILD docker-cli-23.0.3.ebuild 1916 BLAKE2B 714ccdfe708f2d2c9adae830189243a5fa38eaf144418bf77925e8e2acd5716220a96d5924b65b66bf3f8699336bb47c215f29fb58746089939755c813737562 SHA512 caba0e08042eb3694b82e4d8b8eb80bbf4823fed10048eae02529c7e87e23c53b0365eb609cb64e966d90515b571e72757aa5d1c23bb9dbc6af516f47906a111 +EBUILD docker-cli-24.0.4-r1.ebuild 1965 BLAKE2B a7f2a8716247e30eb7486159245bb282f7154c9a89d15781d4eb1c02802104003d3a597aece1da5f150c6cf5ff3af2abd45d3e36339b8e45706881e392fb7f6c SHA512 5a48b3eddb2692adba268dcfe149bc4c500c154f41feaeabeda679d927026893133dd8e1f5bf18182e78951a5f5f42db18743f4b0be367dc55b25a8bef52742f EBUILD docker-cli-24.0.4.ebuild 1919 BLAKE2B 5ced5e6d80f3c18975d2d690e774cc007143f339fbb0874b5fbbf6d2ff4fce5ef4704e3b648c0ef09f889d6e29e5b1314ee9ee901c23fd5eae3dbf29d7a2a4d0 SHA512 570b7e6789910ad1823c9501ec0cf40012199b3a061057ad9857fa7672b36470c4bbf4bf3bf7e14352c19a4dea4b331dcf0e14eda9faf5c613a2bc89f5213015 MISC metadata.xml 689 BLAKE2B 45f4a07f9d949ad4e0175908af936140573bd257f7b11f9b9cc25cdd52bb821a294036635fd81662bcd348aa21e69b5582ab2dc8efaf94dbbdc9608b131414f4 SHA512 efe37f3ae8bc6b26433b7bacfda203ea3b480f419b343921214f19a4ad4e25b2cca5f0426a27348902f51ef15f558e81599ccdadcab6504f9d22314bb472d80c diff --git a/app-containers/docker-cli/docker-cli-24.0.4-r1.ebuild b/app-containers/docker-cli/docker-cli-24.0.4-r1.ebuild new file mode 100644 index 000000000000..2f244bee6ddf --- /dev/null +++ b/app-containers/docker-cli/docker-cli-24.0.4-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +GIT_COMMIT=3713ee1eea +EGO_PN="github.com/docker/cli" +MY_PV=${PV/_/-} +inherit bash-completion-r1 golang-vcs-snapshot + +DESCRIPTION="the command line binary for docker" +HOMEPAGE="https://www.docker.com/" +SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-man.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="hardened selinux" + +RDEPEND="!<app-containers/docker-20.10.1 + selinux? ( sec-policy/selinux-docker )" +BDEPEND=" + >=dev-lang/go-1.16.6" + +PATCHES=( + "${FILESDIR}/${P}-vendor.patch" +) + +RESTRICT="installsources strip test" + +S="${WORKDIR}/${P}/src/${EGO_PN}" + +src_unpack() { + golang-vcs-snapshot_src_unpack + set -- ${A} + unpack ${2} +} + +src_prepare() { + default + sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die +} + +src_compile() { + export DISABLE_WARN_OUTSIDE_CONTAINER=1 + export GOPATH="${WORKDIR}/${P}" + # setup CFLAGS and LDFLAGS for separate build target + # see https://github.com/tianon/docker-overlay/pull/10 + export CGO_CFLAGS="-I${ESYSROOT}/usr/include" + export CGO_LDFLAGS="-L${ESYSROOT}/usr/$(get_libdir)" + emake \ + LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \ + VERSION="${PV}" \ + GITCOMMIT="${GIT_COMMIT}" \ + dynbinary +} + +src_install() { + dobin build/docker + doman "${WORKDIR}"/man/man?/* + dobashcomp contrib/completion/bash/* + bashcomp_alias docker dockerd + insinto /usr/share/fish/vendor_completions.d/ + doins contrib/completion/fish/docker.fish + insinto /usr/share/zsh/site-functions + doins contrib/completion/zsh/_* +} + +pkg_postinst() { + has_version "app-containers/docker-buildx" && return + ewarn "the 'docker build' command is deprecated and will be removed in a" + ewarn "future release. If you need this functionality, install" + ewarn "app-containers/docker-buildx." +} diff --git a/app-containers/docker-cli/files/docker-cli-24.0.4-vendor.patch b/app-containers/docker-cli/files/docker-cli-24.0.4-vendor.patch new file mode 100644 index 000000000000..557486542ede --- /dev/null +++ b/app-containers/docker-cli/files/docker-cli-24.0.4-vendor.patch @@ -0,0 +1,78 @@ +diff --git a/vendor/github.com/docker/docker/client/client.go b/vendor/github.com/docker/docker/client/client.go +index 1c081a5..54fa36c 100644 +--- a/vendor/github.com/docker/docker/client/client.go ++++ b/vendor/github.com/docker/docker/client/client.go +@@ -56,6 +56,36 @@ import ( + "github.com/pkg/errors" + ) + ++// DummyHost is a hostname used for local communication. ++// ++// It acts as a valid formatted hostname for local connections (such as "unix://" ++// or "npipe://") which do not require a hostname. It should never be resolved, ++// but uses the special-purpose ".localhost" TLD (as defined in [RFC 2606, Section 2] ++// and [RFC 6761, Section 6.3]). ++// ++// [RFC 7230, Section 5.4] defines that an empty header must be used for such ++// cases: ++// ++// If the authority component is missing or undefined for the target URI, ++// then a client MUST send a Host header field with an empty field-value. ++// ++// However, [Go stdlib] enforces the semantics of HTTP(S) over TCP, does not ++// allow an empty header to be used, and requires req.URL.Scheme to be either ++// "http" or "https". ++// ++// For further details, refer to: ++// ++// - https://github.com/docker/engine-api/issues/189 ++// - https://github.com/golang/go/issues/13624 ++// - https://github.com/golang/go/issues/61076 ++// - https://github.com/moby/moby/issues/45935 ++// ++// [RFC 2606, Section 2]: https://www.rfc-editor.org/rfc/rfc2606.html#section-2 ++// [RFC 6761, Section 6.3]: https://www.rfc-editor.org/rfc/rfc6761#section-6.3 ++// [RFC 7230, Section 5.4]: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 ++// [Go stdlib]: https://github.com/golang/go/blob/6244b1946bc2101b01955468f1be502dbadd6807/src/net/http/transport.go#L558-L569 ++const DummyHost = "api.moby.localhost" ++ + // ErrRedirect is the error returned by checkRedirect when the request is non-GET. + var ErrRedirect = errors.New("unexpected redirect in response") + +diff --git a/vendor/github.com/docker/docker/client/hijack.go b/vendor/github.com/docker/docker/client/hijack.go +index 6bdacab..db9b02e 100644 +--- a/vendor/github.com/docker/docker/client/hijack.go ++++ b/vendor/github.com/docker/docker/client/hijack.go +@@ -64,7 +64,10 @@ func fallbackDial(proto, addr string, tlsConfig *tls.Config) (net.Conn, error) { + } + + func (cli *Client) setupHijackConn(ctx context.Context, req *http.Request, proto string) (net.Conn, string, error) { +- req.Host = cli.addr ++ if cli.proto == "unix" || cli.proto == "npipe" { ++ // For local communications, it doesn't matter what the host is. ++ req.URL.Host = DummyHost ++ } + req.Header.Set("Connection", "Upgrade") + req.Header.Set("Upgrade", proto) + +diff --git a/vendor/github.com/docker/docker/client/request.go b/vendor/github.com/docker/docker/client/request.go +index c799095..8f43553 100644 +--- a/vendor/github.com/docker/docker/client/request.go ++++ b/vendor/github.com/docker/docker/client/request.go +@@ -98,12 +98,12 @@ func (cli *Client) buildRequest(method, path string, body io.Reader, headers hea + req = cli.addHeaders(req, headers) + + if cli.proto == "unix" || cli.proto == "npipe" { +- // For local communications, it doesn't matter what the host is. We just +- // need a valid and meaningful host name. (See #189) +- req.Host = "docker" ++ // For local communications, it doesn't matter what the host is. ++ req.URL.Host = DummyHost ++ } else { ++ req.URL.Host = cli.addr + } + +- req.URL.Host = cli.addr + req.URL.Scheme = cli.scheme + + if expectedPayload && req.Header.Get("Content-Type") == "" { |