qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: disallow spaces and colons in source


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] configure: disallow spaces and colons in source path
Date: Fri, 15 Mar 2019 18:40:02 +0000

On Fri, 15 Mar 2019 at 18:26, Antonio Ospite <address@hidden> wrote:
>
> From: Antonio Ospite <address@hidden>
>
> The configure script breaks when the qemu source directory is in a path
> containing white spaces, in particular the list of targets is not
> correctly generated when calling "./configure --help".
>
> To avoid this issue, refuse to run the configure script if there are
> spaces or colons in the source path, this is also what kbuild from linux
> does.
>
> Buglink: https://bugs.launchpad.net/qemu/+bug/1817345
>
> Signed-off-by: Antonio Ospite <address@hidden>

Hi Antonio; thanks for this patch.

> ---
>  configure | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/configure b/configure
> index 7071f52584..fbd70a0f51 100755
> --- a/configure
> +++ b/configure
> @@ -295,6 +295,11 @@ libs_qga=""
>  debug_info="yes"
>  stack_protector=""
>
> +if printf "%s" "$(realpath "$source_path")" | grep -q "[[:space:]:]";
> +then
> +  error_exit "main directory cannot contain spaces nor colons"
> +fi
> +

If you do this after the point where we make the source path absolute, you
can skip the realpath (which avoids the problem that 'realpath' doesn't exist
on OSX by default). It will also then be after the handling of the
--source-path option argument.

Do we also need to check for spaces in the path of the build directory
(which is always the current working directory of the script) ?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]