mirror of https://github.com/docker/docs.git
Make release scripts architecture-agnostic and add ARM support
This patch allows to only release the packages that were built and are present under the bundles/ directory instead of assuming packages exist for all distros enumerated in the contrib/builder/ directory. It also now adds support for armhf architecture for apt repositories. Signed-off-by: Tibor Vass <tibor@docker.com> (cherry picked from commit 2ff2e9a73076b737948c68c26f26b7bda5ac7db8) Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
f99fd5a3f9
commit
dab3fc3955
|
@ -14,9 +14,6 @@ set -e
|
|||
#
|
||||
# ... and so on and so forth for the builds created by hack/make/build-deb
|
||||
|
||||
source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
|
||||
source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch"
|
||||
|
||||
: ${DOCKER_RELEASE_DIR:=$DEST}
|
||||
: ${GPG_KEYID:=releasedocker}
|
||||
APTDIR=$DOCKER_RELEASE_DIR/apt/repo
|
||||
|
@ -25,7 +22,7 @@ APTDIR=$DOCKER_RELEASE_DIR/apt/repo
|
|||
mkdir -p "$APTDIR/conf" "$APTDIR/db" "$APTDIR/dists"
|
||||
|
||||
# supported arches/sections
|
||||
arches=( amd64 i386 )
|
||||
arches=( amd64 i386 armhf )
|
||||
|
||||
# Preserve existing components but don't add any non-existing ones
|
||||
for component in main testing experimental ; do
|
||||
|
@ -77,7 +74,7 @@ TreeDefault {
|
|||
};
|
||||
EOF
|
||||
|
||||
for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|
||||
for dir in bundles/$VERSION/build-deb/*/; do
|
||||
version="$(basename "$dir")"
|
||||
suite="${version//debootstrap-}"
|
||||
|
||||
|
@ -98,12 +95,12 @@ APT::FTPArchive::Release::Architectures "${arches[*]}";
|
|||
EOF
|
||||
|
||||
# release the debs
|
||||
for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|
||||
for dir in bundles/$VERSION/build-deb/*/; do
|
||||
version="$(basename "$dir")"
|
||||
codename="${version//debootstrap-}"
|
||||
|
||||
tempdir="$(mktemp -d /tmp/tmp-docker-release-deb.XXXXXXXX)"
|
||||
DEBFILE=( "bundles/$VERSION/build-deb/$version/docker-engine"*.deb )
|
||||
DEBFILE=( "$dir/docker-engine"*.deb )
|
||||
|
||||
# add the deb for each component for the distro version into the
|
||||
# pool (if it is not there already)
|
||||
|
@ -128,7 +125,9 @@ for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|
|||
|
||||
# build the right directory structure, needed for apt-ftparchive
|
||||
for arch in "${arches[@]}"; do
|
||||
mkdir -p "$APTDIR/dists/$codename/$component/binary-$arch"
|
||||
for c in "${components[@]}"; do
|
||||
mkdir -p "$APTDIR/dists/$codename/$c/binary-$arch"
|
||||
done
|
||||
done
|
||||
|
||||
# update the filelist for this codename/component
|
||||
|
@ -139,7 +138,7 @@ done
|
|||
# run the apt-ftparchive commands so we can have pinning
|
||||
apt-ftparchive generate "$APTDIR/conf/apt-ftparchive.conf"
|
||||
|
||||
for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|
||||
for dir in bundles/$VERSION/build-deb/*/; do
|
||||
version="$(basename "$dir")"
|
||||
codename="${version//debootstrap-}"
|
||||
|
||||
|
|
|
@ -14,16 +14,10 @@ set -e
|
|||
#
|
||||
# ... and so on and so forth for the builds created by hack/make/build-rpm
|
||||
|
||||
source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
|
||||
source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch"
|
||||
|
||||
: ${DOCKER_RELEASE_DIR:=$DEST}
|
||||
YUMDIR=$DOCKER_RELEASE_DIR/yum/repo
|
||||
: ${GPG_KEYID:=releasedocker}
|
||||
|
||||
# manage the repos for each distribution separately
|
||||
distros=( fedora centos opensuse oraclelinux )
|
||||
|
||||
# get the release
|
||||
release="main"
|
||||
|
||||
|
@ -35,14 +29,13 @@ if [ $DOCKER_EXPERIMENTAL ] || [[ "$VERSION" == *-dev ]] || [ -n "$(git status -
|
|||
release="experimental"
|
||||
fi
|
||||
|
||||
for distro in "${distros[@]}"; do
|
||||
# Setup the yum repo
|
||||
REPO=$YUMDIR/$release/$distro
|
||||
|
||||
for dir in contrib/builder/rpm/${PACKAGE_ARCH}/$distro-*/; do
|
||||
for dir in bundles/$VERSION/build-rpm/*/; do
|
||||
version="$(basename "$dir")"
|
||||
suite="${version##*-}"
|
||||
|
||||
REPO=$YUMDIR/$release/$suite
|
||||
|
||||
# if the directory does not exist, initialize the yum repo
|
||||
if [[ ! -d $REPO/$suite/Packages ]]; then
|
||||
mkdir -p "$REPO/$suite/Packages"
|
||||
|
@ -75,4 +68,3 @@ for distro in "${distros[@]}"; do
|
|||
# update the repo
|
||||
createrepo --pretty --update "$REPO/$suite"
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue