All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Sascha Silbe <silbe@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 6/8] docker: make sure debootstrap is at least 1.0.67
Date: Wed, 7 Sep 2016 10:12:10 +0800	[thread overview]
Message-ID: <20160907021210.GC30281@lemon> (raw)
In-Reply-To: <1473192351-601-7-git-send-email-silbe@linux.vnet.ibm.com>

On Tue, 09/06 22:05, Sascha Silbe wrote:
> 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 <silbe@linux.vnet.ibm.com>
> ---
> v2→v3:
>   - fix unbalanced white space around pipes
>   - replaced GNU-specific version sort option with POSIX compliant set
>     of options
> 
>  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..ee69e89 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; then

Like -V, -C is not available on OSX either. Maybe use "-c"? If so, I can fix it
when applying.

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sort.1.html

Fam

> +        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
> -- 
> 1.9.1
> 
> 

  reply	other threads:[~2016-09-07  2:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 20:05 [Qemu-devel] [PATCH v3 0/8] docker tests fixes Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 1/8] docker.py: don't hang on large docker output Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 2/8] docker: avoid dependency on 'realpath' package Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 3/8] docker: debian-bootstrap.pre: print error messages to stderr Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 4/8] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 5/8] docker: print warning if EXECUTABLE is not set when building debootstrap image Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 6/8] docker: make sure debootstrap is at least 1.0.67 Sascha Silbe
2016-09-07  2:12   ` Fam Zheng [this message]
2016-09-07 12:10     ` Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 7/8] docker: build debootstrap after cloning Sascha Silbe
2016-09-06 20:05 ` [Qemu-devel] [PATCH v3 8/8] docker: silence debootstrap when --quiet is given Sascha Silbe
2016-09-08 11:58 ` [Qemu-devel] [PATCH v3 0/8] docker tests fixes Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160907021210.GC30281@lemon \
    --to=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=silbe@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.