On Apr 30, 2012, at 18:43 , Paul Davis wrote: > On Mon, Apr 30, 2012 at 11:35 AM, Jan Lehnardt <[email protected]> wrote: >> >> On Apr 30, 2012, at 17:26 , Paul Davis wrote: >> >>> This series of commits confuses me greatly. >> >> Sorry. >> >>> There are a lot of reverts >> >> The sequence is this: >> >> You added chmod +w. >> I reverted chmod +w. >> I accidentally added chmod +w, but called it "Revert" (i.e. this commit >> should never have been pushed) >> I reverted the previous commit, effectively removing chmod +w, adding >> another "Revert" for funsies. >> > > Ahh, gotchya. :D > >>> and the explanation of it breaking compilation from read only media is >>> incorrect. >> >> Why is the explanation incorrect? >> > > VPATH builds have a read-only source directory and a read/writable > build directory. The source directory must remain read only. Any build > products can be writable. local_dev.ini is a build product (albeit a > very simple build). In our normal non-VPATH builds we rely on > local.ini (the "source" of the local_dev.ini build product) to have > correct permissions when local_dev.ini is created (because it copies > them) so that tests and ./utils/run work correctly. > > When we run the VPATH build, it creates a read-only version of > local.ini which then ends up affecting the file permissions of > local_dev.ini which is built in the build directory. This is a bug in > that we don't explicitly specify the permissions of local_dev.ini, > hence the chmod. This is perfectly acceptable because local_dev.ini is > built in the build directory where files can be writable. > >>> This file should be writable or ./utils/run in a VPATH build can't >>> edit its configuration which is incorrect. >> >> Then we can't use utils/run to start CouchDB to run the JS tests against in >> make [dist]check. What alternative would you recommend? >> > > We can. It works. You can tell because make distcheck works when > local_dev.ini is writable. > >> >>> Also it breaks the tests. >> >> Yes, as I said in the previous mail, I'm trying find a fix that doesn't >> require writing to local_dev.ini when running the tests. >> > > I had the same impulse at first. But then I realized that we do in > fact want local_dev.ini to be writable regardless of what this test > does. We could be super pure and never change the configuration for > unit tests in which case I would say keep looking for a solution if > you're so inclined. Regardless of whether we find a solution > local_dev.ini should remain writable because normal operation requires > the last file of the configuration chain to be writable. Making > local_dev.ini read-only is forcing make dev to produce a broken > development environment. > > Also, it occurs to me that a solution to make it more pure would be to > just append a value for that setting when local_dev.ini is generated. > Ie: > > echo "[stuff]\nkey = $VALUE\n" >> local_dev.ini
Pitch perfect summary, thanks for making your thought process clear! +1 then on in fact doing the chmod +w. Do you want to have the honours, again? :) Cheers Jan > >> Cheers >> Jan >> -- >> >> >> >> >>> >>> On Mon, Apr 30, 2012 at 6:24 AM, Jan Lehnardt <[email protected]> wrote: >>>> Sorry :) >>>> >>>> On Apr 30, 2012, at 12:23 , [email protected] wrote: >>>> >>>>> Updated Branches: >>>>> refs/heads/master bdcfcca1e -> 9acc34ed9 >>>>> >>>>> >>>>> Revert "Revert "Revert "Make sure that local_dev.ini is writable""" >>>>> >>>>> Revert. Git <3. >>>>> >>>>> This reverts commit bdcfcca1ec92f379e5376741e5ab103630573ac4. >>>>> >>>>> >>>>> Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo >>>>> Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9acc34ed >>>>> Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9acc34ed >>>>> Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9acc34ed >>>>> >>>>> Branch: refs/heads/master >>>>> Commit: 9acc34ed9ed4315f7cd6f5b8ac45e47f2c0b8cb6 >>>>> Parents: bdcfcca1 >>>>> Author: Jan Lehnardt <[email protected]> >>>>> Authored: Mon Apr 30 12:23:00 2012 +0100 >>>>> Committer: Jan Lehnardt <[email protected]> >>>>> Committed: Mon Apr 30 12:23:00 2012 +0100 >>>>> >>>>> ---------------------------------------------------------------------- >>>>> etc/couchdb/Makefile.am | 1 - >>>>> 1 files changed, 0 insertions(+), 1 deletions(-) >>>>> ---------------------------------------------------------------------- >>>>> >>>>> >>>>> http://git-wip-us.apache.org/repos/asf/couchdb/blob/9acc34ed/etc/couchdb/Makefile.am >>>>> ---------------------------------------------------------------------- >>>>> diff --git a/etc/couchdb/Makefile.am b/etc/couchdb/Makefile.am >>>>> index fe045f9..dd1054b 100644 >>>>> --- a/etc/couchdb/Makefile.am >>>>> +++ b/etc/couchdb/Makefile.am >>>>> @@ -73,7 +73,6 @@ default_dev.ini: default.ini.tpl >>>>> local_dev.ini: local.ini >>>>> if test ! -f "$@"; then \ >>>>> cp $< $@; \ >>>>> - chmod +w $@; \ >>>>> fi >>>>> >>>>> install-data-hook: >>>>> >>>> >>
