On Mon, 2012-05-14 at 08:41 -0400, Dmitri Pal wrote:
foo.conf is no different that other test config files that reside in
the ini.d directory. I do not understand why the change needed for one
and not for the others. Can you please elaborate?
Foo.conf is a special case. It's the only file whose specific file
permissions are tested during the unit test run. This causes issues when
running tests in 'make distcheck' because of a peculiarity in the design
of distcheck.
One of the tests that distcheck performs is to ensure that no part of
the build process modifies the $srcdir. Distcheck takes the following
steps:
1) run 'make dist'
2) Untar the new tarball into a fresh location (this is to ensure that
all files needed for the build have been properly added to the tarball)
3) Change to the new untarred location and run 'chmod -R a-w'. This
makes EVERY file in the checkout unwritable, by changing its
permissions. This means that if something in the build tries to modify
these files, the build will fail (and you'll have to go figure out why
you're trying to modify files in $srcdir instead of $builddir).
3) Now it runs 'make all' and 'make check' and 'make
DESTDIR=tmplocation
install' to verify that those all work without issue.
Foo.conf isn't modified, but it DOES need to have a set of specific
permissions in order for its test to succeed. So in order to avoid
having 'make distcheck' alter them on us, we rig up the build system so
it copies foo.conf into the $builddir and uses it from there (where it's
safe from the 'chmod -R a-w'). Thus, we are able to properly validate
it.