|
@@ -23,7 +23,29 @@ mkdir -p "$APTDIR/conf" "$APTDIR/db"
|
|
|
|
|
|
# supported arches/sections
|
|
# supported arches/sections
|
|
arches=( amd64 i386 )
|
|
arches=( amd64 i386 )
|
|
-components=( main testing experimental )
|
|
|
|
|
|
+
|
|
|
|
+# Preserve existing components but don't add any non-existing ones
|
|
|
|
+for component in main testing experimental ; do
|
|
|
|
+ if ls "$APTDIR/dists/*/$component" >/dev/null 2>&1 ; then
|
|
|
|
+ components+=( $component )
|
|
|
|
+ fi
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+# set the component for the version being released
|
|
|
|
+component="main"
|
|
|
|
+
|
|
|
|
+if [[ "$VERSION" == *-rc* ]]; then
|
|
|
|
+ component="testing"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+if [ "$DOCKER_EXPERIMENTAL" ] || [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then
|
|
|
|
+ component="experimental"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# Make sure our component is in the list of components
|
|
|
|
+if [[ ! "${components[*]}" =~ $component ]] ; then
|
|
|
|
+ components+=( $component )
|
|
|
|
+fi
|
|
|
|
|
|
# create/update apt-ftparchive file
|
|
# create/update apt-ftparchive file
|
|
if [ ! -f "$APTDIR/conf/apt-ftparchive.conf" ]; then
|
|
if [ ! -f "$APTDIR/conf/apt-ftparchive.conf" ]; then
|
|
@@ -53,7 +75,7 @@ if [ ! -f "$APTDIR/conf/apt-ftparchive.conf" ]; then
|
|
for suite in $(exec contrib/reprepro/suites.sh); do
|
|
for suite in $(exec contrib/reprepro/suites.sh); do
|
|
cat <<-EOF
|
|
cat <<-EOF
|
|
Tree "dists/${suite}" {
|
|
Tree "dists/${suite}" {
|
|
- Sections "main testing experimental";
|
|
|
|
|
|
+ Sections "${components[*]}";
|
|
Architectures "${arches[*]}";
|
|
Architectures "${arches[*]}";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -70,17 +92,6 @@ if [ ! -f "$APTDIR/conf/docker-engine-release.conf" ]; then
|
|
EOF
|
|
EOF
|
|
fi
|
|
fi
|
|
|
|
|
|
-# set the component for the version being released
|
|
|
|
-component="main"
|
|
|
|
-
|
|
|
|
-if [[ "$VERSION" == *-rc* ]]; then
|
|
|
|
- component="testing"
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
-if [ $DOCKER_EXPERIMENTAL ] || [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then
|
|
|
|
- component="experimental"
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
# release the debs
|
|
# release the debs
|
|
for dir in contrib/builder/deb/*/; do
|
|
for dir in contrib/builder/deb/*/; do
|
|
version="$(basename "$dir")"
|
|
version="$(basename "$dir")"
|
|
@@ -91,7 +102,7 @@ for dir in contrib/builder/deb/*/; do
|
|
# if we have a $GPG_PASSPHRASE we may as well
|
|
# if we have a $GPG_PASSPHRASE we may as well
|
|
# dpkg-sign before copying the deb into the pool
|
|
# dpkg-sign before copying the deb into the pool
|
|
if [ ! -z "$GPG_PASSPHRASE" ]; then
|
|
if [ ! -z "$GPG_PASSPHRASE" ]; then
|
|
- dpkg-sig -g "--passphrase $GPG_PASSPHRASE" \
|
|
|
|
|
|
+ dpkg-sig -g "--no-tty --passphrase '$GPG_PASSPHRASE'" \
|
|
-k "$GPG_KEYID" --sign builder "${DEBFILE[@]}"
|
|
-k "$GPG_KEYID" --sign builder "${DEBFILE[@]}"
|
|
fi
|
|
fi
|
|
|
|
|
|
@@ -100,6 +111,7 @@ for dir in contrib/builder/deb/*/; do
|
|
cp "${DEBFILE[@]}" "$APTDIR/pool/$component/d/docker-engine/"
|
|
cp "${DEBFILE[@]}" "$APTDIR/pool/$component/d/docker-engine/"
|
|
|
|
|
|
# update the filelist for this codename/component
|
|
# update the filelist for this codename/component
|
|
|
|
+ mkdir -p "$APTDIR/dists/$codename/$component"
|
|
find "$APTDIR/pool/$component" \
|
|
find "$APTDIR/pool/$component" \
|
|
-name *~${codename#*-}*.deb > "$APTDIR/dists/$codename/$component/filelist"
|
|
-name *~${codename#*-}*.deb > "$APTDIR/dists/$codename/$component/filelist"
|
|
done
|
|
done
|
|
@@ -122,6 +134,7 @@ for dir in contrib/builder/deb/*/; do
|
|
"$APTDIR/dists/$codename" > "$APTDIR/dists/$codename/Release"
|
|
"$APTDIR/dists/$codename" > "$APTDIR/dists/$codename/Release"
|
|
|
|
|
|
for arch in "${arches[@]}"; do
|
|
for arch in "${arches[@]}"; do
|
|
|
|
+ mkdir -p "$APTDIR/dists/$codename/$component/binary-$arch"
|
|
apt-ftparchive \
|
|
apt-ftparchive \
|
|
-o "APT::FTPArchive::Release::Codename=$codename" \
|
|
-o "APT::FTPArchive::Release::Codename=$codename" \
|
|
-o "APT::FTPArchive::Release::Suite=$codename" \
|
|
-o "APT::FTPArchive::Release::Suite=$codename" \
|