overlay app-containers/docker-cli: Temporarily override portage-stable package

This is to pick up 24.0.9 ourselves. We can switch back to Gentoo
package when Gentoo catches up.
This commit is contained in:
Krzesimir Nowak 2024-02-06 09:55:34 +01:00
parent 3988570101
commit 6980a6a187
4 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST docker-cli-24.0.9.tar.gz 6455296 BLAKE2B f0afa96e8bab29caf1a06d3a1996c60d501b5d4b779fdcdf2f86387f231a9b0653bc23d277d4abdfa404829a2990b4d8a7efb9f81ff792beadf376468de17cb6 SHA512 7abfbf593783ffaadf84461b7e6dcbef7fbb857166721ba8004531212a231f4630a747c09ef8a3a5cf119861c51465ba3d5bc4b63f0e4d76936fd3b1baff530f

View File

@ -0,0 +1 @@
This is a temporary overlay over portage-stable until Gentoo catches up with package versions.

View File

@ -0,0 +1,77 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
GIT_COMMIT=2936816130
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"
# Flatcar: Drop man pages, we don't have them generated, and we don't
# even put them in production images.
#
# 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"
RESTRICT="installsources strip test"
S="${WORKDIR}/${P}/src/${EGO_PN}"
src_unpack() {
golang-vcs-snapshot_src_unpack
set -- ${A}
# Flatcar: drop man pages
#
# 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
# Flatcar: drop man pages
#
# 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."
}

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
<maintainer type="person">
<email>gyakovlev@gentoo.org</email>
<name>Georgy Yakovlev</name>
</maintainer>
<upstream>
<remote-id type="github">docker/cli</remote-id>
<remote-id type="cpe">cpe:/a:docker:command_line_interface</remote-id>
</upstream>
</pkgmetadata>