[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 7/9] docker: make sure debootstrap is at least 1.0.67
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PULL 7/9] docker: make sure debootstrap is at least 1.0.67 |
Date: |
Fri, 9 Sep 2016 13:52:21 +0800 |
From: Sascha Silbe <address@hidden>
debootstrap prior to 1.0.67 generated an empty sources.list during
foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout
if the installed debootstrap version is too old.
[1] https://bugs.debian.org/732255
Signed-off-by: Sascha Silbe <address@hidden>
Message-Id: <address@hidden>
[Update 'sort -C' to 'sorc -c &>/dev/null' - Fam]
Signed-off-by: Fam Zheng <address@hidden>
---
tests/docker/dockerfiles/debian-bootstrap.pre | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre
b/tests/docker/dockerfiles/debian-bootstrap.pre
index 3d9f7f4..1d4f777 100755
--- a/tests/docker/dockerfiles/debian-bootstrap.pre
+++ b/tests/docker/dockerfiles/debian-bootstrap.pre
@@ -3,6 +3,8 @@
# Simple wrapper for debootstrap, run in the docker build context
#
FAKEROOT=`which fakeroot 2> /dev/null`
+# debootstrap < 1.0.67 generates empty sources.list, see Debian#732255
+MIN_DEBOOTSTRAP_VERSION=1.0.67
exit_and_skip()
{
@@ -40,9 +42,17 @@ fi
#
if [ -z $DEBOOTSTRAP_DIR ]; then
+ NEED_DEBOOTSTRAP=false
DEBOOTSTRAP=`which debootstrap 2> /dev/null`
if [ -z $DEBOOTSTRAP ]; then
echo "No debootstrap installed, attempting to install from SCM"
+ NEED_DEBOOTSTRAP=true
+ elif ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; "${DEBOOTSTRAP}" --version \
+ | cut -d ' ' -f 2) | sort -t . -n -k 1,1 -k 2,2 -k 3,3 -c
&>/dev/null; then
+ echo "debootstrap too old, attempting to install from SCM"
+ NEED_DEBOOTSTRAP=true
+ fi
+ if $NEED_DEBOOTSTRAP; then
DEBOOTSTRAP_SOURCE=https://anonscm.debian.org/git/d-i/debootstrap.git
git clone ${DEBOOTSTRAP_SOURCE} ./debootstrap.git
export DEBOOTSTRAP_DIR=./debootstrap.git
--
2.7.4
- [Qemu-devel] [PULL 0/9] Docker patches, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 1/9] docker: Add a glib2-2.22 image, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 2/9] docker.py: don't hang on large docker output, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 3/9] docker: avoid dependency on 'realpath' package, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 4/9] docker: debian-bootstrap.pre: print error messages to stderr, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 5/9] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 6/9] docker: print warning if EXECUTABLE is not set when building debootstrap image, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 7/9] docker: make sure debootstrap is at least 1.0.67,
Fam Zheng <=
- [Qemu-devel] [PULL 9/9] docker: silence debootstrap when --quiet is given, Fam Zheng, 2016/09/09
- [Qemu-devel] [PULL 8/9] docker: build debootstrap after cloning, Fam Zheng, 2016/09/09
- Re: [Qemu-devel] [PULL 0/9] Docker patches, Peter Maydell, 2016/09/09