app-containers/docker-cli: Sync with Gentoo

It's from Gentoo commit 17e95bd5ff7d75f027fe8ea4379dc278338609e8.
This commit is contained in:
Flatcar Buildbot 2025-04-28 07:12:00 +00:00
parent d21180df09
commit c9e3d49f6e
2 changed files with 76 additions and 0 deletions

View File

@ -2,3 +2,5 @@ DIST docker-cli-28.0.1-man.tar.xz 70360 BLAKE2B 395736a74b314530fbbd6bf4016f7f21
DIST docker-cli-28.0.1.tar.gz 7413092 BLAKE2B 69075ba24eb7c46593d7c4ab80499b67994119af8096409f55eec9524173cb8d37263159cd834e3cfaf4e8d169b568232d400633b2d9b08112ced05c78338f92 SHA512 c3d7ca21b88c5f6925f6c99519a67581fd6c264cc96e6c0bc00751f87de6580a2d443cbe59b2e36771e37a78fe05ea054e292675e19bc4d73fcacfda047e0490
DIST docker-cli-28.0.4-man.tar.xz 70440 BLAKE2B 676eeafda725c759074124e1ccef693d3f0232e2acf3c2b468d28f48e7228b36c885d690cf041bab775b8410e65c1c6f1403b712a869a5610a03ae788f175a0b SHA512 e36dccb3ea043b722993001ebc36180874b65df5fdd446c52ad2902812097a456ee5d1d432e4c5f5db553213c9956c1f2ef3d07e171760f1e29248f3a6dedf9f
DIST docker-cli-28.0.4.tar.gz 7504883 BLAKE2B c975eff2bb4c0dd5430a67418804e8649c733a59ac6b2beb9f2a454a8e8839e12afbf61afccb1e3bd0cb2e38c51fbd59fee3de45490a02ec9ad074cd365ece2c SHA512 fd7562815686fece20a0ea95501612e049e90192305464b06770643ae864baa87b0fb87fddadeb4f9beb33352940cef63ffd24af8b989e309cd5be5f32eddf62
DIST docker-cli-28.1.1-man.tar.xz 69976 BLAKE2B 497c0874a5ed72c3d2dff6c77b687f012c6a6d4dda67f138e3bf051bf019914efda53d85ffde003e5aea11f849dc199a34b17a1325d439b74e3ccc6f4e324d11 SHA512 06a2e65fe376dcb84474f116f6b2fd04afb6ce5fcd2ed5d3a27e4f7a2f5e849ff0317720936bb75b300ef85eacbf41cd9b9af34345e35c5254ff8c1036e25d7f
DIST docker-cli-28.1.1.tar.gz 7518124 BLAKE2B 2d9a1b620d4cffa718571cef9aa1825b57600630624715ccdae50a1bbcc44821d599ea2f6e6c66628434740904d53218e101f69b4fd0865b4197ef19d9c2d4fe SHA512 39ff5f982779b70311d4fce5f829e52199b058cedf92c0e650786a52004edbf3935f8673db98527affc57f0e33be435f8a8af624c2e06f28c7f8f405ed570746

View File

@ -0,0 +1,74 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 go-module
MY_PV=${PV/_/-}
# update this on every bump
GIT_COMMIT=4eba3773274f9d21ba90ae5bc719c3f1e4bb07a1
# To create the man pages tarball, run the following in the git source
# directory:
#git checkout ${PV}
# make manpages
# tar -acf ${P}-man.tar.xz man/man?
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"
S="${WORKDIR}/cli-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="hardened selinux"
RDEPEND="selinux? ( sec-policy/selinux-docker )"
RESTRICT="installsources strip test"
src_unpack() {
default
cd "${S}"
ln -s vendor.mod go.mod
ln -s vendor.sum go.sum
}
src_prepare() {
default
sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die
}
src_compile() {
export DISABLE_WARN_OUTSIDE_CONTAINER=1
# setup CFLAGS and LDFLAGS for separate build target
# see https://github.com/tianon/docker-overlay/pull/10
CGO_CFLAGS+=" -I${ESYSROOT}/usr/include"
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/docker
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."
}