[ovs-dev] [PATCH] testsuite: work around patch bug

Gurucharan Shetty shettyg at nicira.com
Wed Apr 8 19:21:13 UTC 2015


On Wed, Apr 8, 2015 at 9:35 AM, Flavio Leitner <fbl at redhat.com> wrote:
> Due to a CVE bug, the patch was modified to not allow following
> symlinks out of the workdir.  However, this causes a bug when
> there is a regular file out of the workdir which breaks the current
> testsuite build.
>
> Steps to reproduce:
>   ./boot.sh
>   mkdir _gcc && cd _gcc
>   ../configure
I probably did not understand the bug description very well. Is there
any reason not to use '../configure --srcdir=../ '. Doesn't that work?

>   make
>   [...]
>   /bin/sh /home/fleitner/ovs/testsuite/build-aux/missing autom4te
>   --language=autotest -I '..' -o ../tests/testsuite.tmp
>   ../tests/testsuite.at
>   patch -p0 ../tests/testsuite.tmp ../tests/testsuite.patch
>   Invalid file name ../tests/testsuite.tmp -- skipping patch
>   Makefile:5155: recipe for target '../tests/testsuite' failed
>   make[2]: *** [../tests/testsuite] Error 1
>   make[2]: Leaving directory
>   '/home/fleitner/NetworkingServices/openvswitch/repo/testsuite/_gcc'
>   Makefile:4087: recipe for target 'all-recursive' failed
>   make[1]: *** [all-recursive] Error 1
>
> Since it's just a temporary file, this patch changes to use the
> workdir as the place to put the file.
>
> Signed-off-by: Flavio Leitner <fbl at redhat.com>
> ---
>  tests/automake.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/automake.mk b/tests/automake.mk
> index c691cf9..fdc3118 100644
> --- a/tests/automake.mk
> +++ b/tests/automake.mk
> @@ -200,9 +200,9 @@ clean-local:
>
>  AUTOTEST = $(AUTOM4TE) --language=autotest
>  $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) $(TESTSUITE_PATCH)
> -       $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
> -       patch -p0 $@.tmp $(TESTSUITE_PATCH)
> -       $(AM_V_at)mv $@.tmp $@
> +       $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o testsuite.tmp $@.at
> +       patch -p0 testsuite.tmp $(TESTSUITE_PATCH)
> +       $(AM_V_at)mv testsuite.tmp $@
>
>  $(KMOD_TESTSUITE): package.m4 $(KMOD_TESTSUITE_AT) $(COMMON_MACROS_AT)
>         $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
> --
> 2.1.0
>



More information about the dev mailing list