app-emulation: Move docker packages to app-containers

This commit moves containerd, cri-tools, docker, docker-cli and
docker-proxy from app-emulation to app-containers.

Also move app-emulation/docker-runc to app-containers as runc. The
docker-runc name seems to be an artifact from the older versions of
docker, where it needed to use a fork of runc instead of upstream. But
now, docker-runc was actually using upstream code, so simplify the
name now.

Adapt all the other files to the new package names.
This commit is contained in:
Krzesimir Nowak 2023-05-31 16:11:25 +02:00
parent e6700fcc5c
commit fba00ac4fc
41 changed files with 46 additions and 51 deletions

View File

@ -13,7 +13,7 @@ fi
pushd "${SDK_OUTER_OVERLAY}"
VERSION_OLD=$(sed -n "s/^DIST containerd-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-emulation/containerd/Manifest | sort -ruV | head -n1)
VERSION_OLD=$(sed -n "s/^DIST containerd-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-containers/containerd/Manifest | sort -ruV | head -n1)
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
echo "already the latest Containerd, nothing to do"
exit 0
@ -21,15 +21,15 @@ fi
# we need to update not only the main ebuild file, but also its CONTAINERD_COMMIT,
# which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream containerd.
containerdEbuildOldSymlink=$(get_ebuild_filename app-emulation/containerd "${VERSION_OLD}")
containerdEbuildNewSymlink="app-emulation/containerd/containerd-${VERSION_NEW}.ebuild"
containerdEbuildMain="app-emulation/containerd/containerd-9999.ebuild"
containerdEbuildOldSymlink=$(get_ebuild_filename app-containers/containerd "${VERSION_OLD}")
containerdEbuildNewSymlink="app-containers/containerd/containerd-${VERSION_NEW}.ebuild"
containerdEbuildMain="app-containers/containerd/containerd-9999.ebuild"
git mv "${containerdEbuildOldSymlink}" "${containerdEbuildNewSymlink}"
sed -i "s/CONTAINERD_COMMIT=\"\(.*\)\"/CONTAINERD_COMMIT=\"${COMMIT_HASH}\"/g" "${containerdEbuildMain}"
sed -i "s/v${VERSION_OLD}/v${VERSION_NEW}/g" "${containerdEbuildMain}"
DOCKER_VERSION=$(sed -n "s/^DIST docker-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-emulation/docker/Manifest | sort -ruV | head -n1)
DOCKER_VERSION=$(sed -n "s/^DIST docker-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-containers/docker/Manifest | sort -ruV | head -n1)
# torcx ebuild file has a docker version with only major and minor versions, like 19.03.
versionTorcx=${DOCKER_VERSION%.*}
torcxEbuildFile=$(get_ebuild_filename app-torcx/docker "${versionTorcx}")
@ -41,7 +41,7 @@ URL="https://github.com/containerd/containerd/releases/tag/v${VERSION_NEW}"
generate_update_changelog 'containerd' "${VERSION_NEW}" "${URL}" 'containerd'
commit_changes app-emulation/containerd "${VERSION_OLD}" "${VERSION_NEW}" \
commit_changes app-containers/containerd "${VERSION_OLD}" "${VERSION_NEW}" \
app-torcx/docker
cleanup_repo

View File

@ -13,7 +13,7 @@ fi
pushd "${SDK_OUTER_OVERLAY}"
VERSION_OLD=$(sed -n "s/^DIST docker-\([0-9]*.[0-9]*.[0-9]*\).*/\1/p" app-emulation/docker/Manifest | sort -ruV | head -n1)
VERSION_OLD=$(sed -n "s/^DIST docker-\([0-9]*.[0-9]*.[0-9]*\).*/\1/p" app-containers/docker/Manifest | sort -ruV | head -n1)
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
echo "already the latest Docker, nothing to do"
exit 0
@ -21,14 +21,14 @@ fi
# we need to update not only the main ebuild file, but also its DOCKER_GITCOMMIT,
# which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream docker-ce.
dockerEbuildOld=$(get_ebuild_filename app-emulation/docker "${VERSION_OLD}")
dockerEbuildNew="app-emulation/docker/docker-${VERSION_NEW}.ebuild"
dockerEbuildOld=$(get_ebuild_filename app-containers/docker "${VERSION_OLD}")
dockerEbuildNew="app-containers/docker/docker-${VERSION_NEW}.ebuild"
git mv "${dockerEbuildOld}" "${dockerEbuildNew}"
sed -i "s/GIT_COMMIT=\(.*\)/GIT_COMMIT=${COMMIT_HASH_MOBY}/g" "${dockerEbuildNew}"
sed -i "s/v${VERSION_OLD}/v${VERSION_NEW}/g" "${dockerEbuildNew}"
cliEbuildOld=$(get_ebuild_filename app-emulation/docker-cli "${VERSION_OLD}")
cliEbuildNew="app-emulation/docker-cli/docker-cli-${VERSION_NEW}.ebuild"
cliEbuildOld=$(get_ebuild_filename app-containers/docker-cli "${VERSION_OLD}")
cliEbuildNew="app-containers/docker-cli/docker-cli-${VERSION_NEW}.ebuild"
git mv "${cliEbuildOld}" "${cliEbuildNew}"
sed -i "s/GIT_COMMIT=\(.*\)/GIT_COMMIT=${COMMIT_HASH_CLI}/g" "${cliEbuildNew}"
sed -i "s/v${VERSION_OLD}/v${VERSION_NEW}/g" "${cliEbuildNew}"
@ -39,9 +39,9 @@ torcxEbuildFile=$(get_ebuild_filename app-torcx/docker "${versionTorcx}")
sed -i "s/docker-${VERSION_OLD}/docker-${VERSION_NEW}/g" "${torcxEbuildFile}"
sed -i "s/docker-cli-${VERSION_OLD}/docker-cli-${VERSION_NEW}/g" "${torcxEbuildFile}"
# update also docker versions used by the current docker-runc ebuild file.
versionRunc=$(sed -n "s/^DIST docker-runc-\([0-9]*.[0-9]*.*\)\.tar.*/\1/p" app-emulation/docker-runc/Manifest | sort -ruV | head -n1)
runcEbuildFile=$(get_ebuild_filename app-emulation/docker-runc "${versionRunc}")
# update also docker versions used by the current runc ebuild file.
versionRunc=$(sed -n "s/^DIST runc-\([0-9]*.[0-9]*.*\)\.tar.*/\1/p" app-containers/runc/Manifest | sort -ruV | head -n1)
runcEbuildFile=$(get_ebuild_filename app-containers/runc "${versionRunc}")
sed -i "s/github.com\/docker\/docker-ce\/blob\/v${VERSION_OLD}/github.com\/docker\/docker-ce\/blob\/v${VERSION_NEW}/g" ${runcEbuildFile}
popd
@ -60,11 +60,11 @@ URL="https://docs.docker.com/engine/release-notes/${URLSUBFOLDER}/#${URLVERSION}
generate_update_changelog 'Docker' "${VERSION_NEW}" "${URL}" 'docker'
regenerate_manifest app-emulation/docker-cli "${VERSION_NEW}"
commit_changes app-emulation/docker "${VERSION_OLD}" "${VERSION_NEW}" \
app-emulation/docker-cli \
regenerate_manifest app-containers/docker-cli "${VERSION_NEW}"
commit_changes app-containers/docker "${VERSION_OLD}" "${VERSION_NEW}" \
app-containers/docker-cli \
app-torcx/docker \
app-emulation/docker-runc
app-containers/runc
cleanup_repo

View File

@ -19,27 +19,27 @@ pushd "${SDK_OUTER_OVERLAY}"
# underscore and replace other underscores with dots again, so that
# sort -V can properly sort "1.0.0" as newer than "1.0.0-rc95" and
# "0.0.2.1" as newer than "0.0.2".
VERSION_OLD=$(sed -n "s/^DIST docker-runc-\([0-9]*\.[0-9]*.*\)\.tar.*/\1_/p" app-emulation/docker-runc/Manifest | tr '.' '_' | sort -ruV | sed -e 's/_$//' | tr '_' '.' | head -n1)
VERSION_OLD=$(sed -n "s/^DIST runc-\([0-9]*\.[0-9]*.*\)\.tar.*/\1_/p" app-containers/runc/Manifest | tr '.' '_' | sort -ruV | sed -e 's/_$//' | tr '_' '.' | head -n1)
if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then
echo "already the latest Runc, nothing to do"
exit 0
fi
runcEbuildOld=$(get_ebuild_filename app-emulation/docker-runc "${VERSION_OLD}")
runcEbuildNew="app-emulation/docker-runc/docker-runc-${VERSION_NEW}.ebuild"
runcEbuildOld=$(get_ebuild_filename app-containers/runc "${VERSION_OLD}")
runcEbuildNew="app-containers/runc/runc-${VERSION_NEW}.ebuild"
git mv "${runcEbuildOld}" "${runcEbuildNew}"
sed -i "s/${VERSION_OLD}/${VERSION_NEW}/g" "${runcEbuildNew}"
sed -i "s/COMMIT_ID=\"\(.*\)\"/COMMIT_ID=\"${COMMIT_HASH}\"/g" "${runcEbuildNew}"
# update also runc versions used by docker and containerd
sed -i "s/docker-runc-${VERSION_OLD}/docker-runc-${VERSION_NEW}/g" app-emulation/containerd/containerd-9999.ebuild
sed -i "s/runc-${VERSION_OLD}/runc-${VERSION_NEW}/g" app-containers/containerd/containerd-9999.ebuild
dockerVersion=$(sed -n "s/^DIST docker-\([0-9]*.[0-9]*.[0-9]*\).*/\1/p" app-emulation/docker/Manifest | sort -ruV | head -n1)
dockerVersion=$(sed -n "s/^DIST docker-\([0-9]*.[0-9]*.[0-9]*\).*/\1/p" app-containers/docker/Manifest | sort -ruV | head -n1)
# torcx ebuild file has a docker version with only major and minor versions, like 19.03.
versionTorcx=${dockerVersion%.*}
torcxEbuildFile=$(get_ebuild_filename app-torcx/docker "${versionTorcx}")
sed -i "s/docker-runc-${VERSION_OLD}/docker-runc-${VERSION_NEW}/g" "${torcxEbuildFile}"
sed -i "s/runc-${VERSION_OLD}/runc-${VERSION_NEW}/g" "${torcxEbuildFile}"
popd
@ -47,8 +47,8 @@ URL="https://github.com/opencontainers/runc/releases/tag/v${VERSION_NEW}"
generate_update_changelog 'runc' "${VERSION_NEW}" "${URL}" 'runc'
commit_changes app-emulation/docker-runc "${VERSION_OLD}" "${VERSION_NEW}" \
app-emulation/containerd \
commit_changes app-containers/runc "${VERSION_OLD}" "${VERSION_NEW}" \
app-containers/containerd \
app-torcx/docker
cleanup_repo

View File

@ -29,7 +29,7 @@ FLAGS_HELP="USAGE: build_docker_aci [flags] [docker version] [aci version number
This script is used to build a CoreOS docker-skim ACI.
The docker version should identify an existent ebuild (i.e.
app-emulation/docker-\$version).
app-containers/docker-\$version).
The aci version number is an atomically incrementing number that will be
appended to the aci version (to create e.g. :v1.12.6_coreos.0).
@ -98,7 +98,7 @@ case "${version}" in
)
ebuild_aci_create "users.developer.core-os.net/skim/docker" \
"coreos_docker-${BOARD}-${version}_coreos.${aci_version}" \
"app-emulation/docker" \
"app-containers/docker" \
"${version}" \
"${aci_version}" \
"${packaged_files[@]}"

View File

@ -29,7 +29,7 @@ SLOT="0"
IUSE="+btrfs hardened"
DEPEND="btrfs? ( sys-fs/btrfs-progs )"
RDEPEND="~app-emulation/docker-runc-1.1.7
RDEPEND="~app-containers/runc-1.1.7
sys-libs/libseccomp"
S=${WORKDIR}/${P}/src/${COREOS_GO_PACKAGE}

View File

@ -20,7 +20,7 @@ SLOT="0"
KEYWORDS="amd64 arm64"
IUSE="hardened"
RDEPEND="!<app-emulation/docker-20.10.1"
RDEPEND="!<app-containers/docker-20.10.1"
RESTRICT="installsources strip"

View File

@ -47,7 +47,6 @@ DEPEND+="
# for appropriate branchch/version of course
# Flatcar:
# containerd ebuild doesn't support apparmor, device-mapper and seccomp use flags
# use the old category app-emulation instead of app-containers for containerd, docker-proxy and docker-cli
RDEPEND="
${DEPEND}
>=net-firewall/iptables-1.4
@ -55,9 +54,9 @@ RDEPEND="
>=dev-vcs/git-1.7
>=app-arch/xz-utils-4.9
dev-libs/libltdl
>=app-emulation/containerd-1.6.16[btrfs?]
~app-emulation/docker-proxy-0.8.0_p20230118
cli? ( ~app-emulation/docker-cli-${PV} )
>=app-containers/containerd-1.6.16[btrfs?]
~app-containers/docker-proxy-0.8.0_p20230118
cli? ( ~app-containers/docker-cli-${PV} )
container-init? ( >=sys-process/tini-0.19.0[static] )
selinux? ( sec-policy/selinux-docker )
"
@ -306,19 +305,15 @@ pkg_postinst() {
ewarn "Starting with docker 20.10.2, docker has been split into"
ewarn "two packages upstream, so Gentoo has followed suit."
ewarn
# Flatcar: We still use the old app-emulation category,
# instead of app-containers.
ewarn "app-emulation/docker contains the daemon and"
ewarn "app-emulation/docker-cli contains the docker command."
ewarn "app-containers/docker contains the daemon and"
ewarn "app-containers/docker-cli contains the docker command."
ewarn
ewarn "docker currently installs docker-cli using the cli use flag."
ewarn
ewarn "This use flag is temporary, so you need to take the"
ewarn "following actions:"
ewarn
# Flatcar: We still use the old app-emulation category,
# instead of app-containers.
ewarn "First, disable the cli use flag for app-emulation/docker"
ewarn "First, disable the cli use flag for app-containers/docker"
ewarn
ewarn "Then, if you need docker-cli and docker on the same machine,"
ewarn "run the following command:"

View File

@ -0,0 +1 @@
DIST runc-1.1.7.tar.gz 2513930 BLAKE2B 9135f65d6e8dea69fcf648b3910ab7b647ba0d96fb0763c4634a6248a276bc687915161dbafc302b13097832604f239e039818833751524c0bc5799848f161cc SHA512 aa24b14779a1363758cae470f20632f4fac3bd9c63736125631fe34a7ef4462365cbf196465e6e495c7b3203759494fb2a28ef558456dfa124ad8fc4e0709fff

View File

@ -41,7 +41,7 @@ PATCHES=(
)
src_compile() {
# Taken from app-emulation/docker-1.7.0-r1
# Taken from app-containers/docker-1.7.0-r1
export CGO_CFLAGS="-I${SYSROOT}/usr/include"
export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
-L${SYSROOT}/usr/$(get_libdir)"

View File

@ -1 +0,0 @@
DIST docker-runc-1.1.7.tar.gz 2513930 BLAKE2B 9135f65d6e8dea69fcf648b3910ab7b647ba0d96fb0763c4634a6248a276bc687915161dbafc302b13097832604f239e039818833751524c0bc5799848f161cc SHA512 aa24b14779a1363758cae470f20632f4fac3bd9c63736125631fe34a7ef4462365cbf196465e6e495c7b3203759494fb2a28ef558456dfa124ad8fc4e0709fff

View File

@ -11,11 +11,11 @@ KEYWORDS="amd64 arm64"
# Explicitly list all packages that will be built into the image.
RDEPEND="
~app-emulation/docker-20.10.24
~app-emulation/docker-cli-20.10.24
~app-emulation/containerd-1.6.21
~app-emulation/docker-proxy-0.8.0_p20230118
~app-emulation/docker-runc-1.1.7
~app-containers/docker-20.10.24
~app-containers/docker-cli-20.10.24
~app-containers/containerd-1.6.21
~app-containers/docker-proxy-0.8.0_p20230118
~app-containers/runc-1.1.7
~dev-libs/libltdl-2.4.7
~sys-process/tini-0.19.0
"

View File

@ -105,7 +105,7 @@ RDEPEND="${RDEPEND}
app-crypt/tpmpolicy
app-editors/vim
app-emulation/actool
app-emulation/cri-tools
app-containers/cri-tools
app-misc/ca-certificates
app-misc/jq
app-misc/pax-utils

View File

@ -93,8 +93,8 @@ sys-apps/coreutils selinux
# Enable SELinux for tar
app-arch/tar selinux
# Enable SELinux for docker-runc
app-emulation/docker-runc selinux
# Enable SELinux for runc
app-containers/runc selinux
# enable regular expression processing in jq
app-misc/jq oniguruma