[Qemu-devel] [RFC PATCH] tests/docker/run: don't source /etc/profile

Alex Bennée posted 1 patch 6 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170926133622.14991-1-alex.bennee@linaro.org
Test checkpatch passed
Test docker passed
Test s390x passed
tests/docker/run | 1 -
1 file changed, 1 deletion(-)
[Qemu-devel] [RFC PATCH] tests/docker/run: don't source /etc/profile
Posted by Alex Bennée 6 years, 6 months ago
The usual behaviour of /etc/profile is to set the default PATH for
users. This runs into problems when we have updated PATH in our
dockerfile e.g. to access a cross-compiler in a non-standard
location. It shouldn't be needed anyway as we inherit the env from the
image when it was setup.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
CC: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/docker/run | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/docker/run b/tests/docker/run
index c8f940de15..b87f8ef03c 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -18,7 +18,6 @@ fi
 BASE="$(dirname $(readlink -e $0))"
 
 # Prepare the environment
-. /etc/profile
 export PATH=/usr/lib/ccache:$PATH
 
 if test -n "$J"; then
-- 
2.14.1


Re: [Qemu-devel] [RFC PATCH] tests/docker/run: don't source /etc/profile
Posted by Philippe Mathieu-Daudé 6 years, 6 months ago
On 09/26/2017 10:36 AM, Alex Bennée wrote:
> The usual behaviour of /etc/profile is to set the default PATH for
> users. This runs into problems when we have updated PATH in our
> dockerfile e.g. to access a cross-compiler in a non-standard
> location. It shouldn't be needed anyway as we inherit the env from the
> image when it was setup.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>   tests/docker/run | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tests/docker/run b/tests/docker/run
> index c8f940de15..b87f8ef03c 100755
> --- a/tests/docker/run
> +++ b/tests/docker/run
> @@ -18,7 +18,6 @@ fi
>   BASE="$(dirname $(readlink -e $0))"
>   
>   # Prepare the environment
> -. /etc/profile
>   export PATH=/usr/lib/ccache:$PATH
>   
>   if test -n "$J"; then
> 

Re: [Qemu-devel] [RFC PATCH] tests/docker/run: don't source /etc/profile
Posted by Fam Zheng 6 years, 6 months ago
On Tue, 09/26 13:17, Philippe Mathieu-Daudé wrote:
> On 09/26/2017 10:36 AM, Alex Bennée wrote:
> > The usual behaviour of /etc/profile is to set the default PATH for
> > users. This runs into problems when we have updated PATH in our
> > dockerfile e.g. to access a cross-compiler in a non-standard
> > location. It shouldn't be needed anyway as we inherit the env from the
> > image when it was setup.
> > 
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Queued, thanks.

Fam