[augeas-devel] [PATCH] Remove some absolute paths for binaries.

David Lutterkort dlutter at redhat.com
Tue May 27 05:21:09 UTC 2008


On Fri, 2008-05-23 at 22:10 +0200, Jim Meyering wrote:
> Not really necessary, but worthwhile in the long run,
> this hoists from tests/* into one place (tests/Makefile.am)
> the knowledge that the tools under test reside in $(abs_top_builddir)/src.

Hmmm ... I like this, in general; the one nit I have with this is that I
run those tests individually from the command line quite a bit (i.e.,
just ./tests/test-lenses.sh etc.) - that's why they have the checks for
whether top_srcdir/top_builddir is set at the top and otherwise find
augtool/augparse relative to their own location. Any suggestion on how
best to restore that behavior while using your patch ? Or am I just
missing something obvious about the generated Makefile targets that
would let me run test-lenses.sh by itself through make ?

> [Currently, we have this:
> 
>     $ ./augtool foo
>     Unknown command 'foo'
> 
>  What do you think of making augtool emit the conventional prefix:
> 
>     $ augtool foo
>     augtool: Unknown command 'foo'
> ]

Yeah, that should definitely be done.

> Oh!  I've just noticed that the existing uses of $(abs_top_builddir)
> were not quoted.  That's asking for trouble with a meta-character-
> containing build directory name...  potentially even a security
> risk, in pathological cases.

That's indeed bad.

David





More information about the augeas-devel mailing list